You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by im...@apache.org on 2015/05/18 13:31:48 UTC
[1/2] stratos git commit: Removing unused import
Repository: stratos
Updated Branches:
refs/heads/master 1cc7c1f24 -> d90f1a169
Removing unused import
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/d90f1a16
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/d90f1a16
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/d90f1a16
Branch: refs/heads/master
Commit: d90f1a169dfafa459d699ea370c5e01199f3684f
Parents: d2f9f45
Author: anuruddhal <an...@gmail.com>
Authored: Mon May 18 15:36:09 2015 +0530
Committer: Imesh Gunaratne <im...@apache.org>
Committed: Mon May 18 17:01:26 2015 +0530
----------------------------------------------------------------------
.../java/org/apache/stratos/cli/RestCommandLineService.java | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/d90f1a16/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java
index 1979eba..a6c1fcc 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java
@@ -29,7 +29,6 @@ import org.apache.axis2.transport.http.HttpTransportProperties;
import org.apache.commons.lang3.StringUtils;
import org.apache.http.HttpResponse;
import org.apache.http.auth.MalformedChallengeException;
-import org.apache.http.client.ClientProtocolException;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.stratos.cli.exception.CommandException;
import org.apache.stratos.cli.exception.ExceptionMapper;
@@ -233,10 +232,10 @@ public class RestCommandLineService {
printError(message, e);
return false;
} catch (Exception e) {
- if(e.getCause() instanceof MalformedChallengeException){
- String message="Authentication failed. Please check your username/password";
- printError(message,e);
- return false;
+ if (e.getCause() instanceof MalformedChallengeException) {
+ String message = "Authentication failed. Please check your username/password";
+ printError(message, e);
+ return false;
}
String message = "An unknown error occurred: " + e.getMessage();
printError(message, e);
[2/2] stratos git commit: Fixing login error in CLI
Posted by im...@apache.org.
Fixing login error in CLI
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/d2f9f456
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/d2f9f456
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/d2f9f456
Branch: refs/heads/master
Commit: d2f9f456b3fa146ad7a281bdd0b12a958d46c260
Parents: 1cc7c1f
Author: anuruddhal <an...@gmail.com>
Authored: Mon May 18 15:22:54 2015 +0530
Committer: Imesh Gunaratne <im...@apache.org>
Committed: Mon May 18 17:01:26 2015 +0530
----------------------------------------------------------------------
.../java/org/apache/stratos/cli/RestCommandLineService.java | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/d2f9f456/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java
index 3e60294..1979eba 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java
@@ -28,6 +28,8 @@ import org.apache.axis2.description.TransportOutDescription;
import org.apache.axis2.transport.http.HttpTransportProperties;
import org.apache.commons.lang3.StringUtils;
import org.apache.http.HttpResponse;
+import org.apache.http.auth.MalformedChallengeException;
+import org.apache.http.client.ClientProtocolException;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.stratos.cli.exception.CommandException;
import org.apache.stratos.cli.exception.ExceptionMapper;
@@ -214,7 +216,7 @@ public class RestCommandLineService {
if (responseCode == 200) {
return true;
} else {
- System.out.println("Invalid STRATOS_URL");
+ System.out.println("Invalid value is set for STRATOS_URL");
}
}
return false;
@@ -231,6 +233,11 @@ public class RestCommandLineService {
printError(message, e);
return false;
} catch (Exception e) {
+ if(e.getCause() instanceof MalformedChallengeException){
+ String message="Authentication failed. Please check your username/password";
+ printError(message,e);
+ return false;
+ }
String message = "An unknown error occurred: " + e.getMessage();
printError(message, e);
return false;