File tree 2 files changed +9
-3
lines changed
src/main/java/com/fasterxml/jackson/databind/util
2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,8 @@ Project: jackson-databind
6
6
7
7
2.17.0 (not yet released)
8
8
9
+ #4205 : Consider types in `sun.*` package(s) to be JDK (platform) types
10
+ for purposes of handling
9
11
#4209 : Make `BeanDeserializerModifier`/`BeanSerializerModifier`
10
12
implement `java.io.Serializable`
11
13
(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) {
1146
1146
1147
1147
/**
1148
1148
* 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.*}).
1150
1151
*<p>
1151
1152
* Added since some aspects of handling need to be changed for JDK types (and
1152
1153
* possibly some extensions under {@code javax.}?): for example, forcing of access
1153
1154
* will not work well for future JDKs (12 and later).
1154
1155
*<p>
1155
1156
* 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.
1157
1158
*
1158
1159
* @since 2.11
1159
1160
*/
1160
1161
public static boolean isJDKClass (Class <?> rawType ) {
1161
1162
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
+ ;
1163
1167
}
1164
1168
1165
1169
/**
You can’t perform that action at this time.
0 commit comments