You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public static void main(String[] args) {
Map<String, Object> dataMap1 = new HashMap<>();
dataMap1.put("date1", null);
dataMap1.put("date2", new Date());
System.out.println("null>new Date() ===> " + AviatorEvaluator.execute("date1>date2", dataMap1));
Map<String, Object> dataMap2 = new HashMap<>();
dataMap2.put("date1", new Date());
dataMap2.put("date2", null);
System.out.println("new Date()>null ===> " + AviatorEvaluator.execute("date1>date2", dataMap2));
}
null>new Date() ===> false
Exception in thread "main" com.googlecode.aviator.exception.ExpressionRuntimeException: Compare <JavaType, null, null> with <JavaType, null, null> error
at com.googlecode.aviator.runtime.type.AviatorJavaType.compare(AviatorJavaType.java:404)
at Script_1573697293370_1/2052915500.execute0(Unknown Source)
at com.googlecode.aviator.ClassExpression.execute(ClassExpression.java:73)
at com.googlecode.aviator.AviatorEvaluatorInstance.execute(AviatorEvaluatorInstance.java:950)
at com.googlecode.aviator.AviatorEvaluator.execute(AviatorEvaluator.java:496)
at com.googlecode.aviator.AviatorEvaluator.execute(AviatorEvaluator.java:508)
at com.googlecode.aviator.mydemo.Test.main(Test.java:47)
Caused by: java.lang.NullPointerException
at java.util.Date.getMillisOf(Date.java:958)
at java.util.Date.compareTo(Date.java:978)
at java.util.Date.compareTo(Date.java:131)
at com.googlecode.aviator.runtime.type.AviatorJavaType.compare(AviatorJavaType.java:402)
... 6 more
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: