diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/IncludeExclude.java b/jetty-util/src/main/java/org/eclipse/jetty/util/IncludeExclude.java index 39d80e22918..58ab02401aa 100644 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/IncludeExclude.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/IncludeExclude.java @@ -19,6 +19,7 @@ package org.eclipse.jetty.util; import java.util.HashSet; +import java.util.Objects; import java.util.Set; import java.util.function.Predicate; @@ -64,9 +65,12 @@ public class IncludeExclude } /** - * Construct an IncludeExclude + * Construct an IncludeExclude. + *

+ * If the {@link Set} class also implements {@link Predicate}, then that Predicate is + * used to match against the set, otherwise a simple {@link Set#contains(Object)} test is used. * @param setClass The type of {@link Set} to using internally - * @param predicate A predicate function to test if a passed ITEM is matched by the passed SET} + * @param the {@link Set} type */ public > IncludeExclude(Class setClass) { @@ -97,12 +101,18 @@ public class IncludeExclude * Construct an IncludeExclude * * @param includeSet the Set of items that represent the included space - * @param includePredicate the Predicate for included item testing (null for simple {@link Set#contains(Object)} test) + * @param includePredicate the Predicate for included item testing * @param excludeSet the Set of items that represent the excluded space - * @param excludePredicate the Predicate for excluded item testing (null for simple {@link Set#contains(Object)} test) + * @param excludePredicate the Predicate for excluded item testing + * @param the {@link Set} type */ public > IncludeExclude(Set includeSet, Predicate includePredicate, Set excludeSet, Predicate excludePredicate) { + Objects.requireNonNull(includeSet,"Include Set"); + Objects.requireNonNull(includePredicate,"Include Predicate"); + Objects.requireNonNull(excludeSet,"Exclude Set"); + Objects.requireNonNull(excludePredicate,"Exclude Predicate"); + _includes = includeSet; _includePredicate = includePredicate; _excludes = excludeSet; diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/Loader.java b/jetty-util/src/main/java/org/eclipse/jetty/util/Loader.java index 062029cef45..ec3fe466cc5 100644 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/Loader.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/Loader.java @@ -69,7 +69,7 @@ public class Loader /* ------------------------------------------------------------ */ /** Load a class. * - * @param loadClass the class to use for the ClassLoader that was used + * @param loaderClass a similar class, belong in the same classloader of the desired class to load * @param name the name of the new class to load, using the same ClassLoader as the loadClass * @return Class * @throws ClassNotFoundException if not able to find the class diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/Promise.java b/jetty-util/src/main/java/org/eclipse/jetty/util/Promise.java index 30ed7f11be0..45e3270be18 100644 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/Promise.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/Promise.java @@ -47,6 +47,7 @@ public interface Promise *

Empty implementation of {@link Promise}

* * @param the type of the context object + * @param the type of the result */ public static class Adapter implements Promise {