ace-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r1727510 [1/2] - in /ace/trunk: org.apache.ace.client.automation/src/org/apache/ace/client/automation/ org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/ org.apache.ace.client.repository/src/org/apache/ace/client/re...
Date Fri, 29 Jan 2016 10:11:44 GMT
Author: jawi
Date: Fri Jan 29 10:11:43 2016
New Revision: 1727510

URL: http://svn.apache.org/viewvc?rev=1727510&view=rev
Log:
Even more compiler warnings fixed:

- most of the warnings left are not easily fixed as they would infer major
  changes to our APIs or come from sources we embed.


Removed:
    ace/trunk/org.apache.ace.repository/src/org/apache/ace/repository/servlet/packageinfo
Modified:
    ace/trunk/org.apache.ace.client.automation/src/org/apache/ace/client/automation/AutoTargetOperator.java
    ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/Activator.java
    ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/ChangeNotifierImpl.java
    ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/ObjectRepositoryImpl.java
    ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/RepositoryAdminImpl.java
    ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/RepositoryAdminLoginContextImpl.java
    ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/RepositoryObjectImpl.java
    ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/RepositorySerializer.java
    ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/RepositorySet.java
    ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/stateful/impl/StatefulTargetObjectImpl.java
    ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/stateful/impl/StatefulTargetRepositoryImpl.java
    ace/trunk/org.apache.ace.client.repository/test/org/apache/ace/client/repository/impl/ModelTest.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/RepositoryBasedProvider.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/servlet/AgentDeploymentServlet.java
    ace/trunk/org.apache.ace.deployment/src/org/apache/ace/deployment/servlet/DeploymentServlet.java
    ace/trunk/org.apache.ace.deployment/src/org/apache/ace/deployment/task/Activator.java
    ace/trunk/org.apache.ace.gogo/src/org/apache/ace/gogo/collection/CollectionCommands.java
    ace/trunk/org.apache.ace.http/src/org/apache/ace/http/listener/Activator.java
    ace/trunk/org.apache.ace.http/src/org/apache/ace/http/redirector/RedirectServlet.java
    ace/trunk/org.apache.ace.identification/src/org/apache/ace/identification/property/Activator.java
    ace/trunk/org.apache.ace.identification/src/org/apache/ace/identification/property/PropertyBasedIdentification.java
    ace/trunk/org.apache.ace.identification/test/org/apache/ace/identification/property/PropertyBasedIdentificationTest.java
    ace/trunk/org.apache.ace.identification/test/org/apache/ace/identification/property/SimpleIdentificationTest.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/servlet/Activator.java
    ace/trunk/org.apache.ace.log/src/org/apache/ace/log/server/store/impl/Activator.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/server/task/Activator.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.log/src/org/apache/ace/log/target/task/LogSyncTask.java
    ace/trunk/org.apache.ace.log/test/org/apache/ace/log/listener/LogTest.java
    ace/trunk/org.apache.ace.log/test/org/apache/ace/log/listener/MockLog.java
    ace/trunk/org.apache.ace.obr/src/org/apache/ace/obr/storage/file/BundleFileStore.java
    ace/trunk/org.apache.ace.obr/test/org/apache/ace/obr/servlet/MockBundleStore.java
    ace/trunk/org.apache.ace.obr/test/org/apache/ace/obr/storage/file/BundleFileStoreTest.java
    ace/trunk/org.apache.ace.repository/servlet.bnd
    ace/trunk/org.apache.ace.repository/src/org/apache/ace/repository/impl/RepositoryFactory.java
    ace/trunk/org.apache.ace.repository/src/org/apache/ace/repository/servlet/RepositoryServletBase.java
    ace/trunk/org.apache.ace.repository/src/org/apache/ace/repository/task/RepositoryReplicationTask.java
    ace/trunk/org.apache.ace.resourceprocessor.useradmin/src/org/apache/ace/resourceprocessor/useradmin/impl/UserAdminStore.java
    ace/trunk/org.apache.ace.scheduler/src/org/apache/ace/scheduler/Activator.java
    ace/trunk/org.apache.ace.scheduler/src/org/apache/ace/scheduler/Scheduler.java
    ace/trunk/org.apache.ace.scheduler/test/org/apache/ace/scheduler/SchedulerTest.java
    ace/trunk/org.apache.ace.verifier/src/org/apache/ace/deployment/verifier/impl/VerifyEnvironmentImpl.java
    ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/VaadinClient.java
    ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/VaadinServlet.java
    ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/component/BaseObjectPanel.java
    ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/component/MainActionToolbar.java

Modified: ace/trunk/org.apache.ace.client.automation/src/org/apache/ace/client/automation/AutoTargetOperator.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.client.automation/src/org/apache/ace/client/automation/AutoTargetOperator.java?rev=1727510&r1=1727509&r2=1727510&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.client.automation/src/org/apache/ace/client/automation/AutoTargetOperator.java (original)
+++ ace/trunk/org.apache.ace.client.automation/src/org/apache/ace/client/automation/AutoTargetOperator.java Fri Jan 29 10:11:43 2016
@@ -53,11 +53,11 @@ public class AutoTargetOperator implemen
     private volatile UserAdmin m_userAdmin;
     private volatile BundleContext m_bundleContext;
     private volatile LogService m_log;
-    private volatile Dictionary m_settings;
+    private volatile Dictionary<String, ?> m_settings;
+    private volatile ServiceRegistration<Runnable> m_serviceReg;
 
     // used for processing the auditlog (tell the repository about that)
     private final AuditLogProcessTask m_task = new AuditLogProcessTask();
-    private Object m_serviceReg = null;
 
     public void start() {
         // get user
@@ -82,7 +82,7 @@ public class AutoTargetOperator implemen
             // start refresh task
             Dictionary<String, Object> props = new Hashtable<>();
             props.put(SchedulerConstants.SCHEDULER_NAME_KEY, SCHEDULER_NAME);
-            m_serviceReg = m_bundleContext.registerService(Runnable.class.getName(), m_task, props);
+            m_serviceReg = m_bundleContext.registerService(Runnable.class, m_task, props);
         }
         catch (IOException ioe) {
             m_log.log(LogService.LOG_ERROR, "Unable to login at repository admin.", ioe);
@@ -92,7 +92,7 @@ public class AutoTargetOperator implemen
     public void stop() {
         // service present, pull it
         if (m_serviceReg != null) {
-            ((ServiceRegistration) m_serviceReg).unregister();
+            ((ServiceRegistration<?>) m_serviceReg).unregister();
         }
 
         m_serviceReg = null;
@@ -196,7 +196,7 @@ public class AutoTargetOperator implemen
         return changed;
     }
 
-    public void updated(Dictionary settings) throws ConfigurationException {
+    public void updated(Dictionary<String, ?> settings) throws ConfigurationException {
         if (settings != null) {
             for (ConfigItem item : ConfigItem.values()) {
                 String value = (String) settings.get(item.toString());

Modified: ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/Activator.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/Activator.java?rev=1727510&r1=1727509&r2=1727510&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/Activator.java (original)
+++ ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/Activator.java Fri Jan 29 10:11:43 2016
@@ -182,7 +182,6 @@ public class Activator extends Dependenc
      * @param sessionID
      *            the session ID to use.
      */
-    @SuppressWarnings("unchecked")
     private void createSessionServices(SessionData sd, String sessionID, RepositoryConfiguration repoConfig) {
         RepositoryAdminImpl rai = new RepositoryAdminImpl(sessionID, repoConfig);
         Component repositoryAdminComponent = createComponent()
@@ -196,7 +195,7 @@ public class Activator extends Dependenc
         String sessionFilter = "(" + SessionFactory.SERVICE_SID + "=" + sessionID + ")";
         String auditLogFilter = "(&(" + Constants.OBJECTCLASS + "=" + LogStore.class.getName() + ")(name=auditlog))";
 
-        Dictionary topic = new Hashtable();
+        Dictionary<String, Object> topic = new Hashtable<>();
         topic.put(SessionFactory.SERVICE_SID, sessionID);
         topic.put(EventConstants.EVENT_FILTER, sessionFilter);
         topic.put(EventConstants.EVENT_TOPIC, new String[] {

Modified: ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/ChangeNotifierImpl.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/ChangeNotifierImpl.java?rev=1727510&r1=1727509&r2=1727510&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/ChangeNotifierImpl.java (original)
+++ ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/ChangeNotifierImpl.java Fri Jan 29 10:11:43 2016
@@ -75,7 +75,7 @@ public class ChangeNotifierImpl implemen
         return props;
     }
 
-    @SuppressWarnings("unchecked")
+    @SuppressWarnings({ "unchecked", "rawtypes" })
     public void notifyChanged(String topic, Properties props, boolean internalOnly) {
         props = addSession(props);
         m_eventAdmin.sendEvent(new Event(m_privateTopicRoot + m_entityRoot + topic, (Dictionary) props));

Modified: ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/ObjectRepositoryImpl.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/ObjectRepositoryImpl.java?rev=1727510&r1=1727509&r2=1727510&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/ObjectRepositoryImpl.java (original)
+++ ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/ObjectRepositoryImpl.java Fri Jan 29 10:11:43 2016
@@ -199,7 +199,7 @@ abstract class ObjectRepositoryImpl<I ex
         writeLock.lock();
         try {
             for (RepositoryObject o : m_repo) {
-                ((RepositoryObjectImpl) o).setBusy(busy);
+                ((RepositoryObjectImpl<?>) o).setBusy(busy);
             }
             m_busy = busy;
         }

Modified: ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/RepositoryAdminImpl.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/RepositoryAdminImpl.java?rev=1727510&r1=1727509&r2=1727510&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/RepositoryAdminImpl.java (original)
+++ ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/RepositoryAdminImpl.java Fri Jan 29 10:11:43 2016
@@ -93,7 +93,7 @@ public class RepositoryAdminImpl impleme
     /**
      * Maps from interface classes of the ObjectRepositories to their implementations.
      */
-    private Map<Class<? extends ObjectRepository>, ObjectRepositoryImpl> m_repositories;
+    private Map<Class<? extends ObjectRepository<?>>, ObjectRepositoryImpl<?, ?>> m_repositories;
 
     private final String m_sessionID;
     private final Properties m_sessionProps;
@@ -165,7 +165,7 @@ public class RepositoryAdminImpl impleme
         }
     }
 
-    void initialize(Map<Class<? extends ObjectRepository>, ObjectRepositoryImpl> repositories) {
+    void initialize(Map<Class<? extends ObjectRepository<?>>, ObjectRepositoryImpl<?, ?>> repositories) {
         m_repositories = repositories;
     }
 
@@ -173,8 +173,7 @@ public class RepositoryAdminImpl impleme
         return m_changeNotifierManager.getConfiguredNotifier(topic, m_sessionID);
     }
 
-    @SuppressWarnings("unchecked")
-    private Map<Class<? extends ObjectRepository>, ObjectRepositoryImpl> publishRepositories() {
+    private Map<Class<? extends ObjectRepository<?>>, ObjectRepositoryImpl<?, ?>> publishRepositories() {
         // create the repository objects, if this is the first time this method is called. In case a repository
         // implementation needs some form of (runtime) configuration, adapt the RepositoryConfiguration object and pass
         // this object to the repository...
@@ -199,7 +198,7 @@ public class RepositoryAdminImpl impleme
             .add(m_dm.createServiceDependency().setService(LogService.class).setRequired(false))
             .add(m_dm.createServiceDependency().setService(ArtifactHelper.class).setRequired(false).setAutoConfig(false).setCallbacks(this, "addArtifactHelper", "removeArtifactHelper"));
 
-        Dictionary topic = new Hashtable();
+        Dictionary<String, Object> topic = new Hashtable<>();
         topic.put(EventConstants.EVENT_FILTER, "(" + SessionFactory.SERVICE_SID + "=" + m_sessionID + ")");
         topic.put(EventConstants.EVENT_TOPIC, new String[] {});
 
@@ -227,7 +226,7 @@ public class RepositoryAdminImpl impleme
         m_services.add(registerRepository(DeploymentVersionRepository.class, m_deploymentVersionRepositoryImpl, new String[] {}));
 
         // prepare the results.
-        Map<Class<? extends ObjectRepository>, ObjectRepositoryImpl> result = new HashMap<>();
+        Map<Class<? extends ObjectRepository<?>>, ObjectRepositoryImpl<?, ?>> result = new HashMap<>();
 
         result.put(ArtifactRepository.class, m_artifactRepositoryImpl);
         result.put(Artifact2FeatureAssociationRepository.class, m_artifact2FeatureAssociationRepositoryImpl);
@@ -252,13 +251,13 @@ public class RepositoryAdminImpl impleme
         }
     }
 
-    @SuppressWarnings("unchecked")
     private <T extends RepositoryObject> Component[] registerRepository(Class<? extends ObjectRepository<T>> iface, ObjectRepositoryImpl<?, T> implementation, String[] topics) {
         Component repositoryService = m_dm.createComponent()
             .setInterface(iface.getName(), m_sessionProps)
             .setImplementation(implementation)
             .add(m_dm.createServiceDependency().setService(LogService.class).setRequired(false));
-        Dictionary topic = new Hashtable();
+
+        Dictionary<String, Object> topic = new Hashtable<>();
         topic.put(EventConstants.EVENT_TOPIC, topics);
         topic.put(EventConstants.EVENT_FILTER, "(" + SessionFactory.SERVICE_SID + "=" + m_sessionID + ")");
         Component handlerService = m_dm.createComponent()
@@ -475,7 +474,7 @@ public class RepositoryAdminImpl impleme
 
         // First, some sanity checks on the list of descriptors.
         for (RepositorySetDescriptor rsd : descriptors) {
-            for (Class c : rsd.m_objectRepositories) {
+            for (Class<?> c : rsd.m_objectRepositories) {
                 // Do we have an impl for each repository class?
                 if (!m_repositories.containsKey(c)) {
                     throw new IllegalArgumentException(rsd.toString() + " references repository class " + c.getName() + " for which no implementation is available.");
@@ -491,7 +490,7 @@ public class RepositoryAdminImpl impleme
         for (int i = 0; i < result.length; i++) {
             RepositorySetDescriptor rsd = descriptors.get(i);
 
-            ObjectRepositoryImpl[] impls = new ObjectRepositoryImpl[rsd.m_objectRepositories.length];
+            ObjectRepositoryImpl<?, ?>[] impls = new ObjectRepositoryImpl[rsd.m_objectRepositories.length];
             String[] topics = new String[rsd.m_objectRepositories.length];
             for (int j = 0; j < impls.length; j++) {
                 impls[j] = m_repositories.get(rsd.m_objectRepositories[j]);
@@ -585,7 +584,7 @@ public class RepositoryAdminImpl impleme
      * @return The newly created repository set.
      * @throws IOException
      */
-    public RepositorySet loadRepositorySet(User user, RepositorySetDescriptor rsd, ObjectRepositoryImpl[] repos) throws IOException {
+    public RepositorySet loadRepositorySet(User user, RepositorySetDescriptor rsd, ObjectRepositoryImpl<?, ?>[] repos) throws IOException {
         Repository repo = new RemoteRepository(rsd.m_location, rsd.m_customer, rsd.m_name);
 
         // Expose the repository itself as component so its dependencies get managed...
@@ -630,12 +629,12 @@ public class RepositoryAdminImpl impleme
         return (result == null) ? WorkingState.Unchanged : result;
     }
 
-    public void addArtifactHelper(ServiceReference ref, ArtifactHelper helper) {
+    public void addArtifactHelper(ServiceReference<ArtifactHelper> ref, ArtifactHelper helper) {
         String mimetype = (String) ref.getProperty(ArtifactHelper.KEY_MIMETYPE);
         m_artifactRepositoryImpl.addHelper(mimetype, helper);
     }
 
-    public synchronized void removeArtifactHelper(ServiceReference ref, ArtifactHelper helper) {
+    public synchronized void removeArtifactHelper(ServiceReference<ArtifactHelper> ref, ArtifactHelper helper) {
         String mimetype = (String) ref.getProperty(ArtifactHelper.KEY_MIMETYPE);
         m_artifactRepositoryImpl.removeHelper(mimetype, helper);
     }

Modified: ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/RepositoryAdminLoginContextImpl.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/RepositoryAdminLoginContextImpl.java?rev=1727510&r1=1727509&r2=1727510&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/RepositoryAdminLoginContextImpl.java (original)
+++ ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/RepositoryAdminLoginContextImpl.java Fri Jan 29 10:11:43 2016
@@ -119,7 +119,7 @@ public class RepositoryAdminLoginContext
      *            the to-be-added repository set descriptor, cannot be <code>null</code>.
      */
     private void checkConsistency(RepositorySetDescriptor descriptor) {
-        List<Class<? extends ObjectRepository>> seenClasses = new ArrayList<>();
+        List<Class<? extends ObjectRepository<?>>> seenClasses = new ArrayList<>();
         List<String> seenNames = new ArrayList<>();
 
         // Presumption: initially we start out without any duplication...
@@ -132,7 +132,7 @@ public class RepositoryAdminLoginContext
             throw new IllegalArgumentException("Duplicate repository name!");
         }
 
-        for (Class<? extends ObjectRepository> clazz : descriptor.m_objectRepositories) {
+        for (Class<? extends ObjectRepository<?>> clazz : descriptor.m_objectRepositories) {
             if (seenClasses.contains(clazz)) {
                 throw new IllegalArgumentException("Duplicate object repository!");
             }
@@ -148,9 +148,9 @@ public class RepositoryAdminLoginContext
         public final String m_customer;
         public final String m_name;
         public final boolean m_writeAccess;
-        public final Class<? extends ObjectRepository>[] m_objectRepositories;
+        public final Class<? extends ObjectRepository<?>>[] m_objectRepositories;
 
-        public RepositorySetDescriptor(URL location, String customer, String name, boolean writeAccess, Class<? extends ObjectRepository>... objectRepositories) {
+        public RepositorySetDescriptor(URL location, String customer, String name, boolean writeAccess, Class<? extends ObjectRepository<?>>... objectRepositories) {
             m_location = location;
             m_customer = customer;
             m_name = name;

Modified: ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/RepositoryObjectImpl.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/RepositoryObjectImpl.java?rev=1727510&r1=1727509&r2=1727510&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/RepositoryObjectImpl.java (original)
+++ ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/RepositoryObjectImpl.java Fri Jan 29 10:11:43 2016
@@ -48,12 +48,13 @@ import com.thoughtworks.xstream.io.Hiera
  * <code>put()</code> and <code>remove()</code>. It 'looks' like a dictionary to allow filtering of it, using an ldap
  * filter.
  */
+@SuppressWarnings("rawtypes")
 public class RepositoryObjectImpl<T extends RepositoryObject> extends Dictionary<String, Object> implements RepositoryObject, EventHandler {
     private final Map<String, String> m_attributes = new HashMap<>();
     private final Map<String, String> m_tags = new HashMap<>();
     /** see ACE-463 */
     private final Set<String> m_mergedAttrTags = new HashSet<>();
-    private final Map<Class, List<Association>> m_associations = new HashMap<>();
+    private final Map<Class<?>, List<Association>> m_associations = new HashMap<>();
     private final ChangeNotifier m_notifier;
     private final String m_xmlNode;
     private static final Pattern VALID_KEY_PATTERN = Pattern.compile("[a-zA-Z]([a-zA-Z0-9_:.-])*");

Modified: ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/RepositorySerializer.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/RepositorySerializer.java?rev=1727510&r1=1727509&r2=1727510&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/RepositorySerializer.java (original)
+++ ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/RepositorySerializer.java Fri Jan 29 10:11:43 2016
@@ -39,7 +39,7 @@ import com.thoughtworks.xstream.io.Hiera
  * xstream's writer in a delegate object, so this will not require changes to the repositories and objects.
  */
 class RepositorySerializer implements Converter {
-    private final Map<String, ObjectRepositoryImpl> m_tagToRepo = new HashMap<>();
+    private final Map<String, ObjectRepositoryImpl<?, ?>> m_tagToRepo = new HashMap<>();
 
     private final RepositorySet m_set;
 
@@ -47,7 +47,7 @@ class RepositorySerializer implements Co
 
     RepositorySerializer(RepositorySet set) {
         m_set = set;
-        for (ObjectRepositoryImpl repo : m_set.getRepos()) {
+        for (ObjectRepositoryImpl<?, ?> repo : m_set.getRepos()) {
             m_tagToRepo.put(repo.getXmlNode(), repo);
         }
         m_stream = new XStream();
@@ -56,7 +56,7 @@ class RepositorySerializer implements Co
     }
 
     public void marshal(Object target, HierarchicalStreamWriter writer, MarshallingContext context) {
-        for (ObjectRepositoryImpl repo : m_set.getRepos()) {
+        for (ObjectRepositoryImpl<?, ?> repo : m_set.getRepos()) {
             repo.marshal(writer);
         }
     }
@@ -65,7 +65,7 @@ class RepositorySerializer implements Co
         while (reader.hasMoreChildren()) {
             reader.moveDown();
             String nodeName = reader.getNodeName();
-            ObjectRepositoryImpl o = m_tagToRepo.get(nodeName);
+            ObjectRepositoryImpl<?, ?> o = m_tagToRepo.get(nodeName);
             o.unmarshal(reader);
             reader.moveUp();
         }
@@ -77,7 +77,7 @@ class RepositorySerializer implements Co
     }
 
     public void toXML(OutputStream out) throws IOException {
-        for (ObjectRepositoryImpl repo : m_set.getRepos()) {
+        for (ObjectRepositoryImpl<?, ?> repo : m_set.getRepos()) {
             repo.setBusy(true);
         }
         try {
@@ -87,7 +87,7 @@ class RepositorySerializer implements Co
         }
         finally {
             // Ensure all busy flags are reset at all times...
-            for (ObjectRepositoryImpl repo : m_set.getRepos()) {
+            for (ObjectRepositoryImpl<?, ?> repo : m_set.getRepos()) {
                 repo.setBusy(false);
             }
         }
@@ -102,7 +102,7 @@ class RepositorySerializer implements Co
     public void fromXML(InputStream in) {
         // The repositories get cleared, since a user *could* add stuff before
         // checking out.
-        for (ObjectRepositoryImpl repo : m_set.getRepos()) {
+        for (ObjectRepositoryImpl<?, ?> repo : m_set.getRepos()) {
             repo.setBusy(true);
             repo.removeAll();
         }
@@ -122,7 +122,7 @@ class RepositorySerializer implements Co
         finally {
             Thread.currentThread().setContextClassLoader(cl);
             // Ensure all busy flags are reset at all times...
-            for (ObjectRepositoryImpl repo : m_set.getRepos()) {
+            for (ObjectRepositoryImpl<?, ?> repo : m_set.getRepos()) {
                 repo.setBusy(false);
             }
         }

Modified: ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/RepositorySet.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/RepositorySet.java?rev=1727510&r1=1727509&r2=1727510&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/RepositorySet.java (original)
+++ ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/impl/RepositorySet.java Fri Jan 29 10:11:43 2016
@@ -58,7 +58,7 @@ class RepositorySet {
 
     private final User m_user;
     private final Preferences m_prefs;
-    private final ObjectRepositoryImpl[] m_repos;
+    private final ObjectRepositoryImpl<?, ?>[] m_repos;
     private final CachedRepository m_repository;
     private final String m_name;
     private final boolean m_writeAccess;
@@ -66,7 +66,7 @@ class RepositorySet {
     private final ChangeNotifier m_notifier;
     private final LogService m_log;
     
-    private volatile ServiceRegistration m_modifiedHandler;
+    private volatile ServiceRegistration<EventHandler> m_modifiedHandler;
 
     /* ********
      * Basics
@@ -80,7 +80,7 @@ class RepositorySet {
      * that endpoints of an association are available at the time of deserialization.</li>
      * </ul>
      */
-    RepositorySet(ChangeNotifier notifier, LogService log, User user, Preferences prefs, ObjectRepositoryImpl[] repos, CachedRepository repository, String name, boolean writeAccess) {
+    RepositorySet(ChangeNotifier notifier, LogService log, User user, Preferences prefs, ObjectRepositoryImpl<?, ?>[] repos, CachedRepository repository, String name, boolean writeAccess) {
         m_workingState = new ConcurrentHashMap<>();
         m_notifier = notifier;
         m_log = log;
@@ -114,7 +114,7 @@ class RepositorySet {
         return m_user;
     }
 
-    ObjectRepositoryImpl[] getRepos() {
+    ObjectRepositoryImpl<?, ?>[] getRepos() {
         return m_repos;
     }
 
@@ -148,7 +148,6 @@ class RepositorySet {
     /**
      * Only call this after the repository has been deserialized.
      */
-    @SuppressWarnings("unchecked")
     void loadPreferences() {
         Preferences workingNode = m_prefs.node(PREFS_LOCAL_WORKING_STATE);
         Map<String, WorkingState> entries = new HashMap<>();
@@ -168,7 +167,7 @@ class RepositorySet {
         }
         // Then, go through all objects and check whether they match a definition we know.
         // This prevents calling getDefinition more than once per object.
-        for (ObjectRepository<RepositoryObject> repo : m_repos) {
+        for (ObjectRepository<?> repo : m_repos) {
             for (RepositoryObject o : repo.get()) {
                 WorkingState state = entries.get(o.getDefinition());
                 if (state != null) {
@@ -246,18 +245,18 @@ class RepositorySet {
     }
 
     void clearRepositories() {
-        for (ObjectRepositoryImpl repo : getRepos()) {
+        for (ObjectRepositoryImpl<?, ?> repo : getRepos()) {
             repo.setBusy(true);
         }
 
         try {
-            for (ObjectRepositoryImpl repo : getRepos()) {
+            for (ObjectRepositoryImpl<?, ?> repo : getRepos()) {
                 repo.removeAll();
             }
         }
         finally {
             // Ensure all busy flags are reset at all times...
-            for (ObjectRepositoryImpl repo : getRepos()) {
+            for (ObjectRepositoryImpl<?, ?> repo : getRepos()) {
                 repo.setBusy(false);
             }
         }
@@ -284,7 +283,7 @@ class RepositorySet {
         Dictionary<String, Object> topic = new Hashtable<>();
         topic.put(EventConstants.EVENT_TOPIC, topics);
         topic.put(EventConstants.EVENT_FILTER, "(" + SessionFactory.SERVICE_SID + "=" + sessionID + ")");
-        m_modifiedHandler = context.registerService(EventHandler.class.getName(), new ModifiedHandler(), topic);
+        m_modifiedHandler = context.registerService(EventHandler.class, new ModifiedHandler(), topic);
     }
 
     WorkingState getWorkingState(RepositoryObject object) {
@@ -301,7 +300,6 @@ class RepositorySet {
         return result;
     }
 
-    @SuppressWarnings("unchecked")
     private void resetModified(boolean fill) {
         m_workingState.clear();
         if (fill) {

Modified: ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/stateful/impl/StatefulTargetObjectImpl.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/stateful/impl/StatefulTargetObjectImpl.java?rev=1727510&r1=1727509&r2=1727510&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/stateful/impl/StatefulTargetObjectImpl.java (original)
+++ ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/stateful/impl/StatefulTargetObjectImpl.java Fri Jan 29 10:11:43 2016
@@ -633,6 +633,7 @@ public class StatefulTargetObjectImpl im
         }
     }
 
+    @SuppressWarnings("rawtypes")
     public <T extends Associatable, A extends Association> List<A> getAssociationsWith(Associatable other, Class<T> clazz, Class<A> associationType) {
         synchronized (m_lock) {
             ensureTargetPresent();

Modified: ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/stateful/impl/StatefulTargetRepositoryImpl.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/stateful/impl/StatefulTargetRepositoryImpl.java?rev=1727510&r1=1727509&r2=1727510&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/stateful/impl/StatefulTargetRepositoryImpl.java (original)
+++ ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/stateful/impl/StatefulTargetRepositoryImpl.java Fri Jan 29 10:11:43 2016
@@ -365,7 +365,7 @@ public class StatefulTargetRepositoryImp
      *            A Properties event, already containing some extra properties. If RepositoryObject.EVENT_ENTITY is
      *            used, it will be overwritten.
      */
-    @SuppressWarnings("unchecked")
+    @SuppressWarnings({ "unchecked", "rawtypes" })
     void notifyChanged(StatefulTargetObject stoi, String topic, Properties additionalProperties) {
         additionalProperties.put(RepositoryObject.EVENT_ENTITY, stoi);
         additionalProperties.put(SessionFactory.SERVICE_SID, m_sessionID);

Modified: ace/trunk/org.apache.ace.client.repository/test/org/apache/ace/client/repository/impl/ModelTest.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.client.repository/test/org/apache/ace/client/repository/impl/ModelTest.java?rev=1727510&r1=1727509&r2=1727510&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.client.repository/test/org/apache/ace/client/repository/impl/ModelTest.java (original)
+++ ace/trunk/org.apache.ace.client.repository/test/org/apache/ace/client/repository/impl/ModelTest.java Fri Jan 29 10:11:43 2016
@@ -828,7 +828,7 @@ public class ModelTest {
 
         m_repositoryAdmin = new RepositoryAdminImpl("testSessionID", repoConfig);
 
-        Map<Class<? extends ObjectRepository>, ObjectRepositoryImpl> repos = new HashMap<>();
+        Map<Class<? extends ObjectRepository<?>>, ObjectRepositoryImpl<?, ?>> repos = new HashMap<>();
         repos.put(ArtifactRepository.class, m_artifactRepository);
         repos.put(Artifact2FeatureAssociationRepository.class, m_artifact2FeatureRepository);
         repos.put(FeatureRepository.class, m_featureRepository);

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=1727510&r1=1727509&r2=1727510&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 Fri Jan 29 10:11:43 2016
@@ -595,7 +595,7 @@ public class RESTClientServlet extends H
     }
 
     @Override
-    public void updated(Dictionary properties) throws ConfigurationException {
+    public void updated(Dictionary<String, ?> properties) throws ConfigurationException {
     	if (properties == null) {
     		// defaults
     		m_sessionTimeout = DEFAULT_SESSION_TIMEOUT;

Modified: ace/trunk/org.apache.ace.deployment/src/org/apache/ace/deployment/provider/repositorybased/RepositoryBasedProvider.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.deployment/src/org/apache/ace/deployment/provider/repositorybased/RepositoryBasedProvider.java?rev=1727510&r1=1727509&r2=1727510&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.deployment/src/org/apache/ace/deployment/provider/repositorybased/RepositoryBasedProvider.java (original)
+++ ace/trunk/org.apache.ace.deployment/src/org/apache/ace/deployment/provider/repositorybased/RepositoryBasedProvider.java Fri Jan 29 10:11:43 2016
@@ -472,7 +472,7 @@ public class RepositoryBasedProvider imp
 		}
     }
 
-    public void updated(Dictionary settings) throws ConfigurationException {
+    public void updated(Dictionary<String, ?> settings) throws ConfigurationException {
         if (settings != null) {
             String url = getNotNull(settings, URL, "DeploymentRepository URL not configured.");
             String name = getNotNull(settings, NAME, "RepositoryName not configured.");
@@ -522,7 +522,7 @@ public class RepositoryBasedProvider imp
     /**
      * Convenience method for getting settings from a configuration dictionary.
      */
-    private String getNotNull(Dictionary settings, String id, String errorMessage) throws ConfigurationException {
+    private String getNotNull(Dictionary<String, ?> settings, String id, String errorMessage) throws ConfigurationException {
         String result = (String) settings.get(id);
         if (result == null) {
             throw new ConfigurationException(id, errorMessage);

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=1727510&r1=1727509&r2=1727510&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 Fri Jan 29 10:11:43 2016
@@ -102,7 +102,7 @@ public class Activator extends Dependenc
     /**
      * @see org.osgi.service.cm.ManagedServiceFactory#updated(java.lang.String, java.util.Dictionary)
      */
-    public void updated(String pid, Dictionary dict) throws ConfigurationException {
+    public void updated(String pid, Dictionary<String, ?> dict) throws ConfigurationException {
         final String ma = (String) dict.get(MA_NAME);
         
         Component component = m_instances.get(pid);

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=1727510&r1=1727509&r2=1727510&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 Fri Jan 29 10:11:43 2016
@@ -31,7 +31,6 @@ 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.SortedSet;
 import java.util.TreeSet;
@@ -173,10 +172,9 @@ public class DeploymentServiceImpl imple
      * @param versions
      * @return
      */
-    private Version getHighestVersion(List versions) {
+    private Version getHighestVersion(List<Version> versions) {
         Version highestVersion = null;
-        for (Iterator i = versions.iterator(); i.hasNext();) {
-            Version version = (Version) i.next();
+        for (Version version : versions) {
             if (highestVersion == null) {
                 highestVersion = version;
             }

Modified: ace/trunk/org.apache.ace.deployment/src/org/apache/ace/deployment/servlet/AgentDeploymentServlet.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.deployment/src/org/apache/ace/deployment/servlet/AgentDeploymentServlet.java?rev=1727510&r1=1727509&r2=1727510&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.deployment/src/org/apache/ace/deployment/servlet/AgentDeploymentServlet.java (original)
+++ ace/trunk/org.apache.ace.deployment/src/org/apache/ace/deployment/servlet/AgentDeploymentServlet.java Fri Jan 29 10:11:43 2016
@@ -101,7 +101,7 @@ public class AgentDeploymentServlet exte
     }
 
     @Override
-    public void updated(Dictionary settings) throws ConfigurationException {
+    public void updated(Dictionary<String, ?> settings) throws ConfigurationException {
         if (settings != null) {
             String useAuthString = (String) settings.get(KEY_USE_AUTHENTICATION);
             if (useAuthString == null

Modified: ace/trunk/org.apache.ace.deployment/src/org/apache/ace/deployment/servlet/DeploymentServlet.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.deployment/src/org/apache/ace/deployment/servlet/DeploymentServlet.java?rev=1727510&r1=1727509&r2=1727510&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.deployment/src/org/apache/ace/deployment/servlet/DeploymentServlet.java (original)
+++ ace/trunk/org.apache.ace.deployment/src/org/apache/ace/deployment/servlet/DeploymentServlet.java Fri Jan 29 10:11:43 2016
@@ -79,7 +79,7 @@ public class DeploymentServlet extends H
 
     private volatile boolean m_useAuth = false;
 
-    public void addProcessor(ServiceReference ref, DeploymentProcessor processor) {
+    public void addProcessor(ServiceReference<DeploymentProcessor> ref, DeploymentProcessor processor) {
         String key = (String) ref.getProperty(PROCESSOR);
         if (key != null) {
             m_processors.putIfAbsent(key, processor);
@@ -94,7 +94,7 @@ public class DeploymentServlet extends H
         return "Ace Deployment Servlet Endpoint";
     }
 
-    public void removeProcessor(ServiceReference ref, DeploymentProcessor processor) {
+    public void removeProcessor(ServiceReference<DeploymentProcessor> ref, DeploymentProcessor processor) {
         String key = (String) ref.getProperty(PROCESSOR);
         // we do not log this here again, we already did so in 'addProcessor'
         if (key != null) {
@@ -103,7 +103,7 @@ public class DeploymentServlet extends H
     }
 
     @Override
-    public void updated(Dictionary settings) throws ConfigurationException {
+    public void updated(Dictionary<String, ?> settings) throws ConfigurationException {
         if (settings != null) {
             String useAuthString = (String) settings.get(KEY_USE_AUTHENTICATION);
             if (useAuthString == null

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=1727510&r1=1727509&r2=1727510&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 Fri Jan 29 10:11:43 2016
@@ -101,7 +101,7 @@ public class Activator extends Dependenc
     /**
      * @see org.osgi.service.cm.ManagedServiceFactory#updated(java.lang.String, java.util.Dictionary)
      */
-    public void updated(String pid, Dictionary dict) throws ConfigurationException {
+    public void updated(String pid, Dictionary<String, ?> dict) throws ConfigurationException {
         String ma = (String) dict.get(MA_NAME);
 
         List<Component> components = m_instances.get(pid);

Modified: ace/trunk/org.apache.ace.gogo/src/org/apache/ace/gogo/collection/CollectionCommands.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.gogo/src/org/apache/ace/gogo/collection/CollectionCommands.java?rev=1727510&r1=1727509&r2=1727510&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.gogo/src/org/apache/ace/gogo/collection/CollectionCommands.java (original)
+++ ace/trunk/org.apache.ace.gogo/src/org/apache/ace/gogo/collection/CollectionCommands.java Fri Jan 29 10:11:43 2016
@@ -25,7 +25,7 @@ public class CollectionCommands {
     public static final String[] FUNCTIONS = { "first", "rest" };
 
     /** Returns the first object in a list. */
-    public Object first(List list) {
+    public Object first(List<?> list) {
         if (list != null && !list.isEmpty()) {
             return list.get(0);
         }
@@ -33,7 +33,7 @@ public class CollectionCommands {
     }
 
     /** Returns the rest of the list, meaning everything but the first object. */
-    public List rest(List list) {
+    public List<?> rest(List<?> list) {
         if (list != null && !list.isEmpty() && list.size() > 1) {
             return list.subList(1, list.size());
         }

Modified: ace/trunk/org.apache.ace.http/src/org/apache/ace/http/listener/Activator.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.http/src/org/apache/ace/http/listener/Activator.java?rev=1727510&r1=1727509&r2=1727510&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.http/src/org/apache/ace/http/listener/Activator.java (original)
+++ ace/trunk/org.apache.ace.http/src/org/apache/ace/http/listener/Activator.java Fri Jan 29 10:11:43 2016
@@ -71,7 +71,7 @@ public class Activator extends Dependenc
                 .setAutoConfig(false)
                 .setCallbacks("addHttpService", "removeHttpService"))
             .add(createServiceDependency()
-                .setService(Servlet.class)
+                .setService(Servlet.class, "(" + HttpConstants.ENDPOINT + "=*)")
                 .setAutoConfig(false)
                 .setCallbacks("addServlet", "changeServlet", "removeServlet")));
     }
@@ -107,7 +107,7 @@ public class Activator extends Dependenc
         }
     }
 
-    private Dictionary<String, Object> getInitParams(ServiceReference ref) {
+    private Dictionary<String, Object> getInitParams(ServiceReference<?> ref) {
         Dictionary<String, Object> initParams = new Hashtable<>();
         for (String key : ref.getPropertyKeys()) {
             if (key.startsWith(INIT_PREFIX)) {
@@ -191,7 +191,7 @@ public class Activator extends Dependenc
      * @param ref
      *            reference to the Service
      */
-    public synchronized void removeHttpService(ServiceReference ref, HttpService httpService) {
+    public synchronized void removeHttpService(ServiceReference<HttpService> ref, HttpService httpService) {
         m_httpServices.remove(ref);
         // remove references from the unregistered HttpService
         unregisterEndpoints(httpService);
@@ -217,7 +217,7 @@ public class Activator extends Dependenc
      *            the HttpService that is being unregistered
      */
     private void unregisterEndpoints(HttpService httpService) {
-        for (ServiceReference reference : m_servlets.keySet()) {
+        for (ServiceReference<Servlet> reference : m_servlets.keySet()) {
             String endpoint = (String) reference.getProperty(HttpConstants.ENDPOINT);
             if (endpoint != null) {
                 try {

Modified: ace/trunk/org.apache.ace.http/src/org/apache/ace/http/redirector/RedirectServlet.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.http/src/org/apache/ace/http/redirector/RedirectServlet.java?rev=1727510&r1=1727509&r2=1727510&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.http/src/org/apache/ace/http/redirector/RedirectServlet.java (original)
+++ ace/trunk/org.apache.ace.http/src/org/apache/ace/http/redirector/RedirectServlet.java Fri Jan 29 10:11:43 2016
@@ -31,20 +31,20 @@ import org.osgi.framework.ServiceRegistr
 import org.osgi.service.cm.ConfigurationException;
 
 /**
- * Servlet that will redirect from a source URL to a target URL. If you append ?show to the source URL,
- * it will instead show you the redirect (and you can still click on the target URL).
+ * Servlet that will redirect from a source URL to a target URL. If you append ?show to the source URL, it will instead
+ * show you the redirect (and you can still click on the target URL).
  */
 public class RedirectServlet extends HttpServlet {
-	private static final long serialVersionUID = -2218040475620089019L;
-	public static final String REDIRECT_URL_KEY = "org.apache.ace.webui.vaadin.redirect";
+    public static final String REDIRECT_URL_KEY = "org.apache.ace.webui.vaadin.redirect";
+
     private final Object LOCK = new Object();
-    
+
     private volatile ServiceRegistration<?> m_registration;
-    
+
     private String m_redirectURL;
     private String m_sourceURL;
-    
-    public RedirectServlet(Dictionary properties) throws ConfigurationException {
+
+    public RedirectServlet(Dictionary<String, ?> properties) throws ConfigurationException {
         setup(properties);
     }
 
@@ -64,13 +64,13 @@ public class RedirectServlet extends Htt
             resp.sendRedirect(url);
         }
     }
-    
+
     public void update(Dictionary<String, ?> properties) throws ConfigurationException {
         setup(properties);
         m_registration.setProperties(properties);
     }
 
-    private void setup(Dictionary properties) throws ConfigurationException {
+    private void setup(Dictionary<String, ?> properties) throws ConfigurationException {
         synchronized (LOCK) {
             m_redirectURL = (String) properties.get(REDIRECT_URL_KEY);
             m_sourceURL = (String) properties.get(HttpConstants.ENDPOINT);

Modified: ace/trunk/org.apache.ace.identification/src/org/apache/ace/identification/property/Activator.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.identification/src/org/apache/ace/identification/property/Activator.java?rev=1727510&r1=1727509&r2=1727510&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.identification/src/org/apache/ace/identification/property/Activator.java (original)
+++ ace/trunk/org.apache.ace.identification/src/org/apache/ace/identification/property/Activator.java Fri Jan 29 10:11:43 2016
@@ -67,7 +67,7 @@ public class Activator extends Dependenc
         return "Identification Service Factory";
     }
 
-    public void updated(String pid, Dictionary dict) throws ConfigurationException {
+    public void updated(String pid, Dictionary<String, ?> dict) throws ConfigurationException {
         String ma = (String) dict.get(MA_NAME);
         String id = (String) dict.get(IdentificationConstants.IDENTIFICATION_TARGETID_KEY);
 

Modified: ace/trunk/org.apache.ace.identification/src/org/apache/ace/identification/property/PropertyBasedIdentification.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.identification/src/org/apache/ace/identification/property/PropertyBasedIdentification.java?rev=1727510&r1=1727509&r2=1727510&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.identification/src/org/apache/ace/identification/property/PropertyBasedIdentification.java (original)
+++ ace/trunk/org.apache.ace.identification/src/org/apache/ace/identification/property/PropertyBasedIdentification.java Fri Jan 29 10:11:43 2016
@@ -58,7 +58,7 @@ public class PropertyBasedIdentification
         }
     }
 
-    public void updated(Dictionary dictionary) throws ConfigurationException {
+    public void updated(Dictionary<String, ?> dictionary) throws ConfigurationException {
         if (dictionary != null) {
             String id = (String) dictionary.get(IdentificationConstants.IDENTIFICATION_TARGETID_KEY);
             if ((id == null) || (id.length() == 0)) {

Modified: ace/trunk/org.apache.ace.identification/test/org/apache/ace/identification/property/PropertyBasedIdentificationTest.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.identification/test/org/apache/ace/identification/property/PropertyBasedIdentificationTest.java?rev=1727510&r1=1727509&r2=1727510&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.identification/test/org/apache/ace/identification/property/PropertyBasedIdentificationTest.java (original)
+++ ace/trunk/org.apache.ace.identification/test/org/apache/ace/identification/property/PropertyBasedIdentificationTest.java Fri Jan 29 10:11:43 2016
@@ -31,7 +31,6 @@ import org.osgi.service.log.LogService;
 import org.testng.Assert;
 import org.testng.annotations.Test;
 
-@SuppressWarnings({ "unchecked" })
 public class PropertyBasedIdentificationTest {
     @Test(groups = { UNIT })
     public void getIdWithoutUpdate() {
@@ -42,7 +41,7 @@ public class PropertyBasedIdentification
     @Test(groups = { UNIT })
     public void getIdWithUpdate() throws ConfigurationException {
         PropertyBasedIdentification basedIdentification = new PropertyBasedIdentification();
-        Dictionary dict = new Hashtable();
+        Dictionary<String, Object> dict = new Hashtable<>();
         dict.put(IdentificationConstants.IDENTIFICATION_TARGETID_KEY, "myTargetId");
         basedIdentification.updated(dict);
         Assert.assertEquals(basedIdentification.getID(), "myTargetId");
@@ -53,9 +52,9 @@ public class PropertyBasedIdentification
         PropertyBasedIdentification basedIdentification = new PropertyBasedIdentification();
         injectServices(basedIdentification);
 
-        Dictionary dict = new Hashtable();
+        Dictionary<String, Object> dict = new Hashtable<>();
         dict.put(IdentificationConstants.IDENTIFICATION_TARGETID_KEY, "oldId");
-        Dictionary dict2 = new Hashtable();
+        Dictionary<String, Object> dict2 = new Hashtable<>();
         dict2.put(IdentificationConstants.IDENTIFICATION_TARGETID_KEY, "newId");
 
         basedIdentification.updated(dict);

Modified: ace/trunk/org.apache.ace.identification/test/org/apache/ace/identification/property/SimpleIdentificationTest.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.identification/test/org/apache/ace/identification/property/SimpleIdentificationTest.java?rev=1727510&r1=1727509&r2=1727510&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.identification/test/org/apache/ace/identification/property/SimpleIdentificationTest.java (original)
+++ ace/trunk/org.apache.ace.identification/test/org/apache/ace/identification/property/SimpleIdentificationTest.java Fri Jan 29 10:11:43 2016
@@ -20,7 +20,7 @@ package org.apache.ace.identification.pr
 
 import static org.apache.ace.test.utils.TestUtils.UNIT;
 
-import java.util.Properties;
+import java.util.Hashtable;
 
 import org.apache.ace.identification.IdentificationConstants;
 import org.apache.ace.test.utils.TestUtils;
@@ -48,7 +48,7 @@ public class SimpleIdentificationTest {
     @Test(groups = { UNIT })
     public void testSimpleIdentification() throws Exception {
         m_identification.updated(
-            new Properties() {
+            new Hashtable<String, Object>() {
                 {put(IdentificationConstants.IDENTIFICATION_TARGETID_KEY, TEST_ID);}
             });
         assert TEST_ID.equals(m_identification.getID()) : "target ID does not match configured target ID";

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=1727510&r1=1727509&r2=1727510&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 Fri Jan 29 10:11:43 2016
@@ -20,48 +20,52 @@ package org.apache.ace.log.listener;
 
 import java.util.ArrayList;
 import java.util.Dictionary;
-import java.util.Iterator;
 import java.util.List;
+import java.util.concurrent.CopyOnWriteArrayList;
+
 import org.apache.ace.log.Log;
 
 /**
- * This cache is used whenever the real log service is not available. When
- * the real log becomes available, all cached log entries should be flushed
- * to the real log service and leaving the cache empty afterwards.
+ * This cache is used whenever the real log service is not available. When the real log becomes available, all cached
+ * log entries should be flushed to the real log service and leaving the cache empty afterwards.
  */
 public class LogCache implements Log {
 
-    private final List<LogEntry> m_logEntries = new ArrayList<>();
+    private final List<LogEntry> m_logEntries = new CopyOnWriteArrayList<>();
 
     /**
      * Log the entry in the cache for flushing to the real log service later on.
      */
-    public synchronized void log(int type, Dictionary properties) {
+    public void log(int type, Dictionary properties) {
         m_logEntries.add(new LogEntry(type, properties));
     }
 
     /**
-     * Flushes all cached log entries to the specified Log and leaves the cache empty
-     * after flushing. Will do nothing when a null is passed as parameter.
-     * @param log  The log service to flush the cached log entries to
+     * Flushes all cached log entries to the specified Log and leaves the cache empty after flushing. Will do nothing
+     * when a null is passed as parameter.
+     * 
+     * @param log
+     *            The log service to flush the cached log entries to
      */
-    public synchronized void flushTo(Log log) {
-        if (log != null) {
-            for (Iterator iterator = m_logEntries.iterator(); iterator.hasNext();) {
-                LogEntry entry = (LogEntry) iterator.next();
-                log.log(entry.getType(), entry.getProperties());
-            }
-            m_logEntries.clear();
-        }
-        else {
+    public void flushTo(Log log) {
+        if (log == null) {
             // do nothing, as you want to keep using the cache
+            return;
+        }
+
+        List<LogEntry> entries = new ArrayList<>(m_logEntries);
+        m_logEntries.removeAll(entries);
+
+        for (LogEntry entry : entries) {
+            log.log(entry.getType(), entry.getProperties());
         }
     }
 
     private class LogEntry {
         private int m_type;
-        private Dictionary m_properties;
-        public LogEntry(int type, Dictionary properties) {
+        private Dictionary<String, ?> m_properties;
+
+        public LogEntry(int type, Dictionary<String, ?> properties) {
             m_type = type;
             m_properties = properties;
         }
@@ -70,8 +74,8 @@ public class LogCache implements Log {
             return m_type;
         }
 
-        public Dictionary getProperties() {
+        public Dictionary<String, ?> getProperties() {
             return m_properties;
         }
     }
-}
\ No newline at end of file
+}

Modified: ace/trunk/org.apache.ace.log/src/org/apache/ace/log/server/servlet/Activator.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.log/src/org/apache/ace/log/server/servlet/Activator.java?rev=1727510&r1=1727509&r2=1727510&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.log/src/org/apache/ace/log/server/servlet/Activator.java (original)
+++ ace/trunk/org.apache.ace.log/src/org/apache/ace/log/server/servlet/Activator.java Fri Jan 29 10:11:43 2016
@@ -72,7 +72,7 @@ public class Activator extends Dependenc
         return "Log Servlet Factory";
     }
 
-    public void updated(String pid, Dictionary dict) throws ConfigurationException {
+    public void updated(String pid, Dictionary<String, ?> dict) throws ConfigurationException {
         String name = (String) dict.get(KEY_LOG_NAME);
         if ((name == null) || "".equals(name)) {
             throw new ConfigurationException(KEY_LOG_NAME, "Log name has to be specified: " + name);

Modified: ace/trunk/org.apache.ace.log/src/org/apache/ace/log/server/store/impl/Activator.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.log/src/org/apache/ace/log/server/store/impl/Activator.java?rev=1727510&r1=1727509&r2=1727510&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.log/src/org/apache/ace/log/server/store/impl/Activator.java (original)
+++ ace/trunk/org.apache.ace.log/src/org/apache/ace/log/server/store/impl/Activator.java Fri Jan 29 10:11:43 2016
@@ -81,7 +81,7 @@ public class Activator extends Dependenc
         return "Log Store Factory";
     }
 
-    public synchronized void updated(String pid, Dictionary dict) throws ConfigurationException {
+    public synchronized void updated(String pid, Dictionary<String, ?> dict) throws ConfigurationException {
         String name = (String) dict.get(LOG_NAME);
         if ((name == null) || "".equals(name)) {
             throw new ConfigurationException(LOG_NAME, "Log name has to be specified.");

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=1727510&r1=1727509&r2=1727510&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 Fri Jan 29 10:11:43 2016
@@ -529,7 +529,7 @@ public class LogStoreImpl implements Log
     @Override
     public Event put(String targetID, int type, Dictionary dict) throws IOException {
         Map<String, String> props = new HashMap<>();
-        Enumeration keys = dict.keys();
+        Enumeration<?> keys = dict.keys();
         while (keys.hasMoreElements()) {
             String key = (String) keys.nextElement();
             props.put(key, (String) dict.get(key));

Modified: ace/trunk/org.apache.ace.log/src/org/apache/ace/log/server/task/Activator.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.log/src/org/apache/ace/log/server/task/Activator.java?rev=1727510&r1=1727509&r2=1727510&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.log/src/org/apache/ace/log/server/task/Activator.java (original)
+++ ace/trunk/org.apache.ace.log/src/org/apache/ace/log/server/task/Activator.java Fri Jan 29 10:11:43 2016
@@ -65,7 +65,7 @@ public class Activator extends Dependenc
         return "Log Sync Task Factory";
     }
 
-    public synchronized void updated(String pid, Dictionary dict) throws ConfigurationException {
+    public synchronized void updated(String pid, Dictionary<String, ?> dict) throws ConfigurationException {
         String name = (String) dict.get(KEY_LOG_NAME);
         if ((name == null) || "".equals(name)) {
             throw new ConfigurationException(KEY_LOG_NAME, "Log name has to be specified.");

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=1727510&r1=1727509&r2=1727510&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 Fri Jan 29 10:11:43 2016
@@ -50,7 +50,7 @@ public class LogConfigurator implements
         }
     }
 
-    public synchronized void updated(String pid, Dictionary dict) throws ConfigurationException {
+    public synchronized void updated(String pid, Dictionary<String, ?> dict) throws ConfigurationException {
         String name = (String) dict.get(LOG_NAME);
         if ((name == null) || "".equals(name)) {
             throw new ConfigurationException(LOG_NAME, "Log name has to be specified.");

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=1727510&r1=1727509&r2=1727510&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 Fri Jan 29 10:11:43 2016
@@ -55,7 +55,7 @@ public class LogSyncConfigurator impleme
         }
     }
 
-    public synchronized void updated(String pid, Dictionary dict) throws ConfigurationException {
+    public synchronized void updated(String pid, Dictionary<String, ?> dict) throws ConfigurationException {
         String name = (String) dict.get(LOG_NAME);
         String ma = (String) dict.get(MA_NAME);
         if ((name == null) || "".equals(name)) {

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=1727510&r1=1727509&r2=1727510&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 Fri Jan 29 10:11:43 2016
@@ -88,7 +88,7 @@ public class Activator extends Dependenc
         root.delete();
     }
 
-    public void updated(String pid, Dictionary dict) throws ConfigurationException {
+    public void updated(String pid, Dictionary<String, ?> dict) throws ConfigurationException {
         String ma = (String) dict.get(MA_NAME);
         String name = (String) dict.get(LOG_NAME);
         if ((name == null) || "".equals(name)) {

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=1727510&r1=1727509&r2=1727510&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 Fri Jan 29 10:11:43 2016
@@ -257,7 +257,7 @@ public class LogStoreImpl implements Log
     public synchronized Event put(int type, Dictionary dict) throws IOException {
         try {
             Map<String, String> props = new HashMap<>();
-            Enumeration keys = dict.keys();
+            Enumeration<?> keys = dict.keys();
             while (keys.hasMoreElements()) {
                 String key = (String) keys.nextElement();
                 props.put(key, (String) dict.get(key));

Modified: ace/trunk/org.apache.ace.log/src/org/apache/ace/log/target/task/LogSyncTask.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.log/src/org/apache/ace/log/target/task/LogSyncTask.java?rev=1727510&r1=1727509&r2=1727510&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.log/src/org/apache/ace/log/target/task/LogSyncTask.java (original)
+++ ace/trunk/org.apache.ace.log/src/org/apache/ace/log/target/task/LogSyncTask.java Fri Jan 29 10:11:43 2016
@@ -28,14 +28,13 @@ import java.net.ConnectException;
 import java.net.HttpURLConnection;
 import java.net.URL;
 import java.net.URLConnection;
-import java.util.Iterator;
 import java.util.List;
 
 import org.apache.ace.connectionfactory.ConnectionFactory;
 import org.apache.ace.discovery.Discovery;
-import org.apache.ace.identification.Identification;
 import org.apache.ace.feedback.Descriptor;
 import org.apache.ace.feedback.Event;
+import org.apache.ace.identification.Identification;
 import org.apache.ace.log.target.store.LogStore;
 import org.apache.ace.range.RangeIterator;
 import org.apache.ace.range.SortedRangeSet;
@@ -149,10 +148,8 @@ public class LogSyncTask implements Runn
             long lowest = rangeIterator.next();
             long highest = delta.getHigh();
             if (lowest <= highest) {
-                List events = m_LogStore.get(logID, lowest, highestLocal > highest ? highest : highestLocal);
-                Iterator iter = events.iterator();
-                while (iter.hasNext()) {
-                    Event current = (Event) iter.next();
+                List<Event> events = m_LogStore.get(logID, lowest, highestLocal > highest ? highest : highestLocal);
+                for (Event current : events) {
                     while ((current.getID() > lowest) && rangeIterator.hasNext()) {
                         lowest = rangeIterator.next();
                     }

Modified: ace/trunk/org.apache.ace.log/test/org/apache/ace/log/listener/LogTest.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.log/test/org/apache/ace/log/listener/LogTest.java?rev=1727510&r1=1727509&r2=1727510&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.log/test/org/apache/ace/log/listener/LogTest.java (original)
+++ ace/trunk/org.apache.ace.log/test/org/apache/ace/log/listener/LogTest.java Fri Jan 29 10:11:43 2016
@@ -21,6 +21,7 @@ package org.apache.ace.log.listener;
 import static org.apache.ace.test.utils.TestUtils.UNIT;
 
 import java.util.Dictionary;
+import java.util.Hashtable;
 import java.util.List;
 import java.util.Properties;
 
@@ -50,12 +51,11 @@ public class LogTest {
     /**
      * Test whether logging to the cache and setting a new Log causes the log entries to be flushed to this new Log.
      */
-    @SuppressWarnings("unchecked")
     @Test(groups = { UNIT })
     public void testLogCacheFlush() throws Exception {
         assert ((MockLog) m_mockLog).getLogEntries().size() == 0 : "MockLog is not empty on start of test";
 
-        Dictionary props = new Properties();
+        Dictionary<String, Object> props = new Hashtable<>();
         String test = "test";
         String value = "value";
         props.put(test, value);
@@ -73,13 +73,12 @@ public class LogTest {
      * Test whether after unsetting the Log, no new log entries are added, but that they are added to the cache instead
      * (test the latter by flushing the cache).
      */
-    @SuppressWarnings("unchecked")
     @Test(groups = { UNIT })
     public void testUnsettingLog() throws Exception {
         assert ((MockLog) m_mockLog).getLogEntries().size() == 0 : "MockLog is not empty on start of test";
         m_logProxy.setLog(m_mockLog);
 
-        Dictionary props = new Properties();
+        Dictionary<String, Object> props = new Hashtable<>();
         props.put("test", "value");
         m_logProxy.log(1, props);
 
@@ -87,7 +86,7 @@ public class LogTest {
 
         m_logProxy.setLog(null);
 
-        Dictionary props2 = new Properties();
+        Dictionary<String, Object> props2 = new Hashtable<>();
         props2.put("test2", "value2");
         m_logProxy.log(2, props2);
 
@@ -145,12 +144,12 @@ public class LogTest {
         listeners.frameworkEvent(frameworkEvent);
         listeners.stopInternal();
 
-        List logEntries = ((MockLog) m_mockLog).getLogEntries();
+        List<LogEntry> logEntries = ((MockLog) m_mockLog).getLogEntries();
         assert logEntries.size() == 2 : "2 log entries should be logged";
 
         LogEntry bundleEntry = (LogEntry) logEntries.get(0);
         assert bundleEntry.getType() == AuditEvent.BUNDLE_INSTALLED : "state BUNDLE_INSTALLED (" + AuditEvent.BUNDLE_INSTALLED + ") should be in log but '" + bundleEntry.getType() + "' is in log instead";
-        Dictionary bundleProps = bundleEntry.getProperties();
+        Dictionary<String, ?> bundleProps = bundleEntry.getProperties();
         assert bundleProps.size() == 4 : "4 properties should be stored, but found: " + bundleProps.size();
         assert bundleProps.get(AuditEvent.KEY_ID).equals(Long.toString(bundleId)) : "id should be " + bundleId + " but is: " + bundleProps.get(AuditEvent.KEY_ID);
         assert bundleProps.get(AuditEvent.KEY_NAME).equals(symbolicName) : "symbolicName should be " + symbolicName + " but is " + bundleProps.get(AuditEvent.KEY_NAME);
@@ -159,7 +158,7 @@ public class LogTest {
 
         LogEntry frameworkEntry = (LogEntry) logEntries.get(1);
         assert frameworkEntry.getType() == AuditEvent.FRAMEWORK_INFO : "state FRAMEWORK_INFO (" + AuditEvent.FRAMEWORK_INFO + ") should be in log but '" + frameworkEntry.getType() + "' is in log instead";
-        Dictionary frameworkProps = frameworkEntry.getProperties();
+        Dictionary<String, ?> frameworkProps = frameworkEntry.getProperties();
         assert frameworkProps.size() == 2 : "2 properties should be stored, but found: " + frameworkProps.size();
         assert frameworkProps.get(AuditEvent.KEY_ID).equals(Long.toString(bundleId)) : "id should be " + bundleId + " but is: " + frameworkProps.get(AuditEvent.KEY_ID);
         assert frameworkProps.get(AuditEvent.KEY_TYPE).equals(IllegalStateException.class.getName()) : "exceptionType should be " + IllegalStateException.class.getName() + " but is: " + frameworkProps.get(AuditEvent.KEY_TYPE);

Modified: ace/trunk/org.apache.ace.log/test/org/apache/ace/log/listener/MockLog.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.log/test/org/apache/ace/log/listener/MockLog.java?rev=1727510&r1=1727509&r2=1727510&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.log/test/org/apache/ace/log/listener/MockLog.java (original)
+++ ace/trunk/org.apache.ace.log/test/org/apache/ace/log/listener/MockLog.java Fri Jan 29 10:11:43 2016
@@ -19,29 +19,26 @@
 package org.apache.ace.log.listener;
 
 import java.util.ArrayList;
-import java.util.Collections;
 import java.util.Dictionary;
 import java.util.List;
+import java.util.concurrent.CopyOnWriteArrayList;
 
 import org.apache.ace.log.Log;
 
 public class MockLog implements Log {
 
-    private List m_logEntries;
+    private List<LogEntry> m_logEntries;
 
-    @SuppressWarnings("unchecked")
     public MockLog() {
-        m_logEntries = Collections.synchronizedList(new ArrayList());
+        m_logEntries = new CopyOnWriteArrayList<>();
     }
 
-    @SuppressWarnings("unchecked")
     public void log(int type, Dictionary properties) {
         m_logEntries.add(new LogEntry(type, properties));
     }
 
-    @SuppressWarnings("unchecked")
-    public List getLogEntries() {
-        return new ArrayList(m_logEntries);
+    public List<LogEntry> getLogEntries() {
+        return new ArrayList<>(m_logEntries);
     }
 
     public void clear() {
@@ -50,9 +47,9 @@ public class MockLog implements Log {
 
     public class LogEntry {
         private int m_type;
-        private Dictionary m_properties;
+        private Dictionary<String, ?> m_properties;
 
-        public LogEntry(int type, Dictionary properties) {
+        public LogEntry(int type, Dictionary<String, ?> properties) {
             m_type = type;
             m_properties = properties;
         }
@@ -61,7 +58,7 @@ public class MockLog implements Log {
             return m_type;
         }
 
-        public Dictionary getProperties() {
+        public Dictionary<String, ?> getProperties() {
             return m_properties;
         }
     }

Modified: ace/trunk/org.apache.ace.obr/src/org/apache/ace/obr/storage/file/BundleFileStore.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.obr/src/org/apache/ace/obr/storage/file/BundleFileStore.java?rev=1727510&r1=1727509&r2=1727510&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.obr/src/org/apache/ace/obr/storage/file/BundleFileStore.java (original)
+++ ace/trunk/org.apache.ace.obr/src/org/apache/ace/obr/storage/file/BundleFileStore.java Fri Jan 29 10:11:43 2016
@@ -189,7 +189,7 @@ public class BundleFileStore implements
         return false;
     }
 
-    public void updated(Dictionary dict) throws ConfigurationException {
+    public void updated(Dictionary<String, ?> dict) throws ConfigurationException {
         if (dict != null) {
             String path = (String) dict.get(OBRFileStoreConstants.FILE_LOCATION_KEY);
             if (path == null) {

Modified: ace/trunk/org.apache.ace.obr/test/org/apache/ace/obr/servlet/MockBundleStore.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.obr/test/org/apache/ace/obr/servlet/MockBundleStore.java?rev=1727510&r1=1727509&r2=1727510&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.obr/test/org/apache/ace/obr/servlet/MockBundleStore.java (original)
+++ ace/trunk/org.apache.ace.obr/test/org/apache/ace/obr/servlet/MockBundleStore.java Fri Jan 29 10:11:43 2016
@@ -60,7 +60,7 @@ public class MockBundleStore implements
         return false;
     }
 
-    public void updated(Dictionary arg0) throws ConfigurationException {
-        // TODO does nothing yet
+    public void updated(Dictionary<String, ?> dict) throws ConfigurationException {
+        // Nop
     }
 }

Modified: ace/trunk/org.apache.ace.obr/test/org/apache/ace/obr/storage/file/BundleFileStoreTest.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.obr/test/org/apache/ace/obr/storage/file/BundleFileStoreTest.java?rev=1727510&r1=1727509&r2=1727510&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.obr/test/org/apache/ace/obr/storage/file/BundleFileStoreTest.java (original)
+++ ace/trunk/org.apache.ace.obr/test/org/apache/ace/obr/storage/file/BundleFileStoreTest.java Fri Jan 29 10:11:43 2016
@@ -27,7 +27,8 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
 import java.util.Arrays;
-import java.util.Properties;
+import java.util.Dictionary;
+import java.util.Hashtable;
 import java.util.Random;
 import java.util.jar.Attributes;
 import java.util.jar.JarOutputStream;
@@ -65,7 +66,8 @@ public class BundleFileStoreTest {
         m_directory = FileUtils.createTempFile(null);
         m_directory.mkdir();
 
-        Properties props = new Properties();
+        Dictionary<String, Object> props = new Hashtable<>();
+
         props.put(OBRFileStoreConstants.FILE_LOCATION_KEY, m_directory.getAbsolutePath());
         m_bundleStore.updated(props);
 
@@ -207,7 +209,8 @@ public class BundleFileStoreTest {
         File subDir = new File(m_directory.getAbsolutePath(), "changedDirectory");
         subDir.mkdir();
 
-        Properties props = new Properties();
+        Dictionary<String, Object> props = new Hashtable<>();
+
         props.put(OBRFileStoreConstants.FILE_LOCATION_KEY, subDir.getAbsolutePath());
         try {
             m_bundleStore.updated(props);
@@ -233,7 +236,8 @@ public class BundleFileStoreTest {
         File file = new File(m_directory.getAbsolutePath(), "file");
         file.createNewFile();
 
-        Properties props = new Properties();
+        Dictionary<String, Object> props = new Hashtable<>();
+
         props.put(OBRFileStoreConstants.FILE_LOCATION_KEY, file.getAbsolutePath());
         try {
             m_bundleStore.updated(props);
@@ -361,7 +365,8 @@ public class BundleFileStoreTest {
     public void updateConfigurationWithNull() throws Exception {
         boolean exceptionThrown = false;
 
-        Properties props = new Properties();
+        Dictionary<String, Object> props = new Hashtable<>();
+
         try {
             m_bundleStore.updated(props);
         }
@@ -389,7 +394,8 @@ public class BundleFileStoreTest {
     @Test(groups = { UNIT })
     public void updateConfigurationWithSameDirectory() throws Exception {
 
-        Properties props = new Properties();
+        Dictionary<String, Object> props = new Hashtable<>();
+
         props.put(OBRFileStoreConstants.FILE_LOCATION_KEY, m_directory.getAbsolutePath());
         try {
             m_bundleStore.updated(props);

Modified: ace/trunk/org.apache.ace.repository/servlet.bnd
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.repository/servlet.bnd?rev=1727510&r1=1727509&r2=1727510&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.repository/servlet.bnd (original)
+++ ace/trunk/org.apache.ace.repository/servlet.bnd Fri Jan 29 10:11:43 2016
@@ -2,7 +2,6 @@
 
 Private-Package: org.apache.ace.repository.servlet
 Bundle-Activator: org.apache.ace.repository.servlet.Activator
-Export-Package: org.apache.ace.repository.servlet
 Bundle-Version: 2.0.0
 Bundle-Name: Apache ACE Repository Servlet
 Bundle-Description: Registers a repository and replication servlet
\ No newline at end of file

Modified: ace/trunk/org.apache.ace.repository/src/org/apache/ace/repository/impl/RepositoryFactory.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.repository/src/org/apache/ace/repository/impl/RepositoryFactory.java?rev=1727510&r1=1727509&r2=1727510&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.repository/src/org/apache/ace/repository/impl/RepositoryFactory.java (original)
+++ ace/trunk/org.apache.ace.repository/src/org/apache/ace/repository/impl/RepositoryFactory.java Fri Jan 29 10:11:43 2016
@@ -155,7 +155,7 @@ public class RepositoryFactory implement
      *             If any of the above explanation fails <b>or</b>when there is an internal error creating the
      *             repository.
      */
-    public void updated(String pid, Dictionary dict) throws ConfigurationException {
+    public void updated(String pid, Dictionary<String, ?> dict) throws ConfigurationException {
         String customer = (String) dict.get(REPOSITORY_CUSTOMER);
         if ((customer == null) || "".equals(customer)) {
             throw new ConfigurationException(REPOSITORY_CUSTOMER, "Repository customer has to be specified.");

Modified: ace/trunk/org.apache.ace.repository/src/org/apache/ace/repository/servlet/RepositoryServletBase.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.repository/src/org/apache/ace/repository/servlet/RepositoryServletBase.java?rev=1727510&r1=1727509&r2=1727510&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.repository/src/org/apache/ace/repository/servlet/RepositoryServletBase.java (original)
+++ ace/trunk/org.apache.ace.repository/src/org/apache/ace/repository/servlet/RepositoryServletBase.java Fri Jan 29 10:11:43 2016
@@ -68,7 +68,7 @@ public abstract class RepositoryServletB
         m_repoType = repoType;
     }
 
-    public void updated(Dictionary settings) throws ConfigurationException {
+    public void updated(Dictionary<String, ?> settings) throws ConfigurationException {
         if (settings != null) {
             String useAuthString = (String) settings.get(KEY_USE_AUTHENTICATION);
             if ((useAuthString == null) ||

Modified: ace/trunk/org.apache.ace.repository/src/org/apache/ace/repository/task/RepositoryReplicationTask.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.repository/src/org/apache/ace/repository/task/RepositoryReplicationTask.java?rev=1727510&r1=1727509&r2=1727510&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.repository/src/org/apache/ace/repository/task/RepositoryReplicationTask.java (original)
+++ ace/trunk/org.apache.ace.repository/src/org/apache/ace/repository/task/RepositoryReplicationTask.java Fri Jan 29 10:11:43 2016
@@ -46,7 +46,7 @@ import org.osgi.service.log.LogService;
  * stuff out.
  */
 public class RepositoryReplicationTask implements Runnable {
-    private final ConcurrentMap<ServiceReference, RepositoryReplication> m_replicators = new ConcurrentHashMap<>();
+    private final ConcurrentMap<ServiceReference<RepositoryReplication>, RepositoryReplication> m_replicators = new ConcurrentHashMap<>();
 
     private volatile Discovery m_discovery;
     private volatile ConnectionFactory m_connectionFactory;
@@ -55,7 +55,7 @@ public class RepositoryReplicationTask i
     /**
      * Called by Felix DM when a {@link RepositoryReplication} service becomes available.
      */
-    public void add(ServiceReference ref, RepositoryReplication service) {
+    public void add(ServiceReference<RepositoryReplication> ref, RepositoryReplication service) {
         if (m_replicators.putIfAbsent(ref, service) != null) {
             m_log.log(LogService.LOG_WARNING, "Ignoring duplicate repository replication service for '" + ref.getProperty("name") + "'!");
         }
@@ -64,7 +64,7 @@ public class RepositoryReplicationTask i
     /**
      * Called by Felix DM when a {@link RepositoryReplication} service goes away.
      */
-    public void remove(ServiceReference ref, RepositoryReplication service) {
+    public void remove(ServiceReference<RepositoryReplication> ref, RepositoryReplication service) {
         if (!m_replicators.remove(ref, service)) {
             m_log.log(LogService.LOG_WARNING, "Repository replication service '" + ref.getProperty("name") + "' not removed?!");
         }
@@ -75,14 +75,14 @@ public class RepositoryReplicationTask i
      */
     public void run() {
         // Take a snapshot of the current available replicators...
-        Map<ServiceReference, RepositoryReplication> replicators = new HashMap<>(m_replicators);
+        Map<ServiceReference<RepositoryReplication>, RepositoryReplication> replicators = new HashMap<>(m_replicators);
 
         // The URL to the server to replicate...
         URL master = m_discovery.discover();
 
-        for (Entry<ServiceReference, RepositoryReplication> entry : replicators.entrySet()) {
+        for (Entry<ServiceReference<RepositoryReplication>, RepositoryReplication> entry : replicators.entrySet()) {
+            ServiceReference<RepositoryReplication> ref = entry.getKey();
             RepositoryReplication repository = entry.getValue();
-            ServiceReference ref = entry.getKey();
 
             try {
                 replicate(master, ref, repository);
@@ -152,7 +152,7 @@ public class RepositoryReplicationTask i
         }
     }
 
-    private void replicate(URL master, ServiceReference ref, RepositoryReplication repository) throws IOException {
+    private void replicate(URL master, ServiceReference<RepositoryReplication> ref, RepositoryReplication repository) throws IOException {
         String customer = (String) ref.getProperty("customer");
         String name = (String) ref.getProperty("name");
 

Modified: ace/trunk/org.apache.ace.resourceprocessor.useradmin/src/org/apache/ace/resourceprocessor/useradmin/impl/UserAdminStore.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.resourceprocessor.useradmin/src/org/apache/ace/resourceprocessor/useradmin/impl/UserAdminStore.java?rev=1727510&r1=1727509&r2=1727510&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.resourceprocessor.useradmin/src/org/apache/ace/resourceprocessor/useradmin/impl/UserAdminStore.java (original)
+++ ace/trunk/org.apache.ace.resourceprocessor.useradmin/src/org/apache/ace/resourceprocessor/useradmin/impl/UserAdminStore.java Fri Jan 29 10:11:43 2016
@@ -82,7 +82,7 @@ public class UserAdminStore extends Reso
             return m_type;
         }
     }
-    
+
     private final Object m_installListLock = new Object();
     private final Object m_userAdminLock = new Object();
 
@@ -94,7 +94,6 @@ public class UserAdminStore extends Reso
     private List<ProcessRole> m_toRemove = new ArrayList<>();
     private boolean m_clear;
 
-
     UserAdminStore(BundleContext context) {
         super(context);
     }
@@ -162,15 +161,15 @@ public class UserAdminStore extends Reso
         Document doc = getDocument(resource);
         getRoles(doc);
     }
-    
+
     private void checkTransactionInProgress() {
         if (m_installedUsers == null) {
             throw new IllegalStateException("No transaction in progress!");
         }
     }
 
-    private void clearDictionary(Dictionary dict) {
-        Enumeration i = dict.keys();
+    private void clearDictionary(Dictionary<?, ?> dict) {
+        Enumeration<?> i = dict.keys();
         while (i.hasMoreElements()) {
             dict.remove(i.nextElement());
         }
@@ -320,7 +319,7 @@ public class UserAdminStore extends Reso
         m_clear = clearExistingUsers;
         begin();
         updateUserAdmin();
-        end();        
+        end();
     }
 
     /**




Mime
View raw message