Changeset 15034 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2019-05-02T04:33:57+02:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/io/UploadDialog.java
r15015 r15034 595 595 } 596 596 597 private static String l c(String s) {597 private static String lower(String s) { 598 598 return s.toLowerCase(Locale.ENGLISH); 599 599 } 600 600 601 601 static String validateUploadTag(String uploadValue, String preferencePrefix, List<String> defMandatory, List<String> defForbidden) { 602 String uploadValueLc = l c(uploadValue);602 String uploadValueLc = lower(uploadValue); 603 603 // Check mandatory terms 604 604 List<String> missingTerms = Config.getPref().getList(preferencePrefix+".mandatory-terms", defMandatory) 605 .stream().map(UploadAction::l c).filter(x -> !uploadValueLc.contains(x)).collect(Collectors.toList());605 .stream().map(UploadAction::lower).filter(x -> !uploadValueLc.contains(x)).collect(Collectors.toList()); 606 606 if (!missingTerms.isEmpty()) { 607 607 return tr("The following required terms are missing: {0}", missingTerms); … … 609 609 // Check forbidden terms 610 610 List<String> forbiddenTerms = Config.getPref().getList(preferencePrefix+".forbidden-terms", defForbidden) 611 .stream().map(UploadAction::l c).filter(uploadValueLc::contains).collect(Collectors.toList());611 .stream().map(UploadAction::lower).filter(uploadValueLc::contains).collect(Collectors.toList()); 612 612 if (!forbiddenTerms.isEmpty()) { 613 613 return tr("The following forbidden terms have been found: {0}", forbiddenTerms);
Note:
See TracChangeset
for help on using the changeset viewer.