Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixes for issues #11,12,13 contributed by tstockwell.

	modified:   src/kilim/mirrors/CachedClassMirrors.java
	modified:   src/kilim/mirrors/Detector.java
  • Loading branch information...
commit 125d6f88cd37a3a396fd36d3a1b18e2e4a70c0f7 1 parent 42c65b3
@sriram-srinivasan sriram-srinivasan authored
View
3  src/kilim/mirrors/CachedClassMirrors.java
@@ -105,7 +105,8 @@ public int hashCode() {
@Override
public MethodMirror[] getDeclaredMethods() {
- return declaredMethods;
+ return (declaredMethods == null) ?
+ new MethodMirror[0] : declaredMethods;
}
@Override
View
12 src/kilim/mirrors/Detector.java
@@ -118,10 +118,14 @@ private MethodMirror findPausableMethod(String className, String methodName, Str
if (cl == null) return null;
for (MethodMirror om : cl.getDeclaredMethods()) {
- if (om.getName().equals(methodName) && om.getMethodDescriptor().equals(desc)) {
- if (om.isBridge())
- continue;
- return om;
+ if (om.getName().equals(methodName)) {
+ // when comparing descriptors only compare arguments, not return types
+ String omDesc= om.getMethodDescriptor();
+
+ if (omDesc.substring(0,omDesc.indexOf(")")).equals(desc.substring(0,desc.indexOf(")")))) {
+ if (om.isBridge()) continue;
+ return om;
+ }
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.