Author: clopes
Date: 2011-12-05 13:42:34 -0800 (Mon, 05 Dec 2011)
New Revision: 27696

Modified:
   
core3/impl/trunk/io-impl/impl/src/main/java/org/cytoscape/io/internal/read/xgmml/XGMMLParser.java
Log:
Fixed bad parser state after exception, which could prevent other XGMML files 
to be read correctly and require an application restart.

Modified: 
core3/impl/trunk/io-impl/impl/src/main/java/org/cytoscape/io/internal/read/xgmml/XGMMLParser.java
===================================================================
--- 
core3/impl/trunk/io-impl/impl/src/main/java/org/cytoscape/io/internal/read/xgmml/XGMMLParser.java
   2011-12-05 20:55:45 UTC (rev 27695)
+++ 
core3/impl/trunk/io-impl/impl/src/main/java/org/cytoscape/io/internal/read/xgmml/XGMMLParser.java
   2011-12-05 21:42:34 UTC (rev 27696)
@@ -51,8 +51,8 @@
        private Locator locator;
        private String currentCData;
 
-       private ParseState parseState = ParseState.NONE;
-       private Stack<ParseState> stateStack = null;
+       private ParseState parseState;
+       private Stack<ParseState> stateStack;
 
        private final HandlerFactory handlerFactory;
 
@@ -66,7 +66,6 @@
        public XGMMLParser(HandlerFactory handlerFactory, ReadDataManager 
readDataManager) {
                this.handlerFactory = handlerFactory;
                this.readDataManager = readDataManager;
-               stateStack = new Stack<ParseState>();
        }
 
        /********************************************************************
@@ -79,6 +78,8 @@
         */
        @Override
        public void startDocument() throws SAXException {
+               stateStack = new Stack<ParseState>();
+               parseState = ParseState.NONE;
                handlerFactory.init();
                super.startDocument();
        }

-- 
You received this message because you are subscribed to the Google Groups 
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/cytoscape-cvs?hl=en.

Reply via email to