ace-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r1726444 - in /ace/trunk: org.apache.ace.agent/test/org/apache/ace/agent/impl/ org.apache.ace.agent/test/org/apache/ace/agent/testutil/ org.apache.ace.client.rest/src/org/apache/ace/client/rest/ org.apache.ace.deployment/src/org/apache/ace/...
Date Sat, 23 Jan 2016 20:05:15 GMT
Author: jawi
Date: Sat Jan 23 20:05:14 2016
New Revision: 1726444

URL: http://svn.apache.org/viewvc?rev=1726444&view=rev
Log:
Fixed some compiler warnings.


Modified:
    ace/trunk/org.apache.ace.agent/test/org/apache/ace/agent/impl/CustomControllerTest.java
    ace/trunk/org.apache.ace.agent/test/org/apache/ace/agent/testutil/TestWebServer.java
    ace/trunk/org.apache.ace.client.rest/src/org/apache/ace/client/rest/Activator.java
    ace/trunk/org.apache.ace.client.rest/src/org/apache/ace/client/rest/RESTClientServlet.java
    ace/trunk/org.apache.ace.deployment/src/org/apache/ace/deployment/provider/repositorybased/DeploymentArtifactCollector.java
    ace/trunk/org.apache.ace.deployment/src/org/apache/ace/deployment/service/impl/Activator.java
    ace/trunk/org.apache.ace.deployment/src/org/apache/ace/deployment/service/impl/DeploymentServiceImpl.java
    ace/trunk/org.apache.ace.deployment/src/org/apache/ace/deployment/task/Activator.java
    ace/trunk/org.apache.ace.discovery/test/org/apache/ace/discovery/property/PropertyBasedDiscoveryTest.java
    ace/trunk/org.apache.ace.gogo/src/org/apache/ace/gogo/execute/ExecuteCommands.java
    ace/trunk/org.apache.ace.gogo/src/org/apache/ace/gogo/repo/DeployerUtil.java
    ace/trunk/org.apache.ace.gogo/src/org/apache/ace/gogo/repo/RepoCommands.java
    ace/trunk/org.apache.ace.location.upnp/src/org/apache/ace/location/upnp/actions/GetLocationAction.java
    ace/trunk/org.apache.ace.location.upnp/src/org/apache/ace/location/upnp/actions/GetServerLoadAction.java
    ace/trunk/org.apache.ace.location.upnp/src/org/apache/ace/location/upnp/actions/GetServerTypeAction.java
    ace/trunk/org.apache.ace.log/src/org/apache/ace/log/listener/Activator.java
    ace/trunk/org.apache.ace.log/src/org/apache/ace/log/listener/ListenerImpl.java
    ace/trunk/org.apache.ace.log/src/org/apache/ace/log/listener/LogCache.java
    ace/trunk/org.apache.ace.log/src/org/apache/ace/log/server/store/impl/LogStoreImpl.java
    ace/trunk/org.apache.ace.log/src/org/apache/ace/log/target/LogConfigurator.java
    ace/trunk/org.apache.ace.log/src/org/apache/ace/log/target/LogSyncConfigurator.java
    ace/trunk/org.apache.ace.log/src/org/apache/ace/log/target/store/impl/Activator.java
    ace/trunk/org.apache.ace.log/src/org/apache/ace/log/target/store/impl/LogStoreImpl.java
    ace/trunk/org.apache.ace.obr/src/org/apache/ace/obr/storage/BundleStore.java
    ace/trunk/org.apache.ace.scheduler/src/org/apache/ace/scheduler/Scheduler.java
    ace/trunk/org.apache.ace.tageditor/src/org/apache/ace/tageditor/TagTableEntry.java

Modified: ace/trunk/org.apache.ace.agent/test/org/apache/ace/agent/impl/CustomControllerTest.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.agent/test/org/apache/ace/agent/impl/CustomControllerTest.java?rev=1726444&r1=1726443&r2=1726444&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.agent/test/org/apache/ace/agent/impl/CustomControllerTest.java
(original)
+++ ace/trunk/org.apache.ace.agent/test/org/apache/ace/agent/impl/CustomControllerTest.java
Sat Jan 23 20:05:14 2016
@@ -78,7 +78,6 @@ public class CustomControllerTest extend
     }
 
     @BeforeMethod
-    @SuppressWarnings("unchecked")
     public void setUpAgain() throws Exception {
         m_dummyInputStream = new FileInputStream(m_dummyFile);
 

Modified: ace/trunk/org.apache.ace.agent/test/org/apache/ace/agent/testutil/TestWebServer.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.agent/test/org/apache/ace/agent/testutil/TestWebServer.java?rev=1726444&r1=1726443&r2=1726444&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.agent/test/org/apache/ace/agent/testutil/TestWebServer.java (original)
+++ ace/trunk/org.apache.ace.agent/test/org/apache/ace/agent/testutil/TestWebServer.java Sat
Jan 23 20:05:14 2016
@@ -54,7 +54,6 @@ public class TestWebServer {
         }
 
         @Override
-        @SuppressWarnings("unchecked")
         public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain)
throws IOException, ServletException {
             HttpServletRequest hreq = (HttpServletRequest) req;
             HttpServletResponse hres = (HttpServletResponse) res;

Modified: ace/trunk/org.apache.ace.client.rest/src/org/apache/ace/client/rest/Activator.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.client.rest/src/org/apache/ace/client/rest/Activator.java?rev=1726444&r1=1726443&r2=1726444&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.client.rest/src/org/apache/ace/client/rest/Activator.java (original)
+++ ace/trunk/org.apache.ace.client.rest/src/org/apache/ace/client/rest/Activator.java Sat
Jan 23 20:05:14 2016
@@ -18,15 +18,12 @@
  */
 package org.apache.ace.client.rest;
 
-import java.util.Properties;
-
 import javax.servlet.Servlet;
 import javax.servlet.http.HttpSessionListener;
 
 import org.apache.ace.client.workspace.WorkspaceManager;
 import org.apache.felix.dm.DependencyActivatorBase;
 import org.apache.felix.dm.DependencyManager;
-import org.apache.felix.service.command.CommandProcessor;
 import org.osgi.framework.BundleContext;
 import org.osgi.service.log.LogService;
 

Modified: ace/trunk/org.apache.ace.client.rest/src/org/apache/ace/client/rest/RESTClientServlet.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.client.rest/src/org/apache/ace/client/rest/RESTClientServlet.java?rev=1726444&r1=1726443&r2=1726444&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.client.rest/src/org/apache/ace/client/rest/RESTClientServlet.java
(original)
+++ ace/trunk/org.apache.ace.client.rest/src/org/apache/ace/client/rest/RESTClientServlet.java
Sat Jan 23 20:05:14 2016
@@ -22,7 +22,6 @@ import java.io.IOException;
 import java.io.UnsupportedEncodingException;
 import java.net.URLDecoder;
 import java.net.URLEncoder;
-import java.util.ArrayList;
 import java.util.Dictionary;
 import java.util.HashSet;
 import java.util.List;
@@ -137,6 +136,7 @@ public class RESTClientServlet extends H
      * @see javax.servlet.http.HttpServlet#doDelete(javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse)
      */
     @Override
+    @SuppressWarnings("unchecked")
     protected void doDelete(HttpServletRequest req, HttpServletResponse resp) throws ServletException,
IOException {
     	HttpSession session = getSession(req);
         String[] pathElements = getPathElements(req);
@@ -190,6 +190,11 @@ public class RESTClientServlet extends H
     @Override
     protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException,
IOException {
     	HttpSession session = getSession(req);
+        if (session == null) {
+            resp.sendError(HttpServletResponse.SC_BAD_REQUEST);
+            return;
+        }
+    	
         String[] pathElements = getPathElements(req);
         if (pathElements == null || pathElements.length == 0) {
             // TODO return a list of versions
@@ -252,6 +257,7 @@ public class RESTClientServlet extends H
      * @see javax.servlet.http.HttpServlet#doPost(javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse)
      */
     @Override
+    @SuppressWarnings("unchecked")
     protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException,
IOException {
     	HttpSession session = getSession(req);
         String[] pathElements = getPathElements(req);
@@ -306,6 +312,11 @@ public class RESTClientServlet extends H
     @Override
     protected void doPut(HttpServletRequest req, HttpServletResponse resp) throws ServletException,
IOException {
     	HttpSession session = getSession(req);
+        if (session == null) {
+            resp.sendError(HttpServletResponse.SC_BAD_REQUEST);
+            return;
+        }
+
         String[] pathElements = getPathElements(req);
         if (pathElements == null || pathElements.length != 4 || !WORK_FOLDER.equals(pathElements[0]))
{
             resp.sendError(HttpServletResponse.SC_NOT_FOUND);
@@ -616,6 +627,7 @@ public class RESTClientServlet extends H
 	}
 
 	@Override
+    @SuppressWarnings("unchecked")
 	public void sessionDestroyed(HttpSessionEvent e) {
 		HttpSession session = e.getSession();
 		if (session != null) {

Modified: ace/trunk/org.apache.ace.deployment/src/org/apache/ace/deployment/provider/repositorybased/DeploymentArtifactCollector.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.deployment/src/org/apache/ace/deployment/provider/repositorybased/DeploymentArtifactCollector.java?rev=1726444&r1=1726443&r2=1726444&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.deployment/src/org/apache/ace/deployment/provider/repositorybased/DeploymentArtifactCollector.java
(original)
+++ ace/trunk/org.apache.ace.deployment/src/org/apache/ace/deployment/provider/repositorybased/DeploymentArtifactCollector.java
Sat Jan 23 20:05:14 2016
@@ -60,6 +60,7 @@ public class DeploymentArtifactCollector
      *         The array contains the deployment artifacts per requested version, in the
same
      *         order as given in the class constructor.
      */
+    @SuppressWarnings("unchecked")
     public List<XmlDeploymentArtifact>[] getArtifacts() {
         List<XmlDeploymentArtifact>[] result = new List[m_expectedVersions.size()];
         int i = 0;

Modified: ace/trunk/org.apache.ace.deployment/src/org/apache/ace/deployment/service/impl/Activator.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.deployment/src/org/apache/ace/deployment/service/impl/Activator.java?rev=1726444&r1=1726443&r2=1726444&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.deployment/src/org/apache/ace/deployment/service/impl/Activator.java
(original)
+++ ace/trunk/org.apache.ace.deployment/src/org/apache/ace/deployment/service/impl/Activator.java
Sat Jan 23 20:05:14 2016
@@ -19,6 +19,7 @@
 package org.apache.ace.deployment.service.impl;
 
 import java.util.Dictionary;
+import java.util.Hashtable;
 import java.util.Map;
 import java.util.Properties;
 import java.util.concurrent.ConcurrentHashMap;
@@ -124,7 +125,7 @@ public class Activator extends Dependenc
      * @return a {@link Component} instance for the {@link DeploymentService}, never <code>null</code>.
      */
     private Component createService(String ma) {
-        Dictionary deploymentProperties = new Properties();
+        Dictionary<String, Object> deploymentProperties = new Hashtable<String,
Object>();
 
         String identificationFilter = "(" + Constants.OBJECTCLASS + "=" + Identification.class.getName()
+ ")";
         String discoveryFilter = "(" + Constants.OBJECTCLASS + "=" + Discovery.class.getName()
+ ")";

Modified: ace/trunk/org.apache.ace.deployment/src/org/apache/ace/deployment/service/impl/DeploymentServiceImpl.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.deployment/src/org/apache/ace/deployment/service/impl/DeploymentServiceImpl.java?rev=1726444&r1=1726443&r2=1726444&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.deployment/src/org/apache/ace/deployment/service/impl/DeploymentServiceImpl.java
(original)
+++ ace/trunk/org.apache.ace.deployment/src/org/apache/ace/deployment/service/impl/DeploymentServiceImpl.java
Sat Jan 23 20:05:14 2016
@@ -30,9 +30,9 @@ import java.net.URL;
 import java.net.URLConnection;
 import java.util.ArrayList;
 import java.util.Dictionary;
+import java.util.Hashtable;
 import java.util.Iterator;
 import java.util.List;
-import java.util.Properties;
 import java.util.SortedSet;
 import java.util.TreeSet;
 
@@ -66,7 +66,7 @@ public class DeploymentServiceImpl imple
      */
     public Version getHighestLocalVersion() {
         Object[] installedPackages = m_deployer.list();
-        List versions = new ArrayList();
+        List<Version> versions = new ArrayList<Version>();
         for (int i = 0; i < installedPackages.length; i++) {
             if (m_deployer.getName(installedPackages[i]).equals(m_identification.getID()))
{
                 versions.add(m_deployer.getVersion(installedPackages[i]));
@@ -162,7 +162,7 @@ public class DeploymentServiceImpl imple
      * @return
      */
     private Event createEvent(String version, URL dataURL) {
-        Dictionary properties = new Properties();
+        Dictionary<String, Object> properties = new Hashtable<String, Object>();
         properties.put("deploymentpackage.url", dataURL.toString());
         properties.put("deploymentpackage.version", version);
         Event event = new Event(TOPIC_DEPLOYMENTPACKAGE_INSTALL, properties);

Modified: ace/trunk/org.apache.ace.deployment/src/org/apache/ace/deployment/task/Activator.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.deployment/src/org/apache/ace/deployment/task/Activator.java?rev=1726444&r1=1726443&r2=1726444&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.deployment/src/org/apache/ace/deployment/task/Activator.java
(original)
+++ ace/trunk/org.apache.ace.deployment/src/org/apache/ace/deployment/task/Activator.java
Sat Jan 23 20:05:14 2016
@@ -21,6 +21,7 @@ package org.apache.ace.deployment.task;
 import java.util.ArrayList;
 import java.util.Dictionary;
 import java.util.HashMap;
+import java.util.Hashtable;
 import java.util.List;
 import java.util.Map;
 import java.util.Properties;
@@ -125,9 +126,9 @@ public class Activator extends Dependenc
      * @return an array with {@link Component} instances for the different tasks, never <code>null</code>.
      */
     private List<Component> createServices(String ma) {
-        Dictionary updateProperties = new Properties();
-        Dictionary checkProperties = new Properties();
-        Dictionary deploymentProperties = new Properties();
+        Dictionary<String, Object> updateProperties = new Hashtable<String, Object>();
+        Dictionary<String, Object> checkProperties = new Hashtable<String, Object>();
+        Dictionary<String, Object> deploymentProperties = new Hashtable<String,
Object>();
         
         String updateSchedulerName = DeploymentUpdateTask.class.getName();
         String updateDescription = "Task that synchronizes the artifacts (bundles, resources)
installed on this target with the server.";

Modified: ace/trunk/org.apache.ace.discovery/test/org/apache/ace/discovery/property/PropertyBasedDiscoveryTest.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.discovery/test/org/apache/ace/discovery/property/PropertyBasedDiscoveryTest.java?rev=1726444&r1=1726443&r2=1726444&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.discovery/test/org/apache/ace/discovery/property/PropertyBasedDiscoveryTest.java
(original)
+++ ace/trunk/org.apache.ace.discovery/test/org/apache/ace/discovery/property/PropertyBasedDiscoveryTest.java
Sat Jan 23 20:05:14 2016
@@ -39,7 +39,7 @@ public class PropertyBasedDiscoveryTest
     @Test(groups = { UNIT })
     public void discoverWithPropertyUpdate() throws ConfigurationException, URISyntaxException
{
         PropertyBasedDiscovery discovery = new PropertyBasedDiscovery();
-        Dictionary dict = new Hashtable();
+        Dictionary<String, Object> dict = new Hashtable<String, Object>();
         dict.put(DiscoveryConstants.DISCOVERY_URL_KEY, "file://local");
         discovery.updated(dict);
         URL url = discovery.discover();

Modified: ace/trunk/org.apache.ace.gogo/src/org/apache/ace/gogo/execute/ExecuteCommands.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.gogo/src/org/apache/ace/gogo/execute/ExecuteCommands.java?rev=1726444&r1=1726443&r2=1726444&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.gogo/src/org/apache/ace/gogo/execute/ExecuteCommands.java (original)
+++ ace/trunk/org.apache.ace.gogo/src/org/apache/ace/gogo/execute/ExecuteCommands.java Sat
Jan 23 20:05:14 2016
@@ -35,7 +35,7 @@ public class ExecuteCommands {
     private volatile CommandProcessor m_processor;
 
     @Descriptor("executes one or more script definition")
-    public void executeAll(CommandSession session, @Descriptor("the script definition(s)
to execute, which consists of a map with at least a 'script' key") Map<String, String>...
defs) throws Exception {
+    public void executeAll(CommandSession session, @Descriptor("the script definition(s)
to execute, which consists of a map with at least a 'script' key") Map<String, String>[]
defs) throws Exception {
         if (defs == null || defs.length == 0) {
             throw new IllegalArgumentException("Need at least one script definition!");
         }

Modified: ace/trunk/org.apache.ace.gogo/src/org/apache/ace/gogo/repo/DeployerUtil.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.gogo/src/org/apache/ace/gogo/repo/DeployerUtil.java?rev=1726444&r1=1726443&r2=1726444&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.gogo/src/org/apache/ace/gogo/repo/DeployerUtil.java (original)
+++ ace/trunk/org.apache.ace.gogo/src/org/apache/ace/gogo/repo/DeployerUtil.java Sat Jan 23
20:05:14 2016
@@ -26,9 +26,6 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.StringReader;
 import java.nio.ByteBuffer;
-import java.security.DigestInputStream;
-import java.security.MessageDigest;
-import java.util.Arrays;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 import java.util.zip.ZipEntry;

Modified: ace/trunk/org.apache.ace.gogo/src/org/apache/ace/gogo/repo/RepoCommands.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.gogo/src/org/apache/ace/gogo/repo/RepoCommands.java?rev=1726444&r1=1726443&r2=1726444&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.gogo/src/org/apache/ace/gogo/repo/RepoCommands.java (original)
+++ ace/trunk/org.apache.ace.gogo/src/org/apache/ace/gogo/repo/RepoCommands.java Sat Jan 23
20:05:14 2016
@@ -115,8 +115,6 @@ public class RepoCommands {
         List<Resource> resources = findResources(repo, requirement);
 
         for (Resource resource : resources) {
-            String location = getUrl(resources.get(0));
-//            System.out.println("rm " + resource + " => " + location);
             deleteResource(resource);
         }
     }

Modified: ace/trunk/org.apache.ace.location.upnp/src/org/apache/ace/location/upnp/actions/GetLocationAction.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.location.upnp/src/org/apache/ace/location/upnp/actions/GetLocationAction.java?rev=1726444&r1=1726443&r2=1726444&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.location.upnp/src/org/apache/ace/location/upnp/actions/GetLocationAction.java
(original)
+++ ace/trunk/org.apache.ace.location.upnp/src/org/apache/ace/location/upnp/actions/GetLocationAction.java
Sat Jan 23 20:05:14 2016
@@ -63,7 +63,7 @@ public class GetLocationAction implement
 	public Dictionary invoke(Dictionary args) throws Exception {
 		URL location = m_locationService.getLocation();
 
-		Hashtable result = new Hashtable();
+		Hashtable<String, Object> result = new Hashtable<String, Object>();
 		result.put(RET_TARGET_VALUE, location.toExternalForm());
 		return result;
 	}

Modified: ace/trunk/org.apache.ace.location.upnp/src/org/apache/ace/location/upnp/actions/GetServerLoadAction.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.location.upnp/src/org/apache/ace/location/upnp/actions/GetServerLoadAction.java?rev=1726444&r1=1726443&r2=1726444&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.location.upnp/src/org/apache/ace/location/upnp/actions/GetServerLoadAction.java
(original)
+++ ace/trunk/org.apache.ace.location.upnp/src/org/apache/ace/location/upnp/actions/GetServerLoadAction.java
Sat Jan 23 20:05:14 2016
@@ -64,7 +64,7 @@ public class GetServerLoadAction impleme
 	public Dictionary invoke(Dictionary args) throws Exception {
 		int load = m_locationService.getServerLoad();
 
-		Hashtable result = new Hashtable();
+		Hashtable<String, Object> result = new Hashtable<String, Object>();
 		result.put(RET_TARGET_VALUE, load);
 		return result;
 	}

Modified: ace/trunk/org.apache.ace.location.upnp/src/org/apache/ace/location/upnp/actions/GetServerTypeAction.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.location.upnp/src/org/apache/ace/location/upnp/actions/GetServerTypeAction.java?rev=1726444&r1=1726443&r2=1726444&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.location.upnp/src/org/apache/ace/location/upnp/actions/GetServerTypeAction.java
(original)
+++ ace/trunk/org.apache.ace.location.upnp/src/org/apache/ace/location/upnp/actions/GetServerTypeAction.java
Sat Jan 23 20:05:14 2016
@@ -65,7 +65,7 @@ public class GetServerTypeAction impleme
 	public Dictionary invoke(Dictionary args) throws Exception {
 		String type = m_locationService.getServerType();
 
-		Hashtable result = new Hashtable();
+		Hashtable<String, Object> result = new Hashtable<String, Object>();
 		result.put(RET_TARGET_VALUE, type);
 		return result;
 	}

Modified: ace/trunk/org.apache.ace.log/src/org/apache/ace/log/listener/Activator.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.log/src/org/apache/ace/log/listener/Activator.java?rev=1726444&r1=1726443&r2=1726444&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.log/src/org/apache/ace/log/listener/Activator.java (original)
+++ ace/trunk/org.apache.ace.log/src/org/apache/ace/log/listener/Activator.java Sat Jan 23
20:05:14 2016
@@ -57,7 +57,7 @@ public class Activator implements Bundle
         context.addFrameworkListener(m_listener);
 
         // listen for deployment events
-        Dictionary dict = new Hashtable();
+        Dictionary<String, Object> dict = new Hashtable<String, Object>();
         dict.put(EventConstants.EVENT_TOPIC, topics);
         context.registerService(EventHandler.class.getName(), m_listener, dict);
 

Modified: ace/trunk/org.apache.ace.log/src/org/apache/ace/log/listener/ListenerImpl.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.log/src/org/apache/ace/log/listener/ListenerImpl.java?rev=1726444&r1=1726443&r2=1726444&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.log/src/org/apache/ace/log/listener/ListenerImpl.java (original)
+++ ace/trunk/org.apache.ace.log/src/org/apache/ace/log/listener/ListenerImpl.java Sat Jan
23 20:05:14 2016
@@ -20,6 +20,7 @@ package org.apache.ace.log.listener;
 
 import java.util.ArrayList;
 import java.util.Dictionary;
+import java.util.Hashtable;
 import java.util.List;
 import java.util.Properties;
 import org.apache.ace.feedback.AuditEvent;
@@ -54,7 +55,7 @@ public class ListenerImpl implements Bun
     volatile BundleContext m_context;
     volatile Log m_auditLog;
 
-    private final List m_queue = new ArrayList();
+    private final List<Runnable> m_queue = new ArrayList<Runnable>();
 
     public ListenerImpl(BundleContext context, Log log) {
         m_context = context;
@@ -201,7 +202,7 @@ public class ListenerImpl implements Bun
             m_queue.add(new Runnable() {
                 public void run() {
                     int eventType = AuditEvent.DEPLOYMENTADMIN_BASE;
-                    Dictionary props = new Properties();
+                    Dictionary<String, Object> props = new Hashtable<String, Object>();
 
                     String topic = event.getTopic();
 

Modified: ace/trunk/org.apache.ace.log/src/org/apache/ace/log/listener/LogCache.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.log/src/org/apache/ace/log/listener/LogCache.java?rev=1726444&r1=1726443&r2=1726444&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.log/src/org/apache/ace/log/listener/LogCache.java (original)
+++ ace/trunk/org.apache.ace.log/src/org/apache/ace/log/listener/LogCache.java Sat Jan 23
20:05:14 2016
@@ -31,7 +31,7 @@ import org.apache.ace.log.Log;
  */
 public class LogCache implements Log {
 
-    private final List m_logEntries = new ArrayList();
+    private final List<LogEntry> m_logEntries = new ArrayList<LogEntry>();
 
     /**
      * Log the entry in the cache for flushing to the real log service later on.

Modified: ace/trunk/org.apache.ace.log/src/org/apache/ace/log/server/store/impl/LogStoreImpl.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.log/src/org/apache/ace/log/server/store/impl/LogStoreImpl.java?rev=1726444&r1=1726443&r2=1726444&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.log/src/org/apache/ace/log/server/store/impl/LogStoreImpl.java
(original)
+++ ace/trunk/org.apache.ace.log/src/org/apache/ace/log/server/store/impl/LogStoreImpl.java
Sat Jan 23 20:05:14 2016
@@ -231,8 +231,9 @@ public class LogStoreImpl implements Log
      * @throws java.io.IOException
      *             in case of any error.
      */
+    @SuppressWarnings("unchecked")
     protected void put(String targetID, Long logID, List<Event> list) throws IOException
{
-        if ((list == null) || (list.size() == 0)) {
+        if ((list == null) || list.isEmpty()) {
             // nothing to add, so return
             return;
         }

Modified: ace/trunk/org.apache.ace.log/src/org/apache/ace/log/target/LogConfigurator.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.log/src/org/apache/ace/log/target/LogConfigurator.java?rev=1726444&r1=1726443&r2=1726444&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.log/src/org/apache/ace/log/target/LogConfigurator.java (original)
+++ ace/trunk/org.apache.ace.log/src/org/apache/ace/log/target/LogConfigurator.java Sat Jan
23 20:05:14 2016
@@ -36,7 +36,7 @@ public class LogConfigurator implements
     private static final String LOG_NAME = "name";
 
     private DependencyManager m_manager;
-    private final Map /*<String, Component>*/ m_logInstances = new HashMap();
+    private final Map<String, Component> m_logInstances = new HashMap<String, Component>();
     private volatile LogService m_log;
     
     public String getName() {

Modified: ace/trunk/org.apache.ace.log/src/org/apache/ace/log/target/LogSyncConfigurator.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.log/src/org/apache/ace/log/target/LogSyncConfigurator.java?rev=1726444&r1=1726443&r2=1726444&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.log/src/org/apache/ace/log/target/LogSyncConfigurator.java (original)
+++ ace/trunk/org.apache.ace.log/src/org/apache/ace/log/target/LogSyncConfigurator.java Sat
Jan 23 20:05:14 2016
@@ -20,8 +20,8 @@ package org.apache.ace.log.target;
 
 import java.util.Dictionary;
 import java.util.HashMap;
+import java.util.Hashtable;
 import java.util.Map;
-import java.util.Properties;
 
 import org.apache.ace.connectionfactory.ConnectionFactory;
 import org.apache.ace.discovery.Discovery;
@@ -41,7 +41,7 @@ public class LogSyncConfigurator impleme
     private static final String LOG_NAME = "name";
 
     private DependencyManager m_manager;
-    private final Map /*<String, Component>*/ m_syncInstances = new HashMap();
+    private final Map<String, Component> m_syncInstances = new HashMap<String, Component>();
     private volatile LogService m_log;
     
     public String getName() {
@@ -65,7 +65,7 @@ public class LogSyncConfigurator impleme
         Component service = (Component) m_syncInstances.get(pid);
         if (service == null) {
             // publish log sync task service
-            Dictionary properties = new Properties();
+            Dictionary<String, Object> properties = new Hashtable<String, Object>();
             String filterString;
             String filterForDiscovery;
             String filterForIdentification;

Modified: ace/trunk/org.apache.ace.log/src/org/apache/ace/log/target/store/impl/Activator.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.log/src/org/apache/ace/log/target/store/impl/Activator.java?rev=1726444&r1=1726443&r2=1726444&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.log/src/org/apache/ace/log/target/store/impl/Activator.java (original)
+++ ace/trunk/org.apache.ace.log/src/org/apache/ace/log/target/store/impl/Activator.java Sat
Jan 23 20:05:14 2016
@@ -41,7 +41,7 @@ public class Activator extends Dependenc
 
     private DependencyManager m_manager;
     private BundleContext m_context;
-    private final Map /*<String, Component>*/ m_instances = new HashMap();
+    private final Map<String, Component> m_instances = new HashMap<String, Component>();
     private volatile LogService m_log;
 
     public void init(BundleContext context, DependencyManager manager) throws Exception {

Modified: ace/trunk/org.apache.ace.log/src/org/apache/ace/log/target/store/impl/LogStoreImpl.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.log/src/org/apache/ace/log/target/store/impl/LogStoreImpl.java?rev=1726444&r1=1726443&r2=1726444&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.log/src/org/apache/ace/log/target/store/impl/LogStoreImpl.java
(original)
+++ ace/trunk/org.apache.ace.log/src/org/apache/ace/log/target/store/impl/LogStoreImpl.java
Sat Jan 23 20:05:14 2016
@@ -152,7 +152,7 @@ public class LogStoreImpl implements Log
     public synchronized List get(long logID, long from, long to)
             throws IOException {
         Store store = getLog(logID);
-        List result = new ArrayList();
+        List<Event> result = new ArrayList<Event>();
         try {
             if (store.getCurrent() > from) {
                 store.reset();
@@ -437,6 +437,7 @@ public class LogStoreImpl implements Log
             return m_store.getFilePointer() < m_store.length();
         }
 
+        @SuppressWarnings("unused")
         public byte[] read() throws IOException {
             long pos = m_store.getFilePointer();
             try {
@@ -496,6 +497,7 @@ public class LogStoreImpl implements Log
          * @throws java.io.IOException
          *             in case of any IO error or if there is no record left.
          */
+        @SuppressWarnings("unused")
         public void skip() throws IOException {
             long pos = m_store.getFilePointer();
             try {
@@ -525,7 +527,6 @@ public class LogStoreImpl implements Log
             long pos = m_store.getFilePointer();
             try {
                 m_store.seek(m_store.length());
-                long current = m_store.getFilePointer();
                 m_store.writeLong(id);
                 m_store.writeInt(entry.length);
                 m_store.write(entry);

Modified: ace/trunk/org.apache.ace.obr/src/org/apache/ace/obr/storage/BundleStore.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.obr/src/org/apache/ace/obr/storage/BundleStore.java?rev=1726444&r1=1726443&r2=1726444&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.obr/src/org/apache/ace/obr/storage/BundleStore.java (original)
+++ ace/trunk/org.apache.ace.obr/src/org/apache/ace/obr/storage/BundleStore.java Sat Jan 23
20:05:14 2016
@@ -3,8 +3,6 @@ package org.apache.ace.obr.storage;
 import java.io.IOException;
 import java.io.InputStream;
 
-import org.osgi.service.cm.ManagedService;
-
 import aQute.bnd.annotation.ProviderType;
 
 /*

Modified: ace/trunk/org.apache.ace.scheduler/src/org/apache/ace/scheduler/Scheduler.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.scheduler/src/org/apache/ace/scheduler/Scheduler.java?rev=1726444&r1=1726443&r2=1726444&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.scheduler/src/org/apache/ace/scheduler/Scheduler.java (original)
+++ ace/trunk/org.apache.ace.scheduler/src/org/apache/ace/scheduler/Scheduler.java Sat Jan
23 20:05:14 2016
@@ -39,7 +39,7 @@ import org.osgi.service.log.LogService;
  * for it.
  */
 public class Scheduler implements ManagedService {
-    protected Map m_tasks = new HashMap/*<String, SchedulerTask>*/();
+    protected final Map<String, SchedulerTask> m_tasks = new HashMap<String, SchedulerTask>();
     private volatile LogService m_log;
 
     /**

Modified: ace/trunk/org.apache.ace.tageditor/src/org/apache/ace/tageditor/TagTableEntry.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.tageditor/src/org/apache/ace/tageditor/TagTableEntry.java?rev=1726444&r1=1726443&r2=1726444&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.tageditor/src/org/apache/ace/tageditor/TagTableEntry.java (original)
+++ ace/trunk/org.apache.ace.tageditor/src/org/apache/ace/tageditor/TagTableEntry.java Sat
Jan 23 20:05:14 2016
@@ -22,12 +22,10 @@ import org.apache.ace.client.repository.
 
 import com.vaadin.data.Property.ValueChangeEvent;
 import com.vaadin.data.Property.ValueChangeListener;
-import com.vaadin.data.Validator.InvalidValueException;
-import com.vaadin.data.validator.RegexpValidator;
 import com.vaadin.ui.Button;
+import com.vaadin.ui.Button.ClickEvent;
 import com.vaadin.ui.Table;
 import com.vaadin.ui.TextField;
-import com.vaadin.ui.Button.ClickEvent;
 
 public class TagTableEntry {
 



Mime
View raw message