mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Do not throw exception when unable to get constant pool #1097
Bug: https://issuetracker.google.com/issues/123863053 It is becuase ART(Android) JVM doesn't support the 'getConstantPool' capability.
This commit is contained in:
@@ -292,6 +292,11 @@ public class MethodBytecodeUtil {
|
||||
return locations;
|
||||
}
|
||||
|
||||
// Android Studio: 'getConstantPool' is not supported on android. (b/123863053)
|
||||
if (!method.declaringType().virtualMachine().canGetConstantPool()) {
|
||||
return locations;
|
||||
}
|
||||
|
||||
int lineNumber = locations.get(0).lineNumber();
|
||||
List<Boolean> mask = new ArrayList<>(locationsSize);
|
||||
visit(method, new MethodVisitor(Opcodes.API_VERSION) {
|
||||
|
||||
Reference in New Issue
Block a user