Skip to content
Snippets Groups Projects
Commit f52624fa authored by Alexander Diewald's avatar Alexander Diewald
Browse files

YELLOW: Fix float number type check

parent 3b5d4a82
No related branches found
No related tags found
1 merge request!116Math: Add predicate to identify float objects
AngleUtils.java 462551eae71738ff51f92c9906bff9a21a375d2b GREEN
AnnotationUtils.java 197ceb5f39af6b96eb8f7025e3fe3b1b39c35d42 GREEN
BaseMathUtils.java 8d26339a4410b59e6106fbaa47064b42fcc1f98a YELLOW
BaseMathUtils.java 90712a1560f5b4cb9b7873a148303c970ded756d YELLOW
BaseModelElementUtils.java b8775b7a462efc168cf79a017aa3377a782d10f6 GREEN
DimensionUtils.java 0dc67f9de11a84e6e4c6e1eb627817dee91ff30a GREEN
EllipseLayoutUtils.java 5c3a0126fdca5d5b4fb441694747e1cb0f49cd9f GREEN
......
......@@ -228,10 +228,8 @@ public class BaseMathUtils {
* Number to test.
* @return boolean if the given number is an floating point number.
*/
// TODO: This method does not check for the described floating point types. Is this on purpose?
public static boolean isFloatNumber(Number value) {
return(value instanceof Byte || value instanceof Short || value instanceof Integer ||
value instanceof Long || value instanceof BigInteger);
return value != null && isFloatNumber(value.getClass());
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment