- Timestamp:
- 2020-06-14T14:55:23+02:00 (4 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/mapmode/DeleteAction.java
r16558 r16626 75 75 way_with_nodes(/* ICON(cursor/modifier/) */ "delete_way_node_only"); 76 76 77 @SuppressWarnings("ImmutableEnumChecker") 77 78 private final Cursor c; 78 79 -
trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java
r16438 r16626 109 109 move(Cursor.MOVE_CURSOR); 110 110 111 @SuppressWarnings("ImmutableEnumChecker") 111 112 private final Cursor c; 112 113 SelectActionCursor(String main, String sub) { -
trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitiveType.java
r16445 r16626 32 32 private final Class<? extends OsmPrimitive> osmClass; 33 33 private final Class<? extends PrimitiveData> dataClass; 34 @SuppressWarnings("ImmutableEnumChecker") 34 35 private final UniqueIdGenerator idGenerator; 35 36 -
trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/PaintColors.java
r14784 r16626 79 79 AREA_TEXT(marktr("areatext"), Color.LIGHT_GRAY); 80 80 81 @SuppressWarnings("ImmutableEnumChecker") 81 82 private final NamedColorProperty baseProperty; 83 @SuppressWarnings("ImmutableEnumChecker") 82 84 private final CachingProperty<Color> property; 83 85 -
trunk/src/org/openstreetmap/josm/data/projection/CustomProjection.java
r16436 r16626 185 185 SOUTH(LatLon.SOUTH_POLE); 186 186 187 @SuppressWarnings("ImmutableEnumChecker") 187 188 private final LatLon latlon; 188 189 -
trunk/src/org/openstreetmap/josm/data/validation/Severity.java
r12987 r16626 31 31 32 32 /** Associated color */ 33 @SuppressWarnings("ImmutableEnumChecker") // see https://github.com/google/error-prone/pull/1682 33 34 private final Color color; 34 35 -
trunk/src/org/openstreetmap/josm/gui/MenuScroller.java
r16438 r16626 422 422 DOWN(1, 9, 1); 423 423 private static final int[] XPOINTS = {1, 5, 9}; 424 @SuppressWarnings("ImmutableEnumChecker") 424 425 private final int[] yPoints; 425 426 -
trunk/src/org/openstreetmap/josm/gui/conflict/ConflictColors.java
r12987 r16626 82 82 FGCOLOR_MEMBER_REMOVE(marktr("Conflict foreground: remove member"), Color.black); 83 83 84 @SuppressWarnings("ImmutableEnumChecker") 84 85 private final NamedColorProperty property; 85 86 -
trunk/src/org/openstreetmap/josm/gui/conflict/pair/ComparePairType.java
r16438 r16626 5 5 import static org.openstreetmap.josm.gui.conflict.pair.ListRole.THEIR_ENTRIES; 6 6 import static org.openstreetmap.josm.tools.I18n.tr; 7 8 import java.util.Arrays;9 10 import org.openstreetmap.josm.tools.Utils;11 7 12 8 /** … … 33 29 /** the localized display name */ 34 30 private final String displayName; 35 private final ListRole[] participatingRoles; 31 private final ListRole participatingRole1; 32 private final ListRole participatingRole2; 36 33 37 ComparePairType(String displayName, ListRole ... participatingRoles) {34 ComparePairType(String displayName, ListRole participatingRole1, ListRole participatingRole2) { 38 35 this.displayName = displayName; 39 this.participatingRoles = Utils.copyArray(participatingRoles); 36 this.participatingRole1 = participatingRole1; 37 this.participatingRole2 = participatingRole2; 40 38 } 41 39 … … 56 54 */ 57 55 public boolean isParticipatingIn(ListRole role) { 58 return Arrays.stream(participatingRoles).anyMatch(r -> r == role);56 return participatingRole1 == role || participatingRole2 == role; 59 57 } 60 58 … … 65 63 */ 66 64 public ListRole[] getParticipatingRoles() { 67 return Utils.copyArray(participatingRoles);65 return new ListRole[]{participatingRole1, participatingRole2}; 68 66 } 69 67 … … 78 76 if (!isParticipatingIn(role)) 79 77 throw new IllegalStateException(tr("Role {0} is not participating in compare pair {1}.", role.toString(), this.toString())); 80 if (participatingRoles[0] == role) 81 return participatingRoles[1]; 82 else 83 return participatingRoles[0]; 78 return participatingRole1 == role ? participatingRole2 : participatingRole1; 84 79 } 85 80 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/ValidatorListManagementDialog.java
r15586 r16626 49 49 CANCEL(1, tr("Cancel"), new ImageProvider("cancel")); 50 50 51 private int index; 52 private String name; 53 private ImageIcon icon; 51 private final int index; 52 private final String name; 53 @SuppressWarnings("ImmutableEnumChecker") 54 private final ImageIcon icon; 54 55 55 56 BUTTONS(int index, String name, ImageProvider image) { -
trunk/src/org/openstreetmap/josm/gui/history/TwoColumnDiff.java
r16458 r16626 39 39 EMPTY(new Color(234, 234, 234)); 40 40 41 @SuppressWarnings("ImmutableEnumChecker") // see https://github.com/google/error-prone/pull/1682 41 42 private final Color color; 42 43 DiffItemType(Color color) { -
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ConditionFactory.java
r16438 r16626 182 182 static final Set<Op> NEGATED_OPS = EnumSet.of(NEQ, NREGEX); 183 183 184 @SuppressWarnings("ImmutableEnumChecker") 184 185 private final BiPredicate<String, String> function; 185 186 -
trunk/src/org/openstreetmap/josm/tools/OptionParser.java
r14640 r16626 251 251 MULTIPLE(0, Integer.MAX_VALUE); 252 252 253 private int min;254 private int max;253 private final int min; 254 private final int max; 255 255 256 256 OptionCount(int min, int max) {
Note:
See TracChangeset
for help on using the changeset viewer.