Author: jm
Date: 2011-04-07 13:53:28 -0700 (Thu, 07 Apr 2011)
New Revision: 24705

Removed:
   
core3/biopax-impl/trunk/src/main/java/org/cytoscape/biopax/internal/util/StaxHack.java
   
core3/cpath2-impl/trunk/src/main/java/org/cytoscape/cpath2/internal/util/StaxHack.java
Modified:
   
core3/biopax-impl/trunk/src/main/java/org/cytoscape/biopax/util/BioPaxUtil.java
Log:
Removed StaxHack

Deleted: 
core3/biopax-impl/trunk/src/main/java/org/cytoscape/biopax/internal/util/StaxHack.java
===================================================================
--- 
core3/biopax-impl/trunk/src/main/java/org/cytoscape/biopax/internal/util/StaxHack.java
      2011-04-07 20:52:49 UTC (rev 24704)
+++ 
core3/biopax-impl/trunk/src/main/java/org/cytoscape/biopax/internal/util/StaxHack.java
      2011-04-07 20:53:28 UTC (rev 24705)
@@ -1,21 +0,0 @@
-package org.cytoscape.biopax.internal.util;
-
-/**
- * This class executes code using this bundle's ClassLoader as the current
- * thread's context ClassLoader.  This enables the service discovery mechanism
- * used by some StAX implementations to function properly under OSGi.
- */
-public abstract class StaxHack<T> {
-       public abstract T runWithHack();
-       
-       public final T run() {
-               Thread thread = Thread.currentThread();
-               ClassLoader oldClassLoader = thread.getContextClassLoader();
-               try {
-                       
thread.setContextClassLoader(getClass().getClassLoader());
-                       return runWithHack();
-               } finally {
-                       thread.setContextClassLoader(oldClassLoader);
-               }
-       }
-}
\ No newline at end of file

Modified: 
core3/biopax-impl/trunk/src/main/java/org/cytoscape/biopax/util/BioPaxUtil.java
===================================================================
--- 
core3/biopax-impl/trunk/src/main/java/org/cytoscape/biopax/util/BioPaxUtil.java 
    2011-04-07 20:52:49 UTC (rev 24704)
+++ 
core3/biopax-impl/trunk/src/main/java/org/cytoscape/biopax/util/BioPaxUtil.java 
    2011-04-07 20:53:28 UTC (rev 24705)
@@ -71,7 +71,6 @@
 import org.cytoscape.biopax.internal.ExternalLink;
 import org.cytoscape.biopax.internal.MapBioPaxToCytoscapeImpl;
 import org.cytoscape.biopax.internal.util.ParentFinder;
-import org.cytoscape.biopax.internal.util.StaxHack;
 import org.cytoscape.model.CyNetwork;
 import org.cytoscape.model.CyRow;
 import org.slf4j.Logger;
@@ -198,18 +197,12 @@
         * @throws FileNotFoundException 
         */
        public static Model read(final InputStream in) throws 
FileNotFoundException {
-               Model model = null;
                try {
-                       model = new StaxHack<Model>() {
-                               @Override
-                               public Model runWithHack() {
-                                       return new 
SimpleReader().convertFromOWL(in);
-                               }
-                       }.runWithHack();
+                       return new SimpleReader().convertFromOWL(in);
                } catch (Exception e) {
                        log.warn("Import failed: " + e);
                }
-               return model;
+               return null;
        }
 
        /**

Deleted: 
core3/cpath2-impl/trunk/src/main/java/org/cytoscape/cpath2/internal/util/StaxHack.java
===================================================================
--- 
core3/cpath2-impl/trunk/src/main/java/org/cytoscape/cpath2/internal/util/StaxHack.java
      2011-04-07 20:52:49 UTC (rev 24704)
+++ 
core3/cpath2-impl/trunk/src/main/java/org/cytoscape/cpath2/internal/util/StaxHack.java
      2011-04-07 20:53:28 UTC (rev 24705)
@@ -1,21 +0,0 @@
-package org.cytoscape.cpath2.internal.util;
-
-/**
- * This class executes code using this bundle's ClassLoader as the current
- * thread's context ClassLoader.  This enables the service discovery mechanism
- * used by some StAX implementations to function properly under OSGi.
- */
-public abstract class StaxHack<T> {
-       public abstract T runWithHack();
-       
-       public final T run() {
-               Thread thread = Thread.currentThread();
-               ClassLoader oldClassLoader = thread.getContextClassLoader();
-               try {
-                       
thread.setContextClassLoader(getClass().getClassLoader());
-                       return runWithHack();
-               } finally {
-                       thread.setContextClassLoader(oldClassLoader);
-               }
-       }
-}
\ No newline at end of file

-- 
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