Skip to content

Commit 71cc19c

Browse files
Implement review changes
1 parent 599ec0c commit 71cc19c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

command/src/com/mirth/connect/cli/CommandLineInterface.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,16 +180,20 @@ private void runShell(String server, String user, String password, String script
180180
client = new Client(server);
181181
this.debug = debug;
182182

183-
LoginStatus loginStatus = null;
183+
LoginStatus loginStatus;
184184
try {
185185
loginStatus = client.login(user, password);
186186
} catch (UnauthorizedException ex) {
187187
if (ex.getResponse() != null && ex.getResponse() instanceof LoginStatus) {
188188
loginStatus = (LoginStatus) ex.getResponse();
189189
}
190+
else {
191+
error("Could not login to server.", ex);
192+
return;
193+
}
190194
}
191195

192-
if (loginStatus == null || loginStatus.getStatus() != LoginStatus.Status.SUCCESS) {
196+
if (loginStatus.getStatus() != LoginStatus.Status.SUCCESS) {
193197
error("Could not login to server. Status: " + loginStatus.getStatus(), null);
194198
return;
195199
}

0 commit comments

Comments
 (0)