felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r1397394 - in /felix/trunk/scr: ./ src/main/java/org/apache/felix/scr/impl/config/ src/test/java/org/apache/felix/scr/impl/ src/test/java/org/apache/felix/scr/integration/components/
Date Fri, 12 Oct 2012 00:40:19 GMT
Author: djencks
Date: Fri Oct 12 00:40:18 2012
New Revision: 1397394

URL: http://svn.apache.org/viewvc?rev=1397394&view=rev
Log:
FELIX-3708 update to java 5 for type safety during development

Modified:
    felix/trunk/scr/pom.xml
    felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/config/ConfigurationSupport.java
    felix/trunk/scr/src/test/java/org/apache/felix/scr/impl/MockBundle.java
    felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/SimpleService2Impl.java
    felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/SimpleServiceImpl.java

Modified: felix/trunk/scr/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/scr/pom.xml?rev=1397394&r1=1397393&r2=1397394&view=diff
==============================================================================
--- felix/trunk/scr/pom.xml (original)
+++ felix/trunk/scr/pom.xml Fri Oct 12 00:40:18 2012
@@ -77,7 +77,7 @@
         <dependency>
             <groupId>org.osgi</groupId>
             <artifactId>org.osgi.core</artifactId>
-            <version>4.1.0</version>
+            <version>4.3.0</version>
             <scope>provided</scope>
         </dependency>
         <dependency>
@@ -330,6 +330,7 @@
                 - for now touch base on Java 1.4
                 - Ignore some known Java 5 classes (used in JLock)
             -->
+<!--
             <plugin>
                 <groupId>org.codehaus.mojo</groupId>
                 <artifactId>animal-sniffer-maven-plugin</artifactId>
@@ -360,6 +361,7 @@
                     </execution>
                 </executions>
             </plugin>
+-->
 
             <!--
                 Configure default compilation for Java 1.3 and integration
@@ -370,47 +372,49 @@
             -->
             <plugin>
                 <artifactId>maven-compiler-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>compile-java5</id>
-                        <goals>
-                            <goal>compile</goal>
-                        </goals>
-                        <configuration>
-                            <source>1.5</source>
-                            <target>1.5</target>
-                            <excludes>
-                                <exclude>dummy-to-overwrite-global-config</exclude>
-                            </excludes>
-                            <includes>
-                                <include>**/ScrGogoCommand.java</include>
-                            </includes>
-                        </configuration>
-                    </execution>
-                    <execution>
-                        <id>test-compile-java5</id>
-                        <goals>
-                            <goal>testCompile</goal>
-                        </goals>
-                        <configuration>
-                            <source>1.5</source>
-                            <target>1.5</target>
-                            <testIncludes>
-                                <testInclude>**/integration/**</testInclude>
-                            </testIncludes>
-                            <testExcludes>
-                                <testExclude>**/impl/**</testExclude>
-                            </testExcludes>
-                        </configuration>
-                    </execution>
-                </executions>
+                <!--<executions>-->
+                    <!--<execution>-->
+                        <!--<id>compile-java5</id>-->
+                        <!--<goals>-->
+                            <!--<goal>compile</goal>-->
+                        <!--</goals>-->
+                        <!--<configuration>-->
+                            <!--<source>1.5</source>-->
+                            <!--<target>1.5</target>-->
+                            <!--<excludes>-->
+                                <!--<exclude>dummy-to-overwrite-global-config</exclude>-->
+                            <!--</excludes>-->
+                            <!--<includes>-->
+                                <!--<include>**/ScrGogoCommand.java</include>-->
+                            <!--</includes>-->
+                        <!--</configuration>-->
+                    <!--</execution>-->
+                    <!--<execution>-->
+                        <!--<id>test-compile-java5</id>-->
+                        <!--<goals>-->
+                            <!--<goal>testCompile</goal>-->
+                        <!--</goals>-->
+                        <!--<configuration>-->
+                            <!--<source>1.5</source>-->
+                            <!--<target>1.5</target>-->
+                            <!--<testIncludes>-->
+                                <!--<testInclude>**/integration/**</testInclude>-->
+                            <!--</testIncludes>-->
+                            <!--<testExcludes>-->
+                                <!--<testExclude>**/impl/**</testExclude>-->
+                            <!--</testExcludes>-->
+                        <!--</configuration>-->
+                    <!--</execution>-->
+                <!--</executions>-->
                 <configuration>
-                    <testExcludes>
-                        <testExclude>**/integration/**</testExclude>
-                    </testExcludes>
-                    <excludes>
-                        <exclude>**/ScrGogoCommand.java</exclude>
-                    </excludes>
+                    <source>1.5</source>
+                    <target>1.5</target>
+                    <!--<testExcludes>-->
+                        <!--<testExclude>**/integration/**</testExclude>-->
+                    <!--</testExcludes>-->
+                    <!--<excludes>-->
+                        <!--<exclude>**/ScrGogoCommand.java</exclude>-->
+                    <!--</excludes>-->
                 </configuration>
             </plugin>
 

Modified: felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/config/ConfigurationSupport.java
URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/config/ConfigurationSupport.java?rev=1397394&r1=1397393&r2=1397394&view=diff
==============================================================================
--- felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/config/ConfigurationSupport.java
(original)
+++ felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/config/ConfigurationSupport.java
Fri Oct 12 00:40:18 2012
@@ -126,7 +126,7 @@ public class ConfigurationSupport implem
 
     // ---------- ServiceListener
 
-    public void configureComponentHolders(final ServiceReference configurationAdminReference,
+    public void configureComponentHolders(final ServiceReference<ConfigurationAdmin>
configurationAdminReference,
         final Object configurationAdmin)
     {
         if (configurationAdmin instanceof ConfigurationAdmin)

Modified: felix/trunk/scr/src/test/java/org/apache/felix/scr/impl/MockBundle.java
URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/test/java/org/apache/felix/scr/impl/MockBundle.java?rev=1397394&r1=1397393&r2=1397394&view=diff
==============================================================================
--- felix/trunk/scr/src/test/java/org/apache/felix/scr/impl/MockBundle.java (original)
+++ felix/trunk/scr/src/test/java/org/apache/felix/scr/impl/MockBundle.java Fri Oct 12 00:40:18
2012
@@ -19,14 +19,19 @@
 package org.apache.felix.scr.impl;
 
 
+import java.io.File;
 import java.io.InputStream;
 import java.net.URL;
+import java.security.cert.X509Certificate;
 import java.util.Dictionary;
 import java.util.Enumeration;
+import java.util.List;
+import java.util.Map;
 
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.ServiceReference;
+import org.osgi.framework.Version;
 
 
 public class MockBundle implements Bundle
@@ -43,6 +48,26 @@ public class MockBundle implements Bundl
         return null;
     }
 
+    public Map<X509Certificate, List<X509Certificate>> getSignerCertificates(
int i )
+    {
+        return null;
+    }
+
+    public Version getVersion()
+    {
+        return null;
+    }
+
+    public <A> A adapt( Class<A> aClass )
+    {
+        return null;
+    }
+
+    public File getDataFile( String s )
+    {
+        return null;
+    }
+
 
     public long getBundleId()
     {
@@ -175,4 +200,8 @@ public class MockBundle implements Bundl
 
     }
 
+    public int compareTo( Bundle bundle )
+    {
+        return 0;
+    }
 }

Modified: felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/SimpleService2Impl.java
URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/SimpleService2Impl.java?rev=1397394&r1=1397393&r2=1397394&view=diff
==============================================================================
--- felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/SimpleService2Impl.java
(original)
+++ felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/SimpleService2Impl.java
Fri Oct 12 00:40:18 2012
@@ -19,6 +19,8 @@
 package org.apache.felix.scr.integration.components;
 
 
+import java.util.Dictionary;
+import java.util.Hashtable;
 import java.util.Properties;
 
 import org.osgi.framework.BundleContext;
@@ -47,7 +49,7 @@ public class SimpleService2Impl implemen
     public static SimpleService2Impl create( BundleContext bundleContext, String value, int
ranking )
     {
         SimpleService2Impl instance = new SimpleService2Impl( value, ranking );
-        Properties props = instance.getProperties();
+        Dictionary<String,?> props = instance.getProperties();
         instance.setRegistration( bundleContext.registerService( SimpleService2.class.getName(),
instance, props ) );
         return instance;
     }
@@ -61,9 +63,9 @@ public class SimpleService2Impl implemen
     }
 
 
-    private Properties getProperties()
+    private Dictionary<String,?> getProperties()
     {
-        final Properties props = new Properties();
+        final Dictionary<String, Object> props = new Hashtable<String, Object>();
         props.put( "value", m_value );
         props.put( "filterprop", m_filterProp );
         if ( m_ranking != 0 )

Modified: felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/SimpleServiceImpl.java
URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/SimpleServiceImpl.java?rev=1397394&r1=1397393&r2=1397394&view=diff
==============================================================================
--- felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/SimpleServiceImpl.java
(original)
+++ felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/SimpleServiceImpl.java
Fri Oct 12 00:40:18 2012
@@ -19,6 +19,8 @@
 package org.apache.felix.scr.integration.components;
 
 
+import java.util.Dictionary;
+import java.util.Hashtable;
 import java.util.Properties;
 
 import org.osgi.framework.BundleContext;
@@ -47,7 +49,7 @@ public class SimpleServiceImpl implement
     public static SimpleServiceImpl create( BundleContext bundleContext, String value, int
ranking )
     {
         SimpleServiceImpl instance = new SimpleServiceImpl( value, ranking );
-        Properties props = instance.getProperties();
+        Dictionary<String,?> props = instance.getProperties();
         instance.setRegistration( bundleContext.registerService( SimpleService.class.getName(),
instance, props ) );
         return instance;
     }
@@ -65,9 +67,9 @@ public class SimpleServiceImpl implement
     }
 
 
-    private Properties getProperties()
+    private Dictionary<String,?> getProperties()
     {
-        final Properties props = new Properties();
+        final Dictionary<String, Object> props = new Hashtable<String, Object>();
         props.put( "value", m_value );
         props.put( "filterprop", m_filterProp );
         if ( m_ranking != 0 )



Mime
View raw message