Changeset 18051 in josm


Ignore:
Timestamp:
2021-07-17T17:24:53+02:00 (3 years ago)
Author:
Don-vip
Message:

upgrade to checkstyle 8.43, fix violations

Location:
trunk
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/scripts/TagInfoExtract.java

    r18016 r18051  
    293293        }
    294294
    295         private void fillTagsMap(Map<Tag, TagInfoTag> optionalTags, KeyedItem item, String value, String presetName, Set<TagInfoTag.Type> types, String descriptionPrefix, String iconUrl) {
     295        private void fillTagsMap(Map<Tag, TagInfoTag> optionalTags, KeyedItem item, String value,
     296                String presetName, Set<TagInfoTag.Type> types, String descriptionPrefix, String iconUrl) {
    296297            optionalTags.compute(new Tag(item.key, value), (osmTag, tagInfoTag) -> {
    297298                if (tagInfoTag == null) {
  • trunk/src/org/openstreetmap/josm/actions/RestorePropertyAction.java

    r17996 r18051  
    5656
    5757        Map<String, String> changes = TableHelper.selectedIndices(selectionModel).boxed()
    58                 .collect(HashMap::new, (m,i)->m.put(keyFn.apply(i), valueFn.apply(i)), HashMap::putAll);
     58                .collect(HashMap::new, (m, i) -> m.put(keyFn.apply(i), valueFn.apply(i)), HashMap::putAll);
    5959        ChangePropertyCommand command = new ChangePropertyCommand(Collections.singleton(primitive), changes);
    6060        UndoRedoHandler.getInstance().add(command);
  • trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImagesLoader.java

    r18035 r18051  
    4242    /**
    4343     * Constructs a new {@code ImagesLoader}.
    44      * @param selection
    45      * @param gpxLayer
     44     * @param selection image files to load
     45     * @param gpxLayer associated GPX layer
    4646     */
    47     public ImagesLoader(Collection<File> selection, GpxLayer gpxLayer) {
     47    ImagesLoader(Collection<File> selection, GpxLayer gpxLayer) {
    4848        super(tr("Extracting GPS locations from EXIF"));
    4949        this.selection = selection;
  • trunk/src/org/openstreetmap/josm/gui/layer/geoimage/SynchronizeTimeFromPhotoDialog.java

    r18045 r18051  
    5959     * @param images list of image entries
    6060     */
    61     public SynchronizeTimeFromPhotoDialog(Component parent, List<ImageEntry> images) {
     61    SynchronizeTimeFromPhotoDialog(Component parent, List<ImageEntry> images) {
    6262        super(parent, tr("Synchronize time from a photo of the GPS receiver"), tr("OK"), tr("Cancel"));
    6363        setButtonIcons("ok", "cancel");
  • trunk/src/org/openstreetmap/josm/gui/layer/gpx/GpxDataHelper.java

    r18042 r18051  
    3333 */
    3434public final class GpxDataHelper {
     35
     36    private GpxDataHelper() {
     37        // Hide public constructor
     38    }
    3539
    3640    /**
  • trunk/src/org/openstreetmap/josm/io/GpxReader.java

    r17984 r18051  
    133133        @Override
    134134        public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException {
    135             elements.push(new String[] { namespaceURI, localName, qName });
     135            elements.push(new String[] {namespaceURI, localName, qName});
    136136            switch(currentState) {
    137137            case INIT:
  • trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetValidationTest.java

    r18001 r18051  
    5151        TaggingPresetValidation.validate(primitive, label);
    5252
     53        // CHECKSTYLE.OFF: LineLength
    5354        assertTrue(label.isVisible());
    5455        assertEquals("<html><ul>" +
    55                 "<li>Opening hours syntax (Hours without minutes)</li>" +
    56                 "<li>unusual value of width: meters is default; only positive values; point is decimal separator; if units, put space then unit</li>" +
    57                 "<li>unusual value of incline, use x% or x° or up or down instead</li>" +
    58                 "<li>suspicious tag combination (width on suspicious object)</li>" +
    59                 "<li>suspicious tag combination (incline on suspicious object)</li></ul>", label.getToolTipText());
     56            "<li>Opening hours syntax (Hours without minutes)</li>" +
     57            "<li>unusual value of width: meters is default; only positive values; point is decimal separator; if units, put space then unit</li>" +
     58            "<li>unusual value of incline, use x% or x° or up or down instead</li>" +
     59            "<li>suspicious tag combination (width on suspicious object)</li>" +
     60            "<li>suspicious tag combination (incline on suspicious object)</li></ul>", label.getToolTipText());
     61        // CHECKSTYLE.ON: LineLength
    6062    }
    6163
  • trunk/test/unit/org/openstreetmap/josm/testutils/annotations/AnnotationUtils.java

    r18037 r18051  
    6262                } catch (UnsupportedOperationException e) {
    6363                    // Probably an unmodifiable collection
     64                    System.err.println("Unable to clear " + field);
    6465                }
    6566            } else if (!isFinal) {
  • trunk/test/unit/org/openstreetmap/josm/tools/JosmDecimalFormatSymbolsProviderTest.java

    r17967 r18051  
    3535    static void beforeAll() throws IOException {
    3636        if (Utils.getJavaVersion() >= 9) {
    37             assertEquals("SPI,JRE,CLDR", System.getProperty("java.locale.providers"), "This test must be launched with -Djava.locale.providers=SPI,JRE,CLDR");
     37            assertEquals("SPI,JRE,CLDR", System.getProperty("java.locale.providers"),
     38                    "This test must be launched with -Djava.locale.providers=SPI,JRE,CLDR");
    3839            try (InputStream in = I18n.class.getResourceAsStream("/META-INF/services/java.text.spi.DecimalFormatSymbolsProvider")) {
    39                 assertEquals("org.openstreetmap.josm.tools.JosmDecimalFormatSymbolsProvider", new String(Utils.readBytesFromStream(in), StandardCharsets.UTF_8).trim());
     40                assertEquals("org.openstreetmap.josm.tools.JosmDecimalFormatSymbolsProvider",
     41                        new String(Utils.readBytesFromStream(in), StandardCharsets.UTF_8).trim());
    4042            }
    4143        }
  • trunk/tools/checkstyle/META-INF/MANIFEST.MF

    r17302 r18051  
    33Bundle-Name: JOSM Checkstyle Eclipse Plugin
    44Bundle-SymbolicName: org.openstreetmap.josm.checkstyle-eclipse-plugin;singleton:=true
    5 Bundle-Version: 8.35.0.qualifier
     5Bundle-Version: 8.43.0.qualifier
    66Require-Bundle: net.sf.eclipsecs.checkstyle,
    77 net.sf.eclipsecs.core,
  • trunk/tools/ivy.xml

    r17907 r18051  
    1717        <dependency org="net.java.dev.javacc" name="javacc" rev="7.0.10" conf="javacc->default"/>
    1818        <!-- checkstyle->default -->
    19         <dependency org="com.puppycrawl.tools" name="checkstyle" rev="8.36" conf="checkstyle->default"/>
     19        <dependency org="com.puppycrawl.tools" name="checkstyle" rev="8.43" conf="checkstyle->default"/>
    2020        <!-- proguard->default -->
    2121        <dependency org="com.guardsquare" name="proguard-ant" rev="7.1.0-beta3" conf="proguard->default"/>
Note: See TracChangeset for help on using the changeset viewer.