Changeset 11739 in josm for trunk/src


Ignore:
Timestamp:
2017-03-17T23:03:26+01:00 (2 years ago)
Author:
Don-vip
Message:

enable more PMD rules

Location:
trunk/src/org/openstreetmap/josm
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/MergeLayerAction.java

    r11711 r11739  
    4242        if (targetLayer == null)
    4343            return;
    44         final Object actionName = MergeLayerAction.this.getValue(NAME);
     44        final Object actionName = getValue(NAME);
    4545        Main.worker.submit(() -> {
    4646                final long start = System.currentTimeMillis();
  • trunk/src/org/openstreetmap/josm/data/validation/tests/MultipolygonTest.java

    r11608 r11739  
    204204            if (area != null) {
    205205                for (Way wInner : polygon.getInnerWays()) {
    206                     AreaElement areaInner = ElemStyles.getAreaElemStyle(wInner, false);
    207 
    208                     if (areaInner != null && area.equals(areaInner)) {
     206                    if (area.equals(ElemStyles.getAreaElemStyle(wInner, false))) {
    209207                        errors.add(TestError.builder(this, Severity.OTHER, INNER_STYLE_MISMATCH)
    210208                                .message(tr("With the currently used mappaint style the style for inner way equals the multipolygon style"))
  • trunk/src/org/openstreetmap/josm/gui/JosmUserIdentityManager.java

    r10217 r11739  
    239239     */
    240240    public boolean isCurrentUser(String username) {
    241         return username != null && this.userName != null && this.userName.equals(username);
     241        return this.userName != null && this.userName.equals(username);
    242242    }
    243243
  • trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java

    r11620 r11739  
    271271                for (int i = gpxLst.size() - 1; i >= 0; i--) {
    272272                    GpxDataWrapper wrapper = gpxLst.get(i);
    273                     if (wrapper.file != null && sel.equals(wrapper.file)) {
     273                    if (sel.equals(wrapper.file)) {
    274274                        cbGpx.setSelectedIndex(i);
    275275                        if (!sel.getName().equals(wrapper.name)) {
  • trunk/src/org/openstreetmap/josm/tools/bugreport/ReportedException.java

    r11649 r11739  
    228228    private static String makeCollectionNice(Collection<?> value) {
    229229        int lines = 0;
    230         StringBuilder str = new StringBuilder();
     230        StringBuilder str = new StringBuilder(32);
    231231        for (Object e : value) {
    232232            str.append("\n    - ");
     
    246246    public String toString() {
    247247        return "ReportedException [thread=" + caughtOnThread + ", exception=" + getCause()
    248                 + ", methodWarningFrom=" + methodWarningFrom + "]";
     248                + ", methodWarningFrom=" + methodWarningFrom + ']';
    249249    }
    250250
Note: See TracChangeset for help on using the changeset viewer.