Changeset 17331 in josm for trunk


Ignore:
Timestamp:
2020-11-23T10:59:13+01:00 (5 months ago)
Author:
GerdP
Message:

fix #19825: Advanced preferences table is empty w/o search text on Java 8

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/preferences/advanced/AdvancedPreference.java

    r17146 r17331  
    492492            final String prefKeyLower = prefKey.toLowerCase(Locale.ENGLISH);
    493493            final String prefValueLower = prefValue.toLowerCase(Locale.ENGLISH);
    494             final boolean canHas = Pattern.compile("\\s+").splitAsStream(txtFilter.getText())
     494            String filter = txtFilter.getText(); // see #19825
     495            final boolean canHas = filter.isEmpty() || Pattern.compile("\\s+").splitAsStream(filter)
    495496                    .map(bit -> bit.toLowerCase(Locale.ENGLISH))
    496497                    .anyMatch(bit -> {
Note: See TracChangeset for help on using the changeset viewer.