Avoid "if false return false".
But really, these methods should throw an Exception if the key is no good. Not just return false, which nobody is probably checking.
This commit is contained in:
+1
-1
@@ -167,7 +167,7 @@ public class PresentsConnectionManager extends ConnectionManager
|
||||
*/
|
||||
public boolean setPrivateKey (String key)
|
||||
{
|
||||
return key == null ? false : setPrivateKey(SecureUtil.stringToRSAPrivateKey(key));
|
||||
return (key != null) && setPrivateKey(SecureUtil.stringToRSAPrivateKey(key));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user