You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by cz...@apache.org on 2015/06/12 09:22:20 UTC

svn commit: r1685041 - in /felix/trunk/http: api/ base/ base/src/main/java/org/apache/felix/http/base/internal/registry/ base/src/main/java/org/apache/felix/http/base/internal/runtime/ bridge/ bundle/ cometd/ itest/ jetty/ parent/ proxy/ samples/bridge...

Author: cziegeler
Date: Fri Jun 12 07:22:19 2015
New Revision: 1685041

URL: http://svn.apache.org/r1685041
Log:
FELIX-4060 : Make sure all projects work with Java 6, except the Jetty one

Modified:
    felix/trunk/http/api/pom.xml
    felix/trunk/http/base/pom.xml
    felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/registry/EventListenerRegistry.java
    felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/registry/ListenerMap.java
    felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/registry/PerContextHandlerRegistry.java
    felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/registry/ServletRegistry.java
    felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/runtime/AbstractInfo.java
    felix/trunk/http/bridge/pom.xml
    felix/trunk/http/bundle/pom.xml
    felix/trunk/http/cometd/pom.xml
    felix/trunk/http/itest/pom.xml
    felix/trunk/http/jetty/pom.xml
    felix/trunk/http/parent/pom.xml
    felix/trunk/http/proxy/pom.xml
    felix/trunk/http/samples/bridge/pom.xml
    felix/trunk/http/samples/cometd/pom.xml
    felix/trunk/http/samples/filter/pom.xml
    felix/trunk/http/samples/whiteboard/pom.xml
    felix/trunk/http/servlet-api/pom.xml
    felix/trunk/http/sslfilter/pom.xml
    felix/trunk/http/whiteboard/pom.xml

Modified: felix/trunk/http/api/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/http/api/pom.xml?rev=1685041&r1=1685040&r2=1685041&view=diff
==============================================================================
--- felix/trunk/http/api/pom.xml (original)
+++ felix/trunk/http/api/pom.xml Fri Jun 12 07:22:19 2015
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.felix</groupId>
         <artifactId>org.apache.felix.http.parent</artifactId>
-        <version>6</version>
+        <version>7-SNAPSHOT</version>
         <relativePath>../parent/pom.xml</relativePath>
     </parent>
 

Modified: felix/trunk/http/base/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/http/base/pom.xml?rev=1685041&r1=1685040&r2=1685041&view=diff
==============================================================================
--- felix/trunk/http/base/pom.xml (original)
+++ felix/trunk/http/base/pom.xml Fri Jun 12 07:22:19 2015
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.felix</groupId>
         <artifactId>org.apache.felix.http.parent</artifactId>
-        <version>6</version>
+        <version>7-SNAPSHOT</version>
         <relativePath>../parent/pom.xml</relativePath>
     </parent>
 

Modified: felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/registry/EventListenerRegistry.java
URL: http://svn.apache.org/viewvc/felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/registry/EventListenerRegistry.java?rev=1685041&r1=1685040&r2=1685041&view=diff
==============================================================================
--- felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/registry/EventListenerRegistry.java (original)
+++ felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/registry/EventListenerRegistry.java Fri Jun 12 07:22:19 2015
@@ -72,7 +72,7 @@ public final class EventListenerRegistry
     /** Request attribute listeners. */
     private final ListenerMap<ServletRequestAttributeListener> requestAttributeListeners = new ListenerMap<ServletRequestAttributeListener>();
 
-    public synchronized void cleanup()
+    public void cleanup()
     {
         this.contextListeners.cleanup();
         this.contextAttributeListeners.cleanup();

Modified: felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/registry/ListenerMap.java
URL: http://svn.apache.org/viewvc/felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/registry/ListenerMap.java?rev=1685041&r1=1685040&r2=1685041&view=diff
==============================================================================
--- felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/registry/ListenerMap.java (original)
+++ felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/registry/ListenerMap.java Fri Jun 12 07:22:19 2015
@@ -75,7 +75,7 @@ public class ListenerMap<T extends Event
         }
     }
 
-    public void cleanup()
+    public synchronized void cleanup()
     {
         this.handlers = Collections.emptyList();
     }

Modified: felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/registry/PerContextHandlerRegistry.java
URL: http://svn.apache.org/viewvc/felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/registry/PerContextHandlerRegistry.java?rev=1685041&r1=1685040&r2=1685041&view=diff
==============================================================================
--- felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/registry/PerContextHandlerRegistry.java (original)
+++ felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/registry/PerContextHandlerRegistry.java Fri Jun 12 07:22:19 2015
@@ -105,16 +105,16 @@ public final class PerContextHandlerRegi
     @Override
     public int compareTo(@Nonnull final PerContextHandlerRegistry other)
     {
-        final int result = Integer.compare(other.path.length(), this.path.length());
+        final int result = new Integer(other.path.length()).compareTo(this.path.length());
         if ( result == 0 ) {
             if (this.ranking == other.ranking)
             {
                 // Service id's can be negative. Negative id's follow the reverse natural ordering of integers.
                 int reverseOrder = ( this.serviceId <= 0 && other.serviceId <= 0 ) ? -1 : 1;
-                return reverseOrder * Long.compare(this.serviceId, other.serviceId);
+                return reverseOrder * new Long(this.serviceId).compareTo(other.serviceId);
             }
 
-            return Integer.compare(other.ranking, this.ranking);
+            return new Integer(other.ranking).compareTo(this.ranking);
         }
         return result;
     }

Modified: felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/registry/ServletRegistry.java
URL: http://svn.apache.org/viewvc/felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/registry/ServletRegistry.java?rev=1685041&r1=1685040&r2=1685041&view=diff
==============================================================================
--- felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/registry/ServletRegistry.java (original)
+++ felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/registry/ServletRegistry.java Fri Jun 12 07:22:19 2015
@@ -101,7 +101,7 @@ public final class ServletRegistry
      *
      * @param handler The servlet handler
      */
-    public void addServlet(@Nonnull final ServletHandler handler)
+    public synchronized void addServlet(@Nonnull final ServletHandler handler)
     {
         // we have to check for every pattern in the info
         // Can be null in case of error-handling servlets...
@@ -196,7 +196,7 @@ public final class ServletRegistry
         }
     }
 
-    private synchronized void removeFromNameMapping(final String servletName, final ServletHandler handler)
+    private void removeFromNameMapping(final String servletName, final ServletHandler handler)
     {
         if ( !handler.getServletInfo().isResource() )
         {
@@ -269,23 +269,21 @@ public final class ServletRegistry
                             final ServletHandler h = inactiveList.remove(0);
                             boolean activate = h.getServlet() == null;
                             final RegistrationStatus oldStatus = newMap.get(h.getServletInfo());
-                            final RegistrationStatus newOldStatus = new RegistrationStatus();
-                            newOldStatus.handler = oldStatus.handler;
-                            newOldStatus.statusToPath = new HashMap<Integer, String[]>(oldStatus.statusToPath);
-                            newMap.put(h.getServletInfo(), newOldStatus);
-                            removePattern(newOldStatus, DTOConstants.FAILURE_REASON_SHADOWED_BY_OTHER_SERVICE, pattern);
-                            done = this.tryToActivate(resolvers, pattern, h, newOldStatus, regHandler);
+                            if ( oldStatus != null ) {
+                                final RegistrationStatus newOldStatus = new RegistrationStatus();
+                                newOldStatus.handler = oldStatus.handler;
+                                newOldStatus.statusToPath = new HashMap<Integer, String[]>(oldStatus.statusToPath);
+                                removePattern(newOldStatus, DTOConstants.FAILURE_REASON_SHADOWED_BY_OTHER_SERVICE, pattern);
+                                newMap.put(h.getServletInfo(), newOldStatus);
+                                done = this.tryToActivate(resolvers, pattern, h, newOldStatus, regHandler);
+                                if ( done && activate ) {
+                                    this.addToNameMapping(h);
+                                }
+                            }
                             if ( !done )
                             {
                                 done = inactiveList.isEmpty();
                             }
-                            else
-                            {
-                                if ( activate )
-                                {
-                                    this.addToNameMapping(h);
-                                }
-                            }
                         }
                         if ( inactiveList.isEmpty() )
                         {

Modified: felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/runtime/AbstractInfo.java
URL: http://svn.apache.org/viewvc/felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/runtime/AbstractInfo.java?rev=1685041&r1=1685040&r2=1685041&view=diff
==============================================================================
--- felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/runtime/AbstractInfo.java (original)
+++ felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/runtime/AbstractInfo.java Fri Jun 12 07:22:19 2015
@@ -84,10 +84,10 @@ public abstract class AbstractInfo<T> im
         {
             // Service id's can be negative. Negative id's follow the reverse natural ordering of integers.
             int reverseOrder = ( this.serviceId >= 0 && other.serviceId >= 0 ) ? 1 : -1;
-            return reverseOrder * Long.compare(this.serviceId, other.serviceId);
+            return reverseOrder * new Long(this.serviceId).compareTo(other.serviceId);
         }
 
-        return Integer.compare(other.ranking, this.ranking);
+        return new Integer(other.ranking).compareTo(this.ranking);
     }
 
     protected boolean isEmpty(final String value)

Modified: felix/trunk/http/bridge/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/http/bridge/pom.xml?rev=1685041&r1=1685040&r2=1685041&view=diff
==============================================================================
--- felix/trunk/http/bridge/pom.xml (original)
+++ felix/trunk/http/bridge/pom.xml Fri Jun 12 07:22:19 2015
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.felix</groupId>
         <artifactId>org.apache.felix.http.parent</artifactId>
-        <version>6</version>
+        <version>7-SNAPSHOT</version>
         <relativePath>../parent/pom.xml</relativePath>
     </parent>
 

Modified: felix/trunk/http/bundle/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/http/bundle/pom.xml?rev=1685041&r1=1685040&r2=1685041&view=diff
==============================================================================
--- felix/trunk/http/bundle/pom.xml (original)
+++ felix/trunk/http/bundle/pom.xml Fri Jun 12 07:22:19 2015
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.felix</groupId>
         <artifactId>org.apache.felix.http.parent</artifactId>
-        <version>6</version>
+        <version>7-SNAPSHOT</version>
         <relativePath>../parent/pom.xml</relativePath>
     </parent>
 

Modified: felix/trunk/http/cometd/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/http/cometd/pom.xml?rev=1685041&r1=1685040&r2=1685041&view=diff
==============================================================================
--- felix/trunk/http/cometd/pom.xml (original)
+++ felix/trunk/http/cometd/pom.xml Fri Jun 12 07:22:19 2015
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.felix</groupId>
         <artifactId>org.apache.felix.http.parent</artifactId>
-        <version>6</version>
+        <version>7-SNAPSHOT</version>
         <relativePath>../parent/pom.xml</relativePath>
     </parent>
 

Modified: felix/trunk/http/itest/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/http/itest/pom.xml?rev=1685041&r1=1685040&r2=1685041&view=diff
==============================================================================
--- felix/trunk/http/itest/pom.xml (original)
+++ felix/trunk/http/itest/pom.xml Fri Jun 12 07:22:19 2015
@@ -15,7 +15,7 @@
 	<parent>
 		<groupId>org.apache.felix</groupId>
 		<artifactId>org.apache.felix.http.parent</artifactId>
-		<version>6</version>
+		<version>7-SNAPSHOT</version>
 		<relativePath>../parent/pom.xml</relativePath>
 	</parent>
 

Modified: felix/trunk/http/jetty/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/http/jetty/pom.xml?rev=1685041&r1=1685040&r2=1685041&view=diff
==============================================================================
--- felix/trunk/http/jetty/pom.xml (original)
+++ felix/trunk/http/jetty/pom.xml Fri Jun 12 07:22:19 2015
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.felix</groupId>
         <artifactId>org.apache.felix.http.parent</artifactId>
-        <version>6</version>
+        <version>7-SNAPSHOT</version>
         <relativePath>../parent/pom.xml</relativePath>
     </parent>
 

Modified: felix/trunk/http/parent/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/http/parent/pom.xml?rev=1685041&r1=1685040&r2=1685041&view=diff
==============================================================================
--- felix/trunk/http/parent/pom.xml (original)
+++ felix/trunk/http/parent/pom.xml Fri Jun 12 07:22:19 2015
@@ -103,6 +103,25 @@
                     <compilerVersion>1.${http.java.version}</compilerVersion>
                 </configuration>
             </plugin>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>animal-sniffer-maven-plugin</artifactId>
+                <configuration>
+                    <signature>
+                        <groupId>org.codehaus.mojo.signature</groupId>
+                        <artifactId>java1${http.java.version}</artifactId>
+                        <version>1.0</version>
+                    </signature>
+                </configuration>
+                <executions>
+                    <execution>
+                        <phase>test</phase>
+                        <goals>
+                            <goal>check</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
         </plugins>
         <pluginManagement>
             <plugins>
@@ -132,7 +151,12 @@
                             <Bundle-RequiredExecutionEnvironment>${http.bree}</Bundle-RequiredExecutionEnvironment>
                         </instructions>                        
                     </configuration>
-                 </plugin>
+                </plugin>
+                <plugin>
+                    <groupId>org.codehaus.mojo</groupId>
+                    <artifactId>animal-sniffer-maven-plugin</artifactId>
+                    <version>1.14</version>
+                </plugin>
             </plugins>
         </pluginManagement>
     </build>

Modified: felix/trunk/http/proxy/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/http/proxy/pom.xml?rev=1685041&r1=1685040&r2=1685041&view=diff
==============================================================================
--- felix/trunk/http/proxy/pom.xml (original)
+++ felix/trunk/http/proxy/pom.xml Fri Jun 12 07:22:19 2015
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.felix</groupId>
         <artifactId>org.apache.felix.http.parent</artifactId>
-        <version>6</version>
+        <version>7-SNAPSHOT</version>
         <relativePath>../parent/pom.xml</relativePath>
     </parent>
 

Modified: felix/trunk/http/samples/bridge/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/http/samples/bridge/pom.xml?rev=1685041&r1=1685040&r2=1685041&view=diff
==============================================================================
--- felix/trunk/http/samples/bridge/pom.xml (original)
+++ felix/trunk/http/samples/bridge/pom.xml Fri Jun 12 07:22:19 2015
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.felix</groupId>
         <artifactId>org.apache.felix.http.parent</artifactId>
-        <version>6</version>
+        <version>7-SNAPSHOT</version>
         <relativePath>../../parent/pom.xml</relativePath>
     </parent>
 
@@ -124,7 +124,7 @@
         <dependency>
             <groupId>${project.groupId}</groupId>
             <artifactId>org.apache.felix.http.proxy</artifactId>
-            <version>[2.3,2.4)</version>
+            <version>2.3.3-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>${project.groupId}</groupId>

Modified: felix/trunk/http/samples/cometd/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/http/samples/cometd/pom.xml?rev=1685041&r1=1685040&r2=1685041&view=diff
==============================================================================
--- felix/trunk/http/samples/cometd/pom.xml (original)
+++ felix/trunk/http/samples/cometd/pom.xml Fri Jun 12 07:22:19 2015
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.felix</groupId>
         <artifactId>org.apache.felix.http.parent</artifactId>
-        <version>6</version>
+        <version>7-SNAPSHOT</version>
         <relativePath>../../parent/pom.xml</relativePath>
     </parent>
 

Modified: felix/trunk/http/samples/filter/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/http/samples/filter/pom.xml?rev=1685041&r1=1685040&r2=1685041&view=diff
==============================================================================
--- felix/trunk/http/samples/filter/pom.xml (original)
+++ felix/trunk/http/samples/filter/pom.xml Fri Jun 12 07:22:19 2015
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.felix</groupId>
         <artifactId>org.apache.felix.http.parent</artifactId>
-        <version>6</version>
+        <version>7-SNAPSHOT</version>
         <relativePath>../../parent/pom.xml</relativePath>
     </parent>
 

Modified: felix/trunk/http/samples/whiteboard/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/http/samples/whiteboard/pom.xml?rev=1685041&r1=1685040&r2=1685041&view=diff
==============================================================================
--- felix/trunk/http/samples/whiteboard/pom.xml (original)
+++ felix/trunk/http/samples/whiteboard/pom.xml Fri Jun 12 07:22:19 2015
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.felix</groupId>
         <artifactId>org.apache.felix.http.parent</artifactId>
-        <version>6</version>
+        <version>7-SNAPSHOT</version>
         <relativePath>../../parent/pom.xml</relativePath>
     </parent>
 

Modified: felix/trunk/http/servlet-api/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/http/servlet-api/pom.xml?rev=1685041&r1=1685040&r2=1685041&view=diff
==============================================================================
--- felix/trunk/http/servlet-api/pom.xml (original)
+++ felix/trunk/http/servlet-api/pom.xml Fri Jun 12 07:22:19 2015
@@ -14,7 +14,7 @@
     <parent>
         <groupId>org.apache.felix</groupId>
         <artifactId>org.apache.felix.http.parent</artifactId>
-        <version>6</version>
+        <version>7-SNAPSHOT</version>
         <relativePath>../parent/pom.xml</relativePath>
     </parent>
 

Modified: felix/trunk/http/sslfilter/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/http/sslfilter/pom.xml?rev=1685041&r1=1685040&r2=1685041&view=diff
==============================================================================
--- felix/trunk/http/sslfilter/pom.xml (original)
+++ felix/trunk/http/sslfilter/pom.xml Fri Jun 12 07:22:19 2015
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.felix</groupId>
         <artifactId>org.apache.felix.http.parent</artifactId>
-        <version>6</version>
+        <version>7-SNAPSHOT</version>
         <relativePath>../parent/pom.xml</relativePath>
     </parent>
 

Modified: felix/trunk/http/whiteboard/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/http/whiteboard/pom.xml?rev=1685041&r1=1685040&r2=1685041&view=diff
==============================================================================
--- felix/trunk/http/whiteboard/pom.xml (original)
+++ felix/trunk/http/whiteboard/pom.xml Fri Jun 12 07:22:19 2015
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.felix</groupId>
         <artifactId>org.apache.felix.http.parent</artifactId>
-        <version>6</version>
+        <version>7-SNAPSHOT</version>
         <relativePath>../parent/pom.xml</relativePath>
     </parent>