garydgregory commented on code in PR #1328:
URL: https://github.com/apache/commons-lang/pull/1328#discussion_r1875063083


##########
src/main/java/org/apache/commons/lang3/builder/Reflection.java:
##########
@@ -18,13 +18,62 @@
 package org.apache.commons.lang3.builder;
 
 import java.lang.reflect.Field;
+import java.time.Duration;
+import java.time.Instant;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+import java.time.LocalTime;
+import java.time.OffsetDateTime;
+import java.time.OffsetTime;
+import java.time.Period;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Map;
 import java.util.Objects;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
 
 /**
  * Package-private reflection code.
  */
 final class Reflection {
 
+    /**
+     * Some classes known to not be introspectable.
+     * Those are classes where we would blow up when we try to access internal 
information via reflection.
+     */
+    private static final Set<Class> KNOWN_NON_INTROSPECTIBLE_CLASSES = new 
HashSet<>();
+    {
+        KNOWN_NON_INTROSPECTIBLE_CLASSES.addAll(Arrays.asList(
+                Boolean.class,
+                Character.class,
+                String.class,
+                Byte.class,
+                Short.class,
+                Integer.class,
+                Long.class,
+                Float.class,
+                Double.class,
+                java.util.Date.class,
+                java.sql.Date.class,

Review Comment:
   This is not specific to this PR: I don't think we should introduce a _new 
JPMS module dependency_, here on `java.sql`. Lang does not use any classes from 
`java.sql` so this would drag in a new JPMS module. For 4.0, we've mentioned 
dropping our dependency on `java.desktop` and only depending on `java.base`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to