Created
March 1, 2013 12:08
-
-
Save ksiwonia/5064235 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public Date getDateField(final String fieldName) { | |
final Object fieldValue = getField(fieldName); | |
if (fieldValue == null) { | |
return null; | |
} | |
if (fieldValue instanceof Date) { | |
return (Date) fieldValue; | |
} | |
throw new IllegalArgumentException("Field " + fieldName + " in " + dataDefinition.getPluginIdentifier() + '.' | |
+ dataDefinition.getName() + " does not contain correct Date value"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment