Ignore:
Timestamp:
2015-06-20T23:42:21+02:00 (9 years ago)
Author:
Don-vip
Message:

checkstyle: enable relevant whitespace checks and fix them

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/history/TwoColumnDiff.java

    r8318 r8510  
    3232
    3333        public enum DiffItemType {
    34             INSERTED(new Color(0xDD, 0xFF, 0xDD)), DELETED(new Color(255,197,197)), CHANGED(new Color(255,234,213)),
    35             SAME(new Color(234,234,234)), EMPTY(new Color(234,234,234));
     34            INSERTED(new Color(0xDD, 0xFF, 0xDD)),
     35            DELETED(new Color(255, 197, 197)),
     36            CHANGED(new Color(255, 234, 213)),
     37            SAME(new Color(234, 234, 234)),
     38            EMPTY(new Color(234, 234, 234));
    3639
    3740            private final Color color;
     
    3942                this.color = color;
    4043            }
     44
    4145            public Color getColor() {
    4246                return color;
     
    9195        int ib = 0;
    9296
    93         while(script != null) {
     97        while (script != null) {
    9498            int deleted = script.deleted;
    9599            int inserted = script.inserted;
    96             while(ia < script.line0 && ib < script.line1){
     100            while (ia < script.line0 && ib < script.line1) {
    97101                Item cell = new Item(DiffItemType.SAME, a[ia]);
    98102                referenceDiff.add(cell);
     
    102106            }
    103107
    104             while(inserted > 0 || deleted > 0) {
    105                 if(inserted > 0 && deleted > 0) {
     108            while (inserted > 0 || deleted > 0) {
     109                if (inserted > 0 && deleted > 0) {
    106110                    referenceDiff.add(new Item(DiffItemType.CHANGED, a[ia++]));
    107111                    currentDiff.add(new Item(DiffItemType.CHANGED, b[ib++]));
    108                 } else if(inserted > 0) {
     112                } else if (inserted > 0) {
    109113                    referenceDiff.add(new Item(DiffItemType.EMPTY, null));
    110114                    currentDiff.add(new Item(DiffItemType.INSERTED, b[ib++]));
     
    118122            script = script.link;
    119123        }
    120         while(ia < a.length && ib < b.length) {
     124        while (ia < a.length && ib < b.length) {
    121125            referenceDiff.add(new Item(DiffItemType.SAME, a[ia++]));
    122126            currentDiff.add(new Item(DiffItemType.SAME, b[ib++]));
Note: See TracChangeset for help on using the changeset viewer.