This is an automated email from the ASF dual-hosted git repository.

jamesbognar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/juneau.git


The following commit(s) were added to refs/heads/master by this push:
     new b471069c4 Test modernization, clean up utility classes.
b471069c4 is described below

commit b471069c4b8e3ca439548c4c959c6824816ce379
Author: James Bognar <[email protected]>
AuthorDate: Mon Aug 25 13:12:15 2025 -0400

    Test modernization, clean up utility classes.
---
 .../src/java/main/ConfigurablePropertyCodeGenerator.java  |  6 ++++--
 juneau-all/src/java/main/FieldSorter.java                 |  2 +-
 .../java/org/apache/juneau/bean/swagger/Operation.java    |  5 +++--
 .../main/java/org/apache/juneau/bean/swagger/Swagger.java |  3 ++-
 .../java/org/apache/juneau/common/internal/Utils.java     |  4 ++++
 .../src/main/java/org/apache/juneau/BeanSession.java      |  3 ++-
 .../apache/juneau/annotation/BeanConfigAnnotation.java    |  3 +--
 .../main/java/org/apache/juneau/collections/JsonMap.java  |  7 +++----
 .../main/java/org/apache/juneau/cp/BasicFileFinder.java   |  6 +++---
 .../src/main/java/org/apache/juneau/cp/FileFinder.java    |  6 +++---
 .../java/org/apache/juneau/csv/CsvSerializerSession.java  |  1 +
 .../java/org/apache/juneau/internal/AnnotationUtils.java  |  3 +--
 .../java/org/apache/juneau/internal/CollectionUtils.java  | 11 +++++------
 .../java/org/apache/juneau/objecttools/SearchArgs.java    |  4 ++--
 .../main/java/org/apache/juneau/objecttools/SortArgs.java |  5 ++++-
 .../main/java/org/apache/juneau/objecttools/ViewArgs.java |  6 ++++--
 .../org/apache/juneau/serializer/SerializerSession.java   |  3 +--
 .../src/main/java/org/apache/juneau/svl/VarList.java      |  3 +--
 .../org/apache/juneau/examples/rest/RootContentTest.java  |  1 +
 .../java/org/apache/juneau/http/header/HeaderList.java    | 13 +++++++------
 .../main/java/org/apache/juneau/http/header/Thrown.java   |  4 +++-
 .../main/java/org/apache/juneau/http/part/PartList.java   | 15 ++++++++-------
 .../main/java/org/apache/juneau/rest/arg/CookieList.java  |  1 +
 .../apache/juneau/rest/httppart/RequestAttributes.java    |  4 +++-
 .../apache/juneau/rest/httppart/RequestFormParams.java    |  1 +
 .../org/apache/juneau/rest/httppart/RequestHeaders.java   |  1 +
 .../apache/juneau/rest/httppart/RequestPathParams.java    |  1 +
 .../apache/juneau/rest/httppart/RequestQueryParams.java   |  1 +
 .../juneau/rest/processor/ResponseBeanProcessor.java      |  1 +
 .../java/org/apache/juneau/rest/stats/ThrownStore.java    |  3 ++-
 30 files changed, 75 insertions(+), 52 deletions(-)

diff --git a/juneau-all/src/java/main/ConfigurablePropertyCodeGenerator.java 
b/juneau-all/src/java/main/ConfigurablePropertyCodeGenerator.java
index 25157625c..d7e515068 100644
--- a/juneau-all/src/java/main/ConfigurablePropertyCodeGenerator.java
+++ b/juneau-all/src/java/main/ConfigurablePropertyCodeGenerator.java
@@ -12,6 +12,7 @@
 // 
***************************************************************************************************************************
 
 import static org.apache.juneau.common.internal.IOUtils.*;
+import static org.apache.juneau.common.internal.Utils.*;
 import static org.apache.juneau.internal.CollectionUtils.*;
 
 import java.io.*;
@@ -21,12 +22,13 @@ import java.util.*;
 import java.util.stream.*;
 
 import org.apache.juneau.*;
+import org.apache.juneau.common.internal.*;
 import org.apache.juneau.internal.*;
 import org.apache.juneau.reflect.*;
 
 public class ConfigurablePropertyCodeGenerator {
 
-       static Set<Class<?>> IGNORE_CLASSES = set(
+       static Set<Class<?>> IGNORE_CLASSES = Utils.set(
                org.apache.http.entity.AbstractHttpEntity.class,
                org.apache.http.entity.BasicHttpEntity.class,
                org.apache.http.message.AbstractHttpMessage.class,
@@ -119,7 +121,7 @@ public class ConfigurablePropertyCodeGenerator {
                        StringBuilder sb = new StringBuilder();
                        ClassInfo ci = ClassInfo.of(c);
                        String cName = ci.getSimpleName();
-                       Set<String> ignore = set();
+                       Set<String> ignore = Utils.set();
                        FluentSetters fs = 
ci.getAnnotation(FluentSetters.class);
                        if (! fs.returns().isEmpty())
                                cName = fs.returns();
diff --git a/juneau-all/src/java/main/FieldSorter.java 
b/juneau-all/src/java/main/FieldSorter.java
index 8a6a4b661..2e198f47a 100644
--- a/juneau-all/src/java/main/FieldSorter.java
+++ b/juneau-all/src/java/main/FieldSorter.java
@@ -10,7 +10,7 @@
 // * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 
express or implied.  See the License for the        *
 // * specific language governing permissions and limitations under the 
License.                                              *
 // 
***************************************************************************************************************************
-import static org.apache.juneau.internal.CollectionUtils.*;
+import static org.apache.juneau.common.internal.Utils.*;
 
 import java.util.stream.*;
 
diff --git 
a/juneau-bean/juneau-bean-openapi3/src/main/java/org/apache/juneau/bean/swagger/Operation.java
 
b/juneau-bean/juneau-bean-openapi3/src/main/java/org/apache/juneau/bean/swagger/Operation.java
index 2359a975c..6f947bccd 100644
--- 
a/juneau-bean/juneau-bean-openapi3/src/main/java/org/apache/juneau/bean/swagger/Operation.java
+++ 
b/juneau-bean/juneau-bean-openapi3/src/main/java/org/apache/juneau/bean/swagger/Operation.java
@@ -13,6 +13,7 @@
 package org.apache.juneau.bean.swagger;
 
 import static org.apache.juneau.common.internal.StringUtils.*;
+import static org.apache.juneau.common.internal.Utils.*;
 import static org.apache.juneau.internal.CollectionUtils.*;
 import static org.apache.juneau.internal.ConverterUtils.*;
 
@@ -174,7 +175,7 @@ public class Operation extends SwaggerElement {
                if (copyFrom.parameters == null) {
                        this.parameters = null;
                } else {
-                       this.parameters = list();
+                       this.parameters = Utils.list();
                        copyFrom.parameters.forEach(x -> 
this.parameters.add(x.copy()));
                }
 
@@ -188,7 +189,7 @@ public class Operation extends SwaggerElement {
                if (copyFrom.security == null) {
                        this.security = null;
                } else {
-                       this.security = list();
+                       this.security = Utils.list();
                        copyFrom.security.forEach(x -> {
                                Map<String,List<String>> m2 = map();
                                x.forEach((k,v) -> m2.put(k, copyOf(v)));
diff --git 
a/juneau-bean/juneau-bean-openapi3/src/main/java/org/apache/juneau/bean/swagger/Swagger.java
 
b/juneau-bean/juneau-bean-openapi3/src/main/java/org/apache/juneau/bean/swagger/Swagger.java
index 33f2048f1..9f10e7957 100644
--- 
a/juneau-bean/juneau-bean-openapi3/src/main/java/org/apache/juneau/bean/swagger/Swagger.java
+++ 
b/juneau-bean/juneau-bean-openapi3/src/main/java/org/apache/juneau/bean/swagger/Swagger.java
@@ -13,6 +13,7 @@
 package org.apache.juneau.bean.swagger;
 
 import static org.apache.juneau.common.internal.StringUtils.*;
+import static org.apache.juneau.common.internal.Utils.*;
 import static org.apache.juneau.internal.ClassUtils.*;
 import static org.apache.juneau.internal.CollectionUtils.*;
 import static org.apache.juneau.internal.ConverterUtils.*;
@@ -955,7 +956,7 @@ public class Swagger extends SwaggerElement {
         * @return The referenced node, or <jk>null</jk> if the ref was 
<jk>null</jk> or empty or not found.
         */
        public <T> T findRef(String ref, Class<T> c) {
-               if (isEmpty(ref))
+               if (Utils.isEmpty(ref))
                        return null;
                if (! ref.startsWith("#/"))
                        throw new BasicRuntimeException("Unsupported reference: 
 ''{0}''", ref);
diff --git 
a/juneau-core/juneau-common/src/main/java/org/apache/juneau/common/internal/Utils.java
 
b/juneau-core/juneau-common/src/main/java/org/apache/juneau/common/internal/Utils.java
index 71578dddf..a94a7570e 100644
--- 
a/juneau-core/juneau-common/src/main/java/org/apache/juneau/common/internal/Utils.java
+++ 
b/juneau-core/juneau-common/src/main/java/org/apache/juneau/common/internal/Utils.java
@@ -261,6 +261,10 @@ public class Utils {
                return Optional.ofNullable(t);
        }
 
+       public static final <T> Optional<T> opte() {
+               return Optional.empty();
+       }
+
        /**
         * Prints all the specified lines to System.out.
         */
diff --git 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanSession.java 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanSession.java
index ce8d16b4c..58fb7bf8f 100644
--- 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanSession.java
+++ 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanSession.java
@@ -15,6 +15,7 @@ package org.apache.juneau;
 import static org.apache.juneau.common.internal.ArgUtils.*;
 import static org.apache.juneau.common.internal.IOUtils.*;
 import static org.apache.juneau.common.internal.StringUtils.*;
+import static org.apache.juneau.common.internal.Utils.*;
 import static org.apache.juneau.internal.ClassUtils.*;
 import static org.apache.juneau.internal.CollectionUtils.*;
 
@@ -755,7 +756,7 @@ public class BeanSession extends ContextSession {
                        // Target type is some sort of Collection
                        if (to.isCollection()) {
                                try {
-                                       Collection l = 
to.canCreateNewInstance(outer) ? (Collection)to.newInstance(outer) : to.isSet() 
? set() : new JsonList(this);
+                                       Collection l = 
to.canCreateNewInstance(outer) ? (Collection)to.newInstance(outer) : to.isSet() 
? Utils.set() : new JsonList(this);
                                        ClassMeta elementType = 
to.getElementType();
 
                                        if (from.isArray()) {
diff --git 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanConfigAnnotation.java
 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanConfigAnnotation.java
index abf99beaf..0357b3460 100644
--- 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanConfigAnnotation.java
+++ 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanConfigAnnotation.java
@@ -12,8 +12,7 @@
 // 
***************************************************************************************************************************
 package org.apache.juneau.annotation;
 
-import static org.apache.juneau.internal.CollectionUtils.*;
-
+import static org.apache.juneau.common.internal.Utils.*;
 import java.util.*;
 
 import org.apache.juneau.*;
diff --git 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/collections/JsonMap.java
 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/collections/JsonMap.java
index a3cb588f2..731070ecb 100644
--- 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/collections/JsonMap.java
+++ 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/collections/JsonMap.java
@@ -12,8 +12,7 @@
 // 
***************************************************************************************************************************
 package org.apache.juneau.collections;
 
-import static org.apache.juneau.common.internal.StringUtils.*;
-import static org.apache.juneau.internal.CollectionUtils.*;
+import static org.apache.juneau.common.internal.Utils.*;
 import static org.apache.juneau.internal.ConsumerUtils.*;
 
 import java.io.*;
@@ -819,7 +818,7 @@ public class JsonMap extends LinkedHashMap<String,Object> {
                else if (s instanceof Object[])
                        r = ArrayUtils.toStringArray(alist((Object[])s));
                else
-                       r = split(Utils.s(s));
+                       r = StringUtils.split(Utils.s(s));
                return (r.length == 0 ? def : r);
        }
 
@@ -1827,7 +1826,7 @@ public class JsonMap extends LinkedHashMap<String,Object> 
{
        public Set<String> keySet() {
                if (inner == null)
                        return super.keySet();
-               LinkedHashSet<String> s = set();
+               LinkedHashSet<String> s = Utils.set();
                s.addAll(inner.keySet());
                s.addAll(super.keySet());
                return s;
diff --git 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/cp/BasicFileFinder.java
 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/cp/BasicFileFinder.java
index 0f0679284..e32946b05 100644
--- 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/cp/BasicFileFinder.java
+++ 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/cp/BasicFileFinder.java
@@ -14,7 +14,7 @@ package org.apache.juneau.cp;
 
 import static org.apache.juneau.collections.JsonMap.*;
 import static org.apache.juneau.common.internal.IOUtils.*;
-import static org.apache.juneau.common.internal.StringUtils.*;
+import static org.apache.juneau.common.internal.Utils.*;
 import static org.apache.juneau.internal.CollectionUtils.*;
 import static org.apache.juneau.internal.FileUtils.*;
 import java.io.*;
@@ -127,7 +127,7 @@ public class BasicFileFinder implements FileFinder {
                name = StringUtils.trimSlashesAndSpaces(name);
 
                if (isInvalidPath(name))
-                       return empty();
+                       return CollectionUtils.empty();
 
                if (locale != null)
                        localizedFiles.putIfAbsent(locale, new 
ConcurrentHashMap<>());
@@ -239,7 +239,7 @@ public class BasicFileFinder implements FileFinder {
         * @return <jk>true</jk> if the path is invalid.
         */
        protected boolean isInvalidPath(String path) {
-               return isEmpty(path) || path.contains("..") || 
path.contains("%");
+               return StringUtils.isEmpty(path) || path.contains("..") || 
path.contains("%");
        }
 
        /**
diff --git 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/cp/FileFinder.java
 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/cp/FileFinder.java
index ef931a366..cc1826b89 100644
--- 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/cp/FileFinder.java
+++ 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/cp/FileFinder.java
@@ -13,14 +13,14 @@
 package org.apache.juneau.cp;
 
 import static org.apache.juneau.common.internal.ArgUtils.*;
-import static org.apache.juneau.internal.CollectionUtils.*;
-
+import static org.apache.juneau.common.internal.Utils.*;
 import java.io.*;
 import java.nio.file.*;
 import java.util.*;
 import java.util.regex.*;
 
 import org.apache.juneau.*;
+import org.apache.juneau.common.internal.*;
 import org.apache.juneau.internal.*;
 
 /**
@@ -133,7 +133,7 @@ public interface FileFinder {
                 */
                protected Builder(BeanStore beanStore) {
                        super(BasicFileFinder.class, beanStore);
-                       roots = set();
+                       roots = Utils.set();
                        cachingLimit = -1;
                        include = new Pattern[]{Pattern.compile(".*")};
                        exclude = new Pattern[0];
diff --git 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/csv/CsvSerializerSession.java
 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/csv/CsvSerializerSession.java
index 0aaeb5c24..ca506b53c 100644
--- 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/csv/CsvSerializerSession.java
+++ 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/csv/CsvSerializerSession.java
@@ -12,6 +12,7 @@
 // 
***************************************************************************************************************************
 package org.apache.juneau.csv;
 
+import static org.apache.juneau.common.internal.Utils.*;
 import static org.apache.juneau.internal.CollectionUtils.*;
 
 import java.io.*;
diff --git 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/internal/AnnotationUtils.java
 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/internal/AnnotationUtils.java
index 281adce56..0ff8e3a59 100644
--- 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/internal/AnnotationUtils.java
+++ 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/internal/AnnotationUtils.java
@@ -13,8 +13,7 @@
 package org.apache.juneau.internal;
 
 import static org.apache.juneau.common.internal.ThrowableUtils.*;
-import static org.apache.juneau.internal.CollectionUtils.*;
-
+import static org.apache.juneau.common.internal.Utils.*;
 import java.lang.annotation.*;
 import java.lang.reflect.*;
 import java.util.*;
diff --git 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/internal/CollectionUtils.java
 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/internal/CollectionUtils.java
index 7f44828a2..924279d93 100644
--- 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/internal/CollectionUtils.java
+++ 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/internal/CollectionUtils.java
@@ -13,6 +13,7 @@
 package org.apache.juneau.internal;
 
 import static java.util.stream.Collectors.*;
+import static org.apache.juneau.common.internal.Utils.*;
 
 import java.lang.reflect.*;
 import java.util.*;
@@ -216,12 +217,10 @@ public final class CollectionUtils {
         * @param values The values to initialize the list with.
         * @return A new modifiable list, or <jk>null</jk> if the array was 
<jk>null</jk>.
         */
-       @SafeVarargs
-       public static <E> List<E> alist(E...values) {
-               if (values == null)
-                       return null;
-               return Arrays.asList(values);
-       }
+//     @SafeVarargs
+//     public static <E> List<E> alist(E...values) {
+//             return Utils.alist(values);
+//     }
 
        /**
         * Creates an {@link ArrayList} copy from a collection.
diff --git 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/objecttools/SearchArgs.java
 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/objecttools/SearchArgs.java
index bfc67bf36..d82e03708 100644
--- 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/objecttools/SearchArgs.java
+++ 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/objecttools/SearchArgs.java
@@ -12,7 +12,7 @@
 // 
***************************************************************************************************************************
 package org.apache.juneau.objecttools;
 
-import static org.apache.juneau.common.internal.StringUtils.*;
+import static org.apache.juneau.common.internal.Utils.*;
 import static org.apache.juneau.internal.CollectionUtils.*;
 
 import java.util.*;
@@ -66,7 +66,7 @@ public class SearchArgs {
         * @param searchArgs Search arguments.
         */
        public SearchArgs(String searchArgs) {
-               this(alist(split(searchArgs)));
+               this(alist(StringUtils.split(searchArgs)));
        }
 
        /**
diff --git 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/objecttools/SortArgs.java
 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/objecttools/SortArgs.java
index c513187bc..b0ef6671a 100644
--- 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/objecttools/SortArgs.java
+++ 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/objecttools/SortArgs.java
@@ -13,10 +13,13 @@
 package org.apache.juneau.objecttools;
 
 import static org.apache.juneau.common.internal.StringUtils.*;
+import static org.apache.juneau.common.internal.Utils.*;
 import static org.apache.juneau.internal.CollectionUtils.*;
 
 import java.util.*;
 
+import org.apache.juneau.common.internal.*;
+
 /**
  * Arguments passed to {@link ObjectSorter}.
  *
@@ -85,7 +88,7 @@ public class SortArgs {
         *      </ul>
         */
        public SortArgs(String sortArgs) {
-               this(alist(split(sortArgs)));
+               this(alist(StringUtils.split(sortArgs)));
        }
 
        /**
diff --git 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/objecttools/ViewArgs.java
 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/objecttools/ViewArgs.java
index 04d920295..755f22946 100644
--- 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/objecttools/ViewArgs.java
+++ 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/objecttools/ViewArgs.java
@@ -12,11 +12,13 @@
 // 
***************************************************************************************************************************
 package org.apache.juneau.objecttools;
 
-import static org.apache.juneau.common.internal.StringUtils.*;
+import static org.apache.juneau.common.internal.Utils.*;
 import static org.apache.juneau.internal.CollectionUtils.*;
 
 import java.util.*;
 
+import org.apache.juneau.common.internal.*;
+
 /**
  * Arguments passed to {@link ObjectViewer}.
  *
@@ -66,7 +68,7 @@ public class ViewArgs {
         *      <br>Values are column names.
         */
        public ViewArgs(String viewArgs) {
-               this(alist(split(viewArgs)));
+               this(alist(StringUtils.split(viewArgs)));
        }
 
        /**
diff --git 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/SerializerSession.java
 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/SerializerSession.java
index 3a8614b94..e72a1c612 100644
--- 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/SerializerSession.java
+++ 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/SerializerSession.java
@@ -14,8 +14,7 @@ package org.apache.juneau.serializer;
 
 import static org.apache.juneau.collections.JsonMap.*;
 import static org.apache.juneau.common.internal.StringUtils.*;
-import static org.apache.juneau.internal.CollectionUtils.*;
-
+import static org.apache.juneau.common.internal.Utils.*;
 import java.io.*;
 import java.lang.reflect.*;
 import java.text.*;
diff --git 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/svl/VarList.java 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/svl/VarList.java
index e9b998b4a..88bad274c 100644
--- 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/svl/VarList.java
+++ 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/svl/VarList.java
@@ -12,8 +12,7 @@
 // 
***************************************************************************************************************************
 package org.apache.juneau.svl;
 
-import static org.apache.juneau.internal.CollectionUtils.*;
-
+import static org.apache.juneau.common.internal.Utils.*;
 import java.util.*;
 
 import org.apache.juneau.svl.vars.*;
diff --git 
a/juneau-examples/juneau-examples-rest-jetty-ftest/src/test/java/org/apache/juneau/examples/rest/RootContentTest.java
 
b/juneau-examples/juneau-examples-rest-jetty-ftest/src/test/java/org/apache/juneau/examples/rest/RootContentTest.java
index f2f47c2e8..eeff8c226 100644
--- 
a/juneau-examples/juneau-examples-rest-jetty-ftest/src/test/java/org/apache/juneau/examples/rest/RootContentTest.java
+++ 
b/juneau-examples/juneau-examples-rest-jetty-ftest/src/test/java/org/apache/juneau/examples/rest/RootContentTest.java
@@ -12,6 +12,7 @@
 // 
***************************************************************************************************************************
 package org.apache.juneau.examples.rest;
 
+import static org.apache.juneau.common.internal.Utils.*;
 import static org.apache.juneau.internal.CollectionUtils.*;
 
 import java.util.*;
diff --git 
a/juneau-rest/juneau-rest-common/src/main/java/org/apache/juneau/http/header/HeaderList.java
 
b/juneau-rest/juneau-rest-common/src/main/java/org/apache/juneau/http/header/HeaderList.java
index cf00e0fff..e15684dfa 100644
--- 
a/juneau-rest/juneau-rest-common/src/main/java/org/apache/juneau/http/header/HeaderList.java
+++ 
b/juneau-rest/juneau-rest-common/src/main/java/org/apache/juneau/http/header/HeaderList.java
@@ -14,6 +14,7 @@ package org.apache.juneau.http.header;
 
 import static org.apache.juneau.common.internal.ArgUtils.*;
 import static org.apache.juneau.common.internal.StringUtils.*;
+import static org.apache.juneau.common.internal.Utils.*;
 import static org.apache.juneau.internal.CollectionUtils.*;
 import static org.apache.juneau.internal.ConsumerUtils.*;
 
@@ -619,7 +620,7 @@ public class HeaderList extends ControlledArrayList<Header> 
{
                        if (eq(x.getName(), name))
                                return optional(x);
                }
-               return empty();
+               return opte();
        }
 
        /**
@@ -637,7 +638,7 @@ public class HeaderList extends ControlledArrayList<Header> 
{
                        if (eq(x.getName(), name))
                                return optional(x);
                }
-               return empty();
+               return opte();
        }
 
        /**
@@ -660,14 +661,14 @@ public class HeaderList extends 
ControlledArrayList<Header> {
                                        first = x;
                                else {
                                        if (rest == null)
-                                               rest = list();
+                                               rest = Utils.list();
                                        rest.add(x);
                                }
                        }
                }
 
                if (first == null)
-                       return empty();
+                       return opte();
 
                if (rest == null)
                        return optional(first);
@@ -718,14 +719,14 @@ public class HeaderList extends 
ControlledArrayList<Header> {
                                        first = x;
                                else {
                                        if (rest == null)
-                                               rest = list();
+                                               rest = Utils.list();
                                        rest.add(x);
                                }
                        }
                }
 
                if (first == null)
-                       return empty();
+                       return opte();
 
                if (rest == null)
                        return optional(HeaderBeanMeta.of(type).construct(name, 
first.getValue()));
diff --git 
a/juneau-rest/juneau-rest-common/src/main/java/org/apache/juneau/http/header/Thrown.java
 
b/juneau-rest/juneau-rest-common/src/main/java/org/apache/juneau/http/header/Thrown.java
index fce768876..617e31781 100644
--- 
a/juneau-rest/juneau-rest-common/src/main/java/org/apache/juneau/http/header/Thrown.java
+++ 
b/juneau-rest/juneau-rest-common/src/main/java/org/apache/juneau/http/header/Thrown.java
@@ -13,11 +13,13 @@
 package org.apache.juneau.http.header;
 
 import static org.apache.juneau.common.internal.StringUtils.*;
+import static org.apache.juneau.common.internal.Utils.*;
 import static org.apache.juneau.internal.ClassUtils.*;
 import static org.apache.juneau.internal.CollectionUtils.*;
 import java.util.*;
 import java.util.stream.*;
 
+import org.apache.juneau.common.internal.*;
 import org.apache.juneau.http.annotation.*;
 
 /**
@@ -107,7 +109,7 @@ public class Thrown extends BasicCsvHeader {
         */
        public Thrown(String value) {
                super(NAME, value);
-               List<Part> l = list();
+               List<Part> l = Utils.list();
                split(value, x -> l.add(new Part(x)));
                this.value = value == null ? null : unmodifiable(l);
        }
diff --git 
a/juneau-rest/juneau-rest-common/src/main/java/org/apache/juneau/http/part/PartList.java
 
b/juneau-rest/juneau-rest-common/src/main/java/org/apache/juneau/http/part/PartList.java
index ca64a57d1..a8fb03300 100644
--- 
a/juneau-rest/juneau-rest-common/src/main/java/org/apache/juneau/http/part/PartList.java
+++ 
b/juneau-rest/juneau-rest-common/src/main/java/org/apache/juneau/http/part/PartList.java
@@ -14,6 +14,7 @@ package org.apache.juneau.http.part;
 
 import static org.apache.juneau.common.internal.ArgUtils.*;
 import static org.apache.juneau.common.internal.StringUtils.*;
+import static org.apache.juneau.common.internal.Utils.*;
 import static org.apache.juneau.internal.CollectionUtils.*;
 import static org.apache.juneau.internal.ConsumerUtils.*;
 
@@ -594,7 +595,7 @@ public class PartList extends 
ControlledArrayList<NameValuePair> {
                        if (eq(x.getName(), name))
                                return optional(x);
                }
-               return empty();
+               return opte();
        }
 
        /**
@@ -612,7 +613,7 @@ public class PartList extends 
ControlledArrayList<NameValuePair> {
                        if (eq(x.getName(), name))
                                return optional(x);
                }
-               return empty();
+               return opte();
        }
 
        /**
@@ -635,14 +636,14 @@ public class PartList extends 
ControlledArrayList<NameValuePair> {
                                        first = x;
                                else {
                                        if (rest == null)
-                                               rest = list();
+                                               rest = Utils.list();
                                        rest.add(x);
                                }
                        }
                }
 
                if (first == null)
-                       return empty();
+                       return opte();
 
                if (rest == null)
                        return optional(first);
@@ -693,17 +694,17 @@ public class PartList extends 
ControlledArrayList<NameValuePair> {
                                        first = x;
                                else {
                                        if (rest == null)
-                                               rest = list();
+                                               rest = Utils.list();
                                        rest.add(x);
                                }
                        }
                }
 
                if (first == null)
-                       return empty();
+                       return opte();
 
                if (rest == null)
-                       return optional(PartBeanMeta.of(type).construct(name, 
first.getValue()));
+                       return opt(PartBeanMeta.of(type).construct(name, 
first.getValue()));
 
                CharArrayBuffer sb = new CharArrayBuffer(128);
                sb.append(first.getValue());
diff --git 
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/arg/CookieList.java
 
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/arg/CookieList.java
index 641ca1599..f321951af 100644
--- 
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/arg/CookieList.java
+++ 
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/arg/CookieList.java
@@ -12,6 +12,7 @@
 // 
***************************************************************************************************************************
 package org.apache.juneau.rest.arg;
 
+import static org.apache.juneau.common.internal.Utils.*;
 import static org.apache.juneau.internal.CollectionUtils.*;
 
 import java.util.*;
diff --git 
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/httppart/RequestAttributes.java
 
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/httppart/RequestAttributes.java
index 46d30b422..9f69e4d93 100644
--- 
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/httppart/RequestAttributes.java
+++ 
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/httppart/RequestAttributes.java
@@ -13,6 +13,7 @@
 package org.apache.juneau.rest.httppart;
 
 import static org.apache.juneau.common.internal.ArgUtils.*;
+import static org.apache.juneau.common.internal.Utils.*;
 import static org.apache.juneau.internal.CollectionUtils.*;
 
 import java.util.*;
@@ -20,6 +21,7 @@ import java.util.*;
 import jakarta.servlet.http.*;
 
 import org.apache.juneau.collections.*;
+import org.apache.juneau.common.internal.*;
 import org.apache.juneau.rest.*;
 import org.apache.juneau.svl.*;
 
@@ -179,7 +181,7 @@ public class RequestAttributes {
         * @return All the attribute on this request.
         */
        public List<RequestAttribute> getAll() {
-               List<RequestAttribute> l = list();
+               List<RequestAttribute> l = Utils.list();
                Enumeration<String> e = sreq.getAttributeNames();
                while (e.hasMoreElements()) {
                        String n = e.nextElement();
diff --git 
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/httppart/RequestFormParams.java
 
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/httppart/RequestFormParams.java
index 630a80d7d..dcdbdc17e 100644
--- 
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/httppart/RequestFormParams.java
+++ 
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/httppart/RequestFormParams.java
@@ -15,6 +15,7 @@ package org.apache.juneau.rest.httppart;
 import static java.util.stream.Collectors.*;
 import static org.apache.juneau.common.internal.ArgUtils.*;
 import static org.apache.juneau.common.internal.StringUtils.*;
+import static org.apache.juneau.common.internal.Utils.*;
 import static org.apache.juneau.httppart.HttpPartType.*;
 import static org.apache.juneau.internal.ClassUtils.*;
 import static org.apache.juneau.internal.CollectionUtils.*;
diff --git 
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/httppart/RequestHeaders.java
 
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/httppart/RequestHeaders.java
index df0f6cc93..5f8338eff 100644
--- 
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/httppart/RequestHeaders.java
+++ 
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/httppart/RequestHeaders.java
@@ -16,6 +16,7 @@ import static org.apache.juneau.internal.ClassUtils.*;
 import static org.apache.juneau.internal.CollectionUtils.*;
 import static java.util.stream.Collectors.*;
 import static org.apache.juneau.common.internal.ArgUtils.*;
+import static org.apache.juneau.common.internal.Utils.*;
 import static org.apache.juneau.httppart.HttpPartType.*;
 
 import java.util.*;
diff --git 
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/httppart/RequestPathParams.java
 
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/httppart/RequestPathParams.java
index 5c49a0e27..082cd665b 100644
--- 
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/httppart/RequestPathParams.java
+++ 
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/httppart/RequestPathParams.java
@@ -17,6 +17,7 @@ import static org.apache.juneau.internal.CollectionUtils.*;
 import static java.util.stream.Collectors.*;
 import static org.apache.juneau.common.internal.ArgUtils.*;
 import static org.apache.juneau.common.internal.StringUtils.*;
+import static org.apache.juneau.common.internal.Utils.*;
 import static org.apache.juneau.httppart.HttpPartType.*;
 
 import java.util.*;
diff --git 
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/httppart/RequestQueryParams.java
 
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/httppart/RequestQueryParams.java
index edb21647d..2c5e19a57 100644
--- 
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/httppart/RequestQueryParams.java
+++ 
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/httppart/RequestQueryParams.java
@@ -16,6 +16,7 @@ import static org.apache.juneau.internal.ClassUtils.*;
 import static org.apache.juneau.internal.CollectionUtils.*;
 import static org.apache.juneau.common.internal.ArgUtils.*;
 import static org.apache.juneau.common.internal.StringUtils.*;
+import static org.apache.juneau.common.internal.Utils.*;
 import static org.apache.juneau.httppart.HttpPartType.*;
 import static java.util.Optional.*;
 import static java.util.stream.Collectors.*;
diff --git 
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/processor/ResponseBeanProcessor.java
 
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/processor/ResponseBeanProcessor.java
index e399df1de..9a78603c8 100644
--- 
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/processor/ResponseBeanProcessor.java
+++ 
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/processor/ResponseBeanProcessor.java
@@ -12,6 +12,7 @@
 // 
***************************************************************************************************************************
 package org.apache.juneau.rest.processor;
 
+import static org.apache.juneau.common.internal.Utils.*;
 import static org.apache.juneau.internal.ClassUtils.*;
 import static org.apache.juneau.internal.CollectionUtils.*;
 
diff --git 
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/stats/ThrownStore.java
 
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/stats/ThrownStore.java
index ffddb0022..2f093d595 100644
--- 
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/stats/ThrownStore.java
+++ 
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/stats/ThrownStore.java
@@ -13,6 +13,7 @@
 package org.apache.juneau.rest.stats;
 
 import static java.util.stream.Collectors.*;
+import static org.apache.juneau.common.internal.Utils.*;
 import static org.apache.juneau.internal.CollectionUtils.*;
 import static java.util.Comparator.*;
 
@@ -130,7 +131,7 @@ public class ThrownStore {
                 * @return This object.
                 */
                public Builder ignoreClasses(Class<?>...value) {
-                       this.ignoreClasses = set(value);
+                       this.ignoreClasses = Utils.set(value);
                        return this;
                }
 


Reply via email to