Apply suggestions from code review

Co-authored-by: Clément Fournier <clement.fournier76@gmail.com>
This commit is contained in:
Andreas Dangel
2021-02-19 09:18:31 +01:00
committed by GitHub
parent 403c5956b8
commit 7187e1d451
2 changed files with 2 additions and 2 deletions

View File

@ -481,7 +481,7 @@ public class JavaParser {
}
private void checkForNewStringSpaceEscape(String s) {
if (!(jdkVersion >= 15) && s.contains("\\s") && !s.contains("\\\\s")) {
if (jdkVersion < 15 && s.contains("\\s") && !s.contains("\\\\s")) {
throwParseException("The escape sequence \"\\s\" is only supported with Java >= 15");
}
}

View File

@ -18,7 +18,7 @@ import net.sourceforge.pmd.annotation.Experimental;
*
* <pre class="grammar">
*
* PermittedSubclasses ::= "permits" ClassOrInterfaceType
* PermitsList ::= "permits" ClassOrInterfaceType
* ( "," ClassOrInterfaceType )*
* </pre>
*/