Commit cc122450 authored by Guillermo Varela's avatar Guillermo Varela
Browse files

Allows classes extending ClassReader to decide if visit MethodParameters

parent 9a7de6ef
Pipeline #9484 passed with stage
in 7 minutes and 29 seconds
......@@ -1346,7 +1346,7 @@ public class ClassReader {
}
// Visit the MethodParameters attribute.
if (methodParametersOffset != 0 && (context.parsingOptions & SKIP_DEBUG) == 0) {
if (shouldVisitMethodParameters(methodParametersOffset, context)) {
int parametersCount = readByte(methodParametersOffset);
int currentParameterOffset = methodParametersOffset + 1;
while (parametersCount-- > 0) {
......@@ -1486,6 +1486,11 @@ public class ClassReader {
return currentOffset;
}
protected boolean shouldVisitMethodParameters(
final int methodParametersOffset, final Context context) {
return methodParametersOffset != 0 && (context.parsingOptions & SKIP_DEBUG) == 0;
}
// ----------------------------------------------------------------------------------------------
// Methods to parse a Code attribute
// ----------------------------------------------------------------------------------------------
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment