[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-23 18:41:15 +04:00
parent 39efcb5ab0
commit 59bbb58b67
3 changed files with 5 additions and 6 deletions

View File

@@ -124,7 +124,7 @@ public interface GitSSHHandler {
* @param method the authentication method, the empty string means that authentication 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

View File

@@ -182,9 +182,9 @@ public class GitSSHXmlRpcClient implements GitSSHHandler {
*/
@Override
@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) {
return "";
return;
}
Vector parameters = new Vector();
parameters.add(handlerNo);
@@ -192,7 +192,7 @@ public class GitSSHXmlRpcClient implements GitSSHHandler {
parameters.add(method);
parameters.add(error);
try {
return (String)myClient.execute(methodName("setLastSuccessful"), parameters);
myClient.execute(methodName("setLastSuccessful"), parameters);
}
catch (XmlRpcException e) {
throw new RuntimeException("Invocation failed " + e.getMessage(), e);

View File

@@ -86,9 +86,8 @@ public class GitXmlRpcSshService extends GitXmlRpcHandlerService<GitSSHGUIHandle
}
@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);
return "";
}
@Override