call applyPreserveRule only when creating a new class

git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@545 379699f6-c40d-0410-875b-85095c16579e
stable
jochen 26 years ago
parent d70ef1d7d2
commit 4ffe97870b
  1. 7
      jode/jode/obfuscator/PackageIdentifier.java

@ -80,6 +80,8 @@ public class PackageIdentifier extends Identifier {
(bundle, this, subclazz, ClassInfo.forName(fullname));
loadedClasses.put(subclazz, ident);
((ClassIdentifier) ident).initClass();
if (bundle.preserveRule != -1)
ident.applyPreserveRule(bundle.preserveRule);
}
}
}
@ -88,8 +90,7 @@ public class PackageIdentifier extends Identifier {
public Identifier getIdentifier(String name) {
if (loadOnDemand) {
Identifier ident = loadClass(name);
if (ident != null && bundle.preserveRule != -1)
ident.applyPreserveRule(bundle.preserveRule);
return ident;
}
int index = name.indexOf('.');
@ -121,6 +122,8 @@ public class PackageIdentifier extends Identifier {
ClassInfo.forName(fullname));
loadedClasses.put(name, ident);
((ClassIdentifier) ident).initClass();
if (bundle.preserveRule != -1)
ident.applyPreserveRule(bundle.preserveRule);
}
}
return ident;

Loading…
Cancel
Save