- Timestamp:
- 2018-05-01T21:51:12+02:00 (7 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/tests/RightAngleBuildingTest.java
r13690 r13698 47 47 List<Pair<Double, Node>> angles = w.getAngles(); 48 48 for (Pair<Double, Node> pair: angles) { 49 if (checkAngle( w, pair.a, pair.b)) {49 if (checkAngle(pair.a)) { 50 50 TestError.Builder builder = TestError.builder(this, Severity.WARNING, 3701) 51 51 .message(tr("Building with an almost square angle")) … … 76 76 } 77 77 78 private boolean checkAngle( Way w, double angle, Node n) {78 private boolean checkAngle(double angle) { 79 79 double difference = Math.abs(angle - 90); 80 80 return difference > minAngleDelta && difference < maxAngleDelta; -
trunk/src/org/openstreetmap/josm/tools/WindowsShortcut.java
r13697 r13698 4 4 import java.io.ByteArrayOutputStream; 5 5 import java.io.File; 6 import java.io.FileInputStream;7 6 import java.io.IOException; 8 7 import java.io.InputStream; 9 8 import java.nio.charset.StandardCharsets; 9 import java.nio.file.Files; 10 10 import java.text.ParseException; 11 11 import java.util.Locale; … … 46 46 final int minimum_length = 0x64; 47 47 boolean isPotentiallyValid = false; 48 try (InputStream fis = new FileInputStream(file)) {48 try (InputStream fis = Files.newInputStream(file.toPath())) { 49 49 isPotentiallyValid = file.isFile() 50 50 && file.getName().toLowerCase(Locale.ENGLISH).endsWith(".lnk") … … 62 62 */ 63 63 public WindowsShortcut(File file) throws IOException, ParseException { 64 try (InputStream in = new FileInputStream(file)) {64 try (InputStream in = Files.newInputStream(file.toPath())) { 65 65 parseLink(getBytes(in)); 66 66 }
Note:
See TracChangeset
for help on using the changeset viewer.