dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #40234
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 20383: Code style
------------------------------------------------------------
revno: 20383
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2015-09-28 09:12:35 +0200
message:
Code style
modified:
dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/MathUtils.java
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.validation.js
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/MathUtils.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/MathUtils.java 2015-09-24 14:38:17 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/MathUtils.java 2015-09-28 07:12:35 +0000
@@ -426,21 +426,26 @@
}
/**
- * Returns true if the provided string argument is to be considered a coordinate.
+ * Returns true if the provided string argument is to be considered a
+ * coordinate.
*
* @param value the value.
- * @return true if the provided string argument is to be considered a coordinate.
+ * @return true if the provided string argument is to be considered a
+ * coordinate.
*/
public static boolean isCoordinate( String value )
{
- try {
- String[] lnglat = value.trim().split(",");
- float lng = Float.parseFloat(lnglat[0]);
- float lat = Float.parseFloat(lnglat[1]);
- return (lng >= -180 && lng <= 180 && lat >= -90 && lat <= 90);
- } catch (Exception x) {
- return false;
- }
+ try
+ {
+ String[] lnglat = value.trim().split( "," );
+ float lng = Float.parseFloat( lnglat[0] );
+ float lat = Float.parseFloat( lnglat[1] );
+ return (lng >= -180 && lng <= 180 && lat >= -90 && lat <= 90);
+ }
+ catch ( Exception x )
+ {
+ return false;
+ }
}
/**
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.validation.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.validation.js 2015-09-24 15:47:59 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.validation.js 2015-09-28 07:12:35 +0000
@@ -77,7 +77,8 @@
var lng = parseFloat(m[1]);
var lat = parseFloat(m[2]);
return lng >= -180 && lng <= 180 && lat >= -180 && lat <= 90;
- } catch (_) {
+ }
+ catch (_) {
return false;
}
};