incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1211527 - /sling/trunk/bundles/scripting/jsp/src/main/java/org/apache/sling/scripting/jsp/JspScriptEngineFactory.java
Date Wed, 07 Dec 2011 16:46:18 GMT
Author: cziegeler
Date: Wed Dec  7 16:46:17 2011
New Revision: 1211527

URL: http://svn.apache.org/viewvc?rev=1211527&view=rev
Log:
Code optimization only - no functional changes.

Modified:
    sling/trunk/bundles/scripting/jsp/src/main/java/org/apache/sling/scripting/jsp/JspScriptEngineFactory.java

Modified: sling/trunk/bundles/scripting/jsp/src/main/java/org/apache/sling/scripting/jsp/JspScriptEngineFactory.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/scripting/jsp/src/main/java/org/apache/sling/scripting/jsp/JspScriptEngineFactory.java?rev=1211527&r1=1211526&r2=1211527&view=diff
==============================================================================
--- sling/trunk/bundles/scripting/jsp/src/main/java/org/apache/sling/scripting/jsp/JspScriptEngineFactory.java
(original)
+++ sling/trunk/bundles/scripting/jsp/src/main/java/org/apache/sling/scripting/jsp/JspScriptEngineFactory.java
Wed Dec  7 16:46:17 2011
@@ -515,12 +515,9 @@ public class JspScriptEngineFactory
      * @see org.osgi.service.event.EventHandler#handleEvent(org.osgi.service.event.Event)
      */
     public void handleEvent(Event event) {
-        if ( SlingConstants.TOPIC_RESOURCE_CHANGED.equals(event.getTopic()) ) {
-            this.jspRuntimeContext.handleModification((String)event.getProperty(SlingConstants.PROPERTY_PATH));
-        } else if ( SlingConstants.TOPIC_RESOURCE_REMOVED.equals(event.getTopic()) ) {
-            this.jspRuntimeContext.handleModification((String)event.getProperty(SlingConstants.PROPERTY_PATH));
-        } else {
-            this.jspRuntimeContext.handleModification((String)event.getProperty(SlingConstants.PROPERTY_PATH));
+        final String path = (String)event.getProperty(SlingConstants.PROPERTY_PATH);
+        if ( path != null ) {
+            this.jspRuntimeContext.handleModification(path);
         }
     }
 }



Mime
View raw message