Skip to content

Commit f453da8

Browse files
xerialclaude
andcommitted
Fix Jackson deprecation warnings in MessagePackFactory
Replace deprecated _createContext(Object, boolean) calls with _createContext(ContentReference, boolean) to eliminate warnings when running tests with Jackson 2.18.4. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 3021550 commit f453da8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

msgpack-jackson/src/main/java/org/msgpack/jackson/dataformat/MessagePackFactory.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import com.fasterxml.jackson.core.JsonFactory;
2020
import com.fasterxml.jackson.core.JsonGenerator;
2121
import com.fasterxml.jackson.core.JsonParser;
22+
import com.fasterxml.jackson.core.io.ContentReference;
2223
import com.fasterxml.jackson.core.io.IOContext;
2324
import org.msgpack.core.MessagePack;
2425
import org.msgpack.core.annotations.VisibleForTesting;
@@ -111,15 +112,15 @@ public JsonGenerator createGenerator(Writer w)
111112
public JsonParser createParser(byte[] data)
112113
throws IOException
113114
{
114-
IOContext ioContext = _createContext(data, false);
115+
IOContext ioContext = _createContext(ContentReference.rawReference(data), false);
115116
return _createParser(data, 0, data.length, ioContext);
116117
}
117118

118119
@Override
119120
public JsonParser createParser(InputStream in)
120121
throws IOException
121122
{
122-
IOContext ioContext = _createContext(in, false);
123+
IOContext ioContext = _createContext(ContentReference.rawReference(in), false);
123124
return _createParser(in, ioContext);
124125
}
125126

0 commit comments

Comments
 (0)