Changeset 10250 in josm for trunk/src/org/openstreetmap/josm/data/validation
- Timestamp:
- 2016-05-18T17:44:31+02:00 (9 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/data/validation
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/PaintVisitor.java
r10181 r10250 123 123 124 124 if (selected) { 125 g.setColor(getHighlightColor()); 125 g.setColor(getHighlightColor(color)); 126 126 g.fillOval(p.x - 5, p.y - 5, 10, 10); 127 127 } … … 146 146 int deg = (int) Math.toDegrees(t); 147 147 if (selected) { 148 g.setColor(getHighlightColor()); 148 g.setColor(getHighlightColor(color)); 149 149 int[] x = new int[] {(int) (p1.x + cosT), (int) (p2.x + cosT), 150 150 (int) (p2.x - cosT), (int) (p1.x - cosT)}; … … 260 260 /** 261 261 * Gets the color to draw highlight markers with. 262 * @param color severity color 262 263 * @return The color. 263 264 */ 264 private Color getHighlightColor() { 265 private static Color getHighlightColor(Color color) { 265 266 return new Color(color.getRed(), color.getGreen(), color.getBlue(), (int) (color.getAlpha() * .4)); 266 267 } -
trunk/src/org/openstreetmap/josm/data/validation/tests/CrossingWays.java
r8510 r10250 40 40 41 41 /** All way segments, grouped by cells */ 42 private Map<Point2D, List<WaySegment>> cellSegments; 42 private final Map<Point2D, List<WaySegment>> cellSegments = new HashMap<>(1000); 43 43 /** The already detected errors */ 44 private Set<WaySegment> errorSegments; 44 private final Set<WaySegment> errorSegments = new HashSet<>(); 45 45 /** The already detected ways in error */ 46 private Map<List<Way>, List<WaySegment>> seenWays; 46 private final Map<List<Way>, List<WaySegment>> seenWays = new HashMap<>(50); 47 47 48 48 /** … … 188 188 public void startTest(ProgressMonitor monitor) { 189 189 super.startTest(monitor); 190 cellSegments = new HashMap<>(1000);191 errorSegments = new HashSet<>();192 seenWays = new HashMap<>(50);190 cellSegments.clear(); 191 errorSegments.clear(); 192 seenWays.clear(); 193 193 } 194 194 … … 196 196 public void endTest() { 197 197 super.endTest(); 198 cellSegments = null;199 errorSegments = null;200 seenWays = null;198 cellSegments.clear(); 199 errorSegments.clear(); 200 seenWays.clear(); 201 201 } 202 202
Note:
See TracChangeset
for help on using the changeset viewer.