hasAnonymous

simplify if hasAnonymous


git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@867 379699f6-c40d-0410-875b-85095c16579e
stable
jochen 26 years ago
parent 3cb1493951
commit 9f7aed0192
  1. 11
      jode/jode/decompiler/CodeAnalyzer.java

@ -399,11 +399,22 @@ public class CodeAnalyzer implements Analyzer, Scope {
analyzedAnonymous = true; analyzedAnonymous = true;
} }
public void analyzeAnonymousClasses() { public void analyzeAnonymousClasses() {
boolean hasAnonymous = false;
Enumeration enum = anonAnalyzers.elements(); Enumeration enum = anonAnalyzers.elements();
while (enum.hasMoreElements()) { while (enum.hasMoreElements()) {
ClassAnalyzer classAna = (ClassAnalyzer) enum.nextElement(); ClassAnalyzer classAna = (ClassAnalyzer) enum.nextElement();
if (classAna.getName() == null)
hasAnonymous = true;
classAna.analyze(); classAna.analyze();
} }
if (hasAnonymous) {
/* We have to simplify again
* XXX This is because the ConstructorOperator should remove
* the CheckNullOperator, but where is only known after
* analyzing inner classes.
*/
methodHeader.simplify();
}
} }
public boolean hasAnalyzedAnonymous() { public boolean hasAnalyzedAnonymous() {

Loading…
Cancel
Save