Ignore:
Timestamp:
2024-04-19T16:21:11+02:00 (6 weeks ago)
Author:
taylor.smock
Message:

Dependency updates

ivy.xml

  • org.eclipse.parsson:parsson: 1.1.5 -> 1.1.6
  • org.apache.commons:commons-compress: 1.25.0 -> 1.26.1
    • Note: This deprecated some functions
  • ch.poole:OpeningHoursParser: 0.28.1 -> 0.28.2
  • org.jacoco:org.jacoco.ant: 0.8.11 -> 0.8.12
  • com.github.spotbugs:spotbugs-annotations: 4.8.3 -> 4.8.4
  • com.github.tomakehurst:wiremock: 2.35.0 -> 3.0.1
  • io.github.classgraph:classgraph: 4.8.165 -> 4.8.171
  • nl.jqno.equalsverifier:equalsverifier: 3.15.6 -> 3.16.1
  • org.awaitility:awaitility: 4.2.0 -> 4.2.1

tools/ivy.xml

  • com.puppycrawl.tools:checkstyle: 9.3 -> 10.15.0
  • com.github.spotbugs:spotbugs: 4.8.3 -> 4.8.4
  • com.google.errorprone: 2.(10.0|24.1) -> 2.26.1
  • net.sourceforge.pmd:pmd was not updated to 7.0.0 due to a significant number of false positives.

There were some additional changes to cleanup new warnings and remove some
additional Java 8 files. There are more warnings that need to be cleaned up.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/search/SearchCompiler.java

    r18877 r19048  
    2323import java.util.function.Predicate;
    2424import java.util.function.Supplier;
    25 import java.util.regex.Matcher;
    2625import java.util.regex.Pattern;
    2726import java.util.regex.PatternSyntaxException;
     
    160159        @Override
    161160        public Match get(String keyword, boolean caseSensitive, boolean regexSearch, PushbackTokenizer tokenizer) throws SearchParseError {
    162             switch(keyword) {
     161            switch (keyword) {
    163162            case MODIFIED:
    164163                return new Modified();
     
    11401139                    value = Normalizer.normalize(value, Normalizer.Form.NFC);
    11411140
    1142                     Matcher keyMatcher = searchRegex.matcher(key);
    1143                     Matcher valMatcher = searchRegex.matcher(value);
     1141                    final var keyMatcher = searchRegex.matcher(key);
     1142                    final var valMatcher = searchRegex.matcher(value);
    11441143
    11451144                    boolean keyMatchFound = keyMatcher.find();
     
    16231622     * Matches objects that are new (i.e. have not been uploaded to the server)
    16241623     */
    1625     private static class New extends Match {
     1624    private static final class New extends Match {
    16261625        @Override
    16271626        public boolean match(OsmPrimitive osm) {
     
    16381637     * Matches all objects that have been modified, created, or undeleted
    16391638     */
    1640     private static class Modified extends Match {
     1639    private static final class Modified extends Match {
    16411640        @Override
    16421641        public boolean match(OsmPrimitive osm) {
     
    16531652     * Matches all objects that have been deleted
    16541653     */
    1655     private static class Deleted extends Match {
     1654    private static final class Deleted extends Match {
    16561655        @Override
    16571656        public boolean match(OsmPrimitive osm) {
     
    16681667     * Matches all objects currently selected
    16691668     */
    1670     private static class Selected extends Match {
     1669    private static final class Selected extends Match {
    16711670        @Override
    16721671        public boolean match(OsmPrimitive osm) {
     
    16851684     * fetched from the server.
    16861685     */
    1687     private static class Incomplete extends Match {
     1686    private static final class Incomplete extends Match {
    16881687        @Override
    16891688        public boolean match(OsmPrimitive osm) {
     
    17021701     * org.openstreetmap.josm.data.osm.OsmPrimitive.getUninterestingKeys()
    17031702     */
    1704     private static class Untagged extends Match {
     1703    private static final class Untagged extends Match {
    17051704        @Override
    17061705        public boolean match(OsmPrimitive osm) {
     
    17171716     * Matches ways which are closed (i.e. first and last node are the same)
    17181717     */
    1719     private static class Closed extends Match {
     1718    private static final class Closed extends Match {
    17201719        @Override
    17211720        public boolean match(OsmPrimitive osm) {
     
    18181817            if (!(osm instanceof Way))
    18191818                return null;
    1820             Way way = (Way) osm;
     1819            final var way = (Way) osm;
    18211820            return (long) way.getLength();
    18221821        }
     
    19711970
    19721971            try {
    1973                 String groupSuffix = name.substring(0, name.length() - 2); // try to remove '/*'
     1972                final var groupSuffix = name.substring(0, name.length() - 2); // try to remove '/*'
    19741973                TaggingPresetMenu group = preset.group;
    19751974
     
    21792178            } else if (tokenizer.readIfEqual(Token.COLON)) {
    21802179                // see if we have a Match that takes a data parameter
    2181                 SimpleMatchFactory factory = simpleMatchFactoryMap.get(key);
     2180                final var factory = simpleMatchFactoryMap.get(key);
    21822181                if (factory != null)
    21832182                    return factory.get(key, caseSensitive, regexSearch, tokenizer);
    21842183
    2185                 UnaryMatchFactory unaryFactory = unaryMatchFactoryMap.get(key);
     2184                final var unaryFactory = unaryMatchFactoryMap.get(key);
    21862185                if (unaryFactory != null)
    21872186                    return getValidate(unaryFactory, key, tokenizer);
     
    21962195                return new BooleanMatch(key, false);
    21972196            else {
    2198                 SimpleMatchFactory factory = simpleMatchFactoryMap.get(key);
     2197                final var factory = simpleMatchFactoryMap.get(key);
    21992198                if (factory != null)
    22002199                    return factory.get(key, caseSensitive, regexSearch, null).validate();
    22012200
    2202                 UnaryMatchFactory unaryFactory = unaryMatchFactoryMap.get(key);
     2201                final var unaryFactory = unaryMatchFactoryMap.get(key);
    22032202                if (unaryFactory != null)
    22042203                    return getValidate(unaryFactory, key, null);
     
    22222221
    22232222    private static int regexFlags(boolean caseSensitive) {
    2224         int searchFlags = 0;
     2223        var searchFlags = 0;
    22252224
    22262225        // Enables canonical Unicode equivalence so that e.g. the two
Note: See TracChangeset for help on using the changeset viewer.