Skip to content

Commit 7258466

Browse files
committed
Lazy generator class names from the LVTRenamer.
Stops exec being spammed with class ids when we don't care about them as we're using JVN in Fernflower.
1 parent 6f6ed87 commit 7258466

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/main/java/de/oceanlabs/mcp/mcinjector/MCInjectorImpl.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -370,12 +370,13 @@ public void saveMap(String mapFile) throws IOException
370370
}
371371
}
372372

373-
public String getMarker(String cls)
373+
public String getMarker(String cls){ return getMarker(cls, true); }
374+
public String getMarker(String cls, boolean allowGen)
374375
{
375376
String marker = this.mappings.getProperty(cls);
376377
if (marker == null)
377378
{
378-
if (!this.generate) return null;
379+
if (!this.generate || !allowGen) return null;
379380
marker = String.format("CL_%08d", this.classIDIndex++);
380381
}
381382
outMappings.put(cls, marker);

src/main/java/de/oceanlabs/mcp/mcinjector/adaptors/LVTRenamer.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public void visitEnd() {
4848
String suffix = null;
4949
if (isInMethod)
5050
{
51-
String tmp = mci.getMarker(className);
51+
String tmp = mci.getMarker(className, false);
5252
if (tmp != null) {
5353
tmp = tmp.replace("CL_", "");
5454
while (tmp.charAt(0) == '0')

0 commit comments

Comments
 (0)