incubator-droids-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject svn commit: r1444812 - /incubator/droids/branches/0.2.x-cleanup/droids-core/src/main/java/org/apache/droids/handle/SaveHandler.java
Date Mon, 11 Feb 2013 15:04:02 GMT
Author: tobr
Date: Mon Feb 11 15:03:49 2013
New Revision: 1444812

URL: http://svn.apache.org/r1444812
Log:
removed unused imports

Modified:
    incubator/droids/branches/0.2.x-cleanup/droids-core/src/main/java/org/apache/droids/handle/SaveHandler.java

Modified: incubator/droids/branches/0.2.x-cleanup/droids-core/src/main/java/org/apache/droids/handle/SaveHandler.java
URL: http://svn.apache.org/viewvc/incubator/droids/branches/0.2.x-cleanup/droids-core/src/main/java/org/apache/droids/handle/SaveHandler.java?rev=1444812&r1=1444811&r2=1444812&view=diff
==============================================================================
--- incubator/droids/branches/0.2.x-cleanup/droids-core/src/main/java/org/apache/droids/handle/SaveHandler.java
(original)
+++ incubator/droids/branches/0.2.x-cleanup/droids-core/src/main/java/org/apache/droids/handle/SaveHandler.java
Mon Feb 11 15:03:49 2013
@@ -25,11 +25,9 @@ import java.io.InputStream;
 import java.io.OutputStream;
 import java.net.URI;
 
-import org.apache.droids.core.ContentEntity;
 import org.apache.droids.core.DroidsException;
 import org.apache.droids.core.Handler;
 import org.apache.droids.core.Task;
-import org.apache.droids.exception.InvalidTaskException;
 import org.apache.droids.util.FileUtil;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -63,11 +61,7 @@ public class SaveHandler extends WriterH
     @Override
     public void handle(Task task) throws IOException, DroidsException {
         this.uri = task.getURI();
-        InputStream instream;
-        if (task.getContentEntity().getValue(ContentEntity.CONTENT) instanceof InputStream)
{
-            instream = (InputStream) task.getContentEntity().getValue(ContentEntity.CONTENT);
-        } else
-            throw new InvalidTaskException("no inputstream available");
+        InputStream instream = task.getContentEntity().getContent();
         try {
             String path = saveContentHandlerStrategy.calculateFilePath(uri, task);
             writeOutput(path, instream);



Mime
View raw message