diff options
author | aclement <aclement> | 2009-03-03 19:12:28 +0000 |
---|---|---|
committer | aclement <aclement> | 2009-03-03 19:12:28 +0000 |
commit | 63c6e597087eb8faaa2c1309f5009214be4050c8 (patch) | |
tree | be639e2bddfedac28286afaaad7c344a65338108 /asm/src | |
parent | 79400c1dd4ff9a6dd07a8befbe7b3edbecd45c9e (diff) | |
download | aspectj-63c6e597087eb8faaa2c1309f5009214be4050c8.tar.gz aspectj-63c6e597087eb8faaa2c1309f5009214be4050c8.zip |
fb
Diffstat (limited to 'asm/src')
-rw-r--r-- | asm/src/org/aspectj/asm/AsmManager.java | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/asm/src/org/aspectj/asm/AsmManager.java b/asm/src/org/aspectj/asm/AsmManager.java index 1ddfd6c5e..5152908f2 100644 --- a/asm/src/org/aspectj/asm/AsmManager.java +++ b/asm/src/org/aspectj/asm/AsmManager.java @@ -222,7 +222,7 @@ public class AsmManager implements IStructureModel { fos.flush(); fos.close(); s.close(); - } catch (Exception e) { + } catch (IOException e) { // System.err.println("AsmManager: Unable to write structure model: " // +configFilePath+" because of:"); // e.printStackTrace(); @@ -389,8 +389,9 @@ public class AsmManager implements IStructureModel { dumpModel = dModel; dumpRelationships = dRels; dumpDeltaProcessing = dDeltaProcessing; - if (deletefile) + if (deletefile) { new File(filename).delete(); + } dumpFilename = filename; } @@ -1032,7 +1033,9 @@ public class AsmManager implements IStructureModel { * children and remove the node we want to delete from the list of children. */ private void removeSingleNode(IProgramElement progElem) { - verifyAssumption(progElem != null); + if (progElem == null) { + throw new IllegalStateException("AsmManager.removeNode(): programElement unexpectedly null"); + } boolean deleteOK = false; IProgramElement parent = progElem.getParent(); List kids = parent.getChildren(); @@ -1061,8 +1064,9 @@ public class AsmManager implements IStructureModel { try { // flightrecorder.append("In removeNode, about to chuck away: "+ // progElem+"\n"); - - verifyAssumption(progElem != null); + if (progElem == null) { + throw new IllegalStateException("AsmManager.removeNode(): programElement unexpectedly null"); + } // boolean deleteOK = false; IProgramElement parent = progElem.getParent(); // flightrecorder.append("Parent of it is "+parent+"\n"); @@ -1120,7 +1124,7 @@ public class AsmManager implements IStructureModel { /** * A ModelInfo object captures basic information about the structure model. It is used for testing and producing debug info. */ - public class ModelInfo { + public static class ModelInfo { private final Hashtable nodeTypeCount = new Hashtable(); private final Properties extraProperties = new Properties(); |