- public @NonNull Collection<IEventDeclaration> getEventDeclarations() {
- List<IEventDeclaration> retVal = new ArrayList<>(fEvents);
- retVal.removeAll(Collections.<IEventDeclaration> singletonList(null));
+ public @NonNull Collection<@NonNull IEventDeclaration> getEventDeclarations() {
+ List<@NonNull IEventDeclaration> retVal = new ArrayList<>();
+ for (IEventDeclaration eventDeclaration : fEvents) {
+ if (eventDeclaration != null) {
+ retVal.add(eventDeclaration);
+ }
+ }