incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r993027 - in /sling/trunk/bundles/scripting/core/src/main/java/org/apache/sling/scripting/core: ScriptHelper.java impl/ScriptEngineManagerFactory.java impl/SlingScriptAdapterFactory.java
Date Mon, 06 Sep 2010 13:41:18 GMT
Author: cziegeler
Date: Mon Sep  6 13:41:18 2010
New Revision: 993027

URL: http://svn.apache.org/viewvc?rev=993027&view=rev
Log:
Clean up code - no functional changes

Modified:
    sling/trunk/bundles/scripting/core/src/main/java/org/apache/sling/scripting/core/ScriptHelper.java
    sling/trunk/bundles/scripting/core/src/main/java/org/apache/sling/scripting/core/impl/ScriptEngineManagerFactory.java
    sling/trunk/bundles/scripting/core/src/main/java/org/apache/sling/scripting/core/impl/SlingScriptAdapterFactory.java

Modified: sling/trunk/bundles/scripting/core/src/main/java/org/apache/sling/scripting/core/ScriptHelper.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/scripting/core/src/main/java/org/apache/sling/scripting/core/ScriptHelper.java?rev=993027&r1=993026&r2=993027&view=diff
==============================================================================
--- sling/trunk/bundles/scripting/core/src/main/java/org/apache/sling/scripting/core/ScriptHelper.java
(original)
+++ sling/trunk/bundles/scripting/core/src/main/java/org/apache/sling/scripting/core/ScriptHelper.java
Mon Sep  6 13:41:18 2010
@@ -187,6 +187,7 @@ public class ScriptHelper implements Sli
     /**
      * @see org.apache.sling.api.scripting.SlingScriptHelper#dispose()
      */
+    @Deprecated
     public void dispose() {
         LoggerFactory.getLogger(this.getClass()).error("ScriptHelper#dispose has been called.
This method is deprecated and should never be called by clients!");
     }

Modified: sling/trunk/bundles/scripting/core/src/main/java/org/apache/sling/scripting/core/impl/ScriptEngineManagerFactory.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/scripting/core/src/main/java/org/apache/sling/scripting/core/impl/ScriptEngineManagerFactory.java?rev=993027&r1=993026&r2=993027&view=diff
==============================================================================
--- sling/trunk/bundles/scripting/core/src/main/java/org/apache/sling/scripting/core/impl/ScriptEngineManagerFactory.java
(original)
+++ sling/trunk/bundles/scripting/core/src/main/java/org/apache/sling/scripting/core/impl/ScriptEngineManagerFactory.java
Mon Sep  6 13:41:18 2010
@@ -76,7 +76,6 @@ public class ScriptEngineManagerFactory 
 
     private ServiceRegistration scriptEngineManagerRegistration;
 
-    @SuppressWarnings("unchecked")
     private void refreshScriptEngineManager() {
 
         if (scriptEngineManagerRegistration != null) {
@@ -104,7 +103,7 @@ public class ScriptEngineManagerFactory 
         if (bundleContext != null) {
             scriptEngineManagerRegistration = bundleContext.registerService(
                 ScriptEngineManager.class.getName(), scriptEngineManager,
-                new Hashtable());
+                new Hashtable<String, Object>());
         }
 
         // Log messages to verify which ScriptEngine is actually used
@@ -256,9 +255,8 @@ public class ScriptEngineManagerFactory 
         return (EventAdmin) (this.eventAdminTracker != null ? this.eventAdminTracker.getService()
: null);
     }
 
-    @SuppressWarnings("unchecked")
-    private String[] toArray(List list) {
-        return (String[]) list.toArray(new String[list.size()]);
+    private String[] toArray(final List<String> list) {
+        return list.toArray(new String[list.size()]);
     }
 
     private void postEvent(final String topic, final ScriptEngineFactory scriptEngineFactory)
{

Modified: sling/trunk/bundles/scripting/core/src/main/java/org/apache/sling/scripting/core/impl/SlingScriptAdapterFactory.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/scripting/core/src/main/java/org/apache/sling/scripting/core/impl/SlingScriptAdapterFactory.java?rev=993027&r1=993026&r2=993027&view=diff
==============================================================================
--- sling/trunk/bundles/scripting/core/src/main/java/org/apache/sling/scripting/core/impl/SlingScriptAdapterFactory.java
(original)
+++ sling/trunk/bundles/scripting/core/src/main/java/org/apache/sling/scripting/core/impl/SlingScriptAdapterFactory.java
Mon Sep  6 13:41:18 2010
@@ -227,7 +227,7 @@ public class SlingScriptAdapterFactory i
             Object serviceId = ref.getProperty(Constants.SERVICE_ID);
             Object service = bundleContext.getService(ref);
             if (service instanceof Map) {
-                service = new MapWrappingBindingsValuesProvider((Map) service);
+                service = new MapWrappingBindingsValuesProvider((Map<String, Object>)
service);
             }
             if (engineName == null || ANY_ENGINE.contains(engineName.toUpperCase())) {
                 genericBindingsValuesProviders.put(serviceId, (BindingsValuesProvider) service);



Mime
View raw message