From 44d2b9830da1203a0929a1c0cedc97f35f561a6a Mon Sep 17 00:00:00 2001 From: Rebeca Gallardo Date: Fri, 20 Oct 2023 17:47:40 -0600 Subject: [PATCH] Spelling fixes --- .../com/netflix/archaius/api/ArchaiusType.java | 10 +++++----- .../com/netflix/archaius/ConfigProxyFactory.java | 14 +++++++------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/archaius2-api/src/main/java/com/netflix/archaius/api/ArchaiusType.java b/archaius2-api/src/main/java/com/netflix/archaius/api/ArchaiusType.java index 59a19b8d..b2223600 100644 --- a/archaius2-api/src/main/java/com/netflix/archaius/api/ArchaiusType.java +++ b/archaius2-api/src/main/java/com/netflix/archaius/api/ArchaiusType.java @@ -23,19 +23,19 @@ */ public class ArchaiusType implements ParameterizedType { - /** Return a ParametrizedType to represent a {@code List} */ + /** Return a parameterizedType to represent a {@code List} */ public static ParameterizedType forListOf(Class listValuesType) { Class maybeWrappedType = PRIMITIVE_WRAPPERS.getOrDefault(listValuesType, listValuesType); return new ArchaiusType(List.class, new Class[] { maybeWrappedType }); } - /** Return a ParametrizedType to represent a {@code Set} */ + /** Return a parameterizedType to represent a {@code Set} */ public static ParameterizedType forSetOf(Class setValuesType) { Class maybeWrappedType = PRIMITIVE_WRAPPERS.getOrDefault(setValuesType, setValuesType); return new ArchaiusType(Set.class, new Class[] { maybeWrappedType }); } - /** Return a ParametrizedType to represent a {@code Map} */ + /** Return a parameterizedType to represent a {@code Map} */ public static ParameterizedType forMapOf(Class mapKeysTpe, Class mapValuesType) { Class maybeWrappedKeyType = PRIMITIVE_WRAPPERS.getOrDefault(mapKeysTpe, mapKeysTpe); Class maybeWrappedValuesType = PRIMITIVE_WRAPPERS.getOrDefault(mapValuesType, mapValuesType); @@ -68,7 +68,7 @@ private ArchaiusType(Class rawType, Class[] typeArguments) { if (rawType.isArray() || rawType.isPrimitive() || rawType.getTypeParameters().length != typeArguments.length) { - throw new IllegalArgumentException("The provided rawType and arguments don't look like a supported parametrized type"); + throw new IllegalArgumentException("The provided rawType and arguments don't look like a supported parameterized type"); } } @@ -90,6 +90,6 @@ public Type getOwnerType() { @Override public String toString() { String typeArgumentNames = Arrays.stream(typeArguments).map(Class::getSimpleName).collect(Collectors.joining(",")); - return String.format("ParametrizedType for %s<%s>", rawType.getSimpleName(), typeArgumentNames); + return String.format("parameterizedType for %s<%s>", rawType.getSimpleName(), typeArgumentNames); } } diff --git a/archaius2-core/src/main/java/com/netflix/archaius/ConfigProxyFactory.java b/archaius2-core/src/main/java/com/netflix/archaius/ConfigProxyFactory.java index 5327ae97..1bac2fcd 100644 --- a/archaius2-core/src/main/java/com/netflix/archaius/ConfigProxyFactory.java +++ b/archaius2-core/src/main/java/com/netflix/archaius/ConfigProxyFactory.java @@ -206,7 +206,7 @@ T newProxy(final Class type, final String initialPrefix, boolean immutabl if (immutable) { // Cache the current value of the property and always return that. - // Note that this will fail for parametrized properties! + // Note that this will fail for parameterized properties! Object value = methodInvokerHolder.invoker.invoke(new Object[]{}); invokers.put(method, (args) -> value); } else { @@ -246,7 +246,7 @@ private MethodInvokerHolder buildInvokerForMethod(Class type, String pref propertyValueGetter = createInterfaceProperty(propName, newProxy(returnType, propName, immutable)); } else if (m.getParameterCount() > 0) { - // A parametrized property. Note that this requires a @PropertyName annotation to extract the interpolation positions! + // A parameterized property. Note that this requires a @PropertyName annotation to extract the interpolation positions! if (nameAnnot == null) { throw new IllegalArgumentException("Missing @PropertyName annotation on " + m.getDeclaringClass().getName() + "#" + m.getName()); } @@ -354,7 +354,7 @@ private static Function createDefaultMethodSupplier(Method meth return (T) methodHandle.invokeWithArguments(args); } else { // This is a handle to a method WITH arguments, being called with none. This happens when toString() - // is trying to build a representation of a proxy that has a parametrized property AND the interface + // is trying to build a representation of a proxy that has a parameterized property AND the interface // provides a default method for it. There's no good default to return here, so we'll just use null return null; } @@ -385,7 +385,7 @@ protected PropertyValueGetter createScalarProperty(final Type type, final } /** - * A value getter for a parametrized property. Takes the arguments passed to the method call and interpolates them + * A value getter for a parameterized property. Takes the arguments passed to the method call and interpolates them * into the property name from the method's @PropertyName annotation, then returns the value set in config for the * computed property name. If not set, it forwards the call with the same parameters to the defaultValueSupplier. */ @@ -394,7 +394,7 @@ protected PropertyValueGetter createParameterizedProperty(final Class return args -> { if (args == null) { - // Why would args be null if this is a parametrized property? Because toString() abuses its + // Why would args be null if this is a parameterized property? Because toString() abuses its // access to this internal representation :-/ // We'll fall back to trying to call the provider for the default value. That works properly if // it comes from an annotation or the known collections. Our wrapper for default interface methods @@ -465,7 +465,7 @@ public Object invoke(Object proxy, Method method, Object[] args) throws NoSuchMe /** * Create a reasonable string representation of the proxy object: "InterfaceName[propName=currentValue, ...]". - * For the case of parametrized properties, fudges it and just uses "null" as the value. + * For the case of parameterized properties, fudges it and just uses "null" as the value. */ private String proxyToString() { String propertyNamesAndValues = invokers.entrySet().stream() @@ -480,7 +480,7 @@ private String toNameAndValue(Map.Entry> entry) { String propertyName = propertyNames.get(entry.getKey()).substring(prefix.length()); Object propertyValue; try { - // This call should fail for parametrized properties, because the PropertyValueGetter has a non-empty + // This call should fail for parameterized properties, because the PropertyValueGetter has a non-empty // argument list. Fortunately, the implementation there cooperates with us and returns a null instead :-) propertyValue = entry.getValue().invoke(null); } catch (Exception e) {