Apply suggestions from code review
Co-authored-by: Clément Fournier <clement.fournier76@gmail.com>
This commit is contained in:
@ -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");
|
||||
}
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ import net.sourceforge.pmd.annotation.Experimental;
|
||||
*
|
||||
* <pre class="grammar">
|
||||
*
|
||||
* PermittedSubclasses ::= "permits" ClassOrInterfaceType
|
||||
* PermitsList ::= "permits" ClassOrInterfaceType
|
||||
* ( "," ClassOrInterfaceType )*
|
||||
* </pre>
|
||||
*/
|
||||
|
Reference in New Issue
Block a user