src/org/ohmage/service/UploadValidationServices.java
public static void validateAccuracy(final String accuracy) 
    		throws ServiceException {
    	
    	if(accuracy == null) {
    		throw new ServiceException(
    			ErrorCode.SERVER_INVALID_LOCATION,
    			"accuracy in upload message is null");
		}
		
    	try {
    		
			Float.parseFloat(accuracy);
			
		} catch (NumberFormatException nfe) {
			throw new ServiceException(
    			ErrorCode.SERVER_INVALID_LOCATION,
    			"accuracy in upload message is an unparseable float: " + accuracy,
    			nfe);
		}
	}
/**
	 * Validates the provided accuracy (the accuracy of a GPS or Network derived latlong).
	 * 
	 * @param accuracy  The accuracy to validate
	 * @throws ServiceException If the accuracy is null or an unparseable float
	 */
Validates the provided accuracy (the accuracy of a GPS or Network derived latlong).

@param accuracy  The accuracy to validate
@throws ServiceException If the accuracy is null or an unparseable float
Validates the provided accuracy ( the accuracy of a GPS or Network derived latlong ) . @param accuracy The accuracy to validate @throws ServiceException If the accuracy is null or an unparseable float
public static void validateAccuracy(final String accuracy) 
    		throws ServiceException {
    	if(accuracy == null) {
    		throw new ServiceException(
    			ErrorCode.SERVER_INVALID_LOCATION,
    			"accuracy in upload message is null");
		}
    	try {
			Float.parseFloat(accuracy);
		} catch (NumberFormatException nfe) {
			throw new ServiceException(
    			ErrorCode.SERVER_INVALID_LOCATION,
    			"accuracy in upload message is an unparseable float: " + accuracy,
    			nfe);
		}
	}
public static void validateAccuracy ( final String accuracy ) throws ServiceException { if ( accuracy == null ) { throw new ServiceException ( ErrorCode . SERVER_INVALID_LOCATION , "accuracy in upload message is null" ) ; } try { Float . parseFloat ( accuracy ) ; } catch ( NumberFormatException nfe ) { throw new ServiceException ( ErrorCode . SERVER_INVALID_LOCATION , "accuracy in upload message is an unparseable float: " + accuracy , nfe ) ; } }
Validates the provided accuracy (the accuracy of a GPS or Network derived latlong).
Validates the provided accuracy ( the accuracy of a GPS or Network derived latlong ) .