[git] Fix method signature

setLastSuccessful doesn't return any interesting value,
and it is never used => make it void.
This commit is contained in:
Kirill Likhodedov
2013-03-25 15:35:01 +04:00
parent 39efcb5ab0
commit 59bbb58b67
3 changed files with 5 additions and 6 deletions
@@ -124,7 +124,7 @@ public interface GitSSHHandler {
* @param method the authentication method, the empty string means that authentication failed * @param method the authentication method, the empty string means that authentication failed
* @param error the error shown in the case when authentication process failed * @param error the error shown in the case when authentication process failed
*/ */
String setLastSuccessful(final int handlerNo, final String userName, final String method, final String error); void setLastSuccessful(final int handlerNo, final String userName, final String method, final String error);
/** /**
* Get last successful authentication method * Get last successful authentication method
@@ -182,9 +182,9 @@ public class GitSSHXmlRpcClient implements GitSSHHandler {
*/ */
@Override @Override
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public String setLastSuccessful(int handlerNo, String userName, String method, String error) { public void setLastSuccessful(int handlerNo, String userName, String method, String error) {
if (myClient == null) { if (myClient == null) {
return ""; return;
} }
Vector parameters = new Vector(); Vector parameters = new Vector();
parameters.add(handlerNo); parameters.add(handlerNo);
@@ -192,7 +192,7 @@ public class GitSSHXmlRpcClient implements GitSSHHandler {
parameters.add(method); parameters.add(method);
parameters.add(error); parameters.add(error);
try { try {
return (String)myClient.execute(methodName("setLastSuccessful"), parameters); myClient.execute(methodName("setLastSuccessful"), parameters);
} }
catch (XmlRpcException e) { catch (XmlRpcException e) {
throw new RuntimeException("Invocation failed " + e.getMessage(), e); throw new RuntimeException("Invocation failed " + e.getMessage(), e);
@@ -86,9 +86,8 @@ public class GitXmlRpcSshService extends GitXmlRpcHandlerService<GitSSHGUIHandle
} }
@Override @Override
public String setLastSuccessful(int handlerNo, String userName, String method, String error) { public void setLastSuccessful(int handlerNo, String userName, String method, String error) {
getHandler(handlerNo).setLastSuccessful(userName, method, error); getHandler(handlerNo).setLastSuccessful(userName, method, error);
return "";
} }
@Override @Override