common: Add external annotations for Map.get()/.remove()
authorAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Tue, 19 May 2015 00:33:29 +0000 (20:33 -0400)
committerAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Wed, 28 Oct 2015 23:01:32 +0000 (19:01 -0400)
commit523c6cc52ba031bc1fdbb0f357a92e1850f688ef
treec51b83e59a25b79aa2411e5196a41482026e4644
parentae02062dbbc06c6616cf06a212f434f300ee892b
common: Add external annotations for Map.get()/.remove()

Even if one declares a Map<Object, @NonNull Object>, Map.get()
can return a null to indicate "there is no value for this key".
Same applies to .remove() too.

Since the base methods are not annotated, we either have to
supply our own annotation, or make sure to always use @Nullable
keys. The former is less error-prone, so let's do that.

See http://stackoverflow.com/a/25371836/4227853 .

Change-Id: I3bb7395d7dca053d354f2f418d8529696edd0346
Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Reviewed-on: https://git.eclipse.org/r/57249
Reviewed-by: Hudson CI
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Tested-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
common/org.eclipse.tracecompass.common.core/annotations/java/util/Map.eea [new file with mode: 0644]
common/org.eclipse.tracecompass.common.core/annotations/java/util/TreeMap.eea [new file with mode: 0644]
This page took 0.025611 seconds and 5 git commands to generate.