abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From antel...@apache.org
Subject svn commit: r1214980 - in /abdera/abdera2/common/src/main/java/org/apache/abdera2/common: protocol/AbstractResponseContext.java protocol/servlet/async/AbderaAsyncService.java templates/TemplateManager.java
Date Thu, 15 Dec 2011 23:05:12 GMT
Author: antelder
Date: Thu Dec 15 23:05:11 2011
New Revision: 1214980

URL: http://svn.apache.org/viewvc?rev=1214980&view=rev
Log:
Add casts as i get compile errors when building with Maven without them

Modified:
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/protocol/AbstractResponseContext.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/protocol/servlet/async/AbderaAsyncService.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/templates/TemplateManager.java

Modified: abdera/abdera2/common/src/main/java/org/apache/abdera2/common/protocol/AbstractResponseContext.java
URL: http://svn.apache.org/viewvc/abdera/abdera2/common/src/main/java/org/apache/abdera2/common/protocol/AbstractResponseContext.java?rev=1214980&r1=1214979&r2=1214980&view=diff
==============================================================================
--- abdera/abdera2/common/src/main/java/org/apache/abdera2/common/protocol/AbstractResponseContext.java
(original)
+++ abdera/abdera2/common/src/main/java/org/apache/abdera2/common/protocol/AbstractResponseContext.java
Thu Dec 15 23:05:11 2011
@@ -249,7 +249,7 @@ public abstract class AbstractResponseCo
           setHeader("Location", uri));
     }
     public <T extends ResponseContext>T setLocation(IRI iri) {
-      return setLocation(iri == null ? null : iri.toString());
+      return (T)setLocation(iri == null ? null : iri.toString());
     }
 
     public int getStatus() {

Modified: abdera/abdera2/common/src/main/java/org/apache/abdera2/common/protocol/servlet/async/AbderaAsyncService.java
URL: http://svn.apache.org/viewvc/abdera/abdera2/common/src/main/java/org/apache/abdera2/common/protocol/servlet/async/AbderaAsyncService.java?rev=1214980&r1=1214979&r2=1214980&view=diff
==============================================================================
--- abdera/abdera2/common/src/main/java/org/apache/abdera2/common/protocol/servlet/async/AbderaAsyncService.java
(original)
+++ abdera/abdera2/common/src/main/java/org/apache/abdera2/common/protocol/servlet/async/AbderaAsyncService.java
Thu Dec 15 23:05:11 2011
@@ -212,17 +212,19 @@ public class AbderaAsyncService 
       while(exec.isRunning()) {
         if (processor.hasNext()) {
           final AbderaTask task = processor.next();
-          log.debug(String.format("Processing New AbderaTask (%s)...",task.getId())); 
-          exec.execute(new Runnable() {
-            public void run() {
-              try {
-                task.invoke();
-              } catch (Throwable t) {
-                log.error(String.format("Error invoking AbderaTask (%s)",task.getId()),t);
-              }
-              log.debug(String.format("AbderaTask (%s) is complete",task.getId()));
-            }
-          });
+          if (task != null) {
+              log.debug(String.format("Processing New AbderaTask (%s)...",task.getId()));

+              exec.execute(new Runnable() {
+                public void run() {
+                  try {
+                    task.invoke();
+                  } catch (Throwable t) {
+                    log.error(String.format("Error invoking AbderaTask (%s)",task.getId()),t);
+                  }
+                  log.debug(String.format("AbderaTask (%s) is complete",task.getId()));
+                }
+              });
+          }
         }
       }
     }

Modified: abdera/abdera2/common/src/main/java/org/apache/abdera2/common/templates/TemplateManager.java
URL: http://svn.apache.org/viewvc/abdera/abdera2/common/src/main/java/org/apache/abdera2/common/templates/TemplateManager.java?rev=1214980&r1=1214979&r2=1214980&view=diff
==============================================================================
--- abdera/abdera2/common/src/main/java/org/apache/abdera2/common/templates/TemplateManager.java
(original)
+++ abdera/abdera2/common/src/main/java/org/apache/abdera2/common/templates/TemplateManager.java
Thu Dec 15 23:05:11 2011
@@ -59,7 +59,7 @@ public class TemplateManager<T>
     public <M extends Builder<T>>M add(T key, Object template) {
       checkArgumentTypes(checkNotNull(template),Map.class,Collection.class);
       if (template instanceof Supplier)
-        return add(checkNotNull(key),((Supplier<?>)template).get());
+        return (M) add(checkNotNull(key),((Supplier<?>)template).get());
       Template temp = 
         template instanceof Template ?
           (Template)template :



Mime
View raw message