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
Problem
A hard to decipher NullPointerException is thrown if the return-element of the map-step of a MapReducer is null and .uniq() is called.
Favorite solution null-objects should simply be possible as a result, also for uniq().
Alternatives
The error-message should be improved and the javadoc of map as well as uniq should be updated, to inform users to not generate null-values.
The text was updated successfully, but these errors were encountered:
a slightly off topic, but related general advice: please try to simply avoid using the null construct (not only) in java. If you need a special "thing" to represent "missing data" (or something similar), consider the null object pattern instead.
Problem
A hard to decipher
NullPointerException
is thrown if the return-element of the map-step of a MapReducer is null and.uniq()
is called.Favorite solution
null
-objects should simply be possible as a result, also for uniq().Alternatives
The error-message should be improved and the javadoc of
map
as well asuniq
should be updated, to inform users to not generate null-values.The text was updated successfully, but these errors were encountered: