Skip to content

Commit

Permalink
Fix TypedReferenceValue#generalize not setting mayBeExtension to …
Browse files Browse the repository at this point in the history
…true when generalizing to common parent type

Summary: Enabling by default after confirming that DexGuard pipelines pass and customer issues are the result of this issue (https://phabricator.guardsquare.com/T23501#504326).
  • Loading branch information
mrjameshamilton authored and jelle-dc committed Nov 10, 2023
1 parent c192b74 commit 9f41510
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
3 changes: 0 additions & 3 deletions base/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ jar {
def javaVersionsForTest = 9..19

test {
systemProperty "proguard.pe.newextensiongeneralize", "true"
useJUnitPlatform()
}

Expand All @@ -62,8 +61,6 @@ task testAllJavaVersions() { testAllTask ->

task("testJava$version", type: Test) {

systemProperty "proguard.pe.newextensiongeneralize", "true"

// The version of bytebuddy used by mockk only supports Java 20 experimentally so far
if (version == 20) systemProperty 'net.bytebuddy.experimental', true

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ public class TypedReferenceValue extends ReferenceValue
{

private static boolean ALLOW_INCOMPLETE_CLASS_HIERARCHY = System.getProperty("allow.incomplete.class.hierarchy") != null;
private static final boolean ENABLE_NEW_EXTENSION_GENERALIZE = System.getProperty("proguard.pe.newextensiongeneralize") != null;
private static final boolean DEBUG = false;

protected final String type;
Expand Down Expand Up @@ -339,7 +338,7 @@ public ReferenceValue generalize(TypedReferenceValue other)
ClassUtil.internalArrayTypeFromClassName(commonClass.getName(),
commonDimensionCount),
commonClass,
ENABLE_NEW_EXTENSION_GENERALIZE || mayBeExtension,
true,
mayBeNull);
}
catch (IncompleteClassHierarchyException e)
Expand Down
4 changes: 4 additions & 0 deletions docs/md/releasenotes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## Version 9.1.1

### Bugfixes

- Enable fix previously behind system property: fix `TypedReferenceValue.generalize()` not setting `mayBeExtension` to true when generalizing to common parent type.

### Improved

- Enable new `PartialEvaluator` error message format by default.
Expand Down

0 comments on commit 9f41510

Please sign in to comment.