ace-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1311720 - /ace/trunk/ace-deployment-task-base/src/main/java/org/apache/ace/deployment/service/impl/DeploymentServiceImpl.java
Date Tue, 10 Apr 2012 13:42:51 GMT
Author: marrs
Date: Tue Apr 10 13:42:51 2012
New Revision: 1311720

URL: http://svn.apache.org/viewvc?rev=1311720&view=rev
Log:
ACE-242 after closing the issue, still found a scenario that did not work (and might never
have worked): the file based protocol does not support fix packages, so don't even try to
request one

Modified:
    ace/trunk/ace-deployment-task-base/src/main/java/org/apache/ace/deployment/service/impl/DeploymentServiceImpl.java

Modified: ace/trunk/ace-deployment-task-base/src/main/java/org/apache/ace/deployment/service/impl/DeploymentServiceImpl.java
URL: http://svn.apache.org/viewvc/ace/trunk/ace-deployment-task-base/src/main/java/org/apache/ace/deployment/service/impl/DeploymentServiceImpl.java?rev=1311720&r1=1311719&r2=1311720&view=diff
==============================================================================
--- ace/trunk/ace-deployment-task-base/src/main/java/org/apache/ace/deployment/service/impl/DeploymentServiceImpl.java
(original)
+++ ace/trunk/ace-deployment-task-base/src/main/java/org/apache/ace/deployment/service/impl/DeploymentServiceImpl.java
Tue Apr 10 13:42:51 2012
@@ -97,11 +97,13 @@ public class DeploymentServiceImpl imple
         
         try {
             String version = highestRemoteVersion.toString();
-            if (highestLocalVersion != null) {
+            URL baseURL = getURL();
+            boolean isFileBasedProtocol = "file".equals(baseURL.getProtocol());
+            if (highestLocalVersion != null && !isFileBasedProtocol) {
                 version += "?current=" + highestLocalVersion.toString();
             }
-            URL dataURL = new URL(getURL(), version);
-            if ("file".equals(dataURL.getProtocol())) {
+			URL dataURL = new URL(baseURL, version);
+			if (isFileBasedProtocol) {
                 File file = urlToFile(dataURL);
                 inputStream = new FileInputStream(file);
             }



Mime
View raw message