Changeset 10662 in josm for trunk/src/org/openstreetmap/josm/tools
- Timestamp:
- 2016-07-28T01:00:46+02:00 (8 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/AudioPlayer.java
r10659 r10662 7 7 import java.io.IOException; 8 8 import java.net.URL; 9 import java.util.Objects;10 9 11 10 import javax.sound.sampled.AudioFormat; … … 298 297 double offset = command.offset(); 299 298 speed = command.speed(); 300 if ( !Objects.equals(playingUrl, command.url()) ||299 if (playingUrl != command.url() || 301 300 stateChange != State.PAUSED || 302 301 offset != 0) { -
trunk/src/org/openstreetmap/josm/tools/Geometry.java
r10658 r10662 15 15 import java.util.LinkedHashSet; 16 16 import java.util.List; 17 import java.util.Objects;18 17 import java.util.Set; 19 18 … … 116 115 int commonCount = 0; 117 116 //test if we have common nodes to add. 118 if ( Objects.equals(seg1Node1, seg2Node1) || Objects.equals(seg1Node1, seg2Node2)) {117 if (seg1Node1 == seg2Node1 || seg1Node1 == seg2Node2) { 119 118 commonCount++; 120 119 … … 128 127 } 129 128 130 if ( Objects.equals(seg1Node2, seg2Node1) || Objects.equals(seg1Node2, seg2Node2)) {129 if (seg1Node2 == seg2Node1 || seg1Node2 == seg2Node2) { 131 130 commonCount++; 132 131 … … 190 189 intersectionNodes.add(intNode); 191 190 192 if ( Objects.equals(intNode, newNode)) {191 if (intNode == newNode) { 193 192 cmds.add(new AddCommand(intNode)); 194 193 } … … 703 702 public static boolean isClockwise(List<Node> nodes) { 704 703 int nodesCount = nodes.size(); 705 if (nodesCount < 3 || !Objects.equals(nodes.get(0), nodes.get(nodesCount - 1))) {704 if (nodesCount < 3 || nodes.get(0) != nodes.get(nodesCount - 1)) { 706 705 throw new IllegalArgumentException("Way must be closed to check orientation."); 707 706 } … … 992 991 double perimeter = 0; 993 992 if (!nodes.isEmpty()) { 994 boolean closed = Objects.equals(nodes.get(0), nodes.get(nodes.size() - 1));993 boolean closed = nodes.get(0) == nodes.get(nodes.size() - 1); 995 994 int numSegments = closed ? nodes.size() - 1 : nodes.size(); 996 995 EastNorth p1 = projection == null ? nodes.get(0).getEastNorth() : projection.latlon2eastNorth(nodes.get(0).getCoor());
Note:
See TracChangeset
for help on using the changeset viewer.