src/org/ohmage/validator/AuditValidators.java
public static String validateDeviceId(final String deviceId) 
			throws ValidationException {
		
		if(StringUtils.isEmptyOrWhitespaceOnly(deviceId)) {
			return null;
		}
		
		return deviceId.trim();
	}
/**
	 * Checks if the device ID is null or whitespace only. We put no other
	 * limitations on the device ID because a user may want to query about 
	 * device IDs that the server doesn't know about.
	 * 
	 * @param deviceId The device ID.
	 * 
	 * @return The device ID string unless it was null or whitespace only in
	 * 		   which case null is returned.
	 * 
	 * @throws ValidationException Never thrown.
	 */
Checks if the device ID is null or whitespace only. We put no other
limitations on the device ID because a user may want to query about
device IDs that the server doesn't know about.

@param deviceId The device ID.

@return The device ID string unless it was null or whitespace only in
which case null is returned.

@throws ValidationException Never thrown.
Checks if the device ID is null or whitespace only . We put no other limitations on the device ID because a user may want to query about device IDs that the server doesn ' t know about . @param deviceId The device ID . @return The device ID string unless it was null or whitespace only in which case null is returned . @throws ValidationException Never thrown .
public static String validateDeviceId(final String deviceId) 
			throws ValidationException {
		if(StringUtils.isEmptyOrWhitespaceOnly(deviceId)) {
			return null;
		}
		return deviceId.trim();
	}
public static String validateDeviceId ( final String deviceId ) throws ValidationException { if ( StringUtils . isEmptyOrWhitespaceOnly ( deviceId ) ) { return null ; } return deviceId . trim ( ) ; }
Checks if the device ID is null or whitespace only.
Checks if the device ID is null or whitespace only .