diff --git a/sootup.apk.frontend/src/main/java/sootup/apk/frontend/dexpler/DexMethod.java b/sootup.apk.frontend/src/main/java/sootup/apk/frontend/dexpler/DexMethod.java index 83d5edbb1d6..2143aac8f71 100644 --- a/sootup.apk.frontend/src/main/java/sootup/apk/frontend/dexpler/DexMethod.java +++ b/sootup.apk.frontend/src/main/java/sootup/apk/frontend/dexpler/DexMethod.java @@ -53,14 +53,10 @@ public JavaSootMethod makeSootMethod( final Method method, List bodyInterceptors, @Nonnull View view) { int modifierFlags = method.getAccessFlags(); if (Modifier.isAbstract(modifierFlags) || Modifier.isNative(modifierFlags)) { - String className = declaringclassType.getClassName(); - if (DexUtil.isByteCodeClassName(className)) { - className = DexUtil.dottedClassName(className); - } MethodSignature methodSignature = new MethodSignature( declaringclassType, - className, + method.getName(), Collections.emptyList(), DexUtil.toSootType(method.getReturnType(), 0)); DexMethodSource dexMethodSource = diff --git a/sootup.apk.frontend/src/main/java/sootup/apk/frontend/main/DexBody.java b/sootup.apk.frontend/src/main/java/sootup/apk/frontend/main/DexBody.java index d9f1a3a920c..2bc1f8e5eca 100644 --- a/sootup.apk.frontend/src/main/java/sootup/apk/frontend/main/DexBody.java +++ b/sootup.apk.frontend/src/main/java/sootup/apk/frontend/main/DexBody.java @@ -330,13 +330,12 @@ public JavaSootMethod makeSootMethod( // If the Nop Statements are not removed, graph.initializeWith throws a runtime exception // It is only for the case where there is a JNop Statement after the return statement. Crazy // android code :( - String className = classType.getClassName(); - if (DexUtil.isByteCodeClassName(className)) { - className = DexUtil.dottedClassName(className); - } MethodSignature methodSignature = new MethodSignature( - classType, className, parameterTypes, DexUtil.toSootType(method.getReturnType(), 0)); + classType, + method.getName(), + parameterTypes, + DexUtil.toSootType(method.getReturnType(), 0)); while (stmtList.get(stmtList.size() - 1) instanceof JNopStmt) { stmtList.remove(stmtList.size() - 1); } diff --git a/sootup.apk.frontend/src/test/java/sootup/apk/frontend/ApkToDexTest.java b/sootup.apk.frontend/src/test/java/sootup/apk/frontend/ApkToDexTest.java index 3ae04a2b6e8..5f9e6ae37a7 100644 --- a/sootup.apk.frontend/src/test/java/sootup/apk/frontend/ApkToDexTest.java +++ b/sootup.apk.frontend/src/test/java/sootup/apk/frontend/ApkToDexTest.java @@ -82,11 +82,11 @@ public void loadOneClass() { Paths.get(apk_path), "", DexBodyInterceptors.Default.bodyInterceptors()); JavaView view = new JavaView(sootClassApkAnalysisInputLocation); String className = "android.support.v4.app.FragmentState$1"; - String methodName = "FragmentState$1"; + String methodName = ""; ClassType classType = view.getIdentifierFactory().getClassType(className); assertTrue(view.getClass(classType).isPresent()); // Retrieve class - SootClass sootClass = (SootClass) view.getClass(classType).get(); + SootClass sootClass = view.getClass(classType).get(); // write MethodSignature MethodSignature methodSignature = new MethodSignature(classType, methodName, Collections.emptyList(), VoidType.getInstance());