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 efb494065 Test modernization, clean up utility classes.
efb494065 is described below

commit efb4940657d17c6b49e7e8ab45cee6a17f7f2ec6
Author: James Bognar <[email protected]>
AuthorDate: Mon Aug 25 13:48:33 2025 -0400

    Test modernization, clean up utility classes.
---
 .../org/apache/juneau/common/internal/Utils.java   | 12 ++++
 .../main/java/org/apache/juneau/config/Config.java |  6 +-
 .../apache/juneau/config/internal/ConfigMap.java   | 13 ++--
 .../juneau/config/internal/ConfigMapEntry.java     |  8 +--
 .../src/main/java/org/apache/juneau/BeanMeta.java  | 27 ++++-----
 .../main/java/org/apache/juneau/cp/Messages.java   |  9 +--
 .../org/apache/juneau/encoders/EncoderSet.java     | 14 +++--
 .../org/apache/juneau/httppart/HttpPartSchema.java | 35 +++++------
 .../juneau/httppart/bean/RequestBeanMeta.java      |  3 +-
 .../juneau/httppart/bean/ResponseBeanMeta.java     |  7 ++-
 .../apache/juneau/internal/CollectionUtils.java    | 70 +++++++++++-----------
 .../org/apache/juneau/objecttools/SortArgs.java    |  2 +-
 .../org/apache/juneau/objecttools/ViewArgs.java    |  2 +-
 .../java/org/apache/juneau/svl/VarResolver.java    |  3 +-
 .../java/org/apache/juneau/xml/XmlBeanMeta.java    |  7 ++-
 .../juneau/rest/client/remote/RemoteMeta.java      |  7 ++-
 .../java/org/apache/juneau/http/HttpMethod.java    |  2 +-
 .../java/org/apache/juneau/http/header/Thrown.java |  4 +-
 .../juneau/http/remote/RrpcInterfaceMeta.java      |  9 +--
 .../java/org/apache/juneau/rest/RestChildren.java  |  8 ++-
 .../java/org/apache/juneau/rest/RestContext.java   |  8 +--
 .../java/org/apache/juneau/rest/RestOpContext.java | 16 ++---
 .../org/apache/juneau/rest/stats/ThrownStore.java  |  2 +-
 .../SerializerProperties_ComboRoundTripTest.java   |  2 +-
 24 files changed, 150 insertions(+), 126 deletions(-)

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 a94a7570e..046800ffb 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
@@ -612,4 +612,16 @@ public class Utils {
                        return false;
                return ! test.test(o1, o2);
        }
+
+       public static <K,V> Map<K,V> u(Map<? extends K, ? extends V> value) {
+               return value == null ? null : 
Collections.unmodifiableMap(value);
+       }
+
+       public static <T> List<T> u(List<? extends T> value) {
+               return value == null ? null : 
Collections.unmodifiableList(value);
+       }
+
+       public static <T> Set<T> u(Set<? extends T> value) {
+               return value == null ? null : 
Collections.unmodifiableSet(value);
+       }
 }
\ No newline at end of file
diff --git 
a/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/Config.java 
b/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/Config.java
index 5f75d007e..b2529b926 100644
--- 
a/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/Config.java
+++ 
b/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/Config.java
@@ -578,7 +578,7 @@ public final class Config extends Context implements 
ConfigEventListener {
                serializer = builder.serializer;
                parser = builder.parser;
                beanSession = parser.getBeanContext().getSession();
-               mods = unmodifiable(copyOf(builder.mods));
+               mods = u(copyOf(builder.mods));
                varResolver = builder.varResolver;
                varSession = varResolver
                        .copy()
@@ -926,7 +926,7 @@ public final class Config extends Context implements 
ConfigEventListener {
         * @return The section names defined in this config.
         */
        public Set<String> getSectionNames() {
-               return unmodifiable(configMap.getSections());
+               return u(configMap.getSections());
        }
 
        /**
@@ -1181,7 +1181,7 @@ public final class Config extends Context implements 
ConfigEventListener {
        }
 
        List<ConfigEventListener> getListeners() {
-               return unmodifiable(listeners);
+               return u(listeners);
        }
 
        
//-----------------------------------------------------------------------------------------------------------------
diff --git 
a/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/internal/ConfigMap.java
 
b/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/internal/ConfigMap.java
index 4c4d21731..339c87e79 100644
--- 
a/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/internal/ConfigMap.java
+++ 
b/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/internal/ConfigMap.java
@@ -15,6 +15,7 @@ package org.apache.juneau.config.internal;
 import static org.apache.juneau.internal.CollectionUtils.*;
 import static org.apache.juneau.common.internal.StringUtils.*;
 import static org.apache.juneau.common.internal.ThrowableUtils.*;
+import static org.apache.juneau.common.internal.Utils.*;
 import static org.apache.juneau.config.event.ConfigEventType.*;
 
 import java.io.*;
@@ -42,7 +43,7 @@ public class ConfigMap implements ConfigStoreListener {
        private final List<ConfigEvent> changes = synced(new ConfigEvents());
 
        // Registered listeners listening for changes during saves or reloads.
-       private final Set<ConfigEventListener> listeners = synced(set());
+       private final Set<ConfigEventListener> listeners = synced(Utils.set());
 
        // The parsed entries of this map with all changes applied.
        final Map<String,ConfigSection> entries = synced(map());
@@ -104,7 +105,7 @@ public class ConfigMap implements ConfigStoreListener {
                                                if (! isValidConfigName(l2))
                                                        throw new 
ConfigException("Invalid import config name found in configuration:  {0}", 
line);
                                                var l3 = l.substring(i+1);
-                                               if (! (isEmpty(l3) || 
firstChar(l3) == '#'))
+                                               if (! (Utils.isEmpty(l3) || 
firstChar(l3) == '#'))
                                                        throw new 
ConfigException("Invalid import config name found in configuration:  {0}", 
line);
                                                var importName = l2.trim();
                                                try {
@@ -266,7 +267,7 @@ public class ConfigMap implements ConfigStoreListener {
                        imports.forEach(x -> 
s.addAll(x.getConfigMap().getSections()));
                        s.addAll(entries.keySet());
                }
-               return unmodifiable(s);
+               return u(s);
        }
 
        /**
@@ -288,7 +289,7 @@ public class ConfigMap implements ConfigStoreListener {
                        if (cs != null)
                                s.addAll(cs.entries.keySet());
                }
-               return unmodifiable(s);
+               return u(s);
        }
 
        /**
@@ -572,7 +573,7 @@ public class ConfigMap implements ConfigStoreListener {
         * @return The listeners currently associated with this config map.
         */
        public Set<ConfigEventListener> getListeners() {
-               return unmodifiable(listeners);
+               return u(listeners);
        }
 
        @Override /* ConfigStoreListener */
@@ -805,7 +806,7 @@ public class ConfigMap implements ConfigStoreListener {
 
                final String name;   // The config section name, or blank if 
the default section.  Never null.
 
-               final List<String> preLines = synced(list());
+               final List<String> preLines = synced(Utils.list());
                private final String rawLine;
 
                final Map<String,ConfigMapEntry> oentries = synced(map());
diff --git 
a/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/internal/ConfigMapEntry.java
 
b/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/internal/ConfigMapEntry.java
index 744ada42d..900046b91 100644
--- 
a/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/internal/ConfigMapEntry.java
+++ 
b/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/internal/ConfigMapEntry.java
@@ -12,7 +12,7 @@
 // 
***************************************************************************************************************************
 package org.apache.juneau.config.internal;
 
-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.io.*;
@@ -49,7 +49,7 @@ public class ConfigMapEntry {
 
                i = line.indexOf('#');
                if (i != -1) {
-                       var l2 = split(line, '#', 2);
+                       var l2 = StringUtils.split(line, '#', 2);
                        line = l2[0];
                        if (l2.length == 2)
                                this.comment = l2[1].trim();
@@ -61,7 +61,7 @@ public class ConfigMapEntry {
 
                this.value = StringUtils.replaceUnicodeSequences(line.trim());
 
-               this.preLines = preLines == null ? Collections.emptyList() : 
unmodifiable(copyOf(preLines));
+               this.preLines = preLines == null ? Collections.emptyList() : 
u(copyOf(preLines));
        }
 
        ConfigMapEntry(String key, String value, String modifiers, String 
comment, List<String> preLines) {
@@ -70,7 +70,7 @@ public class ConfigMapEntry {
                this.value = value;
                this.comment = comment;
                this.modifiers = modifiers;
-               this.preLines = preLines == null ? Collections.emptyList() : 
unmodifiable(copyOf(preLines));
+               this.preLines = preLines == null ? Collections.emptyList() : 
u(copyOf(preLines));
        }
 
        /**
diff --git 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanMeta.java 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanMeta.java
index c0767a2a4..ee98fd740 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanMeta.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanMeta.java
@@ -12,11 +12,10 @@
 // 
***************************************************************************************************************************
 package org.apache.juneau;
 
-import static org.apache.juneau.internal.CollectionUtils.*;
 import static org.apache.juneau.internal.ConsumerUtils.*;
 import static org.apache.juneau.BeanMeta.MethodType.*;
-import static org.apache.juneau.common.internal.StringUtils.*;
 import static org.apache.juneau.common.internal.ThrowableUtils.*;
+import static org.apache.juneau.common.internal.Utils.*;
 
 import java.beans.*;
 import java.io.*;
@@ -128,13 +127,13 @@ public class BeanMeta<T> {
 
                this.beanFilter = beanFilter;
                this.dictionaryName = b.dictionaryName;
-               this.properties = unmodifiable(b.properties);
-               this.propertyArray = properties == null ? EMPTY_PROPERTIES : 
array(properties.values(), BeanPropertyMeta.class);
-               this.hiddenProperties = unmodifiable(b.hiddenProperties);
-               this.getterProps = unmodifiable(b.getterProps);
-               this.setterProps = unmodifiable(b.setterProps);
+               this.properties = u(b.properties);
+               this.propertyArray = properties == null ? EMPTY_PROPERTIES : 
CollectionUtils.array(properties.values(), BeanPropertyMeta.class);
+               this.hiddenProperties = u(b.hiddenProperties);
+               this.getterProps = u(b.getterProps);
+               this.setterProps = u(b.setterProps);
                this.dynaProperty = b.dynaProperty;
-               this.typeVarImpls = unmodifiable(b.typeVarImpls);
+               this.typeVarImpls = u(b.typeVarImpls);
                this.constructor = b.constructor;
                this.constructorArgs = b.constructorArgs;
                this.beanRegistry = b.beanRegistry;
@@ -187,7 +186,7 @@ public class BeanMeta<T> {
 
                                List<Class<?>> bdClasses = list();
                                if (beanFilter != null && 
beanFilter.getBeanDictionary() != null)
-                                       addAll(bdClasses, 
beanFilter.getBeanDictionary());
+                                       CollectionUtils.addAll(bdClasses, 
beanFilter.getBeanDictionary());
 
                                Value<String> typeName = Value.empty();
                                classMeta.forEachAnnotation(Bean.class, x -> 
isNotEmpty(x.typeName()), x -> typeName.set(x.typeName()));
@@ -234,7 +233,7 @@ public class BeanMeta<T> {
                                                throw new 
BeanRuntimeException(c, "Multiple instances of '@Beanc' found.");
                                        constructor = x;
                                        constructorArgs = new String[0];
-                                       ctx.forEachAnnotation(Beanc.class, 
x.inner(), y -> ! y.properties().isEmpty(), z -> constructorArgs = 
split(z.properties()));
+                                       ctx.forEachAnnotation(Beanc.class, 
x.inner(), y -> ! y.properties().isEmpty(), z -> constructorArgs = 
StringUtils.split(z.properties()));
                                        if (! 
x.hasNumParams(constructorArgs.length)) {
                                                if (constructorArgs.length != 0)
                                                        throw new 
BeanRuntimeException(c, "Number of properties defined in '@Beanc' annotation 
does not match number of parameters in constructor.");
@@ -257,7 +256,7 @@ public class BeanMeta<T> {
                                                        throw new 
BeanRuntimeException(c, "Multiple instances of '@Beanc' found.");
                                                constructor = x;
                                                constructorArgs = new String[0];
-                                               
ctx.forEachAnnotation(Beanc.class, x.inner(), y -> ! y.properties().isEmpty(), 
z -> constructorArgs = split(z.properties()));
+                                               
ctx.forEachAnnotation(Beanc.class, x.inner(), y -> ! y.properties().isEmpty(), 
z -> constructorArgs = StringUtils.split(z.properties()));
                                                if (! 
x.hasNumParams(constructorArgs.length)) {
                                                        if 
(constructorArgs.length != 0)
                                                                throw new 
BeanRuntimeException(c, "Number of properties defined in '@Beanc' annotation 
does not match number of parameters in constructor.");
@@ -437,7 +436,7 @@ public class BeanMeta<T> {
 
                                sortProperties = (ctx.isSortProperties() || 
(beanFilter != null && beanFilter.isSortProperties())) && 
fixedBeanProps.isEmpty();
 
-                               properties = sortProperties ? sortedMap() : 
map();
+                               properties = sortProperties ? 
CollectionUtils.sortedMap() : map();
 
                                if (beanFilter != null && 
beanFilter.getTypeName() != null)
                                        dictionaryName = 
beanFilter.getTypeName();
@@ -807,7 +806,7 @@ public class BeanMeta<T> {
         * @return Metadata on all properties associated with this bean.
         */
        public Collection<BeanPropertyMeta> getPropertyMetas() {
-               return ulist(propertyArray);
+               return CollectionUtils.ulist(propertyArray);
        }
 
        /**
@@ -972,7 +971,7 @@ public class BeanMeta<T> {
                if (p.isEmpty() && n.isEmpty())
                        return null;
                if (! n.isEmpty())
-                       return last(n).value();
+                       return CollectionUtils.last(n).value();
 
                Value<String> name = Value.of(p.isEmpty() ? null : "");
                p.forEach(x -> {
diff --git 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/cp/Messages.java 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/cp/Messages.java
index ac71c72a9..81e338e57 100644
--- 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/cp/Messages.java
+++ 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/cp/Messages.java
@@ -14,6 +14,7 @@ package org.apache.juneau.cp;
 
 import static org.apache.juneau.common.internal.StringUtils.*;
 import static org.apache.juneau.common.internal.ThrowableUtils.*;
+import static org.apache.juneau.common.internal.Utils.*;
 import static org.apache.juneau.internal.CollectionUtils.*;
 import static org.apache.juneau.internal.ResourceBundleUtils.*;
 
@@ -177,7 +178,7 @@ public class Messages extends ResourceBundle {
                        super(Messages.class, BeanStore.INSTANCE);
                        this.forClass = forClass;
                        this.name = forClass.getSimpleName();
-                       locations = list();
+                       locations = Utils.list();
                        locale = Locale.getDefault();
                }
 
@@ -241,7 +242,7 @@ public class Messages extends ResourceBundle {
                 * @return This object.
                 */
                public Builder name(String name) {
-                       this.name = isEmpty(name) ? forClass.getSimpleName() : 
name;
+                       this.name = Utils.isEmpty(name) ? 
forClass.getSimpleName() : name;
                        return this;
                }
 
@@ -403,7 +404,7 @@ public class Messages extends ResourceBundle {
                        });
                }
 
-               this.keyMap = unmodifiable(copyOf(keyMap));
+               this.keyMap = u(copyOf(keyMap));
                this.rbKeys = rb == null ? Collections.emptySet() : rb.keySet();
        }
 
@@ -438,7 +439,7 @@ public class Messages extends ResourceBundle {
         * @return The set of all keys in the resource bundle with the prefix.
         */
        public Set<String> keySet(String prefix) {
-               Set<String> set = set();
+               Set<String> set = Utils.set();
                keySet().forEach(x -> {
                        if (x.equals(prefix) || (x.startsWith(prefix) && 
x.charAt(prefix.length()) == '.'))
                                set.add(x);
diff --git 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/encoders/EncoderSet.java
 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/encoders/EncoderSet.java
index 6597f9393..0f6dc8945 100644
--- 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/encoders/EncoderSet.java
+++ 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/encoders/EncoderSet.java
@@ -13,12 +13,14 @@
 package org.apache.juneau.encoders;
 
 import static org.apache.juneau.common.internal.ThrowableUtils.*;
+import static org.apache.juneau.common.internal.Utils.*;
 import static org.apache.juneau.internal.CollectionUtils.*;
 import static java.util.stream.Collectors.*;
 import java.util.*;
 import java.util.concurrent.*;
 
 import org.apache.juneau.*;
+import org.apache.juneau.common.internal.*;
 import org.apache.juneau.cp.*;
 import org.apache.juneau.internal.*;
 
@@ -126,7 +128,7 @@ public final class EncoderSet {
                 */
                protected Builder(BeanStore beanStore) {
                        super(EncoderSet.class, beanStore);
-                       entries = list();
+                       entries = Utils.list();
                }
 
                /**
@@ -168,7 +170,7 @@ public final class EncoderSet {
                 * @throws IllegalArgumentException if any class does not 
extend from {@link Encoder}.
                 */
                public Builder add(Class<?>...values) {
-                       List<Object> l = list();
+                       List<Object> l = Utils.list();
                        for (Class<?> v : values)
                                if (v.getSimpleName().equals("NoInherit"))
                                        clear();
@@ -198,7 +200,7 @@ public final class EncoderSet {
                 * @throws IllegalArgumentException if any class does not 
extend from {@link Encoder}.
                 */
                public Builder set(Class<?>...values) {
-                       List<Object> l = list();
+                       List<Object> l = Utils.list();
                        for (Class<?> v : values) {
                                if (v.getSimpleName().equals("Inherit")) {
                                        l.addAll(entries);
@@ -314,8 +316,8 @@ public final class EncoderSet {
        protected EncoderSet(Builder builder) {
                entries = builder.entries.stream().map(x -> 
instantiate(builder.beanStore(), x)).toArray(Encoder[]::new);
 
-               List<String> lc = list();
-               List<Encoder> l = list();
+               List<String> lc = Utils.list();
+               List<Encoder> l = Utils.list();
                for (Encoder e : entries) {
                        for (String c: e.getCodings()) {
                                lc.add(c);
@@ -323,7 +325,7 @@ public final class EncoderSet {
                        }
                }
 
-               this.encodings = unmodifiable(lc);
+               this.encodings = u(lc);
                this.encodingsEncoders = l.toArray(new Encoder[l.size()]);
        }
 
diff --git 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/httppart/HttpPartSchema.java
 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/httppart/HttpPartSchema.java
index 7ac76ae7f..ae126d3a0 100644
--- 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/httppart/HttpPartSchema.java
+++ 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/httppart/HttpPartSchema.java
@@ -15,6 +15,7 @@ package org.apache.juneau.httppart;
 import static java.util.Collections.*;
 import static org.apache.juneau.common.internal.StringUtils.*;
 import static org.apache.juneau.common.internal.ThrowableUtils.*;
+import static org.apache.juneau.common.internal.Utils.*;
 import static org.apache.juneau.httppart.HttpPartDataType.*;
 import static org.apache.juneau.httppart.HttpPartFormat.*;
 import static org.apache.juneau.internal.ClassUtils.*;
@@ -920,7 +921,7 @@ public class HttpPartSchema {
                 * @return This object.
                 */
                public Builder name(String value) {
-                       if (isNotEmpty(value))
+                       if (Utils.isNotEmpty(value))
                                name = value;
                        return this;
                }
@@ -1124,7 +1125,7 @@ public class HttpPartSchema {
                 */
                public Builder type(String value) {
                        try {
-                               if (isNotEmpty(value))
+                               if (Utils.isNotEmpty(value))
                                        type = 
HttpPartDataType.fromString(value);
                        } catch (Exception e) {
                                throw new ContextRuntimeException("Invalid 
value ''{0}'' passed in as type value.  Valid values: {1}", value, 
HttpPartDataType.values());
@@ -1364,7 +1365,7 @@ public class HttpPartSchema {
                 */
                public Builder format(String value) {
                        try {
-                               if (isNotEmpty(value))
+                               if (Utils.isNotEmpty(value))
                                        format = 
HttpPartFormat.fromString(value);
                        } catch (Exception e) {
                                throw new ContextRuntimeException("Invalid 
value ''{0}'' passed in as format value.  Valid values: {1}", value, 
HttpPartFormat.values());
@@ -1808,7 +1809,7 @@ public class HttpPartSchema {
                 */
                public Builder collectionFormat(String value) {
                        try {
-                               if (isNotEmpty(value))
+                               if (Utils.isNotEmpty(value))
                                        this.collectionFormat = 
HttpPartCollectionFormat.fromString(value);
                        } catch (Exception e) {
                                throw new ContextRuntimeException("Invalid 
value ''{0}'' passed in as collectionFormat value.  Valid values: {1}", value, 
HttpPartCollectionFormat.values());
@@ -2399,7 +2400,7 @@ public class HttpPartSchema {
                 */
                public Builder pattern(String value) {
                        try {
-                               if (isNotEmpty(value))
+                               if (Utils.isNotEmpty(value))
                                        this.pattern = Pattern.compile(value);
                        } catch (Exception e) {
                                throw new ContextRuntimeException(e, "Invalid 
value {0} passed in as pattern value.  Must be a valid regular expression.", 
value);
@@ -2765,7 +2766,7 @@ public class HttpPartSchema {
                 * @return This object.
                 */
                public Builder _enum(String...values) {
-                       return _enum(set(values));
+                       return _enum(Utils.set(values));
                }
 
                /**
@@ -3164,7 +3165,7 @@ public class HttpPartSchema {
                }
 
                private Boolean resolve(String newValue, Boolean oldValue) {
-                       return isEmpty(newValue) ? oldValue : 
Boolean.valueOf(newValue);
+                       return Utils.isEmpty(newValue) ? oldValue : 
Boolean.valueOf(newValue);
                }
 
                private Boolean resolve(Boolean newValue, Boolean oldValue) {
@@ -3172,7 +3173,7 @@ public class HttpPartSchema {
                }
 
                private Long resolve(String newValue, Long oldValue) {
-                       return isEmpty(newValue) ? oldValue : 
Long.parseLong(newValue);
+                       return Utils.isEmpty(newValue) ? oldValue : 
Long.parseLong(newValue);
                }
 
                private Long resolve(Long newValue, Long oldValue) {
@@ -3282,7 +3283,7 @@ public class HttpPartSchema {
                        return;
 
                // Validation.
-               List<String> errors = list();
+               List<String> errors = Utils.list();
                ListBuilder<String> notAllowed = listBuilder(String.class);
                boolean invalidFormat = false;
                switch (type) {
@@ -3925,7 +3926,7 @@ public class HttpPartSchema {
        }
 
        private boolean isValidAllowEmpty(String x) {
-               return allowEmptyValue || isNotEmpty(x);
+               return allowEmptyValue || Utils.isNotEmpty(x);
        }
 
        private boolean isValidPattern(String x) {
@@ -4007,7 +4008,7 @@ public class HttpPartSchema {
        }
 
        private static <T> Set<T> copy(Set<T> in) {
-               return in == null ? emptySet() : unmodifiable(copyOf(in));
+               return in == null ? emptySet() : u(copyOf(in));
        }
 
        private static Map<String,HttpPartSchema> build(Map<String,Object> in, 
boolean noValidate) {
@@ -4015,7 +4016,7 @@ public class HttpPartSchema {
                        return null;
                Map<String,HttpPartSchema> m = map();
                in.forEach((k,v) -> m.put(k, build(v, noValidate)));
-               return unmodifiable(m);
+               return u(m);
        }
 
        private static HttpPartSchema build(Object in, boolean noValidate) {
@@ -4040,7 +4041,7 @@ public class HttpPartSchema {
                        isNotEmpty |= ss.length > 0;
                if (! isNotEmpty)
                        return null;
-               Set<String> set = set();
+               Set<String> set = Utils.set();
                for (String[] ss : s)
                        if (ss != null)
                                for (String ss2 : ss)
@@ -4049,9 +4050,9 @@ public class HttpPartSchema {
        }
 
        final static Set<String> toSet(String s) {
-               if (isEmpty(s))
+               if (Utils.isEmpty(s))
                        return null;
-               Set<String> set = set();
+               Set<String> set = Utils.set();
                try {
                        JsonList.ofJsonOrCdl(s).forEach(x -> 
set.add(x.toString()));
                } catch (ParseException e) {
@@ -4063,7 +4064,7 @@ public class HttpPartSchema {
        final static Number toNumber(String...s) {
                try {
                        for (String ss : s)
-                               if (isNotEmpty(ss))
+                               if (Utils.isNotEmpty(ss))
                                        return parseNumber(ss, Number.class);
                        return null;
                } catch (ParseException e) {
@@ -4087,7 +4088,7 @@ public class HttpPartSchema {
        @Override
        public String toString() {
                try {
-                       Predicate<Object> ne = x -> isNotEmpty(Utils.s(x));
+                       Predicate<Object> ne = x -> 
Utils.isNotEmpty(Utils.s(x));
                        Predicate<Boolean> nf = Utils::isTrue;
                        Predicate<Number> nm1 = Utils::isNotMinusOne;
                        Predicate<Object> nn = Utils::isNotNull;
diff --git 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/httppart/bean/RequestBeanMeta.java
 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/httppart/bean/RequestBeanMeta.java
index 637d4cd52..4f70d3a5e 100644
--- 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/httppart/bean/RequestBeanMeta.java
+++ 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/httppart/bean/RequestBeanMeta.java
@@ -15,6 +15,7 @@ package org.apache.juneau.httppart.bean;
 import static org.apache.juneau.httppart.bean.Utils.*;
 import static org.apache.juneau.internal.ClassUtils.*;
 import static org.apache.juneau.internal.CollectionUtils.*;
+import static org.apache.juneau.common.internal.Utils.*;
 import static org.apache.juneau.httppart.HttpPartType.*;
 
 import java.util.*;
@@ -76,7 +77,7 @@ public class RequestBeanMeta {
                this.parser = b.parser.orElse(null);
                Map<String,RequestBeanPropertyMeta> properties = map();
                b.properties.forEach((k,v) -> properties.put(k, 
v.build(serializer, parser)));
-               this.properties = unmodifiable(properties);
+               this.properties = u(properties);
        }
 
        static class Builder {
diff --git 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/httppart/bean/ResponseBeanMeta.java
 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/httppart/bean/ResponseBeanMeta.java
index 11188da63..d28dc7136 100644
--- 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/httppart/bean/ResponseBeanMeta.java
+++ 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/httppart/bean/ResponseBeanMeta.java
@@ -17,6 +17,7 @@ import static org.apache.juneau.internal.ClassUtils.*;
 import static org.apache.juneau.internal.CollectionUtils.*;
 import static org.apache.juneau.httppart.HttpPartType.*;
 import static org.apache.juneau.annotation.InvalidAnnotationException.*;
+import static org.apache.juneau.common.internal.Utils.*;
 
 import java.io.*;
 import java.lang.reflect.*;
@@ -122,17 +123,17 @@ public class ResponseBeanMeta {
                        hm.put(k, pm);
                        properties.put(pm.getGetter().getName(), pm);
                });
-               this.headerMethods = unmodifiable(hm);
+               this.headerMethods = u(hm);
 
                this.contentMethod = b.contentMethod == null ? null : 
b.contentMethod.schema(schema).build(partSerializer, partParser);
-               this.statusMethod = b.statusMethod == null ? null : 
b.statusMethod.build(empty(), empty());
+               this.statusMethod = b.statusMethod == null ? null : 
b.statusMethod.build(opte(), opte());
 
                if (contentMethod != null)
                        properties.put(contentMethod.getGetter().getName(), 
contentMethod);
                if (statusMethod != null)
                        properties.put(statusMethod.getGetter().getName(), 
statusMethod);
 
-               this.properties = unmodifiable(properties);
+               this.properties = u(properties);
        }
 
        static class Builder {
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 737065b3d..efe615d01 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
@@ -278,7 +278,7 @@ public final class CollectionUtils {
         */
        @SafeVarargs
        public static <E> Set<E> uset(E...values) {
-               return unmodifiable(set(values));
+               return u(set(values));
        }
 
        /**
@@ -292,7 +292,7 @@ public final class CollectionUtils {
        public static <E> List<E> ulist(E...values) {
                if (values == null)
                        return null;
-               return unmodifiable(alist(values));
+               return u(alist(values));
        }
 
        /**
@@ -485,39 +485,39 @@ public final class CollectionUtils {
                return l;
        }
 
-       /**
-        * Wraps the specified list in {@link 
Collections#unmodifiableList(List)}.
-        *
-        * @param <E> The element type.
-        * @param value The list to wrap.
-        * @return The wrapped list.
-        */
-       public static <E> List<E> unmodifiable(List<E> value) {
-               return value == null ? null: 
Collections.unmodifiableList(value);
-       }
-
-       /**
-        * Wraps the specified set in {@link Collections#unmodifiableSet(Set)}.
-        *
-        * @param <E> The element type.
-        * @param value The set to wrap.
-        * @return The wrapped set.
-        */
-       public static <E> Set<E> unmodifiable(Set<E> value) {
-               return value == null ? null: Collections.unmodifiableSet(value);
-       }
-
-       /**
-        * Wraps the specified map in {@link Collections#unmodifiableMap(Map)}.
-        *
-        * @param <K> The key type.
-        * @param <V> The value type.
-        * @param value The map to wrap.
-        * @return The wrapped map.
-        */
-       public static <K,V> Map<K,V> unmodifiable(Map<K,V> value) {
-               return value == null ? null: Collections.unmodifiableMap(value);
-       }
+//     /**
+//      * Wraps the specified list in {@link 
Collections#unmodifiableList(List)}.
+//      *
+//      * @param <E> The element type.
+//      * @param value The list to wrap.
+//      * @return The wrapped list.
+//      */
+//     public static <E> List<E> unmodifiable(List<E> value) {
+//             return value == null ? null: 
Collections.unmodifiableList(value);
+//     }
+//
+//     /**
+//      * Wraps the specified set in {@link Collections#unmodifiableSet(Set)}.
+//      *
+//      * @param <E> The element type.
+//      * @param value The set to wrap.
+//      * @return The wrapped set.
+//      */
+//     public static <E> Set<E> unmodifiable(Set<E> value) {
+//             return value == null ? null: Collections.unmodifiableSet(value);
+//     }
+//
+//     /**
+//      * Wraps the specified map in {@link Collections#unmodifiableMap(Map)}.
+//      *
+//      * @param <K> The key type.
+//      * @param <V> The value type.
+//      * @param value The map to wrap.
+//      * @return The wrapped map.
+//      */
+//     public static <K,V> Map<K,V> unmodifiable(Map<K,V> value) {
+//             return value == null ? null: Collections.unmodifiableMap(value);
+//     }
 
        /**
         * Wraps the specified list in {@link 
Collections#unmodifiableList(List)}.
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 b0ef6671a..106014592 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
@@ -113,7 +113,7 @@ public class SortArgs {
                        }
                        sort.put(s, isDesc);
                });
-               this.sort = unmodifiable(sort);
+               this.sort = u(sort);
        }
 
        /**
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 755f22946..5be49af84 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
@@ -79,7 +79,7 @@ public class ViewArgs {
         *      <br>Values are column names.
         */
        public ViewArgs(Collection<String> viewArgs) {
-               this.view = unmodifiable(listFrom(viewArgs));
+               this.view = u(listFrom(viewArgs));
        }
 
        /**
diff --git 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/svl/VarResolver.java
 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/svl/VarResolver.java
index 13250d466..53f1dcf08 100644
--- 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/svl/VarResolver.java
+++ 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/svl/VarResolver.java
@@ -12,6 +12,7 @@
 // 
***************************************************************************************************************************
 package org.apache.juneau.svl;
 
+import static org.apache.juneau.common.internal.Utils.*;
 import static org.apache.juneau.internal.CollectionUtils.*;
 
 import java.io.*;
@@ -259,7 +260,7 @@ public class VarResolver {
                for (Var v : vars)
                        m.put(v.getName(), v);
 
-               this.varMap = unmodifiable(m);
+               this.varMap = u(m);
                this.beanStore = BeanStore.of(builder.beanStore());
        }
 
diff --git 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/XmlBeanMeta.java
 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/XmlBeanMeta.java
index da52d5f73..a286eec3e 100644
--- 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/XmlBeanMeta.java
+++ 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/XmlBeanMeta.java
@@ -12,6 +12,7 @@
 // 
***************************************************************************************************************************
 package org.apache.juneau.xml;
 
+import static org.apache.juneau.common.internal.Utils.*;
 import static org.apache.juneau.internal.CollectionUtils.*;
 import static org.apache.juneau.xml.annotation.XmlFormat.*;
 
@@ -50,10 +51,10 @@ public class XmlBeanMeta extends ExtendedBeanMeta {
                Class<?> c = beanMeta.getClassMeta().getInnerClass();
                XmlBeanMetaBuilder b = new XmlBeanMetaBuilder(beanMeta, mp);
 
-               attrs = unmodifiable(b.attrs);
-               elements = unmodifiable(b.elements);
+               attrs = u(b.attrs);
+               elements = u(b.elements);
                attrsProperty = b.attrsProperty;
-               collapsedProperties = unmodifiable(b.collapsedProperties);
+               collapsedProperties = u(b.collapsedProperties);
                contentProperty = b.contentProperty;
                contentFormat = b.contentFormat;
 
diff --git 
a/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/remote/RemoteMeta.java
 
b/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/remote/RemoteMeta.java
index 154671a28..804f73738 100644
--- 
a/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/remote/RemoteMeta.java
+++ 
b/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/remote/RemoteMeta.java
@@ -12,7 +12,7 @@
 // 
***************************************************************************************************************************
 package org.apache.juneau.rest.client.remote;
 
-import static org.apache.juneau.common.internal.StringUtils.*;
+import static org.apache.juneau.common.internal.Utils.*;
 import static org.apache.juneau.http.HttpHeaders.*;
 import static org.apache.juneau.internal.ClassUtils.*;
 import static org.apache.juneau.internal.CollectionUtils.*;
@@ -21,6 +21,7 @@ import java.lang.reflect.*;
 import java.util.*;
 
 import org.apache.juneau.*;
+import org.apache.juneau.common.internal.*;
 import org.apache.juneau.http.header.*;
 import org.apache.juneau.http.remote.*;
 import org.apache.juneau.reflect.*;
@@ -59,7 +60,7 @@ public class RemoteMeta {
 
                for (Remote r : remotes) {
                        if (isNotEmpty(r.path()))
-                               path = trimSlashes(resolve(r.path()));
+                               path = 
StringUtils.trimSlashes(resolve(r.path()));
                        for (String h : r.headers())
                                headers.append(stringHeader(resolve(h)));
                        if (isNotEmpty(r.version()))
@@ -85,7 +86,7 @@ public class RemoteMeta {
                        x -> operations.put(x.inner(), new 
RemoteOperationMeta(path2, x.inner(), "GET"))
                );
 
-               this.operations = unmodifiable(operations);
+               this.operations = u(operations);
                this.headers = headers;
        }
 
diff --git 
a/juneau-rest/juneau-rest-common/src/main/java/org/apache/juneau/http/HttpMethod.java
 
b/juneau-rest/juneau-rest-common/src/main/java/org/apache/juneau/http/HttpMethod.java
index e744841d3..d883c7cd9 100644
--- 
a/juneau-rest/juneau-rest-common/src/main/java/org/apache/juneau/http/HttpMethod.java
+++ 
b/juneau-rest/juneau-rest-common/src/main/java/org/apache/juneau/http/HttpMethod.java
@@ -64,7 +64,7 @@ public class HttpMethod {
        /** Represents any HTTP method. */
        public static final String ANY = "*";
 
-       private static final Set<String> NO_BODY_METHODS = 
CollectionUtils.unmodifiable(set("GET","HEAD","DELETE","CONNECT","OPTIONS","TRACE"));
+       private static final Set<String> NO_BODY_METHODS = 
u(set("GET","HEAD","DELETE","CONNECT","OPTIONS","TRACE"));
 
        /**
         * Returns <jk>true</jk> if specified http method has content.
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 617e31781..ebc8593c5 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
@@ -111,7 +111,7 @@ public class Thrown extends BasicCsvHeader {
                super(NAME, value);
                List<Part> l = Utils.list();
                split(value, x -> l.add(new Part(x)));
-               this.value = value == null ? null : unmodifiable(l);
+               this.value = value == null ? null : u(l);
        }
 
        /**
@@ -122,7 +122,7 @@ public class Thrown extends BasicCsvHeader {
         */
        public Thrown(List<Part> value) {
                super(NAME, join(value, ", "));
-               this.value = unmodifiable(value);
+               this.value = u(value);
        }
 
        /**
diff --git 
a/juneau-rest/juneau-rest-common/src/main/java/org/apache/juneau/http/remote/RrpcInterfaceMeta.java
 
b/juneau-rest/juneau-rest-common/src/main/java/org/apache/juneau/http/remote/RrpcInterfaceMeta.java
index 1d959b453..dd59f1c47 100644
--- 
a/juneau-rest/juneau-rest-common/src/main/java/org/apache/juneau/http/remote/RrpcInterfaceMeta.java
+++ 
b/juneau-rest/juneau-rest-common/src/main/java/org/apache/juneau/http/remote/RrpcInterfaceMeta.java
@@ -12,13 +12,14 @@
 // 
***************************************************************************************************************************
 package org.apache.juneau.http.remote;
 
-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.lang.reflect.*;
 import java.util.*;
 
 import org.apache.juneau.*;
+import org.apache.juneau.common.internal.*;
 import org.apache.juneau.reflect.*;
 
 /**
@@ -53,7 +54,7 @@ public class RrpcInterfaceMeta {
                Value<String> path = Value.of("");
                ClassInfo ci = ClassInfo.of(c);
 
-               ci.forEachAnnotation(Remote.class, x -> isNotEmpty(x.path()), x 
-> path.set(trimSlashes(x.path())));
+               ci.forEachAnnotation(Remote.class, x -> isNotEmpty(x.path()), x 
-> path.set(StringUtils.trimSlashes(x.path())));
 
                Map<Method,RrpcInterfaceMethodMeta> methods = map();
                ci.forEachPublicMethod(
@@ -64,8 +65,8 @@ public class RrpcInterfaceMeta {
                Map<String,RrpcInterfaceMethodMeta> methodsByPath = map();
                methods.values().forEach(x -> methodsByPath.put(x.getPath(), 
x));
 
-               this.methods = unmodifiable(methods);
-               this.methodsByPath = unmodifiable(methodsByPath);
+               this.methods = u(methods);
+               this.methodsByPath = u(methodsByPath);
                this.path = path.get();
        }
 
diff --git 
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestChildren.java
 
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestChildren.java
index b2f710ee1..53bc12373 100644
--- 
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestChildren.java
+++ 
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestChildren.java
@@ -12,6 +12,7 @@
 // 
***************************************************************************************************************************
 package org.apache.juneau.rest;
 
+import static org.apache.juneau.common.internal.Utils.*;
 import static org.apache.juneau.internal.CollectionUtils.*;
 
 import java.util.*;
@@ -19,6 +20,7 @@ import java.util.*;
 import jakarta.servlet.*;
 
 import org.apache.juneau.*;
+import org.apache.juneau.common.internal.*;
 import org.apache.juneau.cp.*;
 import org.apache.juneau.internal.*;
 import org.apache.juneau.rest.annotation.*;
@@ -76,7 +78,7 @@ public class RestChildren {
                 */
                protected Builder(BeanStore beanStore) {
                        super(RestChildren.class, beanStore);
-                       list = list();
+                       list = Utils.list();
                }
 
                @Override /* BeanBuilder */
@@ -149,7 +151,7 @@ public class RestChildren {
                                }
                        }
                }
-               return empty();
+               return opte();
        }
 
        /**
@@ -161,7 +163,7 @@ public class RestChildren {
         * @return The children as an unmodifiable map.
         */
        public Map<String,RestContext> asMap() {
-               return unmodifiable(children);
+               return u(children);
        }
 
        
//-----------------------------------------------------------------------------------------------------------------
diff --git 
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestContext.java
 
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestContext.java
index 54beca03c..4837674de 100644
--- 
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestContext.java
+++ 
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestContext.java
@@ -130,7 +130,7 @@ public class RestContext extends Context {
         * @return An unmodifiable map of resource classes to {@link 
RestContext} objects.
         */
        public static final Map<Class<?>, RestContext> getGlobalRegistry() {
-               return unmodifiable(REGISTRY);
+               return u(REGISTRY);
        }
 
        /**
@@ -5535,14 +5535,14 @@ public class RestContext extends Context {
                                ()->{
                                        Set<MediaType> s = opContexts.isEmpty() 
? emptySet() : 
toSet(opContexts.get(0).getSerializers().getSupportedMediaTypes());
                                        opContexts.forEach(x -> 
s.retainAll(x.getSerializers().getSupportedMediaTypes()));
-                                       return unmodifiable(listFrom(s));
+                                       return u(listFrom(s));
                                }
                        );
                        consumes = builder.consumes().orElseGet(
                                ()->{
                                        Set<MediaType> s = opContexts.isEmpty() 
? emptySet() : toSet(opContexts.get(0).getParsers().getSupportedMediaTypes());
                                        opContexts.forEach(x -> 
s.retainAll(x.getParsers().getSupportedMediaTypes()));
-                                       return unmodifiable(listFrom(s));
+                                       return u(listFrom(s));
                                }
                        );
 
@@ -5570,7 +5570,7 @@ public class RestContext extends Context {
                        }
                };
                split(value, x -> s.add(x));
-               return unmodifiable(s);
+               return u(s);
        }
 
        @Override /* Context */
diff --git 
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestOpContext.java
 
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestOpContext.java
index 365a671d3..e4b6b32e5 100644
--- 
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestOpContext.java
+++ 
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestOpContext.java
@@ -14,8 +14,8 @@ package org.apache.juneau.rest;
 
 import static org.apache.juneau.internal.CollectionUtils.*;
 import static org.apache.juneau.collections.JsonMap.*;
-import static org.apache.juneau.common.internal.StringUtils.*;
 import static org.apache.juneau.common.internal.ThrowableUtils.*;
+import static org.apache.juneau.common.internal.Utils.*;
 import static org.apache.juneau.http.HttpHeaders.*;
 import static org.apache.juneau.http.HttpParts.*;
 import static org.apache.juneau.httppart.HttpPartType.*;
@@ -1650,7 +1650,7 @@ public class RestOpContext extends Context implements 
Comparable<RestOpContext>
                                                Header h = (Header)a;
                                                if (def != null) {
                                                        try {
-                                                               
defaultRequestHeaders().set(basicHeader(firstNonEmpty(h.name(), h.value()), 
parseAnything(def)));
+                                                               
defaultRequestHeaders().set(basicHeader(StringUtils.firstNonEmpty(h.name(), 
h.value()), parseAnything(def)));
                                                        } catch (ParseException 
e) {
                                                                throw new 
ConfigException(e, "Malformed @Header annotation");
                                                        }
@@ -1660,7 +1660,7 @@ public class RestOpContext extends Context implements 
Comparable<RestOpContext>
                                                Query h = (Query)a;
                                                if (def != null) {
                                                        try {
-                                                               
defaultRequestQueryData().setDefault(basicPart(firstNonEmpty(h.name(), 
h.value()), parseAnything(def)));
+                                                               
defaultRequestQueryData().setDefault(basicPart(StringUtils.firstNonEmpty(h.name(),
 h.value()), parseAnything(def)));
                                                        } catch (ParseException 
e) {
                                                                throw new 
ConfigException(e, "Malformed @Query annotation");
                                                        }
@@ -1670,7 +1670,7 @@ public class RestOpContext extends Context implements 
Comparable<RestOpContext>
                                                FormData h = (FormData)a;
                                                if (def != null) {
                                                        try {
-                                                               
defaultRequestFormData().setDefault(basicPart(firstNonEmpty(h.name(), 
h.value()), parseAnything(def)));
+                                                               
defaultRequestFormData().setDefault(basicPart(StringUtils.firstNonEmpty(h.name(),
 h.value()), parseAnything(def)));
                                                        } catch (ParseException 
e) {
                                                                throw new 
ConfigException(e, "Malformed @FormData annotation");
                                                        }
@@ -2079,7 +2079,7 @@ public class RestOpContext extends Context implements 
Comparable<RestOpContext>
                @FluentSetter
                public Builder roleGuard(String value) {
                        if (roleGuard == null)
-                               roleGuard = set(value);
+                               roleGuard = Utils.set(value);
                        else
                                roleGuard.add(value);
                        return this;
@@ -2204,7 +2204,7 @@ public class RestOpContext extends Context implements 
Comparable<RestOpContext>
                private String joinnlFirstNonEmptyArray(String[]...s) {
                        for (String[] ss : s)
                                if (ss.length > 0)
-                                       return joinnl(ss);
+                                       return StringUtils.joinnl(ss);
                        return null;
                }
 
@@ -2293,8 +2293,8 @@ public class RestOpContext extends Context implements 
Comparable<RestOpContext>
                        pathMatchers = bs.add(UrlPathMatcher[].class, 
builder.getPathMatchers().asArray());
                        bs.addBean(UrlPathMatcher.class, pathMatchers.length > 
0 ? pathMatchers[0] : null);
 
-                       supportedAcceptTypes = unmodifiable(builder.produces != 
null ? builder.produces : serializers.getSupportedMediaTypes());
-                       supportedContentTypes = unmodifiable(builder.consumes 
!= null ? builder.consumes : parsers.getSupportedMediaTypes());
+                       supportedAcceptTypes = u(builder.produces != null ? 
builder.produces : serializers.getSupportedMediaTypes());
+                       supportedContentTypes = u(builder.consumes != null ? 
builder.consumes : parsers.getSupportedMediaTypes());
 
                        defaultRequestHeaders = builder.defaultRequestHeaders();
                        defaultResponseHeaders = 
builder.defaultResponseHeaders();
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 2f093d595..da8c1182e 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
@@ -187,7 +187,7 @@ public class ThrownStore {
                        s = parent.get().ignoreClasses;
                if (s == null)
                        s = Collections.emptySet();
-               this.ignoreClasses = unmodifiable(s);
+               this.ignoreClasses = u(s);
        }
 
 
diff --git 
a/juneau-utest/src/test/java/org/apache/juneau/SerializerProperties_ComboRoundTripTest.java
 
b/juneau-utest/src/test/java/org/apache/juneau/SerializerProperties_ComboRoundTripTest.java
index 0deaa49e8..0ded7098a 100644
--- 
a/juneau-utest/src/test/java/org/apache/juneau/SerializerProperties_ComboRoundTripTest.java
+++ 
b/juneau-utest/src/test/java/org/apache/juneau/SerializerProperties_ComboRoundTripTest.java
@@ -133,7 +133,7 @@ class SerializerProperties_ComboRoundTripTest extends 
ComboRoundTripTest_Base {
                        .rdfXmlR("<rdf:RDF>\n  <rdf:Seq>\n    
<rdf:li>a</rdf:li>\n    <rdf:li>b</rdf:li>\n    <rdf:li>c</rdf:li>\n  
</rdf:Seq>\n</rdf:RDF>\n")
                        .apply(Serializer.Builder.class, 
Builder::sortCollections)
                        .build(),
-               tester(5, "SERIALIZER_sortMaps", Map.class, 
CollectionUtils.unmodifiable(map("c","3","a","1","b","2")))
+               tester(5, "SERIALIZER_sortMaps", Map.class, 
u(map("c","3","a","1","b","2")))
                        .json("{a:'1',b:'2',c:'3'}")
                        .jsonT("{a:'1',b:'2',c:'3'}")
                        .jsonR("{\n\ta: '1',\n\tb: '2',\n\tc: '3'\n}")


Reply via email to