Changeset 8777 in josm for trunk/src/org/openstreetmap/josm
- Timestamp:
- 2015-09-21T23:48:29+02:00 (9 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/relation/AbstractRelationAction.java
r8308 r8777 24 24 return Collections.<Relation>emptySet(); 25 25 } else { 26 return new SubclassFilteredCollection<>( 26 return new SubclassFilteredCollection<OsmPrimitive, Relation>( 27 27 primitives, OsmPrimitive.relationPredicate); 28 28 } -
trunk/src/org/openstreetmap/josm/command/ChangePropertyKeyCommand.java
r8510 r8777 25 25 * All primitives, that are affected with this command. 26 26 */ 27 private final List<OsmPrimitive> objects; 27 private final List<? extends OsmPrimitive> objects; 28 28 /** 29 29 * The key that is subject to change. -
trunk/src/org/openstreetmap/josm/command/DeleteCommand.java
r8540 r8777 369 369 return null; 370 370 371 Set<OsmPrimitive> primitivesToDelete = new HashSet<>(selection); 371 Set<OsmPrimitive> primitivesToDelete = new HashSet<OsmPrimitive>(selection); 372 372 373 373 Collection<Relation> relationsToDelete = Utils.filteredCollection(primitivesToDelete, Relation.class); -
trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateNode.java
r8510 r8777 381 381 public Command fixError(TestError testError) { 382 382 if (!isFixable(testError)) return null; 383 Collection<OsmPrimitive> sel = new LinkedList<>(testError.getPrimitives()); 383 Collection<OsmPrimitive> sel = new LinkedList<OsmPrimitive>(testError.getPrimitives()); 384 384 Set<Node> nodes = new LinkedHashSet<>(OsmPrimitive.getFilteredList(sel, Node.class)); 385 385 -
trunk/src/org/openstreetmap/josm/data/validation/tests/MultipolygonTest.java
r8510 r8777 302 302 } 303 303 } 304 List<OsmPrimitive> newPrimitives = new ArrayList<>(primitives); 304 List<OsmPrimitive> newPrimitives = new ArrayList<OsmPrimitive>(primitives); 305 305 newPrimitives.add(0, r); 306 306 error.setPrimitives(newPrimitives); -
trunk/src/org/openstreetmap/josm/gui/widgets/JosmComboBox.java
r8510 r8777 108 108 E oldPrototype = getPrototypeDisplayValue(); 109 109 // Get internal JList to directly call the renderer 110 JList<E> list = getList(); 110 @SuppressWarnings("rawtypes") 111 JList list = getList(); 111 112 try { 112 113 // Index to give to renderer … … 117 118 // but not with TaggingPreset custom renderer that return a dummy height if index is equal to -1 118 119 // So we explicitely call the renderer by simulating a correct index for the current value 120 @SuppressWarnings("unchecked") 119 121 Component c = getRenderer().getListCellRendererComponent(list, value, i, true, true); 120 122 if (c != null) { … … 139 141 140 142 @SuppressWarnings("unchecked") 141 protected final JList< E> getList() {143 protected final JList<Object> getList() { 142 144 for (int i = 0; i < getUI().getAccessibleChildrenCount(this); i++) { 143 145 Accessible child = getUI().getAccessibleChild(this, i); … … 158 160 // If possible, adjust the maximum number of items with the real height of items 159 161 // It is not granted this works on every platform (tested OK on Windows) 160 JList< E> list = getList();162 JList<Object> list = getList(); 161 163 if (list != null) { 162 164 if (!prototype.equals(list.getPrototypeCellValue())) { -
trunk/src/org/openstreetmap/josm/tools/Utils.java
r8764 r8777 131 131 132 132 public static <T> Collection<T> filter(Collection<? extends T> collection, Predicate<? super T> predicate) { 133 return new FilteredCollection<>(collection, predicate); 133 return new FilteredCollection<T>(collection, predicate); 134 134 } 135 135
Note:
See TracChangeset
for help on using the changeset viewer.