File tree Expand file tree Collapse file tree
src/main/java/com/fasterxml/jackson/databind/util Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,6 +6,8 @@ Project: jackson-databind
66
772.17.0 (not yet released)
88
9+ #4205 : Consider types in `sun.*` package(s) to be JDK (platform) types
10+ for purposes of handling
911#4209 : Make `BeanDeserializerModifier`/`BeanSerializerModifier`
1012 implement `java.io.Serializable`
1113 (fix contributed by Muhammad K)
Original file line number Diff line number Diff line change @@ -1146,20 +1146,24 @@ public static boolean isJacksonStdImpl(Class<?> implClass) {
11461146
11471147 /**
11481148 * Accessor for checking whether given {@code Class} is under Java package
1149- * of {@code java.*} or {@code javax.*} (including all sub-packages).
1149+ * of {@code java.*} or {@code javax.*} (including all sub-packages), or
1150+ * (starting with Jackson 2.17), {@code sun.*}).
11501151 *<p>
11511152 * Added since some aspects of handling need to be changed for JDK types (and
11521153 * possibly some extensions under {@code javax.}?): for example, forcing of access
11531154 * will not work well for future JDKs (12 and later).
11541155 *<p>
11551156 * Note: in Jackson 2.11 only returned true for {@code java.*} (and not {@code javax.*});
1156- * was changed in 2.12.
1157+ * was changed in 2.12. {@code sun.*} was added in 2.17.
11571158 *
11581159 * @since 2.11
11591160 */
11601161 public static boolean isJDKClass (Class <?> rawType ) {
11611162 final String clsName = rawType .getName ();
1162- return clsName .startsWith ("java." ) || clsName .startsWith ("javax." );
1163+ return clsName .startsWith ("java." )
1164+ || clsName .startsWith ("javax." )
1165+ || clsName .startsWith ("sun." )
1166+ ;
11631167 }
11641168
11651169 /**
You can’t perform that action at this time.
0 commit comments