Skip to content

Commit 65bf087

Browse files
committed
Merge pull request #37 from DevFactory/release/boolean-expressions-not-to-be-wrapped-fix-1
Fixing squid:S1126--Fixing squid:S1488
2 parents f461e82 + 5b33c64 commit 65bf087

File tree

4 files changed

+4
-14
lines changed

4 files changed

+4
-14
lines changed

src/main/java/org/audit4j/core/Configurations.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,7 @@ static Configuration loadConfig(String configFilePath) throws ConfigurationExcep
8080
*/
8181
static Configuration loadConfig(ConfigurationStream stream) throws ConfigurationException {
8282
ConfigProvider<Configuration> provider = getProviderByFileExtention(stream.getExtention());
83-
Configuration configuration = provider.readConfig(stream.getInputStream());
84-
return configuration;
83+
return provider.readConfig(stream.getInputStream());
8584
}
8685

8786
/**

src/main/java/org/audit4j/core/handler/file/FileHandlerUtil.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -183,11 +183,7 @@ public static String separatorsToSystem(String path) {
183183
*/
184184
public static boolean isFileAlreadyExists(String path) {
185185
File file = new File(path);
186-
if (file.exists()) {
187-
return true;
188-
} else {
189-
return false;
190-
}
186+
return file.exists();
191187
}
192188

193189
/**

src/main/java/org/audit4j/core/web/ServletContexConfigSupport.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,6 @@ boolean canSearchConfigFile(ServletContext servletContext) {
9595
*/
9696
boolean hasHandlers(ServletContext servletContext) {
9797
String handlers = servletContext.getInitParameter("handlers");
98-
if (handlers == null || handlers.equals("")) {
99-
return false;
100-
} else {
101-
return true;
102-
}
98+
return !(handlers == null || handlers.equals(""));
10399
}
104100
}

src/test/java/org/audit4j/core/Audit4jTestBase.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ protected AuditEvent getSampleAuditEvent() {
2424
EventBuilder builder = new EventBuilder();
2525
builder.addTimestamp(new Date()).addActor(actor).addAction("myMethod").addOrigin("Origin").addField("myParam1Name", "param1")
2626
.addField("myParam2Name", new Integer(2));
27-
AuditEvent event = builder.build();
28-
return event;
27+
return builder.build();
2928
}
3029

3130
protected Configuration getDefaultConfiguration() {

0 commit comments

Comments
 (0)