Skip to content

Instantly share code, notes, and snippets.

@gilfernandes
Created May 13, 2014 15:16
Show Gist options
  • Save gilfernandes/51538551f1ebd540b93c to your computer and use it in GitHub Desktop.
Save gilfernandes/51538551f1ebd540b93c to your computer and use it in GitHub Desktop.
public class ConversionUtils {
/**
* What happens if number is really null?
*/
public static double toDouble(Number number) {
return number != null ? number.doubleValue() : null;
}
}
@gilfernandes
Copy link
Author

What happens if number is null?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment