Skip to content

Commit 86e4d77

Browse files
author
stoecker
committed
PMD and checkstyle
git-svn-id: https://josm.openstreetmap.de/svn/trunk@19094 0c6e7542-c601-0410-84e7-c038aed88b3b
1 parent 42fe7b5 commit 86e4d77

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/org/openstreetmap/josm/tools/Utils.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2066,6 +2066,7 @@ public static String intern(String string) {
20662066
* Convert a length unit to meters
20672067
* @param s arbitrary string representing a length
20682068
* @return the length converted to meters
2069+
* @throws IllegalArgumentException if input is no valid length
20692070
* @since 19089
20702071
*/
20712072
public static Double unitToMeter(String s) throws IllegalArgumentException {
@@ -2093,7 +2094,7 @@ else if ("in".equals(m.group(2)) || "\"".equals(m.group(2)))
20932094
if (m.matches()) {
20942095
/* NOTE: we assume -a'b" means -(a'+b") and not (-a')+b" - because of such issues SI units have been invented
20952096
and have been adopted by the majority of the world */
2096-
return (Double.valueOf(m.group(2))*0.3048+Double.valueOf(m.group(4))*0.0254)*(m.group(1).isEmpty()?1.0:-1.0);
2097+
return (Double.valueOf(m.group(2))*0.3048+Double.valueOf(m.group(4))*0.0254)*(m.group(1).isEmpty() ? 1.0 : -1.0);
20972098
}
20982099
}
20992100
throw new IllegalArgumentException("Invalid length value: " + s);

0 commit comments

Comments
 (0)