diff --git a/docs/header_names/allowed_framework_names.adoc b/docs/header_names/allowed_framework_names.adoc index ba9726085af..b849fc5fed3 100644 --- a/docs/header_names/allowed_framework_names.adoc +++ b/docs/header_names/allowed_framework_names.adoc @@ -46,6 +46,7 @@ * Java JDBC API * Java I/O API * Java Lang Package +* Java Logging API * Java JNDI API * Java Regex API * Java XML API diff --git a/rules/S2091/kotlin/how-to-fix-it/java-xml.adoc b/rules/S2091/kotlin/how-to-fix-it/java-xml.adoc index dd67f2498fd..5f0930daa3c 100644 --- a/rules/S2091/kotlin/how-to-fix-it/java-xml.adoc +++ b/rules/S2091/kotlin/how-to-fix-it/java-xml.adoc @@ -13,8 +13,8 @@ import javax.xml.xpath.XPath import javax.xml.xpath.XPathConstants fun authenticate(request: HttpServletRequest, xpath: XPath, doc: Document): Boolean { - val user: String = request.getParameter("user") - val pass: String = request.getParameter("pass") + val user = request.getParameter("user") + val pass = request.getParameter("pass") val expression = "/users/user[@name='$user' and @pass='$pass']" return xpath.evaluate(expression, doc, XPathConstants.BOOLEAN) as Boolean } @@ -28,7 +28,7 @@ import javax.xml.xpath.XPath import javax.xml.xpath.XPathConstants import javax.xml.xpath.XPathVariableResolver -fun authenticate(request: HttpServletRequest, xpath: XPath, doc: Document?): Boolean { +fun authenticate(request: HttpServletRequest, xpath: XPath, doc: Document): Boolean { val user = request.getParameter("user") val pass = request.getParameter("pass") val expression = "/users/user[@name=\$user and @pass=\$pass]" diff --git a/rules/S5145/java/how-to-fix-it/java-se.adoc b/rules/S5145/java/how-to-fix-it/java-logging.adoc similarity index 96% rename from rules/S5145/java/how-to-fix-it/java-se.adoc rename to rules/S5145/java/how-to-fix-it/java-logging.adoc index b4a5d6b1095..f6aed33dd33 100644 --- a/rules/S5145/java/how-to-fix-it/java-se.adoc +++ b/rules/S5145/java/how-to-fix-it/java-logging.adoc @@ -1,4 +1,4 @@ -== How to fix it in Java SE +== How to fix it in Java Logging API === Code examples diff --git a/rules/S5145/java/rule.adoc b/rules/S5145/java/rule.adoc index 9e64384ef13..7544b45ab88 100644 --- a/rules/S5145/java/rule.adoc +++ b/rules/S5145/java/rule.adoc @@ -6,7 +6,7 @@ include::../impact.adoc[] // How to fix it section -include::how-to-fix-it/java-se.adoc[] +include::how-to-fix-it/java-logging.adoc[] == Resources diff --git a/rules/S5145/kotlin/how-to-fix-it/java-se.adoc b/rules/S5145/kotlin/how-to-fix-it/java-logging.adoc similarity index 96% rename from rules/S5145/kotlin/how-to-fix-it/java-se.adoc rename to rules/S5145/kotlin/how-to-fix-it/java-logging.adoc index 9d1c2baed5c..3d05d5d72ef 100644 --- a/rules/S5145/kotlin/how-to-fix-it/java-se.adoc +++ b/rules/S5145/kotlin/how-to-fix-it/java-logging.adoc @@ -1,4 +1,4 @@ -== How to fix it in Java SE +== How to fix it in Java Logging API === Code examples diff --git a/rules/S5145/kotlin/rule.adoc b/rules/S5145/kotlin/rule.adoc index f78c3bff163..418f9fe4959 100644 --- a/rules/S5145/kotlin/rule.adoc +++ b/rules/S5145/kotlin/rule.adoc @@ -4,7 +4,7 @@ include::../rationale.adoc[] include::../impact.adoc[] -include::how-to-fix-it/java-se.adoc[] +include::how-to-fix-it/java-logging.adoc[] == Resources diff --git a/rules/S6384/java/rule.adoc b/rules/S6384/java/rule.adoc index 2b4219ece45..88f1e8ee74d 100644 --- a/rules/S6384/java/rule.adoc +++ b/rules/S6384/java/rule.adoc @@ -20,15 +20,7 @@ ifdef::env-github,rspecator-view[] == Implementation Specification (visible only on this page) -=== Message - -Change this code to not perform arbitrary intent redirection. - +include::../message.adoc[] endif::env-github,rspecator-view[] -''' -== Implementation Specification -(visible only on this page) - -include::../message.adoc[] diff --git a/rules/S6384/kotlin/rule.adoc b/rules/S6384/kotlin/rule.adoc index 2b4219ece45..f6f076fdccb 100644 --- a/rules/S6384/kotlin/rule.adoc +++ b/rules/S6384/kotlin/rule.adoc @@ -20,15 +20,8 @@ ifdef::env-github,rspecator-view[] == Implementation Specification (visible only on this page) -=== Message - -Change this code to not perform arbitrary intent redirection. +include::../message.adoc[] endif::env-github,rspecator-view[] -''' -== Implementation Specification -(visible only on this page) - -include::../message.adoc[] diff --git a/rules/S6390/java/how-to-fix-it/java-se.adoc b/rules/S6390/java/how-to-fix-it/java-lang.adoc similarity index 97% rename from rules/S6390/java/how-to-fix-it/java-se.adoc rename to rules/S6390/java/how-to-fix-it/java-lang.adoc index af084fbdbcc..87b92b844c8 100644 --- a/rules/S6390/java/how-to-fix-it/java-se.adoc +++ b/rules/S6390/java/how-to-fix-it/java-lang.adoc @@ -1,4 +1,4 @@ -== How to fix it in Java SE +== How to fix it in Java Lang Package === Code examples diff --git a/rules/S6390/java/rule.adoc b/rules/S6390/java/rule.adoc index 1154bd16169..b01b3ec604d 100644 --- a/rules/S6390/java/rule.adoc +++ b/rules/S6390/java/rule.adoc @@ -24,7 +24,7 @@ might badly answer, be slowed down, or become completely irresponsive. // How to fix it section -include::./how-to-fix-it/java-se.adoc[] +include::./how-to-fix-it/java-lang.adoc[] == Resources diff --git a/rules/S6390/kotlin/how-to-fix-it/java-se.adoc b/rules/S6390/kotlin/how-to-fix-it/java-lang.adoc similarity index 97% rename from rules/S6390/kotlin/how-to-fix-it/java-se.adoc rename to rules/S6390/kotlin/how-to-fix-it/java-lang.adoc index 7d0819ccc2f..6d39cc59d02 100644 --- a/rules/S6390/kotlin/how-to-fix-it/java-se.adoc +++ b/rules/S6390/kotlin/how-to-fix-it/java-lang.adoc @@ -1,4 +1,4 @@ -== How to fix it in Java SE +== How to fix it in Java Lang Package === Code examples diff --git a/rules/S6390/kotlin/rule.adoc b/rules/S6390/kotlin/rule.adoc index 3e8d0095e34..57942a96c67 100644 --- a/rules/S6390/kotlin/rule.adoc +++ b/rules/S6390/kotlin/rule.adoc @@ -24,7 +24,7 @@ might badly answer, be slowed down, or become completely irresponsive. // How to fix it section -include::./how-to-fix-it/java-se.adoc[] +include::./how-to-fix-it/java-lang.adoc[] == Resources diff --git a/rules/S6547/java/how-to-fix-it/java-se.adoc b/rules/S6547/java/how-to-fix-it/java-lang.adoc similarity index 96% rename from rules/S6547/java/how-to-fix-it/java-se.adoc rename to rules/S6547/java/how-to-fix-it/java-lang.adoc index ba8ba9677fe..ad7d5f4b2ba 100644 --- a/rules/S6547/java/how-to-fix-it/java-se.adoc +++ b/rules/S6547/java/how-to-fix-it/java-lang.adoc @@ -1,4 +1,4 @@ -== How to fix it in Java SE +== How to fix it in Java Lang Package === Code examples diff --git a/rules/S6547/java/rule.adoc b/rules/S6547/java/rule.adoc index 3df0e6b24fc..8603c8a0aa1 100644 --- a/rules/S6547/java/rule.adoc +++ b/rules/S6547/java/rule.adoc @@ -6,7 +6,7 @@ include::../impact.adoc[] // How to fix it section -include::how-to-fix-it/java-se.adoc[] +include::how-to-fix-it/java-lang.adoc[] == Resources diff --git a/rules/S6547/kotlin/how-to-fix-it/java-se.adoc b/rules/S6547/kotlin/how-to-fix-it/java-lang.adoc similarity index 96% rename from rules/S6547/kotlin/how-to-fix-it/java-se.adoc rename to rules/S6547/kotlin/how-to-fix-it/java-lang.adoc index 17ecd3cb8e7..ef5571052dd 100644 --- a/rules/S6547/kotlin/how-to-fix-it/java-se.adoc +++ b/rules/S6547/kotlin/how-to-fix-it/java-lang.adoc @@ -1,4 +1,4 @@ -== How to fix it in Java SE +== How to fix it in Java Lang Package === Code examples diff --git a/rules/S6547/kotlin/rule.adoc b/rules/S6547/kotlin/rule.adoc index dfdb20f4cd6..ebc937f1a47 100644 --- a/rules/S6547/kotlin/rule.adoc +++ b/rules/S6547/kotlin/rule.adoc @@ -6,7 +6,7 @@ include::../impact.adoc[] // How to fix it section -include::how-to-fix-it/java-se.adoc[] +include::how-to-fix-it/java-lang.adoc[] == Resources