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
When the result of a calculatePreciseDuration() is passed on to a format() a NullPointerException will be thrown.
This happens due to not being able to find the corresponding TimeUnit (eg.: Month) in the map named "units" resulting in a null from getFormat(TimeUnit unit).
This specifically happens in this line:
returnunits.get(unit);
If the unit is a Month (as TimeUnit), this will not find Month (as TimeUnit) in units. Eventually because they're not exactly the same and have different properties.
The text was updated successfully, but these errors were encountered:
astatio
changed the title
calculatePreciseDuration() returns "Week" where "id = 6" but it should be "id = 18"
calculatePreciseDuration(List<Duration>) always throws a NullPointerException
Apr 24, 2022
astatio
changed the title
calculatePreciseDuration(List<Duration>) always throws a NullPointerException
format(List<Duration>) always throws a NullPointerException
Apr 24, 2022
When the result of a calculatePreciseDuration() is passed on to a format() a NullPointerException will be thrown.
This happens due to not being able to find the corresponding TimeUnit (eg.: Month) in the map named "units" resulting in a null from getFormat(TimeUnit unit).
This specifically happens in this line:
If the unit is a Month (as TimeUnit), this will not find Month (as TimeUnit) in units. Eventually because they're not exactly the same and have different properties.
The function for context:
The text was updated successfully, but these errors were encountered: