Augment annotation to Map.entrySet()
authorAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Fri, 30 Oct 2015 20:48:15 +0000 (16:48 -0400)
committerAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Mon, 23 Nov 2015 21:12:05 +0000 (16:12 -0500)
We already annotated Map.entrySet() to return a

  @NonNull Set<Map.Entry<K, V>>

But actually, the returned Set should not contain any null elements,
since then entry objects will always exist, even if the key and/or
value is null. So we could augment the annotation to:

  @NonNull Set<@NonNull Map.Entry<K, V>>

K and V in this case need to remain unannotated, their type should
match the Map's declaration.

Change-Id: Id436fd3cfc4f679198070e5efdbb9d2d3ce478ae
Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Reviewed-on: https://git.eclipse.org/r/59422
Reviewed-by: Hudson CI
Reviewed-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Tested-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
common/org.eclipse.tracecompass.common.core/annotations/java/util/Map.eea

index 44f25b374dbe23832a7e0426e559512c8a1c45f1..f538bf972f1c73797277471f351a8c22537ce3e2 100644 (file)
@@ -1,7 +1,7 @@
 class java/util/Map
 entrySet
  ()Ljava/util/Set<Ljava/util/Map$Entry<TK;TV;>;>;
- ()L1java/util/Set<Ljava/util/Map$Entry<TK;TV;>;>;
+ ()L1java/util/Set<L1java/util/Map$Entry<TK;TV;>;>;
 get
  (Ljava/lang/Object;)TV;
  (Ljava/lang/Object;)T0V;
This page took 0.027449 seconds and 5 git commands to generate.