bug fix: setAlias even if representative is stripped

git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@339 379699f6-c40d-0410-875b-85095c16579e
stable
jochen 26 years ago
parent 8a4b992d2a
commit 9a58e16d4c
  1. 14
      jode/jode/obfuscator/Identifier.java

@ -33,6 +33,7 @@ public abstract class Identifier {
private boolean preserved = false;
private String alias = null;
private boolean wasAliased = false;
public Identifier(String alias) {
this.alias = alias;
@ -156,11 +157,14 @@ public abstract class Identifier {
if (isPreserved()) {
if (Obfuscator.isDebugging)
Obfuscator.err.println(toString() + " is preserved");
} else if (isRepresentative()
&& renameRule != Obfuscator.RENAME_NONE) {
} else if (renameRule != Obfuscator.RENAME_NONE) {
Identifier rep = getRepresentative();
if (rep.wasAliased)
return;
rep.wasAliased = true;
if (renameRule == Obfuscator.RENAME_UNIQUE)
setAlias("xxx" + serialnr++);
rep.setAlias("xxx" + serialnr++);
else {
StringBuffer newAlias = new StringBuffer();
next_alias:
@ -194,7 +198,7 @@ public abstract class Identifier {
newAlias.append(renameRule == Obfuscator.RENAME_WEAK
&& newAlias.length() == 0 ? "A": "0");
} while (false);
Identifier ptr = this;
Identifier ptr = rep;
while (ptr != null) {
if (ptr.conflicting(newAlias.toString(),
renameRule
@ -202,7 +206,7 @@ public abstract class Identifier {
continue next_alias;
ptr = ptr.right;
}
alias = newAlias.toString();
setAlias(newAlias.toString());
return;
}
}

Loading…
Cancel
Save