From 63c6e597087eb8faaa2c1309f5009214be4050c8 Mon Sep 17 00:00:00 2001 From: aclement Date: Tue, 3 Mar 2009 19:12:28 +0000 Subject: [PATCH] fb --- asm/src/org/aspectj/asm/AsmManager.java | 16 ++++++++++------ 1 file 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(); -- 2.39.5