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

garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-beanutils.git


The following commit(s) were added to refs/heads/master by this push:
     new a62b1d1c Sort members.
a62b1d1c is described below

commit a62b1d1cc1d67e8caf38133c7f81c91d08e5f476
Author: Gary Gregory <[email protected]>
AuthorDate: Sat Jul 18 14:17:32 2026 -0700

    Sort members.
---
 .../commons/beanutils2/PropertyUtilsBean.java      | 34 +++++++++++-----------
 .../org/apache/commons/beanutils2/BeanMapTest.java | 18 ++++++------
 .../commons/beanutils2/WrapDynaClassTest.java      | 32 ++++++++++----------
 .../beanutils2/converters/ColorConverterTest.java  | 14 ++++-----
 4 files changed, 49 insertions(+), 49 deletions(-)

diff --git a/src/main/java/org/apache/commons/beanutils2/PropertyUtilsBean.java 
b/src/main/java/org/apache/commons/beanutils2/PropertyUtilsBean.java
index 7232d88d..be0f3066 100644
--- a/src/main/java/org/apache/commons/beanutils2/PropertyUtilsBean.java
+++ b/src/main/java/org/apache/commons/beanutils2/PropertyUtilsBean.java
@@ -705,23 +705,6 @@ public class PropertyUtilsBean {
         return result;
     }
 
-    /**
-     * Tests whether a property name has been removed by a registered {@link 
SuppressPropertiesBeanIntrospector}. The mapped-descriptor fallback in
-     * {@link #getPropertyDescriptor(Object, String)} bypasses the 
introspection pipeline, so suppressed mapped property names must be filtered 
explicitly.
-     *
-     * @param name The property name to test.
-     * @return {@code true} if the name is suppressed by an introspector.
-     */
-    private boolean isPropertySuppressed(final String name) {
-        for (final BeanIntrospector introspector : introspectors) {
-            if (introspector instanceof SuppressPropertiesBeanIntrospector
-                    && ((SuppressPropertiesBeanIntrospector) 
introspector).getSuppressedProperties().contains(name)) {
-                return true;
-            }
-        }
-        return false;
-    }
-
     /**
      * <p>
      * Retrieve the property descriptors for the specified class, 
introspecting and caching them the first time a particular bean class is 
encountered.
@@ -1082,6 +1065,23 @@ public class PropertyUtilsBean {
         }
     }
 
+    /**
+     * Tests whether a property name has been removed by a registered {@link 
SuppressPropertiesBeanIntrospector}. The mapped-descriptor fallback in
+     * {@link #getPropertyDescriptor(Object, String)} bypasses the 
introspection pipeline, so suppressed mapped property names must be filtered 
explicitly.
+     *
+     * @param name The property name to test.
+     * @return {@code true} if the name is suppressed by an introspector.
+     */
+    private boolean isPropertySuppressed(final String name) {
+        for (final BeanIntrospector introspector : introspectors) {
+            if (introspector instanceof SuppressPropertiesBeanIntrospector
+                    && ((SuppressPropertiesBeanIntrospector) 
introspector).getSuppressedProperties().contains(name)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
     /**
      * Return {@code true} if the specified property name identifies a 
readable property on the specified bean; otherwise, return {@code false}.
      *
diff --git a/src/test/java/org/apache/commons/beanutils2/BeanMapTest.java 
b/src/test/java/org/apache/commons/beanutils2/BeanMapTest.java
index 33f5f706..071eb45c 100644
--- a/src/test/java/org/apache/commons/beanutils2/BeanMapTest.java
+++ b/src/test/java/org/apache/commons/beanutils2/BeanMapTest.java
@@ -285,6 +285,15 @@ class BeanMapTest extends AbstractMapTest<BeanMap, String, 
Object> {
         }
     }
 
+    @Test
+    void testBeanMapPutAllWriteable() {
+        final BeanMap map1 = (BeanMap) makeFullMap();
+        final BeanMap map2 = (BeanMap) makeFullMap();
+        map2.put("someIntValue", Integer.valueOf(0));
+        map1.putAllWriteable(map2);
+        assertEquals(map1.get("someIntValue"), Integer.valueOf(0));
+    }
+
     /**
      * The {@code class} and (for enums) {@code declaringClass} 
pseudo-properties expose the bean's {@link ClassLoader} and must not be 
reachable through the map,
      * matching the suppression {@link PropertyUtilsBean} applies by default.
@@ -302,15 +311,6 @@ class BeanMapTest extends AbstractMapTest<BeanMap, String, 
Object> {
         assertNull(enumMap.get("declaringClass"));
     }
 
-    @Test
-    void testBeanMapPutAllWriteable() {
-        final BeanMap map1 = (BeanMap) makeFullMap();
-        final BeanMap map2 = (BeanMap) makeFullMap();
-        map2.put("someIntValue", Integer.valueOf(0));
-        map1.putAllWriteable(map2);
-        assertEquals(map1.get("someIntValue"), Integer.valueOf(0));
-    }
-
     /**
      * Test that the cause of exception thrown by clear() is initialized.
      */
diff --git a/src/test/java/org/apache/commons/beanutils2/WrapDynaClassTest.java 
b/src/test/java/org/apache/commons/beanutils2/WrapDynaClassTest.java
index 4b9d3038..785e1304 100644
--- a/src/test/java/org/apache/commons/beanutils2/WrapDynaClassTest.java
+++ b/src/test/java/org/apache/commons/beanutils2/WrapDynaClassTest.java
@@ -36,6 +36,22 @@ import org.junit.jupiter.api.Test;
  */
 class WrapDynaClassTest {
 
+    /**
+     * Simple bean used as a cache key.
+     */
+    public static final class ConcurrentBean {
+
+        private String value;
+
+        public String getValue() {
+            return value;
+        }
+
+        public void setValue(final String value) {
+            this.value = value;
+        }
+    }
+
     /**
      * The cache key is one bean class, so {@code createDynaClass} must hand 
back a single instance no matter how many threads race to populate the
      * per-classloader cache. With a plain {@code WeakHashMap} the non-atomic 
{@code computeIfAbsent} let concurrent callers build and return distinct
@@ -83,20 +99,4 @@ class WrapDynaClassTest {
         assertSame(first, WrapDynaClass.createDynaClass(ConcurrentBean.class));
         WrapDynaClass.clear();
     }
-
-    /**
-     * Simple bean used as a cache key.
-     */
-    public static final class ConcurrentBean {
-
-        private String value;
-
-        public String getValue() {
-            return value;
-        }
-
-        public void setValue(final String value) {
-            this.value = value;
-        }
-    }
 }
diff --git 
a/src/test/java/org/apache/commons/beanutils2/converters/ColorConverterTest.java
 
b/src/test/java/org/apache/commons/beanutils2/converters/ColorConverterTest.java
index 0bba5c84..463387ee 100644
--- 
a/src/test/java/org/apache/commons/beanutils2/converters/ColorConverterTest.java
+++ 
b/src/test/java/org/apache/commons/beanutils2/converters/ColorConverterTest.java
@@ -105,6 +105,13 @@ class ColorConverterTest {
         assertEquals(expected, actual);
     }
 
+    @Test
+    void testConvertingLiteralHex() {
+        final Color expected = Color.BLUE;
+        final Color actual = converter.convert(Color.class, "0x0000FF");
+        assertEquals(expected, actual);
+    }
+
     @Test
     void testConvertingOutOfRangeComponentRejected() {
         assertThrows(ConversionException.class, () -> 
converter.convert(Color.class, "1234,5,6"));
@@ -114,13 +121,6 @@ class ColorConverterTest {
         assertThrows(ConversionException.class, () -> 
converter.convert(Color.class, "0,0,2550"));
     }
 
-    @Test
-    void testConvertingLiteralHex() {
-        final Color expected = Color.BLUE;
-        final Color actual = converter.convert(Color.class, "0x0000FF");
-        assertEquals(expected, actual);
-    }
-
     @Test
     void testConvertingPattern() {
         final Color expected = Color.BLACK;

Reply via email to