[MRESOLVER-4] Use java.util.Objects#requireNonNull to intercept invalid input
o Updated to re-add missing validation. Project: http://git-wip-us.apache.org/repos/asf/maven-resolver/repo Commit: http://git-wip-us.apache.org/repos/asf/maven-resolver/commit/d2f5aa54 Tree: http://git-wip-us.apache.org/repos/asf/maven-resolver/tree/d2f5aa54 Diff: http://git-wip-us.apache.org/repos/asf/maven-resolver/diff/d2f5aa54 Branch: refs/heads/master Commit: d2f5aa54b14107eeffe230a331d472ae46d7ff5b Parents: 077281a Author: Christian Schulte <schu...@apache.org> Authored: Mon Dec 12 23:33:20 2016 +0100 Committer: Christian Schulte <schu...@apache.org> Committed: Mon Dec 12 23:52:59 2016 +0100 ---------------------------------------------------------------------- .../org/eclipse/aether/internal/impl/DefaultRepositorySystem.java | 2 ++ 1 file changed, 2 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/d2f5aa54/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/DefaultRepositorySystem.java ---------------------------------------------------------------------- diff --git a/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/DefaultRepositorySystem.java b/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/DefaultRepositorySystem.java index 7555812..5787a61 100644 --- a/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/DefaultRepositorySystem.java +++ b/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/DefaultRepositorySystem.java @@ -431,11 +431,13 @@ public class DefaultRepositorySystem requireNonNull( session, "repository system session cannot be null" ); invalidSession( session.getLocalRepositoryManager(), "local repository manager" ); invalidSession( session.getSystemProperties(), "system properties" ); + invalidSession( session.getUserProperties(), "user properties" ); invalidSession( session.getConfigProperties(), "config properties" ); invalidSession( session.getMirrorSelector(), "mirror selector" ); invalidSession( session.getProxySelector(), "proxy selector" ); invalidSession( session.getAuthenticationSelector(), "authentication selector" ); invalidSession( session.getArtifactTypeRegistry(), "artifact type registry" ); + invalidSession( session.getData(), "data" ); } private void invalidSession( Object obj, String name )