Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ion/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ tree model)
<dependency>
<groupId>com.amazon.ion</groupId>
<artifactId>ion-java</artifactId>
<version>1.11.1</version>
<version>1.11.2</version>
</dependency>

<!-- Extends Jackson core, databind -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,16 +273,7 @@ public String getText() throws IOException
case VALUE_STRING:
try {
return _reader.stringValue();
} catch (IonException
// stringValue() will throw an UnknownSymbolException if we're
// trying to get the text for a symbol id that cannot be resolved.
// stringValue() has an assert statement which could throw an
| AssertionError e
// AssertionError if we're trying to get the text with a symbol
// id less than or equals to 0. This is a bug in ion-java that
// will be fixed by https://github.com/amazon-ion/ion-java/issues/702
// at which point this AssertionError clause should be removed.
) {
} catch (IonException e) {
return _reportCorruptContent(e);
}
case VALUE_NUMBER_INT:
Expand Down Expand Up @@ -658,12 +649,6 @@ public JsonToken nextToken() throws IOException
} catch (IonException e) {
return _reportCorruptContent(e);

} catch (AssertionError e) {
// [dataformats-binary#432]: AssertionError if we're trying to get the text
// with a symbol id less than or equals to 0. This is a bug in ion-java that
// will be fixed by https://github.com/amazon-ion/ion-java/issues/702
// at which point this AssertionError clause should be removed.
return _reportCorruptContent(e);
}
if (type == null) {
if (_parsingContext.inRoot()) { // EOF?
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.fasterxml.jackson.dataformat.ion.failing;
package com.fasterxml.jackson.dataformat.ion.fuzz;

import org.hamcrest.Matchers;
import org.junit.Test;
Expand All @@ -24,7 +24,6 @@ public void testFuzz66149_NegativeArraySize() throws Exception {
ION_MAPPER.readTree(doc);
fail("Should not pass (invalid content)");
} catch (StreamReadException e) {
// May or may not be the exception message to get, change as appropriate
assertThat(e.getMessage(), Matchers.containsString("Corrupt content to decode"));
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.fasterxml.jackson.dataformat.ion.failing;
package com.fasterxml.jackson.dataformat.ion.fuzz;

import org.hamcrest.Matchers;
import org.junit.Test;
Expand All @@ -24,8 +24,7 @@ public void testFuzz66141_AssertionError() throws Exception {
ION_MAPPER.readValue(doc, java.util.Date.class);
fail("Should not pass (invalid content)");
} catch (StreamReadException e) {
// May or may not be the exception message to get, change as appropriate
assertThat(e.getMessage(), Matchers.containsString("Corrupt content to decode"));
assertThat(e.getMessage(), Matchers.containsString("Corrupt Number value to decode"));
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.fasterxml.jackson.dataformat.ion.failing;
package com.fasterxml.jackson.dataformat.ion.fuzz;

import org.hamcrest.Matchers;
import org.junit.Test;
Expand Down