File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
src/org/openstreetmap/josm/tools Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -2066,6 +2066,7 @@ public static String intern(String string) {
2066
2066
* Convert a length unit to meters
2067
2067
* @param s arbitrary string representing a length
2068
2068
* @return the length converted to meters
2069
+ * @throws IllegalArgumentException if input is no valid length
2069
2070
* @since 19089
2070
2071
*/
2071
2072
public static Double unitToMeter (String s ) throws IllegalArgumentException {
@@ -2093,7 +2094,7 @@ else if ("in".equals(m.group(2)) || "\"".equals(m.group(2)))
2093
2094
if (m .matches ()) {
2094
2095
/* NOTE: we assume -a'b" means -(a'+b") and not (-a')+b" - because of such issues SI units have been invented
2095
2096
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 );
2097
2098
}
2098
2099
}
2099
2100
throw new IllegalArgumentException ("Invalid length value: " + s );
You can’t perform that action at this time.
0 commit comments