commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brit...@apache.org
Subject svn commit: r1500972 - in /commons/proper/chain/trunk: src/changes/changes.xml web/src/main/java/org/apache/commons/chain2/web/ChainListener.java web/src/main/java/org/apache/commons/chain2/web/ChainResources.java
Date Mon, 08 Jul 2013 21:31:39 GMT
Author: britter
Date: Mon Jul  8 21:31:39 2013
New Revision: 1500972

URL: http://svn.apache.org/r1500972
Log:
CHAIN-108 - Build fails with Java 6; assigning variables helps the compiler to figure out
typed arguments

Modified:
    commons/proper/chain/trunk/src/changes/changes.xml
    commons/proper/chain/trunk/web/src/main/java/org/apache/commons/chain2/web/ChainListener.java
    commons/proper/chain/trunk/web/src/main/java/org/apache/commons/chain2/web/ChainResources.java

Modified: commons/proper/chain/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/chain/trunk/src/changes/changes.xml?rev=1500972&r1=1500971&r2=1500972&view=diff
==============================================================================
--- commons/proper/chain/trunk/src/changes/changes.xml (original)
+++ commons/proper/chain/trunk/src/changes/changes.xml Mon Jul  8 21:31:39 2013
@@ -41,6 +41,9 @@ The <action> type attribute can be add,u
 
   <body>
     <release version="2.0" description="Major release">
+      <action issue="CHAIN-108" dev="britter" type="update">
+          Build fails with Java 6
+      </action>
       <action issue="CHAIN-94" dev="britter" type="update" due-to="Jonas Sprenger">
           Refactor tests in class TestContextTestCase
       </action>

Modified: commons/proper/chain/trunk/web/src/main/java/org/apache/commons/chain2/web/ChainListener.java
URL: http://svn.apache.org/viewvc/commons/proper/chain/trunk/web/src/main/java/org/apache/commons/chain2/web/ChainListener.java?rev=1500972&r1=1500971&r2=1500972&view=diff
==============================================================================
--- commons/proper/chain/trunk/web/src/main/java/org/apache/commons/chain2/web/ChainListener.java
(original)
+++ commons/proper/chain/trunk/web/src/main/java/org/apache/commons/chain2/web/ChainListener.java
Mon Jul  8 21:31:39 2013
@@ -19,6 +19,7 @@ package org.apache.commons.chain2.web;
 import java.io.InputStream;
 import java.net.URL;
 import java.util.HashSet;
+import java.util.Map;
 import java.util.Set;
 
 import javax.servlet.ServletContext;
@@ -258,7 +259,8 @@ public class ChainListener implements Se
                 if (log.isDebugEnabled()) {
                     log.debug("Parsing: " + resourceURL);
                 }
-                parser.parse(resourceURL);
+                @SuppressWarnings("unused") // FIXME we have to assign the factory here to
help the compiler with the type arguments
+                CatalogFactory<Object, Object,Map<Object,Object>> factory = parser.parse(resourceURL);
             } catch (Exception e) {
                 String externalURL = "null";
                 if (resourceURL != null) {

Modified: commons/proper/chain/trunk/web/src/main/java/org/apache/commons/chain2/web/ChainResources.java
URL: http://svn.apache.org/viewvc/commons/proper/chain/trunk/web/src/main/java/org/apache/commons/chain2/web/ChainResources.java?rev=1500972&r1=1500971&r2=1500972&view=diff
==============================================================================
--- commons/proper/chain/trunk/web/src/main/java/org/apache/commons/chain2/web/ChainResources.java
(original)
+++ commons/proper/chain/trunk/web/src/main/java/org/apache/commons/chain2/web/ChainResources.java
Mon Jul  8 21:31:39 2013
@@ -17,6 +17,7 @@
 package org.apache.commons.chain2.web;
 
 import org.apache.commons.chain2.Catalog;
+import org.apache.commons.chain2.CatalogFactory;
 import org.apache.commons.chain2.config.xml.XmlConfigParser;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -25,6 +26,7 @@ import javax.servlet.ServletContext;
 import java.net.URL;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Map;
 import java.util.StringTokenizer;
 
 /**
@@ -74,7 +76,8 @@ final class ChainResources {
                 if (log.isDebugEnabled()) {
                     log.debug("Loading chain config resource '" + path + "'");
                 }
-                parser.parse(url);
+                @SuppressWarnings("unused") // FIXME we have to assign the factory here to
help the compiler with the type arguments
+                CatalogFactory<Object,Object,Map<Object,Object>> factory = parser.parse(url);
             }
         } catch (Exception e) {
             throw new RuntimeException
@@ -110,7 +113,8 @@ final class ChainResources {
                 if (log.isDebugEnabled()) {
                     log.debug("Loading chain config resource '" + path + "'");
                 }
-                parser.parse(url);
+                @SuppressWarnings("unused") // FIXME we have to assign the factory here to
help the compiler with the type arguments
+                CatalogFactory<Object, Object, Map<Object, Object>> factory =
parser.parse(url);
             }
         } catch (Exception e) {
             throw new RuntimeException



Mime
View raw message