diff --git a/jadx-core/src/main/java/jadx/core/dex/nodes/ClassNode.java b/jadx-core/src/main/java/jadx/core/dex/nodes/ClassNode.java index 13d13c43ba4..d44373ae151 100644 --- a/jadx-core/src/main/java/jadx/core/dex/nodes/ClassNode.java +++ b/jadx-core/src/main/java/jadx/core/dex/nodes/ClassNode.java @@ -176,8 +176,7 @@ public void updateGenericClsData(List generics, ArgType superClass, Lis private static void processSpecialClasses(ClassNode cls) { AccessInfo flags = cls.getAccessFlags(); - if (flags.isSynthetic() && flags.isInterface() && flags.isAbstract() - && cls.getName().equals("package-info")) { + if (flags.isInterface() && cls.getName().equals("package-info")) { cls.add(AFlag.PACKAGE_INFO); cls.add(AFlag.DONT_RENAME); } diff --git a/jadx-core/src/test/java/jadx/tests/integration/special/TestPackageInfoSupport.java b/jadx-core/src/test/java/jadx/tests/integration/special/TestPackageInfoSupport.java index 4b181ebc6a0..cfe5a4b4f56 100644 --- a/jadx-core/src/test/java/jadx/tests/integration/special/TestPackageInfoSupport.java +++ b/jadx-core/src/test/java/jadx/tests/integration/special/TestPackageInfoSupport.java @@ -28,5 +28,7 @@ public void test() { "package special.pkg2;", "", "import org.jetbrains.annotations.ApiStatus;"); + assertThat(searchCls(classes, "special.pkg3.package-info")) + .code().isEqualTo("\npackage special.pkg3;\n"); } } diff --git a/jadx-core/src/test/smali/special/TestPackageInfoSupport/pkg3.smali b/jadx-core/src/test/smali/special/TestPackageInfoSupport/pkg3.smali new file mode 100644 index 00000000000..b801da50791 --- /dev/null +++ b/jadx-core/src/test/smali/special/TestPackageInfoSupport/pkg3.smali @@ -0,0 +1,2 @@ +.class interface Lspecial/pkg3/package-info; +.super Ljava/lang/Object;