gnodet commented on issue #12601: URL: https://github.com/apache/maven/issues/12601#issuecomment-5457534761
Closing as invalid after investigation. **`getLocation()` is `@Nonnull`**: The `Source.getLocation()` method (line 89 of `Source.java`) is annotated `@Nonnull` and documented as returning "a non-null string describing the source location." `ModelSource` extends `Source` and inherits this contract. **`LinkedHashSet` allows null**: Even if an implementation violated the `@Nonnull` contract and returned null, `LinkedHashSet.add(null)` would succeed without throwing — `LinkedHashSet` (backed by `LinkedHashMap`) explicitly allows null elements. Only `TreeSet` and `ConcurrentHashMap`-based sets reject nulls. There is no valid failure path for this issue. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
