Skip to content

Commit acee342

Browse files
author
smisger
committed
Fixing squid:S1197- Array designators "[]" should be on the type, not
the variable, Fixing squid:S1125- Literal boolean values should not be used in condition expressions
1 parent 492a8e7 commit acee342

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/main/java/org/audit4j/core/filter/POJOQuery.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,9 +294,9 @@ public Counting charCount() {
294294
* @return true, if successful
295295
*/
296296
public boolean operaterProceed() {
297-
if (operator.equals(Operator.AND) && result == false) {
297+
if (operator.equals(Operator.AND) && !result) {
298298
return false;
299-
} else if (operator.equals(Operator.OR) && result == true) {
299+
} else if (operator.equals(Operator.OR) && result) {
300300
return false;
301301
}
302302
return true;

src/main/java/org/audit4j/core/handler/file/archive/FTPArchiveClient.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ public static void init(String[] args) throws UnknownHostException {
139139
trustmgr = args[++base];
140140
} else if (args[base].equals("-PrH")) {
141141
proxyHost = args[++base];
142-
String parts[] = proxyHost.split(":");
142+
String[] parts = proxyHost.split(":");
143143
if (parts.length == 2) {
144144
proxyHost = parts[0];
145145
proxyPort = Integer.parseInt(parts[1]);
@@ -167,7 +167,7 @@ public static void init(String[] args) throws UnknownHostException {
167167

168168
String server = args[base++];
169169
int port = 0;
170-
String parts[] = server.split(":");
170+
String[] parts = server.split(":");
171171
if (parts.length == 2) {
172172
server = parts[0];
173173
port = Integer.parseInt(parts[1]);
@@ -202,7 +202,7 @@ public static void init(String[] args) throws UnknownHostException {
202202
} else if (protocol.equals("false")) {
203203
ftps = new FTPSClient(false);
204204
} else {
205-
String prot[] = protocol.split(",");
205+
String[] prot = protocol.split(",");
206206
if (prot.length == 1) { // Just protocol
207207
ftps = new FTPSClient(protocol);
208208
} else { // protocol,true|false

0 commit comments

Comments
 (0)