Author: rwesten
Date: Mon Jul 22 11:03:23 2013
New Revision: 1505654

URL: http://svn.apache.org/r1505654
Log:
STANBOL-1073: The workaround code is now only called if the JerseyEndpoint is 
activated. This should prevent the NPE caused by the Parser not yet beeing 
injected.

Modified:
    
stanbol/trunk/commons/web/base.jersey/src/main/java/org/apache/stanbol/commons/web/base/jersey/JerseyEndpoint.java

Modified: 
stanbol/trunk/commons/web/base.jersey/src/main/java/org/apache/stanbol/commons/web/base/jersey/JerseyEndpoint.java
URL: 
http://svn.apache.org/viewvc/stanbol/trunk/commons/web/base.jersey/src/main/java/org/apache/stanbol/commons/web/base/jersey/JerseyEndpoint.java?rev=1505654&r1=1505653&r2=1505654&view=diff
==============================================================================
--- 
stanbol/trunk/commons/web/base.jersey/src/main/java/org/apache/stanbol/commons/web/base/jersey/JerseyEndpoint.java
 (original)
+++ 
stanbol/trunk/commons/web/base.jersey/src/main/java/org/apache/stanbol/commons/web/base/jersey/JerseyEndpoint.java
 Mon Jul 22 11:03:23 2013
@@ -172,16 +172,16 @@ public class JerseyEndpoint {
 
     /** Initialize the Jersey subsystem */
     private synchronized void initJersey() throws NamespaceException, 
ServletException {
-        //temporary workaround for STANBOL-1073
-        InputStream in = new ByteArrayInputStream(
-                "<http://example.org/me> <http://xmlns.com/foaf/0.1/name> 
\"Jane Doe\" .".getBytes());
-        parser.parse(in, "text/turtle");
-        //end of STANBOL-1073 work around
         if (componentContext == null) {
             log.debug(" ... can not init Jersey Endpoint - Component not yet 
activated!");
             //throw new IllegalStateException("Null ComponentContext, not 
activated?");
             return;
         }
+        //temporary workaround for STANBOL-1073
+        InputStream in = new ByteArrayInputStream(
+                "<http://example.org/me> <http://xmlns.com/foaf/0.1/name> 
\"Jane Doe\" .".getBytes());
+        parser.parse(in, "text/turtle");
+        //end of STANBOL-1073 work around
 
         shutdownJersey();
 


Reply via email to