Skip to content

Method returns wrong boolean value #2

Description

@lzccc

getSetGuardCondition(String ownerName, String methodName) {
if(entryMethod != null && entryClass != null) {
return methodName.equals(entryMethod) && entryClass.equals(ownerName);
} else if(entryMethod != null) {
return methodName.equals(entryMethod);
}
boolean regular = methodName.equals("main([Ljava/lang/String;)V")
|| methodName.equals("realMain([Ljava/lang/String;)V");
regular = (methodName.equals("run()V") &&
ownerName.equals("net/percederberg/tetris/Game$GameThread"));
return regular;
}
line 569 will overwrite whatever value that set by line 567, this problem will cause endProfiling() in profiler class never be invoked. Should we change line 569 to:

regular =  regular || ((methodName.equals("run()V") &&
        ownerName.equals("net/percederberg/tetris/Game$GameThread")));

?

Metadata

Metadata

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions