Skip to content

Commit 147fb08

Browse files
committed
Fix #1628 for 2.7(.10)
1 parent 86c43de commit 147fb08

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

release-notes/VERSION

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ Project: jackson-databind
44
=== Releases ===
55
------------------------------------------------------------------------
66

7-
2.7.9.2 (not yet released)
7+
2.7.10 (not yet released)
88

99
#1607: @JsonIdentityReference not used when setup on class only
1010
(reported by vboulaye@github)
11+
#1628: Don't print to error stream about failure to load JDK 7 types
12+
(reported by Villane@github)
1113

1214
2.7.9.1 (18-Apr-2017)
1315

src/main/java/com/fasterxml/jackson/databind/ext/OptionalHandlerFactory.java

+7-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
package com.fasterxml.jackson.databind.ext;
22

3+
import java.util.logging.Logger;
4+
import java.util.logging.Level;
5+
36
import com.fasterxml.jackson.databind.*;
47
import com.fasterxml.jackson.databind.deser.Deserializers;
58
import com.fasterxml.jackson.databind.ser.Serializers;
@@ -52,7 +55,8 @@ public class OptionalHandlerFactory implements java.io.Serializable
5255
doc = org.w3c.dom.Document.class;
5356
} catch (Exception e) {
5457
// not optimal but will do
55-
System.err.println("WARNING: could not load DOM Node and/or Document classes");
58+
Logger.getLogger("com.fasterxml.jackson.databind.ext.OptionalHandlerFactory")
59+
.log(Level.INFO, "Could not load DOM `Node` and/or `Document` classes: ignoring");
5660
}
5761
CLASS_DOM_NODE = node;
5862
CLASS_DOM_DOCUMENT = doc;
@@ -68,8 +72,8 @@ public class OptionalHandlerFactory implements java.io.Serializable
6872
try {
6973
cls = Class.forName("java.nio.file.Path");
7074
} catch (Exception e) {
71-
// not optimal but will do
72-
System.err.println("WARNING: could not load Java7 Path class");
75+
Logger.getLogger("com.fasterxml.jackson.databind.ext.OptionalHandlerFactory")
76+
.log(Level.INFO, "Could not load Java7 `java.nio.file.Path` class: ignoring");
7377
}
7478
CLASS_JAVA7_PATH = cls;
7579
}

0 commit comments

Comments
 (0)