8035763: Error parsing binary type annotations data in javac
Fix accidental reversal of read order from a previous change Reviewed-by: jjg
This commit is contained in:
parent
3b2a17f08f
commit
10fb266571
@ -1540,35 +1540,41 @@ public class ClassReader {
|
|||||||
// local variable
|
// local variable
|
||||||
case LOCAL_VARIABLE: {
|
case LOCAL_VARIABLE: {
|
||||||
final int table_length = nextChar();
|
final int table_length = nextChar();
|
||||||
final TypeAnnotationPosition position =
|
final int[] newLvarOffset = new int[table_length];
|
||||||
TypeAnnotationPosition.localVariable(readTypePath());
|
final int[] newLvarLength = new int[table_length];
|
||||||
|
final int[] newLvarIndex = new int[table_length];
|
||||||
position.lvarOffset = new int[table_length];
|
|
||||||
position.lvarLength = new int[table_length];
|
|
||||||
position.lvarIndex = new int[table_length];
|
|
||||||
|
|
||||||
for (int i = 0; i < table_length; ++i) {
|
for (int i = 0; i < table_length; ++i) {
|
||||||
position.lvarOffset[i] = nextChar();
|
newLvarOffset[i] = nextChar();
|
||||||
position.lvarLength[i] = nextChar();
|
newLvarLength[i] = nextChar();
|
||||||
position.lvarIndex[i] = nextChar();
|
newLvarIndex[i] = nextChar();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final TypeAnnotationPosition position =
|
||||||
|
TypeAnnotationPosition.localVariable(readTypePath());
|
||||||
|
position.lvarOffset = newLvarOffset;
|
||||||
|
position.lvarLength = newLvarLength;
|
||||||
|
position.lvarIndex = newLvarIndex;
|
||||||
return position;
|
return position;
|
||||||
}
|
}
|
||||||
// resource variable
|
// resource variable
|
||||||
case RESOURCE_VARIABLE: {
|
case RESOURCE_VARIABLE: {
|
||||||
final int table_length = nextChar();
|
final int table_length = nextChar();
|
||||||
final TypeAnnotationPosition position =
|
final int[] newLvarOffset = new int[table_length];
|
||||||
TypeAnnotationPosition.resourceVariable(readTypePath());
|
final int[] newLvarLength = new int[table_length];
|
||||||
|
final int[] newLvarIndex = new int[table_length];
|
||||||
position.lvarOffset = new int[table_length];
|
|
||||||
position.lvarLength = new int[table_length];
|
|
||||||
position.lvarIndex = new int[table_length];
|
|
||||||
|
|
||||||
for (int i = 0; i < table_length; ++i) {
|
for (int i = 0; i < table_length; ++i) {
|
||||||
position.lvarOffset[i] = nextChar();
|
newLvarOffset[i] = nextChar();
|
||||||
position.lvarLength[i] = nextChar();
|
newLvarLength[i] = nextChar();
|
||||||
position.lvarIndex[i] = nextChar();
|
newLvarIndex[i] = nextChar();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final TypeAnnotationPosition position =
|
||||||
|
TypeAnnotationPosition.resourceVariable(readTypePath());
|
||||||
|
position.lvarOffset = newLvarOffset;
|
||||||
|
position.lvarLength = newLvarLength;
|
||||||
|
position.lvarIndex = newLvarIndex;
|
||||||
return position;
|
return position;
|
||||||
}
|
}
|
||||||
// exception parameter
|
// exception parameter
|
||||||
|
Loading…
Reference in New Issue
Block a user