You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by cz...@apache.org on 2009/07/02 07:46:39 UTC

svn commit: r790463 - in /sling/trunk/bundles/scripting/jsp/src/main: java/org/apache/sling/scripting/jsp/JspScriptEngineFactory.java resources/OSGI-INF/metatype/metatype.properties

Author: cziegeler
Date: Thu Jul  2 05:46:39 2009
New Revision: 790463

URL: http://svn.apache.org/viewvc?rev=790463&view=rev
Log:
SLING-1027 : Turn off development mode by default.

Modified:
    sling/trunk/bundles/scripting/jsp/src/main/java/org/apache/sling/scripting/jsp/JspScriptEngineFactory.java
    sling/trunk/bundles/scripting/jsp/src/main/resources/OSGI-INF/metatype/metatype.properties

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=790463&r1=790462&r2=790463&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 Thu Jul  2 05:46:39 2009
@@ -56,7 +56,7 @@
  * @scr.property name="service.vendor" value="The Apache Software Foundation" *
  * @scr.property name="jasper.checkInterval" value="300" type="Integer"
  * @scr.property name="jasper.classdebuginfo" value="true" type="Boolean"
- * @scr.property name="jasper.development" value="true" type="Boolean"
+ * @scr.property name="jasper.development" value="false" type="Boolean"
  * @scr.property name="jasper.enablePooling" value="true" type="Boolean"
  * @scr.property name="jasper.ieClassId"
  *               value="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
@@ -129,6 +129,7 @@
      * @throws SlingServletException
      * @throws SlingIOException
      */
+    @SuppressWarnings("unchecked")
     private void callJsp(Bindings bindings, SlingScriptHelper scriptHelper) {
 
         ioProvider.setRequestResourceResolver(scriptHelper.getRequest().getResourceResolver());
@@ -341,7 +342,7 @@
             Bindings props = context.getBindings(ScriptContext.ENGINE_SCOPE);
             SlingScriptHelper scriptHelper = (SlingScriptHelper) props.get(SLING);
             if (scriptHelper != null) {
-                
+
                 // set the current class loader as the thread context loader for
                 // the compilation and execution of the JSP script
                 ClassLoader old = Thread.currentThread().getContextClassLoader();
@@ -360,21 +361,20 @@
                         // but only a Exception, so we have to wrap it with a dummy Exception in Throwable cases
                         if (rootCause instanceof Exception) {
                             throw new BetterScriptException(rootCause.toString(), (Exception) rootCause);
-                        } else {
-                            throw new BetterScriptException(rootCause.toString(),
-                                    new Exception("Wrapping Throwable: " + rootCause.toString(), rootCause));
                         }
+                        throw new BetterScriptException(rootCause.toString(),
+                                new Exception("Wrapping Throwable: " + rootCause.toString(), rootCause));
                     }
-                    
+
                     // fallback to standard behaviour
                     throw new BetterScriptException(e.getMessage(), e);
-                    
+
                 } catch (Exception e) {
-                    
+
                     throw new BetterScriptException(e.getMessage(), e);
-                    
+
                 } finally {
-                    
+
                     // make sure the context loader is reset after setting up the
                     // JSP runtime context
                     Thread.currentThread().setContextClassLoader(old);

Modified: sling/trunk/bundles/scripting/jsp/src/main/resources/OSGI-INF/metatype/metatype.properties
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/scripting/jsp/src/main/resources/OSGI-INF/metatype/metatype.properties?rev=790463&r1=790462&r2=790463&view=diff
==============================================================================
--- sling/trunk/bundles/scripting/jsp/src/main/resources/OSGI-INF/metatype/metatype.properties (original)
+++ sling/trunk/bundles/scripting/jsp/src/main/resources/OSGI-INF/metatype/metatype.properties Thu Jul  2 05:46:39 2009
@@ -42,7 +42,7 @@
  
 jasper.development.name = Development Mode
 jasper.development.description = Is Jasper used in development mode (will check \
- for JSP modification on every access)? true or false, default true.
+ for JSP modification on every access)? true or false, default false.
  
 jasper.enablePooling.name = Tag Pooling
 jasper.enablePooling.description = Determines whether tag handler pooling is \