Repository navigation
Closed
Labels
Milestone
Description
graphhopper/core/src/main/java/com/graphhopper/util/GHUtility.java
Lines 660 to 681 in b713008
| // copied from janino | |
| private static final Set<String> KEYWORDS = new HashSet<>(Arrays.asList( | |
| "first_match", | |
| "abstract", "assert", | |
| "boolean", "break", "byte", | |
| "case", "catch", "char", "class", "const", "continue", | |
| "default", "do", "double", | |
| "else", "enum", "extends", | |
| "false", "final", "finally", "float", "for", | |
| "goto", | |
| "if", "implements", "import", "instanceof", "int", "interface", | |
| "long", | |
| "native", "new", "non-sealed", "null", | |
| "package", "permits", "private", "protected", "public", | |
| "record", "return", | |
| "sealed", "short", "static", "strictfp", "super", "switch", "synchronized", | |
| "this", "throw", "throws", "transient", "true", "try", | |
| "var", "void", "volatile", | |
| "while", | |
| "yield", | |
| "_" | |
| )); |
(what's up with first_match ?)
This avoids having to curate a list of Java keywords and instead uses the information provided by the standard library.
Activity
karussell commentedon Jan 27, 2023
Cool 👍
Ah, yes, we can avoid it. It was a keyword in the "language" before janino.
move area/EV name check into relevant classes and fix graphhopper#2735
[RSPS-1174] : Upgrade gh7 (#35)
[RSPS-1546] Upgrade to GH8 (#38)