From 4ffe97870b12cc19ca20fc3053b4c72487b2a6de Mon Sep 17 00:00:00 2001 From: jochen Date: Fri, 9 Apr 1999 08:11:14 +0000 Subject: [PATCH] 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 --- jode/jode/obfuscator/PackageIdentifier.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/jode/jode/obfuscator/PackageIdentifier.java b/jode/jode/obfuscator/PackageIdentifier.java index 191f34b..c51ea3c 100644 --- a/jode/jode/obfuscator/PackageIdentifier.java +++ b/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;