Skip to content

Commit

Permalink
sonar fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mariuszkubis committed Sep 22, 2016
1 parent 7932fcc commit f55fbb6
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 96 deletions.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
jcr:primaryType="nt:unstructured"
sling:resourceType="cognifide/secureaem/components/crxDevelopmentBundles"
enabled="true"
users="[admin:admin]"
bundles="[Adobe CRXDE Support,Adobe Granite CRX Explorer,Adobe Granite CRXDE Lite]"/>
</jcr:content>
</jcr:root>
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
<testComponent
jcr:primaryType="nt:unstructured"
sling:resourceType="cognifide/secureaem/components/replicationTransportUsers"
enabled="true"
users="[admin:admin]"/>
enabled="true"/>
</jcr:content>
</jcr:root>
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
jcr:primaryType="nt:unstructured"
sling:resourceType="cognifide/secureaem/components/slingDevelopmentBundle"
enabled="true"
users="[admin:admin]"
bundles="[Apache Sling Tooling]"/>
</jcr:content>
</jcr:root>
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
<testComponent
jcr:primaryType="nt:unstructured"
sling:resourceType="cognifide/secureaem/components/slingJsHandler"
enabled="true"
authorUser="admin:admin"
publishUser="admin:admin"/>
enabled="true"/>
</jcr:content>
</jcr:root>
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
urlDesc="Official AEM Security Checklist">
<testComponent
jcr:primaryType="nt:unstructured"
sling:resourceType="cognifide/secureaem/components/slingJsHandler"
enabled="true"
authorUser="admin:admin"
publishUser="admin:admin"/>
sling:resourceType="cognifide/secureaem/components/slingJspScriptHandler"
enabled="true"/>
</jcr:content>
</jcr:root>
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
<testComponent
jcr:primaryType="nt:unstructured"
sling:resourceType="cognifide/secureaem/components/slingReferrerFilter"
enabled="true"
users="[admin:admin]"/>
enabled="true"/>
</jcr:content>
</jcr:root>
6 changes: 4 additions & 2 deletions src/main/java/com/cognifide/secureaem/cli/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
import org.apache.commons.lang3.StringUtils;

import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
Expand Down Expand Up @@ -58,7 +58,9 @@ private static List<TestLoader> createTestLoaders(CommandLine cmdLine) throws IO
private static BufferedReader getBufferedReader(CommandLine cmdLine) throws FileNotFoundException {
BufferedReader reader;
if (cmdLine.hasOption("suite")) {
reader = new BufferedReader(new FileReader(cmdLine.getOptionValue("suite")));
reader = new BufferedReader(
new InputStreamReader(new FileInputStream(cmdLine.getOptionValue("suite")),
StandardCharsets.UTF_8));
} else {
InputStream is = Main.class.getClass().getResourceAsStream(DEFAULT_TEST_SUITE_PATH);
reader = new BufferedReader(new InputStreamReader(is, StandardCharsets.UTF_8));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import com.cognifide.secureaem.AbstractTest;
import com.cognifide.secureaem.Configuration;
import com.cognifide.secureaem.UserHelper;
import com.cognifide.secureaem.markers.AuthorTest;
import com.cognifide.secureaem.markers.PublishTest;

Expand All @@ -14,11 +13,8 @@ public SlingJspScriptHandlerTest(Configuration config) {
}

@Override public boolean doTest(String url, String instanceName) throws Exception {
String[] user = AuthorTest.ENVIRONMENT_NAME.equals(instanceName) ?
UserHelper.splitUser(config.getStringValue("authorUser", "admin:admin")) :
UserHelper.splitUser(config.getStringValue("publishUser", "admin:admin"));
String configurationEndpoint = url
+ "/system/console/configMgr/com.adobe.granite.ui.clientlibs.impl.HtmlLibraryManagerImpl.json";
+ "/system/console/configMgr/org.apache.sling.scripting.jsp.JspScriptEngineFactory.json";
String body = getJsonBodyOfOsgiConfiguration(configurationEndpoint, getUsernamePasswordCredentials(instanceName), instanceName);
checkBooleanValue(getBooleanValueFromJson("jasper.classdebuginfo", body), false,
"Generate Debug Info", instanceName);
Expand Down

0 comments on commit f55fbb6

Please sign in to comment.