From b91da6368743992d616f26e7627438839bd6a9ad Mon Sep 17 00:00:00 2001 From: ProGuard Date: Mon, 5 Dec 2016 23:32:00 +0100 Subject: [PATCH] Created ProGuard version 5.3.2. --- buildscripts/maven/ant/pom.xml | 2 +- buildscripts/maven/base/pom.xml | 2 +- buildscripts/maven/gradle/pom.xml | 2 +- buildscripts/maven/gui/pom.xml | 2 +- buildscripts/maven/pom.xml | 2 +- buildscripts/maven/retrace/pom.xml | 2 +- buildscripts/maven/wtk/pom.xml | 2 +- examples/annotations/lib/annotations.jar | Bin 6123 -> 6123 bytes src/proguard/ProGuard.java | 2 +- .../editor/MethodInvocationFixer.java | 19 ++++++++++-------- src/proguard/classfile/util/ClassUtil.java | 2 +- src/proguard/gui/GUIResources.properties | 2 +- 12 files changed, 21 insertions(+), 18 deletions(-) diff --git a/buildscripts/maven/ant/pom.xml b/buildscripts/maven/ant/pom.xml index e77a19181..88229048c 100644 --- a/buildscripts/maven/ant/pom.xml +++ b/buildscripts/maven/ant/pom.xml @@ -7,7 +7,7 @@ net.sf.proguard proguard-parent - 5.3.1 + 5.3.2 ../pom.xml proguard-anttask diff --git a/buildscripts/maven/base/pom.xml b/buildscripts/maven/base/pom.xml index be16f625a..8427db890 100644 --- a/buildscripts/maven/base/pom.xml +++ b/buildscripts/maven/base/pom.xml @@ -7,7 +7,7 @@ net.sf.proguard proguard-parent - 5.3.1 + 5.3.2 ../pom.xml proguard-base diff --git a/buildscripts/maven/gradle/pom.xml b/buildscripts/maven/gradle/pom.xml index 489ddcc05..e1c1894c8 100644 --- a/buildscripts/maven/gradle/pom.xml +++ b/buildscripts/maven/gradle/pom.xml @@ -7,7 +7,7 @@ net.sf.proguard proguard-parent - 5.3.1 + 5.3.2 ../pom.xml proguard-gradle diff --git a/buildscripts/maven/gui/pom.xml b/buildscripts/maven/gui/pom.xml index 07beee9a6..9d16e0c15 100644 --- a/buildscripts/maven/gui/pom.xml +++ b/buildscripts/maven/gui/pom.xml @@ -7,7 +7,7 @@ net.sf.proguard proguard-parent - 5.3.1 + 5.3.2 ../pom.xml proguard-gui diff --git a/buildscripts/maven/pom.xml b/buildscripts/maven/pom.xml index 63349baea..08e09b275 100644 --- a/buildscripts/maven/pom.xml +++ b/buildscripts/maven/pom.xml @@ -7,7 +7,7 @@ net.sf.proguard proguard-parent - 5.3.1 + 5.3.2 pom [${project.groupId}] ${project.artifactId} ProGuard is a free Java class file shrinker, optimizer, obfuscator, and preverifier. diff --git a/buildscripts/maven/retrace/pom.xml b/buildscripts/maven/retrace/pom.xml index e983d75f1..ab08fac4b 100644 --- a/buildscripts/maven/retrace/pom.xml +++ b/buildscripts/maven/retrace/pom.xml @@ -7,7 +7,7 @@ net.sf.proguard proguard-parent - 5.3.1 + 5.3.2 ../pom.xml proguard-retrace diff --git a/buildscripts/maven/wtk/pom.xml b/buildscripts/maven/wtk/pom.xml index 1dde705d3..52c2bd865 100644 --- a/buildscripts/maven/wtk/pom.xml +++ b/buildscripts/maven/wtk/pom.xml @@ -7,7 +7,7 @@ net.sf.proguard proguard-parent - 5.3.1 + 5.3.2 ../pom.xml proguard-wtk-plugin diff --git a/examples/annotations/lib/annotations.jar b/examples/annotations/lib/annotations.jar index 53bb8998e829d691f69dd7d90bc109d49600b2d8..3e114bb9d614282189b45f3a7847c973491ee878 100644 GIT binary patch delta 314 zcmaE@|5~3nz?+#xgn@&DgW>9q)``4U%pl6kk5OvkOgYKRHbxU&7#J8_ff%9i%8u5J z7yKCofwU)30uJOR2MSAX_GU6;WCluYZefmuFdnc3Ll|akK@dhaJ5=N$M=C_blPej* zSkD~`Ves?DK^O&mP>~D#B@hvJ!8}HgJ16fDvfu#Ho*;Kl{vl)qvUjqna0r<05%vVr zH-sa>w24S4L|h~sOg|He0Mm}5zF>NyXgrwyEE)}_1I1#&^hU8bFfAmW0j6uk^8g$% BccK6Q delta 314 zcmaE@|5~3nz?+#xgn@&DgJI#e@QJ)u%pl6kk5OXcOgYI(>ihn?FfcH<0x?42f^Fd& zFZeSG0%=d61RTgs4iuK&?9F7x$PAR)+`=3QVLV_7hA_<7f*_1;cBsfhj#P+AeZllZ(ReWZSu`3<2a3gl>5XD>U|L8#15DS7=K%ow C_iZo$ diff --git a/src/proguard/ProGuard.java b/src/proguard/ProGuard.java index 0ed0075c4..1422eb0f2 100644 --- a/src/proguard/ProGuard.java +++ b/src/proguard/ProGuard.java @@ -39,7 +39,7 @@ */ public class ProGuard { - public static final String VERSION = "ProGuard, version 5.3.1"; + public static final String VERSION = "ProGuard, version 5.3.2"; private final Configuration configuration; private ClassPool programClassPool = new ClassPool(); diff --git a/src/proguard/classfile/editor/MethodInvocationFixer.java b/src/proguard/classfile/editor/MethodInvocationFixer.java index 6316cdcd7..9aa0fe347 100644 --- a/src/proguard/classfile/editor/MethodInvocationFixer.java +++ b/src/proguard/classfile/editor/MethodInvocationFixer.java @@ -138,10 +138,15 @@ else if ((referencedClass.getAccessFlags() & ClassConstants.ACC_INTERFACE) != 0) int invokeinterfaceConstant = (ClassUtil.internalMethodParameterSize(referencedMethod.getDescriptor(referencedMethodClass), false)) << 8; + if (opcode == InstructionConstants.OP_INVOKESPECIAL && + (referencedMethod.getAccessFlags() & ClassConstants.ACC_ABSTRACT) == 0) + { + // Explicit calls to default interface methods *must* be preserved. + } // But is it not an interface invocation, or is the parameter // size incorrect? - if (opcode != InstructionConstants.OP_INVOKEINTERFACE || - constantInstruction.constant != invokeinterfaceConstant) + else if (opcode != InstructionConstants.OP_INVOKEINTERFACE || + constantInstruction.constant != invokeinterfaceConstant) { // Fix the parameter size of the interface invocation. Instruction replacementInstruction = @@ -165,12 +170,10 @@ else if ((referencedClass.getAccessFlags() & ClassConstants.ACC_INTERFACE) != 0) // But is it not a virtual invocation? if (opcode != InstructionConstants.OP_INVOKEVIRTUAL && (// Replace any non-invokespecial. - opcode != InstructionConstants.OP_INVOKESPECIAL || - // For invokespecial, replace invocations from static - // methods, invocations from the same class, and - // invocations to non-superclasses. - (method.getAccessFlags() & ClassConstants.ACC_STATIC) != 0 || - clazz.equals(referencedClass) || + opcode != InstructionConstants.OP_INVOKESPECIAL || + // For invokespecial, replace invocations from the same + // class, and invocations to non-superclasses. + clazz.equals(referencedClass) || !clazz.extends_(referencedClass))) { // Replace the invocation by an invokevirtual instruction. diff --git a/src/proguard/classfile/util/ClassUtil.java b/src/proguard/classfile/util/ClassUtil.java index 8115bc7f6..c7fb75233 100644 --- a/src/proguard/classfile/util/ClassUtil.java +++ b/src/proguard/classfile/util/ClassUtil.java @@ -439,7 +439,7 @@ public static String internalClassNameFromType(String internalClassType) * Returns whether the given method name refers to a class initializer or * an instance initializer. * @param internalMethodName the internal method name, - * e.g. "<clinit>". + * e.g. "<clinit>". * @return whether the method name refers to an initializer, * e.g. true. */ diff --git a/src/proguard/gui/GUIResources.properties b/src/proguard/gui/GUIResources.properties index 637f11995..5bea860ad 100644 --- a/src/proguard/gui/GUIResources.properties +++ b/src/proguard/gui/GUIResources.properties @@ -25,7 +25,7 @@ preverification = Preverification # # Panel titles. # -welcome = Welcome to ProGuard, version 5.3.1 +welcome = Welcome to ProGuard, version 5.3.2 options = Options keepAdditional = Keep additional classes and class members keepNamesAdditional = Keep additional class names and class member names