Skip to content
Permalink
Browse files
Simplify Statement.
  • Loading branch information
arturobernalg committed Aug 29, 2021
1 parent e36a49c commit 400c7bba108bad66198330e508a65a5de91b09fd
Showing 9 changed files with 11 additions and 33 deletions.
@@ -81,7 +81,7 @@ public static void main(final String[] args)
}

final String proto = argCount > 3 ? args[argIdx++] : null;
final boolean implicit = argCount > 4 ? Boolean.parseBoolean(args[argIdx++]) : false;
final boolean implicit = argCount > 4 && Boolean.parseBoolean(args[argIdx++]);

final POP3Client pop3;

@@ -60,7 +60,7 @@ public static void main(final String[] args)
}

final String proto = args.length > 3 ? args[3] : null;
final boolean implicit = args.length > 4 ? Boolean.parseBoolean(args[4]) : false;
final boolean implicit = args.length > 4 && Boolean.parseBoolean(args[4]);

final POP3Client pop3;

@@ -250,7 +250,7 @@ else if(line.matches("^\\^[A-Z^]\\r?\\n?$"))
end_loop = true;
}
}
while(ret_read > 0 && end_loop == false);
while(ret_read > 0 && !end_loop);

try
{
@@ -45,10 +45,7 @@ public FTPFile parseFTPEntry(final String listEntry)
if (cachedFtpFileEntryParser != null)
{
final FTPFile matched = cachedFtpFileEntryParser.parseFTPEntry(listEntry);
if (matched != null)
{
return matched;
}
return matched;
}
else
{
@@ -205,14 +205,8 @@ public FTPFile parseFTPEntry(final String entry) {
(!group(g + 1).equals("-")));

final String execPerm = group(g + 2);
if (!execPerm.equals("-") && !Character.isUpperCase(execPerm.charAt(0)))
{
file.setPermission(access, FTPFile.EXECUTE_PERMISSION, true);
}
else
{
file.setPermission(access, FTPFile.EXECUTE_PERMISSION, false);
}
file.setPermission(access, FTPFile.EXECUTE_PERMISSION, !execPerm.equals("-")
&& !Character.isUpperCase(execPerm.charAt(0)));
}

if (!isDevice)
@@ -300,10 +300,7 @@ protected FTPClientConfig getDefaultConfiguration() {
* else <code>false</code>.
*/
private boolean isNullOrEmpty(final String string) {
if (string == null || string.isEmpty()) {
return true;
}
return false;
return string == null || string.isEmpty();
}

@Override
@@ -299,14 +299,8 @@ public FTPFile parseFTPEntry(final String entry) {
!group(g + 1).equals("-"));

final String execPerm = group(g + 2);
if (!execPerm.equals("-") && !Character.isUpperCase(execPerm.charAt(0)))
{
file.setPermission(access, FTPFile.EXECUTE_PERMISSION, true);
}
else
{
file.setPermission(access, FTPFile.EXECUTE_PERMISSION, false);
}
file.setPermission(access, FTPFile.EXECUTE_PERMISSION, !execPerm.equals("-")
&& !Character.isUpperCase(execPerm.charAt(0)));
}

if (!isDevice)
@@ -60,11 +60,7 @@ public String readLine() throws IOException {
if (prevWasCR && intch == LF) {
return sb.substring(0, sb.length()-1);
}
if (intch == CR) {
prevWasCR = true;
} else {
prevWasCR = false;
}
prevWasCR = intch == CR;
sb.append((char) intch);
}
}
@@ -244,7 +244,7 @@ final boolean _sendAYT(final long timeout)
_output_.flush();
}
aytMonitor.wait(timeout);
if (aytFlag == false)
if (!aytFlag)
{
retValue = false;
aytFlag = true;

0 comments on commit 400c7bb

Please sign in to comment.