jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From resc...@apache.org
Subject svn commit: r816181 - /jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/RepositoryImpl.java
Date Thu, 17 Sep 2009 13:27:03 GMT
Author: reschke
Date: Thu Sep 17 13:27:03 2009
New Revision: 816181

URL: http://svn.apache.org/viewvc?rev=816181&view=rev
Log:
JCR-2087: parametrize generic types

Modified:
    jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/RepositoryImpl.java

Modified: jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/RepositoryImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/RepositoryImpl.java?rev=816181&r1=816180&r2=816181&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/RepositoryImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/RepositoryImpl.java
Thu Sep 17 13:27:03 2009
@@ -80,7 +80,7 @@
         });
 
         Map<String, QValue[]> descr = config.getRepositoryService().getRepositoryDescriptors();
      
-        descriptors = new HashMap(descr.size());
+        descriptors = new HashMap<String, Value[]>(descr.size());
         for (String key : descr.keySet()) {
             QValue[] qvs = descr.get(key);
             Value[] vs = new Value[qvs.length];
@@ -172,8 +172,8 @@
             if (reference == null) {
                 reference = new Reference(RepositoryImpl.class.getName(), RepositoryImpl.Factory.class.getName(),
null);
                 // carry over all addresses from referenceable config
-                for (Enumeration en = confref.getReference().getAll(); en.hasMoreElements();
) {
-                    reference.add((RefAddr)(en.nextElement()));
+                for (Enumeration<RefAddr> en = confref.getReference().getAll(); en.hasMoreElements();
) {
+                    reference.add(en.nextElement());
                 }
 
                 // also add the information required by factory class
@@ -223,7 +223,7 @@
         public static final String RCF = RepositoryImpl.class.getName() + ".factory";
         public static final String RCC = RepositoryImpl.class.getName() + ".class";
 
-        public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable
environment) throws Exception {
+        public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable<?,?>
environment) throws Exception {
 
             Object res = null;
             if (obj instanceof Reference) {
@@ -255,8 +255,8 @@
                         configFactoryClassName, null);
 
                     // carry over all arguments except our own
-                    for (Enumeration en = ref.getAll(); en.hasMoreElements(); ){
-                        RefAddr ra = (RefAddr)en.nextElement();
+                    for (Enumeration<RefAddr> en = ref.getAll(); en.hasMoreElements();
){
+                        RefAddr ra = en.nextElement();
                         String type = ra.getType();
                         if (! RCF.equals(type) && ! RCC.equals(type)) {
                             newref.add(ra);



Mime
View raw message