We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dfcbd72 commit 1c5a171Copy full SHA for 1c5a171
src/main/java/com/caucho/hessian/io/SerializerFactory.java
@@ -760,12 +760,20 @@ protected static void addAbstractStringBuilderSupport() {
760
}
761
762
763
- private static boolean isZoneId(Class cl) {
+ private static Class<?> ZONE_ID_CLASS_CACHE = null;
764
+
765
+ static {
766
try {
- return isHigherThanJdk8 && Class.forName("java.time.ZoneId").isAssignableFrom(cl);
767
+ ZONE_ID_CLASS_CACHE = Class.forName("java.time.ZoneId");
768
} catch (ClassNotFoundException e) {
769
// ignore
770
771
+ }
772
773
+ private static boolean isZoneId(Class cl) {
774
+ if (ZONE_ID_CLASS_CACHE != null) {
775
+ return isHigherThanJdk8 && ZONE_ID_CLASS_CACHE.isAssignableFrom(cl);
776
777
return false;
778
779
0 commit comments