commit
a0d5af9c35
BIN
jackson-1.9.11-15.oe1.src.rpm
Normal file
BIN
jackson-1.9.11-15.oe1.src.rpm
Normal file
Binary file not shown.
15
jackson-1.9.11-javadoc.patch
Normal file
15
jackson-1.9.11-javadoc.patch
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
--- a/build.xml 2013-09-25 16:31:19.058162819 +0200
|
||||||
|
+++ b/build.xml-gil 2013-09-25 16:51:15.985892622 +0200
|
||||||
|
@@ -324,6 +324,12 @@
|
||||||
|
<fileset dir="${dir.lib}/jaxrs">
|
||||||
|
<include name="*.jar" />
|
||||||
|
</fileset>
|
||||||
|
+ <fileset dir="${dir.lib}/ext">
|
||||||
|
+ <include name="*.jar" />
|
||||||
|
+ </fileset>
|
||||||
|
+ <fileset dir="${dir.lib}/ext/asm">
|
||||||
|
+ <include name="*.jar" />
|
||||||
|
+ </fileset>
|
||||||
|
</classpath>
|
||||||
|
|
||||||
|
<packageset dir="${dir.src.java.core}" defaultexcludes="yes">
|
||||||
415
jackson-1.9.11-to-1.9.13.patch
Normal file
415
jackson-1.9.11-to-1.9.13.patch
Normal file
@ -0,0 +1,415 @@
|
|||||||
|
diff -Nru jackson-src-1.9.11/src/java/org/codehaus/jackson/impl/Utf8StreamParser.java jackson-src-1.9.11-gil/src/java/org/codehaus/jackson/impl/Utf8StreamParser.java
|
||||||
|
--- jackson-src-1.9.11/src/java/org/codehaus/jackson/impl/Utf8StreamParser.java 2012-11-06 17:24:50.000000000 +0100
|
||||||
|
+++ jackson-src-1.9.11-gil/src/java/org/codehaus/jackson/impl/Utf8StreamParser.java 2013-02-13 18:45:26.000000000 +0100
|
||||||
|
@@ -730,7 +730,7 @@
|
||||||
|
{
|
||||||
|
// very first thing: common case, colon, value, no white space
|
||||||
|
int i;
|
||||||
|
- if (_inputPtr < _inputEnd && _inputBuffer[_inputPtr] == INT_COLON) { // fast case first
|
||||||
|
+ if (_inputPtr < (_inputEnd-1) && _inputBuffer[_inputPtr] == INT_COLON) { // fast case first
|
||||||
|
++_inputPtr;
|
||||||
|
i = _inputBuffer[_inputPtr++];
|
||||||
|
if (i == INT_QUOTE) {
|
||||||
|
@@ -2359,6 +2359,7 @@
|
||||||
|
switch (i) {
|
||||||
|
case INT_SPACE:
|
||||||
|
case INT_TAB:
|
||||||
|
+ break;
|
||||||
|
case INT_CR:
|
||||||
|
_skipCR();
|
||||||
|
break;
|
||||||
|
@@ -2374,11 +2375,11 @@
|
||||||
|
}
|
||||||
|
break space_loop;
|
||||||
|
}
|
||||||
|
+ if (_inputPtr >= _inputEnd) {
|
||||||
|
+ loadMoreGuaranteed();
|
||||||
|
+ }
|
||||||
|
+ i = _inputBuffer[_inputPtr++] & 0xFF;
|
||||||
|
}
|
||||||
|
- if (_inputPtr >= _inputEnd) {
|
||||||
|
- loadMoreGuaranteed();
|
||||||
|
- }
|
||||||
|
- i = _inputBuffer[_inputPtr++] & 0xFF;
|
||||||
|
if (i != INT_COLON) {
|
||||||
|
_reportUnexpectedChar(i, "was expecting a colon to separate field name and value");
|
||||||
|
}
|
||||||
|
diff -Nru jackson-src-1.9.11/src/java/org/codehaus/jackson/io/JsonStringEncoder.java jackson-src-1.9.11-gil/src/java/org/codehaus/jackson/io/JsonStringEncoder.java
|
||||||
|
--- jackson-src-1.9.11/src/java/org/codehaus/jackson/io/JsonStringEncoder.java 2012-11-06 17:24:51.000000000 +0100
|
||||||
|
+++ jackson-src-1.9.11-gil/src/java/org/codehaus/jackson/io/JsonStringEncoder.java 2013-01-15 21:03:48.000000000 +0100
|
||||||
|
@@ -129,8 +129,12 @@
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// something to escape; 2 or 6-char variant?
|
||||||
|
- int escCode = escCodes[input.charAt(inPtr++)];
|
||||||
|
- int length = _appendSingleEscape(escCode, _quoteBuffer);
|
||||||
|
+ char d = input.charAt(inPtr++);
|
||||||
|
+ int escCode = escCodes[d];
|
||||||
|
+ int length = (escCode < 0)
|
||||||
|
+ ? _appendNumericEscape(d, _quoteBuffer)
|
||||||
|
+ : _appendNamedEscape(escCode, _quoteBuffer);
|
||||||
|
+ ;
|
||||||
|
if ((outPtr + length) > outputBuffer.length) {
|
||||||
|
int first = outputBuffer.length - outPtr;
|
||||||
|
if (first > 0) {
|
||||||
|
@@ -144,7 +148,6 @@
|
||||||
|
System.arraycopy(_quoteBuffer, 0, outputBuffer, outPtr, length);
|
||||||
|
outPtr += length;
|
||||||
|
}
|
||||||
|
-
|
||||||
|
}
|
||||||
|
textBuffer.setCurrentLength(outPtr);
|
||||||
|
return textBuffer.contentsAsArray();
|
||||||
|
@@ -249,6 +252,7 @@
|
||||||
|
* Will encode given String as UTF-8 (without any quoting), return
|
||||||
|
* resulting byte array.
|
||||||
|
*/
|
||||||
|
+ @SuppressWarnings("resource")
|
||||||
|
public byte[] encodeAsUTF8(String text)
|
||||||
|
{
|
||||||
|
ByteArrayBuilder byteBuilder = _byteBuilder;
|
||||||
|
@@ -341,16 +345,17 @@
|
||||||
|
/**********************************************************
|
||||||
|
*/
|
||||||
|
|
||||||
|
- private int _appendSingleEscape(int escCode, char[] quoteBuffer)
|
||||||
|
+ private int _appendNumericEscape(int value, char[] quoteBuffer)
|
||||||
|
+ {
|
||||||
|
+ quoteBuffer[1] = 'u';
|
||||||
|
+ // We know it's a control char, so only the last 2 chars are non-0
|
||||||
|
+ quoteBuffer[4] = HEX_CHARS[value >> 4];
|
||||||
|
+ quoteBuffer[5] = HEX_CHARS[value & 0xF];
|
||||||
|
+ return 6;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ private int _appendNamedEscape(int escCode, char[] quoteBuffer)
|
||||||
|
{
|
||||||
|
- if (escCode < 0) { // control char, value -(char + 1)
|
||||||
|
- int value = -(escCode + 1);
|
||||||
|
- quoteBuffer[1] = 'u';
|
||||||
|
- // We know it's a control char, so only the last 2 chars are non-0
|
||||||
|
- quoteBuffer[4] = HEX_CHARS[value >> 4];
|
||||||
|
- quoteBuffer[5] = HEX_CHARS[value & 0xF];
|
||||||
|
- return 6;
|
||||||
|
- }
|
||||||
|
quoteBuffer[1] = (char) escCode;
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
diff -Nru jackson-src-1.9.11/src/java/org/codehaus/jackson/io/UTF32Reader.java jackson-src-1.9.11-gil/src/java/org/codehaus/jackson/io/UTF32Reader.java
|
||||||
|
--- jackson-src-1.9.11/src/java/org/codehaus/jackson/io/UTF32Reader.java 2012-11-06 17:24:51.000000000 +0100
|
||||||
|
+++ jackson-src-1.9.11-gil/src/java/org/codehaus/jackson/io/UTF32Reader.java 2012-11-15 18:51:10.000000000 +0100
|
||||||
|
@@ -2,52 +2,54 @@
|
||||||
|
|
||||||
|
import java.io.*;
|
||||||
|
|
||||||
|
-
|
||||||
|
/**
|
||||||
|
* Since JDK does not come with UTF-32/UCS-4, let's implement a simple
|
||||||
|
* decoder to use.
|
||||||
|
*/
|
||||||
|
-public final class UTF32Reader
|
||||||
|
+public class UTF32Reader
|
||||||
|
extends BaseReader
|
||||||
|
{
|
||||||
|
- final boolean mBigEndian;
|
||||||
|
+ protected final boolean _bigEndian;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Although input is fine with full Unicode set, Java still uses
|
||||||
|
* 16-bit chars, so we may have to split high-order chars into
|
||||||
|
* surrogate pairs.
|
||||||
|
*/
|
||||||
|
- char mSurrogate = NULL_CHAR;
|
||||||
|
+ protected char _surrogate = NULL_CHAR;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Total read character count; used for error reporting purposes
|
||||||
|
*/
|
||||||
|
- int mCharCount = 0;
|
||||||
|
+ protected int _charCount = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Total read byte count; used for error reporting purposes
|
||||||
|
*/
|
||||||
|
- int mByteCount = 0;
|
||||||
|
+ protected int _byteCount = 0;
|
||||||
|
|
||||||
|
+ protected final boolean _managedBuffers;
|
||||||
|
+
|
||||||
|
/*
|
||||||
|
- ////////////////////////////////////////
|
||||||
|
- // Life-cycle
|
||||||
|
- ////////////////////////////////////////
|
||||||
|
- */
|
||||||
|
+ /**********************************************************
|
||||||
|
+ /* Life-cycle
|
||||||
|
+ /**********************************************************
|
||||||
|
+ */
|
||||||
|
|
||||||
|
public UTF32Reader(IOContext ctxt,
|
||||||
|
- InputStream in, byte[] buf, int ptr, int len,
|
||||||
|
- boolean isBigEndian)
|
||||||
|
+ InputStream in, byte[] buf, int ptr, int len,
|
||||||
|
+ boolean isBigEndian)
|
||||||
|
{
|
||||||
|
super(ctxt, in, buf, ptr, len);
|
||||||
|
- mBigEndian = isBigEndian;
|
||||||
|
+ _bigEndian = isBigEndian;
|
||||||
|
+ _managedBuffers = (in != null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
- ////////////////////////////////////////
|
||||||
|
- // Public API
|
||||||
|
- ////////////////////////////////////////
|
||||||
|
- */
|
||||||
|
+ /**********************************************************
|
||||||
|
+ /* Public API
|
||||||
|
+ /**********************************************************
|
||||||
|
+ */
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int read(char[] cbuf, int start, int len)
|
||||||
|
@@ -69,9 +71,9 @@
|
||||||
|
int outPtr = start;
|
||||||
|
|
||||||
|
// Ok, first; do we have a surrogate from last round?
|
||||||
|
- if (mSurrogate != NULL_CHAR) {
|
||||||
|
- cbuf[outPtr++] = mSurrogate;
|
||||||
|
- mSurrogate = NULL_CHAR;
|
||||||
|
+ if (_surrogate != NULL_CHAR) {
|
||||||
|
+ cbuf[outPtr++] = _surrogate;
|
||||||
|
+ _surrogate = NULL_CHAR;
|
||||||
|
// No need to load more, already got one char
|
||||||
|
} else {
|
||||||
|
/* Note: we'll try to avoid blocking as much as possible. As a
|
||||||
|
@@ -90,7 +92,7 @@
|
||||||
|
int ptr = _ptr;
|
||||||
|
int ch;
|
||||||
|
|
||||||
|
- if (mBigEndian) {
|
||||||
|
+ if (_bigEndian) {
|
||||||
|
ch = (_buffer[ptr] << 24) | ((_buffer[ptr+1] & 0xFF) << 16)
|
||||||
|
| ((_buffer[ptr+2] & 0xFF) << 8) | (_buffer[ptr+3] & 0xFF);
|
||||||
|
} else {
|
||||||
|
@@ -112,7 +114,7 @@
|
||||||
|
ch = (0xDC00 | (ch & 0x03FF));
|
||||||
|
// Room for second part?
|
||||||
|
if (outPtr >= len) { // nope
|
||||||
|
- mSurrogate = (char) ch;
|
||||||
|
+ _surrogate = (char) ch;
|
||||||
|
break main_loop;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@@ -123,36 +125,34 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
len = outPtr - start;
|
||||||
|
- mCharCount += len;
|
||||||
|
+ _charCount += len;
|
||||||
|
return len;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
- ////////////////////////////////////////
|
||||||
|
- // Internal methods
|
||||||
|
- ////////////////////////////////////////
|
||||||
|
- */
|
||||||
|
+ /**********************************************************
|
||||||
|
+ /* Internal methods
|
||||||
|
+ /**********************************************************
|
||||||
|
+ */
|
||||||
|
|
||||||
|
private void reportUnexpectedEOF(int gotBytes, int needed)
|
||||||
|
throws IOException
|
||||||
|
{
|
||||||
|
- int bytePos = mByteCount + gotBytes;
|
||||||
|
- int charPos = mCharCount;
|
||||||
|
+ int bytePos = _byteCount + gotBytes;
|
||||||
|
+ int charPos = _charCount;
|
||||||
|
|
||||||
|
throw new CharConversionException("Unexpected EOF in the middle of a 4-byte UTF-32 char: got "
|
||||||
|
- +gotBytes+", needed "+needed
|
||||||
|
- +", at char #"+charPos+", byte #"+bytePos+")");
|
||||||
|
+ +gotBytes+", needed "+needed+", at char #"+charPos+", byte #"+bytePos+")");
|
||||||
|
}
|
||||||
|
|
||||||
|
private void reportInvalid(int value, int offset, String msg)
|
||||||
|
throws IOException
|
||||||
|
{
|
||||||
|
- int bytePos = mByteCount + _ptr - 1;
|
||||||
|
- int charPos = mCharCount + offset;
|
||||||
|
+ int bytePos = _byteCount + _ptr - 1;
|
||||||
|
+ int charPos = _charCount + offset;
|
||||||
|
|
||||||
|
throw new CharConversionException("Invalid UTF-32 character 0x"
|
||||||
|
- +Integer.toHexString(value)
|
||||||
|
- +msg+" at char #"+charPos+", byte #"+bytePos+")");
|
||||||
|
+ +Integer.toHexString(value)+msg+" at char #"+charPos+", byte #"+bytePos+")");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
@@ -164,7 +164,7 @@
|
||||||
|
private boolean loadMore(int available)
|
||||||
|
throws IOException
|
||||||
|
{
|
||||||
|
- mByteCount += (_length - available);
|
||||||
|
+ _byteCount += (_length - available);
|
||||||
|
|
||||||
|
// Bytes that need to be moved to the beginning of buffer?
|
||||||
|
if (available > 0) {
|
||||||
|
@@ -180,11 +180,13 @@
|
||||||
|
* so let's do a separate read right away:
|
||||||
|
*/
|
||||||
|
_ptr = 0;
|
||||||
|
- int count = _in.read(_buffer);
|
||||||
|
+ int count = (_in == null) ? -1 : _in.read(_buffer);
|
||||||
|
if (count < 1) {
|
||||||
|
_length = 0;
|
||||||
|
if (count < 0) { // -1
|
||||||
|
- freeBuffers(); // to help GC?
|
||||||
|
+ if (_managedBuffers) {
|
||||||
|
+ freeBuffers(); // to help GC?
|
||||||
|
+ }
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
// 0 count is no good; let's err out
|
||||||
|
@@ -197,10 +199,12 @@
|
||||||
|
* error.
|
||||||
|
*/
|
||||||
|
while (_length < 4) {
|
||||||
|
- int count = _in.read(_buffer, _length, _buffer.length - _length);
|
||||||
|
+ int count = (_in == null) ? -1 : _in.read(_buffer, _length, _buffer.length - _length);
|
||||||
|
if (count < 1) {
|
||||||
|
if (count < 0) { // -1, EOF... no good!
|
||||||
|
- freeBuffers(); // to help GC?
|
||||||
|
+ if (_managedBuffers) {
|
||||||
|
+ freeBuffers(); // to help GC?
|
||||||
|
+ }
|
||||||
|
reportUnexpectedEOF(_length, 4);
|
||||||
|
}
|
||||||
|
// 0 count is no good; let's err out
|
||||||
|
@@ -211,4 +215,3 @@
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
-
|
||||||
|
diff -Nru jackson-src-1.9.11/src/mapper/java/org/codehaus/jackson/map/AnnotationIntrospector.java jackson-src-1.9.11-gil/src/mapper/java/org/codehaus/jackson/map/AnnotationIntrospector.java
|
||||||
|
--- jackson-src-1.9.11/src/mapper/java/org/codehaus/jackson/map/AnnotationIntrospector.java 2012-11-06 17:24:51.000000000 +0100
|
||||||
|
+++ jackson-src-1.9.11-gil/src/mapper/java/org/codehaus/jackson/map/AnnotationIntrospector.java 2012-11-08 13:26:56.000000000 +0100
|
||||||
|
@@ -637,10 +637,15 @@
|
||||||
|
* Method for determining the String value to use for serializing
|
||||||
|
* given enumeration entry; used when serializing enumerations
|
||||||
|
* as Strings (the standard method).
|
||||||
|
+ *<p>
|
||||||
|
+ * NOTE: implemented since 1.9.11, to make things work even when
|
||||||
|
+ * annotation introspection is disabled.
|
||||||
|
*
|
||||||
|
* @return Serialized enum value.
|
||||||
|
*/
|
||||||
|
- public abstract String findEnumValue(Enum<?> value);
|
||||||
|
+ public String findEnumValue(Enum<?> value) {
|
||||||
|
+ return value.name();
|
||||||
|
+ }
|
||||||
|
|
||||||
|
/*
|
||||||
|
/**********************************************************
|
||||||
|
diff -Nru jackson-src-1.9.11/src/mapper/java/org/codehaus/jackson/map/deser/std/ClassDeserializer.java jackson-src-1.9.11-gil/src/mapper/java/org/codehaus/jackson/map/deser/std/ClassDeserializer.java
|
||||||
|
--- jackson-src-1.9.11/src/mapper/java/org/codehaus/jackson/map/deser/std/ClassDeserializer.java 2012-11-06 17:24:51.000000000 +0100
|
||||||
|
+++ jackson-src-1.9.11-gil/src/mapper/java/org/codehaus/jackson/map/deser/std/ClassDeserializer.java 2012-11-16 19:30:42.000000000 +0100
|
||||||
|
@@ -7,6 +7,7 @@
|
||||||
|
import org.codehaus.jackson.JsonToken;
|
||||||
|
import org.codehaus.jackson.map.DeserializationContext;
|
||||||
|
import org.codehaus.jackson.map.annotate.JacksonStdImpl;
|
||||||
|
+import org.codehaus.jackson.map.util.ClassUtil;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
@@ -26,20 +27,8 @@
|
||||||
|
// Currently will only accept if given simple class name
|
||||||
|
if (curr == JsonToken.VALUE_STRING) {
|
||||||
|
String className = jp.getText();
|
||||||
|
- // [JACKSON-597]: support primitive types (and void)
|
||||||
|
- if (className.indexOf('.') < 0) {
|
||||||
|
- if ("int".equals(className)) return Integer.TYPE;
|
||||||
|
- if ("long".equals(className)) return Long.TYPE;
|
||||||
|
- if ("float".equals(className)) return Float.TYPE;
|
||||||
|
- if ("double".equals(className)) return Double.TYPE;
|
||||||
|
- if ("boolean".equals(className)) return Boolean.TYPE;
|
||||||
|
- if ("byte".equals(className)) return Byte.TYPE;
|
||||||
|
- if ("char".equals(className)) return Character.TYPE;
|
||||||
|
- if ("short".equals(className)) return Short.TYPE;
|
||||||
|
- if ("void".equals(className)) return Void.TYPE;
|
||||||
|
- }
|
||||||
|
try {
|
||||||
|
- return Class.forName(jp.getText());
|
||||||
|
+ return ClassUtil.findClass(className);
|
||||||
|
} catch (ClassNotFoundException e) {
|
||||||
|
throw ctxt.instantiationException(_valueClass, e);
|
||||||
|
}
|
||||||
|
diff -Nru jackson-src-1.9.11/src/mapper/java/org/codehaus/jackson/map/deser/StdDeserializerProvider.java jackson-src-1.9.11-gil/src/mapper/java/org/codehaus/jackson/map/deser/StdDeserializerProvider.java
|
||||||
|
--- jackson-src-1.9.11/src/mapper/java/org/codehaus/jackson/map/deser/StdDeserializerProvider.java 2012-11-06 17:24:51.000000000 +0100
|
||||||
|
+++ jackson-src-1.9.11-gil/src/mapper/java/org/codehaus/jackson/map/deser/StdDeserializerProvider.java 2013-03-01 19:29:20.000000000 +0100
|
||||||
|
@@ -469,6 +469,16 @@
|
||||||
|
// should never happen? (if it can, could call on that object)
|
||||||
|
throw new IllegalStateException("Type-wrapped deserializer's deserializeWithType should never get called");
|
||||||
|
}
|
||||||
|
- }
|
||||||
|
|
||||||
|
+ @Override
|
||||||
|
+ public Object deserialize(JsonParser jp, DeserializationContext ctxt,
|
||||||
|
+ Object intoValue)
|
||||||
|
+ throws IOException, JsonProcessingException
|
||||||
|
+ {
|
||||||
|
+ /* 01-Mar-2013, tatu: Hmmh. Tough call as to what to do... need
|
||||||
|
+ * to delegate, but will this work reliably? Let's just hope so:
|
||||||
|
+ */
|
||||||
|
+ return _deserializer.deserialize(jp, ctxt, intoValue);
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
diff -Nru jackson-src-1.9.11/src/mapper/java/org/codehaus/jackson/map/introspect/NopAnnotationIntrospector.java jackson-src-1.9.11-gil/src/mapper/java/org/codehaus/jackson/map/introspect/NopAnnotationIntrospector.java
|
||||||
|
--- jackson-src-1.9.11/src/mapper/java/org/codehaus/jackson/map/introspect/NopAnnotationIntrospector.java 2012-11-06 17:24:51.000000000 +0100
|
||||||
|
+++ jackson-src-1.9.11-gil/src/mapper/java/org/codehaus/jackson/map/introspect/NopAnnotationIntrospector.java 2012-11-08 13:31:02.000000000 +0100
|
||||||
|
@@ -42,7 +42,8 @@
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String findEnumValue(Enum<?> value) {
|
||||||
|
- return null;
|
||||||
|
+ // as per [JACKSON-875]
|
||||||
|
+ return value.name();
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
diff -Nru jackson-src-1.9.11/src/mapper/java/org/codehaus/jackson/map/JsonDeserializer.java jackson-src-1.9.11-gil/src/mapper/java/org/codehaus/jackson/map/JsonDeserializer.java
|
||||||
|
--- jackson-src-1.9.11/src/mapper/java/org/codehaus/jackson/map/JsonDeserializer.java 2012-11-06 17:24:51.000000000 +0100
|
||||||
|
+++ jackson-src-1.9.11-gil/src/mapper/java/org/codehaus/jackson/map/JsonDeserializer.java 2013-03-01 19:28:18.000000000 +0100
|
||||||
|
@@ -61,7 +61,8 @@
|
||||||
|
T intoValue)
|
||||||
|
throws IOException, JsonProcessingException
|
||||||
|
{
|
||||||
|
- throw new UnsupportedOperationException();
|
||||||
|
+ throw new UnsupportedOperationException("Can not update object of type "
|
||||||
|
+ +intoValue.getClass().getName()+" (by deserializer of type "+getClass().getName()+")");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
diff -Nru jackson-src-1.9.11/src/mapper/java/org/codehaus/jackson/map/type/TypeBindings.java jackson-src-1.9.11-gil/src/mapper/java/org/codehaus/jackson/map/type/TypeBindings.java
|
||||||
|
--- jackson-src-1.9.11/src/mapper/java/org/codehaus/jackson/map/type/TypeBindings.java 2012-11-06 17:24:51.000000000 +0100
|
||||||
|
+++ jackson-src-1.9.11-gil/src/mapper/java/org/codehaus/jackson/map/type/TypeBindings.java 2013-02-08 22:11:42.000000000 +0100
|
||||||
|
@@ -287,7 +287,14 @@
|
||||||
|
* need to call getEnclosingClass since anonymous classes declare
|
||||||
|
* generics
|
||||||
|
*/
|
||||||
|
- _resolveBindings(raw.getDeclaringClass());
|
||||||
|
+ Class<?> decl = raw.getDeclaringClass();
|
||||||
|
+ /* 08-Feb-2013, tatu: Except that if context is also super-class, we must
|
||||||
|
+ * skip it; context will be checked anyway, and we'd get StackOverflow if
|
||||||
|
+ * we went there.
|
||||||
|
+ */
|
||||||
|
+ if (decl != null && !decl.isAssignableFrom(raw)) {
|
||||||
|
+ _resolveBindings(raw.getDeclaringClass());
|
||||||
|
+ }
|
||||||
|
/* 24-Mar-2010, tatu: Can not have true generics definitions, but can
|
||||||
|
* have lower bounds ("<T extends BeanBase>") in declaration itself
|
||||||
|
*/
|
||||||
98
jackson-build-plain-jars-instead-of-osgi-bundles.patch
Normal file
98
jackson-build-plain-jars-instead-of-osgi-bundles.patch
Normal file
@ -0,0 +1,98 @@
|
|||||||
|
From 8cfd6868e1d8c5eb4816682f32d137b551dcab05 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Juan Hernandez <juan.hernandez@redhat.com>
|
||||||
|
Date: Tue, 14 Feb 2012 18:27:09 +0100
|
||||||
|
Subject: [PATCH 1/2] Build plain jar files instead of OSGi bundles
|
||||||
|
|
||||||
|
In order to avoid dependending on BND.
|
||||||
|
---
|
||||||
|
ant/build-jars.xml | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
build.xml | 2 +-
|
||||||
|
2 files changed, 65 insertions(+), 1 deletions(-)
|
||||||
|
create mode 100644 ant/build-jars.xml
|
||||||
|
|
||||||
|
diff --git a/ant/build-jars.xml b/ant/build-jars.xml
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..1267948
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/ant/build-jars.xml
|
||||||
|
@@ -0,0 +1,64 @@
|
||||||
|
+<?xml version="1.0" standalone='yes'?>
|
||||||
|
+
|
||||||
|
+<project name="Plain jar files for Jackson" basedir=".">
|
||||||
|
+
|
||||||
|
+ <target name="jars.asl" depends="jar.core.asl, jar.mapper.asl"/>
|
||||||
|
+ <target name="jars.lgpl" depends=""/>
|
||||||
|
+ <target name="jars.other" depends="jar.jaxrs, jar.xc, jar.smile, jar.mrbean"/>
|
||||||
|
+ <target name="jars.tools" depends="jar.tool.smile"/>
|
||||||
|
+
|
||||||
|
+ <target name="jar.core.asl" depends="compile.core">
|
||||||
|
+ <jar destfile="${dir.build}/jackson-core-asl-${IMPL_VERSION}.jar">
|
||||||
|
+ <fileset dir="${dir.build.classes.core}"/>
|
||||||
|
+ </jar>
|
||||||
|
+ </target>
|
||||||
|
+
|
||||||
|
+ <target name="jar.mapper.asl" depends="compile.mapper">
|
||||||
|
+ <jar destfile="${dir.build}/jackson-mapper-asl-${IMPL_VERSION}.jar">
|
||||||
|
+ <fileset dir="${dir.build.classes.mapper}"/>
|
||||||
|
+ </jar>
|
||||||
|
+ </target>
|
||||||
|
+
|
||||||
|
+ <target name="jar.jaxrs" depends="compile.jaxrs">
|
||||||
|
+ <jar destfile="${dir.build}/jackson-jaxrs-${IMPL_VERSION}.jar">
|
||||||
|
+ <fileset dir="${dir.build.classes.jaxrs}"/>
|
||||||
|
+ </jar>
|
||||||
|
+ </target>
|
||||||
|
+
|
||||||
|
+ <target name="jar.mrbean" depends="compile.mrbean">
|
||||||
|
+ <jar destfile="${dir.build}/jackson-mrbean-${IMPL_VERSION}.jar">
|
||||||
|
+ <fileset dir="${dir.build.classes.mrbean}"/>
|
||||||
|
+ </jar>
|
||||||
|
+ </target>
|
||||||
|
+
|
||||||
|
+ <target name="jar.xc" depends="compile.xc">
|
||||||
|
+ <jar destfile="${dir.build}/jackson-xc-${IMPL_VERSION}.jar">
|
||||||
|
+ <fileset dir="${dir.build.classes.xc}"/>
|
||||||
|
+ </jar>
|
||||||
|
+ </target>
|
||||||
|
+
|
||||||
|
+ <target name="jar.smile" depends="compile.smile">
|
||||||
|
+ <jar destfile="${dir.build}/jackson-smile-${IMPL_VERSION}.jar">
|
||||||
|
+ <fileset dir="${dir.build.classes.smile}"/>
|
||||||
|
+ </jar>
|
||||||
|
+ </target>
|
||||||
|
+
|
||||||
|
+ <target name="jar.tool.smile" depends="compile.smile, jar.core.asl, jar.smile">
|
||||||
|
+ <jar destfile="${dir.build}/smile-tool-${IMPL_VERSION}.jar">
|
||||||
|
+ <manifest>
|
||||||
|
+ <attribute name="Built-By" value="${user.name}"/>
|
||||||
|
+ <attribute name="Implementation-Title" value="Smile Tool"/>
|
||||||
|
+ <attribute name="Implementation-Version" value="${IMPL_VERSION}"/>
|
||||||
|
+ <attribute name="Implementation-Vendor" value="${IMPL_VENDOR}"/>
|
||||||
|
+ <attribute name="Main-Class" value="org.codehaus.jackson.smile.Tool"/>
|
||||||
|
+ </manifest>
|
||||||
|
+ <fileset dir="${dir.build.classes.core}">
|
||||||
|
+ <include name="org/codehaus/jackson/**/*.class" />
|
||||||
|
+ </fileset>
|
||||||
|
+ <fileset dir="${dir.build.classes.smile}">
|
||||||
|
+ <include name="org/codehaus/jackson/**/*.class" />
|
||||||
|
+ </fileset>
|
||||||
|
+ </jar>
|
||||||
|
+ </target>
|
||||||
|
+
|
||||||
|
+</project>
|
||||||
|
diff --git a/build.xml b/build.xml
|
||||||
|
index 4f1432d..4613994 100644
|
||||||
|
--- a/build.xml
|
||||||
|
+++ b/build.xml
|
||||||
|
@@ -74,7 +74,7 @@
|
||||||
|
</patternset>
|
||||||
|
|
||||||
|
<!-- some build tasks are refactored out of the main task -->
|
||||||
|
- <import file="ant/build-osgi.xml" />
|
||||||
|
+ <import file="ant/build-jars.xml" />
|
||||||
|
<import file="ant/build-maven-deploy.xml" />
|
||||||
|
<import file="ant/build-coverage.xml" />
|
||||||
|
<import file="ant/build-test.xml" />
|
||||||
|
--
|
||||||
|
1.7.9
|
||||||
|
|
||||||
32
jackson-dont-require-repackaged-asm.patch
Normal file
32
jackson-dont-require-repackaged-asm.patch
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
From d05e128aa7c5ef7b2699b044fa33a799375f1acc Mon Sep 17 00:00:00 2001
|
||||||
|
From: Juan Hernandez <juan.hernandez@redhat.com>
|
||||||
|
Date: Tue, 14 Feb 2012 18:28:20 +0100
|
||||||
|
Subject: [PATCH 2/2] Don't require repackaged asm
|
||||||
|
|
||||||
|
To avoid bringing in additional dependencies to do the repackaging.
|
||||||
|
|
||||||
|
The repackaging is done in order to avoid version problems, but we should have
|
||||||
|
solved that already in Fedora.
|
||||||
|
---
|
||||||
|
.../org/codehaus/jackson/mrbean/BeanBuilder.java | 4 ++--
|
||||||
|
1 files changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/mrbean/java/org/codehaus/jackson/mrbean/BeanBuilder.java b/src/mrbean/java/org/codehaus/jackson/mrbean/BeanBuilder.java
|
||||||
|
index b03ca0a..cbbc92d 100644
|
||||||
|
--- a/src/mrbean/java/org/codehaus/jackson/mrbean/BeanBuilder.java
|
||||||
|
+++ b/src/mrbean/java/org/codehaus/jackson/mrbean/BeanBuilder.java
|
||||||
|
@@ -3,9 +3,9 @@ package org.codehaus.jackson.mrbean;
|
||||||
|
import java.lang.reflect.Method;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
-import org.codehaus.jackson.org.objectweb.asm.*;
|
||||||
|
+import org.objectweb.asm.*;
|
||||||
|
|
||||||
|
-import static org.codehaus.jackson.org.objectweb.asm.Opcodes.*;
|
||||||
|
+import static org.objectweb.asm.Opcodes.*;
|
||||||
|
|
||||||
|
import org.codehaus.jackson.type.JavaType;
|
||||||
|
import org.codehaus.jackson.map.DeserializationConfig;
|
||||||
|
--
|
||||||
|
1.7.9
|
||||||
|
|
||||||
BIN
jackson-src-1.9.11.tar.gz
Normal file
BIN
jackson-src-1.9.11.tar.gz
Normal file
Binary file not shown.
73
jackson.spec
Normal file
73
jackson.spec
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
Name: jackson
|
||||||
|
Version: 1.9.11
|
||||||
|
Release: 15
|
||||||
|
Summary: Jackson Java JSON-processor
|
||||||
|
License: ASL2.0 and LGPLv2
|
||||||
|
URL: https://github.com/codehaus/jackson
|
||||||
|
Source0: http://apt.linuxfans.org/magic/3.0/sources/SOURCES.j/jackson/jackson-src-1.9.11.tar.gz
|
||||||
|
Patch0001: jackson-build-plain-jars-instead-of-osgi-bundles.patch
|
||||||
|
Patch0002: jackson-dont-require-repackaged-asm.patch
|
||||||
|
Patch0003: jackson-1.9.11-to-1.9.13.patch
|
||||||
|
Patch0004: jackson-1.9.11-javadoc.patch
|
||||||
|
BuildArch: noarch
|
||||||
|
Requires: joda-time >= 1.6.2 stax2-api >= 3.1.1 jsr-311 >= 1.1.1 objectweb-asm3 >= 3.3
|
||||||
|
BuildRequires: javapackages-local ant >= 1.8.2 joda-time >= 1.6.2 stax2-api >= 3.1.1
|
||||||
|
BuildRequires: jsr-311 >= 1.1.1 objectweb-asm3 >= 3.3 cglib >= 2.2 groovy18 >= 1.8.5
|
||||||
|
|
||||||
|
%description
|
||||||
|
JSON processor written in Java., it also offers full node-based Tree
|
||||||
|
Model, as well as full Object/Json Mapper data binding functionality.
|
||||||
|
|
||||||
|
%package help
|
||||||
|
Summary: Documentation for jackson package
|
||||||
|
Provides: jackson-javadoc = %{version}-%{release}
|
||||||
|
Obsoletes: jackson-javadoc < %{version}-%{release}
|
||||||
|
|
||||||
|
%description help
|
||||||
|
Documentation for jackson package.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -n jackson-src-%{version} -p1
|
||||||
|
|
||||||
|
find . -type f -name '*.jar' |xargs rm -f
|
||||||
|
find . -type f -name 'TestHibernate.java' |xargs rm -f
|
||||||
|
find . -type f -name 'TestJsonPerf.java' |xargs rm -f
|
||||||
|
find . -type f -name 'TestGoogleCollections.java' |xargs rm -f
|
||||||
|
|
||||||
|
ln -s $(build-classpath joda-time) lib/ext/joda-time.jar
|
||||||
|
ln -s $(build-classpath stax2-api) lib/xml/sta2-api.jar
|
||||||
|
ln -s $(build-classpath jsr-311) lib/jaxrs/jsr-311.jar
|
||||||
|
ln -s $(build-classpath objectweb-asm3/asm) lib/ext/asm/asm.jar
|
||||||
|
ln -s $(build-classpath objectweb-asm3/asm) lib/repackaged/jackson-asm.jar
|
||||||
|
ln -s $(build-classpath cglib/cglib) lib/ext/cglib/cglib-nodep.jar
|
||||||
|
ln -s $(build-classpath groovy18-1.8) lib/ext/groovy/groovy.jar
|
||||||
|
ln -s $(build-classpath junit) lib/junit/junit.jar
|
||||||
|
|
||||||
|
sed -i "s/59 Temple Place/51 Franklin Street/" release-notes/lgpl/LGPL2.1
|
||||||
|
sed -i "s/Suite 330/Fifth Floor/" release-notes/lgpl/LGPL2.1
|
||||||
|
sed -i "s/02111-1307/02110-1301/" release-notes/lgpl/LGPL2.1
|
||||||
|
|
||||||
|
native2ascii -encoding UTF8 src/test/org/codehaus/jackson/jaxrs/TestUntouchables.java \
|
||||||
|
src/test/org/codehaus/jackson/jaxrs/TestUntouchables.java
|
||||||
|
|
||||||
|
%build
|
||||||
|
ant dist
|
||||||
|
|
||||||
|
%install
|
||||||
|
%mvn_artifact dist/jackson-core-asl-%{version}.pom dist/jackson-core-asl-%{version}.jar
|
||||||
|
%mvn_artifact dist/jackson-mapper-asl-%{version}.pom dist/jackson-mapper-asl-%{version}.jar
|
||||||
|
%mvn_artifact dist/jackson-xc-%{version}.pom dist/jackson-xc-%{version}.jar
|
||||||
|
%mvn_artifact dist/jackson-smile-%{version}.pom dist/jackson-smile-%{version}.jar
|
||||||
|
%mvn_artifact dist/jackson-mrbean-%{version}.pom dist/jackson-mrbean-%{version}.jar
|
||||||
|
%mvn_artifact dist/jackson-jaxrs-%{version}.pom dist/jackson-jaxrs-%{version}.jar
|
||||||
|
%mvn_install -J dist/javadoc/
|
||||||
|
|
||||||
|
%files -f .mfiles
|
||||||
|
%doc release-notes
|
||||||
|
|
||||||
|
%files help -f .mfiles-javadoc
|
||||||
|
%doc README.txt
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Fri Dec 20 2019 zhujunhao <zhujunhao5@huawei.com> 1.9.11-15
|
||||||
|
- Package init
|
||||||
Loading…
x
Reference in New Issue
Block a user