forked from architectury/Mercury
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Attempt to fix anonymous class classpath lookup
- Loading branch information
Showing
6 changed files
with
68 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
group = dev.architectury | ||
group = org.sinytra | ||
og_group = org.cadixdev | ||
name = Mercury | ||
base_version = 0.1.4 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
patches/org/eclipse/jdt/internal/core/util/BindingKeyResolver.java.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- a/org/eclipse/jdt/internal/core/util/BindingKeyResolver.java | ||
+++ b/org/eclipse/jdt/internal/core/util/BindingKeyResolver.java | ||
@@ -57,6 +57,8 @@ | ||
import org.eclipse.jdt.internal.compiler.lookup.VariableBinding; | ||
import org.eclipse.jdt.internal.compiler.lookup.WildcardBinding; | ||
import org.eclipse.jdt.internal.compiler.util.HashtableOfObject; | ||
+import org.eclipse.jdt.internal.core.util.BindingKeyParser; | ||
+import org.eclipse.jdt.internal.core.util.Util; | ||
|
||
@SuppressWarnings({"rawtypes", "unchecked"}) | ||
public class BindingKeyResolver extends BindingKeyParser { | ||
@@ -354,7 +356,12 @@ | ||
@Override | ||
public void consumeLocalType(char[] uniqueKey) { | ||
if (this.parsedUnit == null) { | ||
- this.typeBinding = null; | ||
+ char[][] subtypeName = new char[this.compoundName.length][]; | ||
+ System.arraycopy(this.compoundName, 0, subtypeName, 0, this.compoundName.length); | ||
+ String[] subTypeParts = String.copyValueOf(uniqueKey).split("/"); | ||
+ String subTypeClassName = subTypeParts[subTypeParts.length - 1]; | ||
+ subtypeName[subtypeName.length - 1] = subTypeClassName.substring(0, subTypeClassName.length() - 1).toCharArray(); | ||
+ this.typeBinding = this.environment.getType(subtypeName); | ||
return; | ||
} | ||
for (LocalTypeBinding localTypeBinding : this.parsedUnit.localTypes.values()) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters