From 00382727bd5ffc79193494503c941f2f0279ed14 Mon Sep 17 00:00:00 2001 From: Yoann Vernageau <6807151+yvrng@users.noreply.github.com> Date: Mon, 1 Apr 2024 19:23:54 +0200 Subject: [PATCH] Allow custom writer configurations in IonSystemBuilder --- build.gradle.kts | 2 +- config/spotbugs/baseline.xml | 1515 ++++++++--------- .../amazon/ion/system/IonSystemBuilder.java | 137 +- .../ion/system/IonSystemBuilderTest.java | 28 + 4 files changed, 882 insertions(+), 800 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 773a793dd3..1d7ae0975f 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -322,7 +322,7 @@ tasks { "xsltproc", "--output", spotbugsBaselineFile, "$rootDir/config/spotbugs/baseline.xslt", - "${outputLocation.get()}/spotBugs" + "${outputLocation.get()}" ) } } diff --git a/config/spotbugs/baseline.xml b/config/spotbugs/baseline.xml index 79b19a3ce6..0960fbe2f0 100644 --- a/config/spotbugs/baseline.xml +++ b/config/spotbugs/baseline.xml @@ -1,266 +1,266 @@ - + Possible null pointer dereference on branch that might be infeasible Possible null pointer dereference of Timestamp._fraction on branch that might be infeasible in com.amazon.ion.Timestamp.equals(Timestamp) - - At Timestamp.java:[lines 74-2870] + + At Timestamp.java:[lines 74-2884] In class com.amazon.ion.Timestamp - + In method com.amazon.ion.Timestamp.equals(Timestamp) - + In Timestamp.java Value contained in com.amazon.ion.Timestamp._fraction - - Dereferenced at Timestamp.java:[line 2794] + + Dereferenced at Timestamp.java:[line 2808] - - Known null at Timestamp.java:[line 2790] + + Known null at Timestamp.java:[line 2804] Suspicious reference comparison Suspicious comparison of Integer references in com.amazon.ion.Timestamp.make_localtime() - - At Timestamp.java:[lines 74-2870] + + At Timestamp.java:[lines 74-2884] In class com.amazon.ion.Timestamp - + In method com.amazon.ion.Timestamp.make_localtime() - - At Integer.java:[lines 59-1825] + + At Integer.java:[lines 52-1590] Actual type Integer - + In Timestamp.java Value loaded from field com.amazon.ion.Timestamp._offset - - At Timestamp.java:[line 1236] + + At Timestamp.java:[line 1249] Suspicious reference comparison to constant Suspicious comparison of a Integer reference to constant in com.amazon.ion.Timestamp.print(Appendable, Timestamp) - - At Timestamp.java:[lines 74-2870] + + At Timestamp.java:[lines 74-2884] In class com.amazon.ion.Timestamp - + In method com.amazon.ion.Timestamp.print(Appendable, Timestamp) - - At Integer.java:[lines 59-1825] + + At Integer.java:[lines 52-1590] Actual type Integer - + In Timestamp.java Value loaded from field com.amazon.ion.Timestamp.UNKNOWN_OFFSET - - At Timestamp.java:[line 2157] + + At Timestamp.java:[line 2171] - - Another occurrence at Timestamp.java:[line 2165] + + Another occurrence at Timestamp.java:[line 2179] - - Another occurrence at Timestamp.java:[line 2173] + + Another occurrence at Timestamp.java:[line 2187] - - Another occurrence at Timestamp.java:[line 2191] + + Another occurrence at Timestamp.java:[line 2205] Suspicious reference comparison to constant Suspicious comparison of a Integer reference to constant in com.amazon.ion.Timestamp.printZ(Appendable) - - At Timestamp.java:[lines 74-2870] + + At Timestamp.java:[lines 74-2884] In class com.amazon.ion.Timestamp - + In method com.amazon.ion.Timestamp.printZ(Appendable) - - At Integer.java:[lines 59-1825] + + At Integer.java:[lines 52-1590] Actual type Integer - + In Timestamp.java Value loaded from field com.amazon.ion.Timestamp.UNKNOWN_OFFSET - - At Timestamp.java:[line 2117] + + At Timestamp.java:[line 2131] Suspicious reference comparison to constant Suspicious comparison of a Integer reference to constant in com.amazon.ion.Timestamp.set_fields_from_calendar(Calendar, Timestamp$Precision, boolean) - - At Timestamp.java:[lines 74-2870] + + At Timestamp.java:[lines 74-2884] In class com.amazon.ion.Timestamp - + In method com.amazon.ion.Timestamp.set_fields_from_calendar(Calendar, Timestamp$Precision, boolean) - - At Integer.java:[lines 59-1825] + + At Integer.java:[lines 52-1590] Actual type Integer - + In Timestamp.java Value loaded from field com.amazon.ion.Timestamp.UNKNOWN_OFFSET - - At Timestamp.java:[line 434] + + At Timestamp.java:[line 436] Switch statement found where one case falls through to the next case Switch statement found in new com.amazon.ion.Timestamp(BigDecimal, Timestamp$Precision, Integer) where one case falls through to the next case - - At Timestamp.java:[lines 74-2870] + + At Timestamp.java:[lines 74-2884] In class com.amazon.ion.Timestamp - + In method new com.amazon.ion.Timestamp(BigDecimal, Timestamp$Precision, Integer) - - At Timestamp.java:[lines 746-748] + + At Timestamp.java:[lines 757-759] - - Another occurrence at Timestamp.java:[lines 748-750] + + Another occurrence at Timestamp.java:[lines 759-761] - - Another occurrence at Timestamp.java:[lines 751-753] + + Another occurrence at Timestamp.java:[lines 762-764] Switch statement found where one case falls through to the next case Switch statement found in com.amazon.ion.Timestamp.clearUnusedPrecision() where one case falls through to the next case - - At Timestamp.java:[lines 74-2870] + + At Timestamp.java:[lines 74-2884] In class com.amazon.ion.Timestamp - + In method com.amazon.ion.Timestamp.clearUnusedPrecision() - - At Timestamp.java:[lines 2353-2355] + + At Timestamp.java:[lines 2367-2369] - - Another occurrence at Timestamp.java:[lines 2355-2357] + + Another occurrence at Timestamp.java:[lines 2369-2371] - - Another occurrence at Timestamp.java:[lines 2358-2360] + + Another occurrence at Timestamp.java:[lines 2372-2374] Switch statement found where default case is missing Switch statement found in new com.amazon.ion.Timestamp(BigDecimal, Timestamp$Precision, Integer) where default case is missing - - At Timestamp.java:[lines 74-2870] + + At Timestamp.java:[lines 74-2884] In class com.amazon.ion.Timestamp - + In method new com.amazon.ion.Timestamp(BigDecimal, Timestamp$Precision, Integer) - - At Timestamp.java:[lines 743-753] + + At Timestamp.java:[lines 754-764] Switch statement found where default case is missing Switch statement found in com.amazon.ion.Timestamp.calendarValue() where default case is missing - - At Timestamp.java:[lines 74-2870] + + At Timestamp.java:[lines 74-2884] In class com.amazon.ion.Timestamp - + In method com.amazon.ion.Timestamp.calendarValue() - - At Timestamp.java:[lines 1580-1593] + + At Timestamp.java:[lines 1594-1607] Switch statement found where default case is missing Switch statement found in com.amazon.ion.Timestamp.clearUnusedPrecision() where default case is missing - - At Timestamp.java:[lines 74-2870] + + At Timestamp.java:[lines 74-2884] In class com.amazon.ion.Timestamp - + In method com.amazon.ion.Timestamp.clearUnusedPrecision() - - At Timestamp.java:[lines 2351-2361] + + At Timestamp.java:[lines 2365-2375] Class defines clone() but doesn't implement Cloneable com.amazon.ion.impl.BlockedBuffer defines clone() but doesn't implement Cloneable - + At BlockedBuffer.java:[lines 38-1041] In class com.amazon.ion.impl.BlockedBuffer - + In method com.amazon.ion.impl.BlockedBuffer.clone() - + At BlockedBuffer.java:[lines 173-196] @@ -268,22 +268,22 @@ Method may fail to close stream new com.amazon.ion.impl.BlockedBuffer(InputStream) may fail to close stream - + At BlockedBuffer.java:[lines 38-1041] In class com.amazon.ion.impl.BlockedBuffer - + In method new com.amazon.ion.impl.BlockedBuffer(InputStream) - - At OutputStream.java:[lines 48-193] + + At OutputStream.java:[lines 46-152] Need to close java.io.OutputStream - + At BlockedBuffer.java:[line 156] @@ -291,17 +291,17 @@ May expose internal representation by incorporating reference to mutable object new com.amazon.ion.impl.BlockedBuffer$BlockedByteOutputStream(BlockedBuffer) may expose internal representation by storing an externally mutable object into BlockedBuffer$BlockedByteOutputStream._buf - + At BlockedBuffer.java:[lines 1310-1656] In class com.amazon.ion.impl.BlockedBuffer$BlockedByteOutputStream - + In method new com.amazon.ion.impl.BlockedBuffer$BlockedByteOutputStream(BlockedBuffer) - + In BlockedBuffer.java Field com.amazon.ion.impl.BlockedBuffer$BlockedByteOutputStream._buf @@ -309,7 +309,7 @@ Local variable named bb - + At BlockedBuffer.java:[line 1334] @@ -317,17 +317,17 @@ May expose internal representation by incorporating reference to mutable object new com.amazon.ion.impl.BlockedBuffer$BlockedByteOutputStream(BlockedBuffer, int) may expose internal representation by storing an externally mutable object into BlockedBuffer$BlockedByteOutputStream._buf - + At BlockedBuffer.java:[lines 1310-1656] In class com.amazon.ion.impl.BlockedBuffer$BlockedByteOutputStream - + In method new com.amazon.ion.impl.BlockedBuffer$BlockedByteOutputStream(BlockedBuffer, int) - + In BlockedBuffer.java Field com.amazon.ion.impl.BlockedBuffer$BlockedByteOutputStream._buf @@ -335,7 +335,7 @@ Local variable named bb - + At BlockedBuffer.java:[line 1349] @@ -343,17 +343,17 @@ May expose internal representation by incorporating reference to mutable object new com.amazon.ion.impl.BlockedBuffer$BufferedOutputStream(BlockedBuffer) may expose internal representation by storing an externally mutable object into BlockedBuffer$BufferedOutputStream._buffer - + At BlockedBuffer.java:[lines 1674-1776] In class com.amazon.ion.impl.BlockedBuffer$BufferedOutputStream - + In method new com.amazon.ion.impl.BlockedBuffer$BufferedOutputStream(BlockedBuffer) - + In BlockedBuffer.java Field com.amazon.ion.impl.BlockedBuffer$BufferedOutputStream._buffer @@ -361,7 +361,7 @@ Local variable named buffer - + At BlockedBuffer.java:[line 1677] @@ -369,16 +369,16 @@ Switch statement found where default case is missing Switch statement found in com.amazon.ion.impl.IonBinary.lenInt(BigInteger, boolean) where default case is missing - + At IonBinary.java:[lines 42-940] In class com.amazon.ion.impl.IonBinary - + In method com.amazon.ion.impl.IonBinary.lenInt(BigInteger, boolean) - + At IonBinary.java:[lines 538-544] @@ -386,22 +386,22 @@ Condition has no effect Useless condition: it's known that longVal != Long.MIN_VALUE at this point - + At IonBinary.java:[lines 42-940] In class com.amazon.ion.impl.IonBinary - + In method com.amazon.ion.impl.IonBinary.lenInt(long) Value longVal != Long.MIN_VALUE - + Unreachable code at IonBinary.java:[line 529] - + At IonBinary.java:[line 529] @@ -409,22 +409,22 @@ Condition has no effect Useless condition: it's known that longVal >= 0 at this point - + At IonBinary.java:[lines 42-940] In class com.amazon.ion.impl.IonBinary - + In method com.amazon.ion.impl.IonBinary.lenInt(long) Value longVal >= 0 - + Unreachable code at IonBinary.java:[line 521] - + At IonBinary.java:[line 521] @@ -432,13 +432,13 @@ Condition has no effect due to the variable type Useless condition: it's always longVal >= Long.MIN_VALUE because variable type is long - + At IonBinary.java:[lines 42-940] In class com.amazon.ion.impl.IonBinary - + In method com.amazon.ion.impl.IonBinary.lenVarUInt(long) @@ -447,10 +447,10 @@ Type long - + Unreachable code at IonBinary.java:[line 454] - + At IonBinary.java:[line 454] @@ -458,16 +458,16 @@ Class defines clone() but doesn't implement Cloneable com.amazon.ion.impl.IonBinary$BufferManager defines clone() but doesn't implement Cloneable - + At IonBinary.java:[lines 322-437] In class com.amazon.ion.impl.IonBinary$BufferManager - + In method com.amazon.ion.impl.IonBinary$BufferManager.clone() - + At IonBinary.java:[lines 396-398] @@ -475,22 +475,22 @@ May expose internal representation by returning reference to mutable object com.amazon.ion.impl.IonBinary$BufferManager.buffer() may expose internal representation by returning IonBinary$BufferManager._buf - + At IonBinary.java:[lines 322-437] In class com.amazon.ion.impl.IonBinary$BufferManager - + In method com.amazon.ion.impl.IonBinary$BufferManager.buffer() - + In IonBinary.java Field com.amazon.ion.impl.IonBinary$BufferManager._buf - + At IonBinary.java:[line 414] @@ -498,22 +498,22 @@ May expose internal representation by returning reference to mutable object com.amazon.ion.impl.IonBinary$BufferManager.openReader() may expose internal representation by returning IonBinary$BufferManager._reader - + At IonBinary.java:[lines 322-437] In class com.amazon.ion.impl.IonBinary$BufferManager - + In method com.amazon.ion.impl.IonBinary$BufferManager.openReader() - + In IonBinary.java Field com.amazon.ion.impl.IonBinary$BufferManager._reader - + At IonBinary.java:[line 405] @@ -521,22 +521,22 @@ May expose internal representation by returning reference to mutable object com.amazon.ion.impl.IonBinary$BufferManager.openWriter() may expose internal representation by returning IonBinary$BufferManager._writer - + At IonBinary.java:[lines 322-437] In class com.amazon.ion.impl.IonBinary$BufferManager - + In method com.amazon.ion.impl.IonBinary$BufferManager.openWriter() - + In IonBinary.java Field com.amazon.ion.impl.IonBinary$BufferManager._writer - + At IonBinary.java:[line 411] @@ -544,22 +544,22 @@ May expose internal representation by returning reference to mutable object com.amazon.ion.impl.IonBinary$BufferManager.reader() may expose internal representation by returning IonBinary$BufferManager._reader - + At IonBinary.java:[lines 322-437] In class com.amazon.ion.impl.IonBinary$BufferManager - + In method com.amazon.ion.impl.IonBinary$BufferManager.reader() - + In IonBinary.java Field com.amazon.ion.impl.IonBinary$BufferManager._reader - + At IonBinary.java:[line 415] @@ -567,22 +567,22 @@ May expose internal representation by returning reference to mutable object com.amazon.ion.impl.IonBinary$BufferManager.reader(int) may expose internal representation by returning IonBinary$BufferManager._reader - + At IonBinary.java:[lines 322-437] In class com.amazon.ion.impl.IonBinary$BufferManager - + In method com.amazon.ion.impl.IonBinary$BufferManager.reader(int) - + In IonBinary.java Field com.amazon.ion.impl.IonBinary$BufferManager._reader - + At IonBinary.java:[line 421] @@ -590,22 +590,22 @@ May expose internal representation by returning reference to mutable object com.amazon.ion.impl.IonBinary$BufferManager.writer() may expose internal representation by returning IonBinary$BufferManager._writer - + At IonBinary.java:[lines 322-437] In class com.amazon.ion.impl.IonBinary$BufferManager - + In method com.amazon.ion.impl.IonBinary$BufferManager.writer() - + In IonBinary.java Field com.amazon.ion.impl.IonBinary$BufferManager._writer - + At IonBinary.java:[line 416] @@ -613,22 +613,22 @@ May expose internal representation by returning reference to mutable object com.amazon.ion.impl.IonBinary$BufferManager.writer(int) may expose internal representation by returning IonBinary$BufferManager._writer - + At IonBinary.java:[lines 322-437] In class com.amazon.ion.impl.IonBinary$BufferManager - + In method com.amazon.ion.impl.IonBinary$BufferManager.writer(int) - + In IonBinary.java Field com.amazon.ion.impl.IonBinary$BufferManager._writer - + At IonBinary.java:[line 426] @@ -636,17 +636,17 @@ May expose internal representation by incorporating reference to mutable object new com.amazon.ion.impl.IonBinary$BufferManager(BlockedBuffer) may expose internal representation by storing an externally mutable object into IonBinary$BufferManager._buf - + At IonBinary.java:[lines 322-437] In class com.amazon.ion.impl.IonBinary$BufferManager - + In method new com.amazon.ion.impl.IonBinary$BufferManager(BlockedBuffer) - + In IonBinary.java Field com.amazon.ion.impl.IonBinary$BufferManager._buf @@ -654,52 +654,24 @@ Local variable named buf - + At IonBinary.java:[line 334] - - Method invokes inefficient Number constructor; use static valueOf instead - com.amazon.ion.impl.IonBinary$Reader.readVarIntWithNegativeZero() invokes inefficient new Integer(int) constructor; use Integer.valueOf(int) instead - - - At IonBinary.java:[lines 942-1815] - - In class com.amazon.ion.impl.IonBinary$Reader - - - - In method com.amazon.ion.impl.IonBinary$Reader.readVarIntWithNegativeZero() - - - - Called method new Integer(int) - - - - Should call Integer.valueOf(int) instead - - - At IonBinary.java:[line 1519] - - - Another occurrence at IonBinary.java:[line 1523] - - Switch statement found where one case falls through to the next case Switch statement found in com.amazon.ion.impl.IonBinary$Reader.readIntAsInt(int) where one case falls through to the next case - + At IonBinary.java:[lines 942-1815] In class com.amazon.ion.impl.IonBinary$Reader - + In method com.amazon.ion.impl.IonBinary$Reader.readIntAsInt(int) - + At IonBinary.java:[lines 1237-1239] @@ -707,16 +679,16 @@ Switch statement found where default case is missing Switch statement found in com.amazon.ion.impl.IonBinary$Reader.readIntAsInt(int) where default case is missing - + At IonBinary.java:[lines 942-1815] In class com.amazon.ion.impl.IonBinary$Reader - + In method com.amazon.ion.impl.IonBinary$Reader.readIntAsInt(int) - + At IonBinary.java:[lines 1229-1243] @@ -724,16 +696,16 @@ Switch statement found where default case is missing Switch statement found in com.amazon.ion.impl.IonBinary$Reader.readIntAsLong(int) where default case is missing - + At IonBinary.java:[lines 942-1815] In class com.amazon.ion.impl.IonBinary$Reader - + In method com.amazon.ion.impl.IonBinary$Reader.readIntAsLong(int) - + At IonBinary.java:[lines 1177-1204] @@ -741,13 +713,13 @@ Incompatible bit masks Incompatible bit masks in (e & 0x80 == 0x40) yields a constant result in com.amazon.ion.impl.IonBinary$Writer.writeIntValue(long) - + At IonBinary.java:[lines 1819-2917] In class com.amazon.ion.impl.IonBinary$Writer - + In method com.amazon.ion.impl.IonBinary$Writer.writeIntValue(long) @@ -756,396 +728,343 @@ Value 0x40 - + At IonBinary.java:[line 2433] - - Iterator next() method cannot throw NoSuchElementException - com.amazon.ion.impl.IonReaderBinaryIncremental$2.next() cannot throw NoSuchElementException - - - At IonReaderBinaryIncremental.java:[lines 1846-1860] - - In class com.amazon.ion.impl.IonReaderBinaryIncremental$2 - - - - In method com.amazon.ion.impl.IonReaderBinaryIncremental$2.next() - - - At IonReaderBinaryIncremental.java:[line 1855] - - - - Switch statement found where one case falls through to the next case - Switch statement found in com.amazon.ion.impl.IonReaderBinaryRawX.has_next_helper_raw() where one case falls through to the next case - - - At IonReaderBinaryRawX.java:[lines 55-1354] - - In class com.amazon.ion.impl.IonReaderBinaryRawX - - - - In method com.amazon.ion.impl.IonReaderBinaryRawX.has_next_helper_raw() - - - At IonReaderBinaryRawX.java:[lines 327-330] - - - - Unread field - Unread field: com.amazon.ion.impl.IonReaderLookaheadBuffer.currentNumberOfAnnotations - - - At IonReaderLookaheadBuffer.java:[lines 22-956] - - In class com.amazon.ion.impl.IonReaderLookaheadBuffer - - - - In IonReaderLookaheadBuffer.java - - Field com.amazon.ion.impl.IonReaderLookaheadBuffer.currentNumberOfAnnotations - - - At IonReaderLookaheadBuffer.java:[line 285] - - Method concatenates strings using + in a loop com.amazon.ion.impl.IonReaderTextRawTokensX.peekNullTypeSymbolUndo(int[], int) concatenates strings using + in a loop - - At IonReaderTextRawTokensX.java:[lines 65-2897] + + At IonReaderTextRawTokensX.java:[lines 66-2915] In class com.amazon.ion.impl.IonReaderTextRawTokensX - + In method com.amazon.ion.impl.IonReaderTextRawTokensX.peekNullTypeSymbolUndo(int[], int) - - At IonReaderTextRawTokensX.java:[line 424] + + At IonReaderTextRawTokensX.java:[line 429] Switch statement found where one case falls through to the next case Switch statement found in com.amazon.ion.impl.IonReaderTextRawTokensX.load_double_quoted_string(StringBuilder, boolean) where one case falls through to the next case - - At IonReaderTextRawTokensX.java:[lines 65-2897] + + At IonReaderTextRawTokensX.java:[lines 66-2915] In class com.amazon.ion.impl.IonReaderTextRawTokensX - + In method com.amazon.ion.impl.IonReaderTextRawTokensX.load_double_quoted_string(StringBuilder, boolean) - - At IonReaderTextRawTokensX.java:[lines 2039-2041] + + At IonReaderTextRawTokensX.java:[lines 2057-2059] Switch statement found where one case falls through to the next case Switch statement found in com.amazon.ion.impl.IonReaderTextRawTokensX.load_fixed_digits(StringBuilder, int) where one case falls through to the next case - - At IonReaderTextRawTokensX.java:[lines 65-2897] + + At IonReaderTextRawTokensX.java:[lines 66-2915] In class com.amazon.ion.impl.IonReaderTextRawTokensX - + In method com.amazon.ion.impl.IonReaderTextRawTokensX.load_fixed_digits(StringBuilder, int) - - At IonReaderTextRawTokensX.java:[lines 1707-1710] + + At IonReaderTextRawTokensX.java:[lines 1725-1728] - - Another occurrence at IonReaderTextRawTokensX.java:[lines 1712-1715] + + Another occurrence at IonReaderTextRawTokensX.java:[lines 1730-1733] - - Another occurrence at IonReaderTextRawTokensX.java:[lines 1717-1720] + + Another occurrence at IonReaderTextRawTokensX.java:[lines 1735-1738] Switch statement found where one case falls through to the next case Switch statement found in com.amazon.ion.impl.IonReaderTextRawTokensX.load_single_quoted_string(StringBuilder, boolean) where one case falls through to the next case - - At IonReaderTextRawTokensX.java:[lines 65-2897] + + At IonReaderTextRawTokensX.java:[lines 66-2915] In class com.amazon.ion.impl.IonReaderTextRawTokensX - + In method com.amazon.ion.impl.IonReaderTextRawTokensX.load_single_quoted_string(StringBuilder, boolean) - - At IonReaderTextRawTokensX.java:[lines 1955-1959] + + At IonReaderTextRawTokensX.java:[lines 1973-1977] Switch statement found where one case falls through to the next case Switch statement found in com.amazon.ion.impl.IonReaderTextRawTokensX.read_base64_byte_helper() where one case falls through to the next case - - At IonReaderTextRawTokensX.java:[lines 65-2897] + + At IonReaderTextRawTokensX.java:[lines 66-2915] In class com.amazon.ion.impl.IonReaderTextRawTokensX - + In method com.amazon.ion.impl.IonReaderTextRawTokensX.read_base64_byte_helper() - - At IonReaderTextRawTokensX.java:[lines 2561-2564] + + At IonReaderTextRawTokensX.java:[lines 2579-2582] - - Another occurrence at IonReaderTextRawTokensX.java:[lines 2565-2568] + + Another occurrence at IonReaderTextRawTokensX.java:[lines 2583-2586] Switch statement found where one case falls through to the next case Switch statement found in com.amazon.ion.impl.IonReaderTextRawTokensX.skip_double_quoted_string_helper() where one case falls through to the next case - - At IonReaderTextRawTokensX.java:[lines 65-2897] + + At IonReaderTextRawTokensX.java:[lines 66-2915] In class com.amazon.ion.impl.IonReaderTextRawTokensX - + In method com.amazon.ion.impl.IonReaderTextRawTokensX.skip_double_quoted_string_helper() - - At IonReaderTextRawTokensX.java:[lines 2001-2006] + + At IonReaderTextRawTokensX.java:[lines 2019-2024] - - Another occurrence at IonReaderTextRawTokensX.java:[lines 2006-2008] + + Another occurrence at IonReaderTextRawTokensX.java:[lines 2024-2026] Switch statement found where one case falls through to the next case Switch statement found in com.amazon.ion.impl.IonReaderTextRawTokensX.skip_over_container(int) where one case falls through to the next case - - At IonReaderTextRawTokensX.java:[lines 65-2897] + + At IonReaderTextRawTokensX.java:[lines 66-2915] In class com.amazon.ion.impl.IonReaderTextRawTokensX - + In method com.amazon.ion.impl.IonReaderTextRawTokensX.skip_over_container(int) - - At IonReaderTextRawTokensX.java:[lines 1215-1219] + + At IonReaderTextRawTokensX.java:[lines 1225-1229] Switch statement found where one case falls through to the next case Switch statement found in com.amazon.ion.impl.IonReaderTextRawTokensX.skip_single_quoted_string(UnifiedSavePointManagerX$SavePoint) where one case falls through to the next case - - At IonReaderTextRawTokensX.java:[lines 65-2897] + + At IonReaderTextRawTokensX.java:[lines 66-2915] In class com.amazon.ion.impl.IonReaderTextRawTokensX - + In method com.amazon.ion.impl.IonReaderTextRawTokensX.skip_single_quoted_string(UnifiedSavePointManagerX$SavePoint) - - At IonReaderTextRawTokensX.java:[lines 1919-1921] + + At IonReaderTextRawTokensX.java:[lines 1937-1939] Switch statement found where one case falls through to the next case Switch statement found in com.amazon.ion.impl.IonReaderTextRawTokensX.skip_triple_quoted_string(UnifiedSavePointManagerX$SavePoint, IonReaderTextRawTokensX$CommentStrategy) where one case falls through to the next case - - At IonReaderTextRawTokensX.java:[lines 65-2897] + + At IonReaderTextRawTokensX.java:[lines 66-2915] In class com.amazon.ion.impl.IonReaderTextRawTokensX - + In method com.amazon.ion.impl.IonReaderTextRawTokensX.skip_triple_quoted_string(UnifiedSavePointManagerX$SavePoint, IonReaderTextRawTokensX$CommentStrategy) - - At IonReaderTextRawTokensX.java:[lines 2137-2139] + + At IonReaderTextRawTokensX.java:[lines 2155-2157] Switch statement found where default case is missing Switch statement found in com.amazon.ion.impl.IonReaderTextRawTokensX.read_escaped_char_content_helper(int, boolean) where default case is missing - - At IonReaderTextRawTokensX.java:[lines 65-2897] + + At IonReaderTextRawTokensX.java:[lines 66-2915] In class com.amazon.ion.impl.IonReaderTextRawTokensX - + In method com.amazon.ion.impl.IonReaderTextRawTokensX.read_escaped_char_content_helper(int, boolean) - - At IonReaderTextRawTokensX.java:[lines 2472-2491] + + At IonReaderTextRawTokensX.java:[lines 2490-2509] Switch statement found where default case is missing Switch statement found in com.amazon.ion.impl.IonReaderTextRawTokensX.skip_block_comment() where default case is missing - - At IonReaderTextRawTokensX.java:[lines 65-2897] + + At IonReaderTextRawTokensX.java:[lines 66-2915] In class com.amazon.ion.impl.IonReaderTextRawTokensX - + In method com.amazon.ion.impl.IonReaderTextRawTokensX.skip_block_comment() - - At IonReaderTextRawTokensX.java:[lines 935-948] + + At IonReaderTextRawTokensX.java:[lines 940-953] Switch statement found where default case is missing Switch statement found in com.amazon.ion.impl.IonReaderTextRawTokensX.skip_double_quoted_string_helper() where default case is missing - - At IonReaderTextRawTokensX.java:[lines 65-2897] + + At IonReaderTextRawTokensX.java:[lines 66-2915] In class com.amazon.ion.impl.IonReaderTextRawTokensX - + In method com.amazon.ion.impl.IonReaderTextRawTokensX.skip_double_quoted_string_helper() - - At IonReaderTextRawTokensX.java:[lines 1999-2010] + + At IonReaderTextRawTokensX.java:[lines 2017-2028] Switch statement found where default case is missing Switch statement found in com.amazon.ion.impl.IonReaderTextRawTokensX.skip_single_quoted_string(UnifiedSavePointManagerX$SavePoint) where default case is missing - - At IonReaderTextRawTokensX.java:[lines 65-2897] + + At IonReaderTextRawTokensX.java:[lines 66-2915] In class com.amazon.ion.impl.IonReaderTextRawTokensX - + In method com.amazon.ion.impl.IonReaderTextRawTokensX.skip_single_quoted_string(UnifiedSavePointManagerX$SavePoint) - - At IonReaderTextRawTokensX.java:[lines 1918-1926] + + At IonReaderTextRawTokensX.java:[lines 1936-1944] Switch statement found where default case is missing Switch statement found in com.amazon.ion.impl.IonReaderTextRawTokensX.skip_triple_quoted_string(UnifiedSavePointManagerX$SavePoint, IonReaderTextRawTokensX$CommentStrategy) where default case is missing - - At IonReaderTextRawTokensX.java:[lines 65-2897] + + At IonReaderTextRawTokensX.java:[lines 66-2915] In class com.amazon.ion.impl.IonReaderTextRawTokensX - + In method com.amazon.ion.impl.IonReaderTextRawTokensX.skip_triple_quoted_string(UnifiedSavePointManagerX$SavePoint, IonReaderTextRawTokensX$CommentStrategy) - - At IonReaderTextRawTokensX.java:[lines 2135-2158] + + At IonReaderTextRawTokensX.java:[lines 2153-2176] Condition has no effect Useless condition: it's known that c != -1 at this point - - At IonReaderTextRawTokensX.java:[lines 65-2897] + + At IonReaderTextRawTokensX.java:[lines 66-2915] In class com.amazon.ion.impl.IonReaderTextRawTokensX - + In method com.amazon.ion.impl.IonReaderTextRawTokensX.read_base64_getchar_helper(int) Value c != -1 - - Unreachable code at IonReaderTextRawTokensX.java:[line 2577] + + Unreachable code at IonReaderTextRawTokensX.java:[line 2595] - - At IonReaderTextRawTokensX.java:[line 2576] + + At IonReaderTextRawTokensX.java:[line 2594] Condition has no effect Useless condition: it's known that c != 125 ('}') at this point - - At IonReaderTextRawTokensX.java:[lines 65-2897] + + At IonReaderTextRawTokensX.java:[lines 66-2915] In class com.amazon.ion.impl.IonReaderTextRawTokensX - + In method com.amazon.ion.impl.IonReaderTextRawTokensX.read_base64_getchar_helper(int) Value c != 125 ('}') - - Unreachable code at IonReaderTextRawTokensX.java:[line 2577] + + Unreachable code at IonReaderTextRawTokensX.java:[line 2595] - - At IonReaderTextRawTokensX.java:[line 2576] + + At IonReaderTextRawTokensX.java:[line 2594] Condition has no effect Useless condition: it's known that len <= 0 at this point - - At IonReaderTextRawTokensX.java:[lines 65-2897] + + At IonReaderTextRawTokensX.java:[lines 66-2915] In class com.amazon.ion.impl.IonReaderTextRawTokensX - + In method com.amazon.ion.impl.IonReaderTextRawTokensX.read_hex_escape_sequence_value(int) Value len <= 0 - - Unreachable code at IonReaderTextRawTokensX.java:[line 2510] + + Unreachable code at IonReaderTextRawTokensX.java:[line 2528] - - At IonReaderTextRawTokensX.java:[line 2509] + + At IonReaderTextRawTokensX.java:[line 2527] Switch statement found where one case falls through to the next case Switch statement found in com.amazon.ion.impl.IonReaderTextRawX.parseSymbolToken(String, StringBuilder, int) where one case falls through to the next case - - At IonReaderTextRawX.java:[lines 72-1440] + + At IonReaderTextRawX.java:[lines 72-1446] In class com.amazon.ion.impl.IonReaderTextRawX - + In method com.amazon.ion.impl.IonReaderTextRawX.parseSymbolToken(String, StringBuilder, int) - + At IonReaderTextRawX.java:[lines 756-758] @@ -1153,22 +1072,22 @@ Condition has no effect Useless condition: it's known that c >= 65535 (0xffff) at this point - + At IonTokenConstsX.java:[lines 27-951] In class com.amazon.ion.impl.IonTokenConstsX - + In method com.amazon.ion.impl.IonTokenConstsX.escapeSequence(int) Value c >= 65535 (0xffff) - + Unreachable code at IonTokenConstsX.java:[line 401] - + At IonTokenConstsX.java:[line 400] @@ -1176,19 +1095,19 @@ Condition has no effect Useless condition: it's known that c <= 1114111 (0x10ffff) at this point - + At IonTokenConstsX.java:[lines 27-951] In class com.amazon.ion.impl.IonTokenConstsX - + In method com.amazon.ion.impl.IonTokenConstsX.escapeSequence(int) Value c <= 1114111 (0x10ffff) - + At IonTokenConstsX.java:[line 388] @@ -1196,19 +1115,19 @@ Switch statement found where one case falls through to the next case Switch statement found in com.amazon.ion.impl.IonTokenReader.readEscapedCharacter(PushbackReader, boolean) where one case falls through to the next case - + At IonTokenReader.java:[lines 41-1620] In class com.amazon.ion.impl.IonTokenReader - + In method com.amazon.ion.impl.IonTokenReader.readEscapedCharacter(PushbackReader, boolean) - + At IonTokenReader.java:[lines 1167-1171] - + Another occurrence at IonTokenReader.java:[lines 1179-1183] @@ -1216,16 +1135,16 @@ Switch statement found where default case is missing Switch statement found in com.amazon.ion.impl.IonTokenReader.matchKeyword(StringBuilder, int, int) where default case is missing - + At IonTokenReader.java:[lines 41-1620] In class com.amazon.ion.impl.IonTokenReader - + In method com.amazon.ion.impl.IonTokenReader.matchKeyword(StringBuilder, int, int) - + At IonTokenReader.java:[lines 724-756] @@ -1233,18 +1152,18 @@ Comparison of String objects using == or != Comparison of String objects using == or != in com.amazon.ion.impl.IonTokenReader$Type.setNumericValue(IonTokenReader, String) - + At IonTokenReader.java:[lines 54-209] In class com.amazon.ion.impl.IonTokenReader$Type - + In method com.amazon.ion.impl.IonTokenReader$Type.setNumericValue(IonTokenReader, String) - - At String.java:[lines 125-3345] + + At String.java:[lines 111-3141] Actual type String @@ -1254,7 +1173,7 @@ Value loaded from eFormat - + At IonTokenReader.java:[line 184] @@ -1263,12 +1182,12 @@ Class names should start with an upper case letter The class name com.amazon.ion.impl.IonTokenReader$Type$timeinfo doesn't start with an upper case letter - + At IonTokenReader.java:[lines 132-143] In class com.amazon.ion.impl.IonTokenReader$Type$timeinfo - + At IonTokenReader.java:[lines 132-143] @@ -1276,22 +1195,22 @@ Bitwise OR of signed byte value Bitwise OR of signed byte value computed in com.amazon.ion.impl.IonUTF8.getAs4BytesReversed(int) - + At IonUTF8.java:[lines 35-406] In class com.amazon.ion.impl.IonUTF8 - + In method com.amazon.ion.impl.IonUTF8.getAs4BytesReversed(int) - + At IonUTF8.java:[line 179] - + Another occurrence at IonUTF8.java:[line 183] - + Another occurrence at IonUTF8.java:[line 188] @@ -1299,19 +1218,19 @@ Bitwise OR of signed byte value Bitwise OR of signed byte value computed in com.amazon.ion.impl.IonUTF8.packBytesAfter1(int, int) - + At IonUTF8.java:[lines 35-406] In class com.amazon.ion.impl.IonUTF8 - + In method com.amazon.ion.impl.IonUTF8.packBytesAfter1(int, int) - + At IonUTF8.java:[line 262] - + Another occurrence at IonUTF8.java:[line 266] @@ -1319,97 +1238,97 @@ Switch statement found where default case is missing Switch statement found in com.amazon.ion.impl.IonUTF8.convertToUTF8Bytes(int, byte[], int, int) where default case is missing - + At IonUTF8.java:[lines 35-406] In class com.amazon.ion.impl.IonUTF8 - + In method com.amazon.ion.impl.IonUTF8.convertToUTF8Bytes(int, byte[], int, int) - + At IonUTF8.java:[lines 214-235] Nullcheck of value previously dereferenced - Nullcheck of IonWriterSystemBinary._patch at line 518 of value previously dereferenced in com.amazon.ion.impl.IonWriterSystemBinary.closeValue() + Nullcheck of IonWriterSystemBinary._patch at line 519 of value previously dereferenced in com.amazon.ion.impl.IonWriterSystemBinary.closeValue() - - At IonWriterSystemBinary.java:[lines 40-1048] + + At IonWriterSystemBinary.java:[lines 40-1049] In class com.amazon.ion.impl.IonWriterSystemBinary - + In method com.amazon.ion.impl.IonWriterSystemBinary.closeValue() - + In IonWriterSystemBinary.java Value loaded from field com.amazon.ion.impl.IonWriterSystemBinary._patch - - At IonWriterSystemBinary.java:[line 517] + + At IonWriterSystemBinary.java:[line 518] - - Redundant null check at IonWriterSystemBinary.java:[line 518] + + Redundant null check at IonWriterSystemBinary.java:[line 519] Inconsistent synchronization - Inconsistent synchronization of com.amazon.ion.impl.LocalSymbolTable.mySymbolNames; locked 75% of time + Inconsistent synchronization of com.amazon.ion.impl.LocalSymbolTable.mySymbolNames; locked 58% of time - - At LocalSymbolTable.java:[lines 53-874] + + At LocalSymbolTable.java:[lines 52-863] In class com.amazon.ion.impl.LocalSymbolTable - + In LocalSymbolTable.java Field com.amazon.ion.impl.LocalSymbolTable.mySymbolNames - - Synchronized 75% of the time + + Synchronized 58% of the time - - Unsynchronized access at LocalSymbolTable.java:[line 856] + + Unsynchronized access at LocalSymbolTable.java:[line 845] + + + Unsynchronized access at LocalSymbolTable.java:[line 849] - - Unsynchronized access at LocalSymbolTable.java:[line 860] + + Unsynchronized access at LocalSymbolTable.java:[line 859] - - Unsynchronized access at LocalSymbolTable.java:[line 870] + + Unsynchronized access at LocalSymbolTable.java:[line 143] - + + Unsynchronized access at LocalSymbolTable.java:[line 145] + + Synchronized access at LocalSymbolTable.java:[line 424] - + Synchronized access at LocalSymbolTable.java:[line 555] - + Synchronized access at LocalSymbolTable.java:[line 575] - + Synchronized access at LocalSymbolTable.java:[line 563] - + Synchronized access at LocalSymbolTable.java:[line 564] - - Synchronized access at LocalSymbolTable.java:[line 144] - - - Synchronized access at LocalSymbolTable.java:[line 146] - - + Synchronized access at LocalSymbolTable.java:[line 494] - + Synchronized access at LocalSymbolTable.java:[line 401] @@ -1417,13 +1336,13 @@ Inconsistent synchronization Inconsistent synchronization of com.amazon.ion.impl.LocalSymbolTable.mySymbolsCount; locked 81% of time - - At LocalSymbolTable.java:[lines 53-874] + + At LocalSymbolTable.java:[lines 52-863] In class com.amazon.ion.impl.LocalSymbolTable - + In LocalSymbolTable.java Field com.amazon.ion.impl.LocalSymbolTable.mySymbolsCount @@ -1431,83 +1350,55 @@ Synchronized 81% of the time - - Unsynchronized access at LocalSymbolTable.java:[line 848] + + Unsynchronized access at LocalSymbolTable.java:[line 837] - - Unsynchronized access at LocalSymbolTable.java:[line 854] + + Unsynchronized access at LocalSymbolTable.java:[line 843] - + Synchronized access at LocalSymbolTable.java:[line 379] - + Synchronized access at LocalSymbolTable.java:[line 555] - + Synchronized access at LocalSymbolTable.java:[line 557] - + Synchronized access at LocalSymbolTable.java:[line 575] - + Synchronized access at LocalSymbolTable.java:[line 570] - + Synchronized access at LocalSymbolTable.java:[line 576] - + Synchronized access at LocalSymbolTable.java:[line 576] - + Synchronized access at LocalSymbolTable.java:[line 563] - + Synchronized access at LocalSymbolTable.java:[line 401] - - Method invokes inefficient Number constructor; use static valueOf instead - com.amazon.ion.impl.SimpleByteBuffer$SimpleByteReader.readVarInteger() invokes inefficient new Integer(int) constructor; use Integer.valueOf(int) instead - - - At SimpleByteBuffer.java:[lines 135-660] - - In class com.amazon.ion.impl.SimpleByteBuffer$SimpleByteReader - - - - In method com.amazon.ion.impl.SimpleByteBuffer$SimpleByteReader.readVarInteger() - - - - Called method new Integer(int) - - - - Should call Integer.valueOf(int) instead - - - At SimpleByteBuffer.java:[line 372] - - - Another occurrence at SimpleByteBuffer.java:[line 376] - - Method call passes null for non-null parameter Null passed for non-null parameter of com.amazon.ion.Timestamp.createFromUtcFields(Timestamp$Precision, int, int, int, int, int, int, BigDecimal, Integer) in com.amazon.ion.impl.SimpleByteBuffer$SimpleByteReader.readTimestamp(int) - + At SimpleByteBuffer.java:[lines 135-660] In class com.amazon.ion.impl.SimpleByteBuffer$SimpleByteReader - + In method com.amazon.ion.impl.SimpleByteBuffer$SimpleByteReader.readTimestamp(int) - + Called method com.amazon.ion.Timestamp.createFromUtcFields(Timestamp$Precision, int, int, int, int, int, int, BigDecimal, Integer) @@ -1516,13 +1407,13 @@ Value loaded from p - + Method invoked at SimpleByteBuffer.java:[line 559] - + Null value at SimpleByteBuffer.java:[line 509] - + Known null at SimpleByteBuffer.java:[line 521] @@ -1531,22 +1422,22 @@ Switch statement found where one case falls through to the next case Switch statement found in com.amazon.ion.impl.SimpleByteBuffer$SimpleByteWriter.writeVarInt(int, int, boolean) where one case falls through to the next case - + At SimpleByteBuffer.java:[lines 841-1383] In class com.amazon.ion.impl.SimpleByteBuffer$SimpleByteWriter - + In method com.amazon.ion.impl.SimpleByteBuffer$SimpleByteWriter.writeVarInt(int, int, boolean) - + At SimpleByteBuffer.java:[lines 987-988] - + Another occurrence at SimpleByteBuffer.java:[lines 988-989] - + Another occurrence at SimpleByteBuffer.java:[lines 989-990] @@ -1554,16 +1445,16 @@ Switch statement found where default case is missing Switch statement found in com.amazon.ion.impl.SimpleByteBuffer$SimpleByteWriter.writeULong(long, int) where default case is missing - + At SimpleByteBuffer.java:[lines 841-1383] In class com.amazon.ion.impl.SimpleByteBuffer$SimpleByteWriter - + In method com.amazon.ion.impl.SimpleByteBuffer$SimpleByteWriter.writeULong(long, int) - + At SimpleByteBuffer.java:[lines 1179-1187] @@ -1571,16 +1462,16 @@ Switch statement found where default case is missing Switch statement found in com.amazon.ion.impl.SimpleByteBuffer$SimpleByteWriter.writeVarInt(int, int, boolean) where default case is missing - + At SimpleByteBuffer.java:[lines 841-1383] In class com.amazon.ion.impl.SimpleByteBuffer$SimpleByteWriter - + In method com.amazon.ion.impl.SimpleByteBuffer$SimpleByteWriter.writeVarInt(int, int, boolean) - + At SimpleByteBuffer.java:[lines 986-990] @@ -1588,16 +1479,16 @@ Switch statement found where default case is missing Switch statement found in com.amazon.ion.impl.SimpleByteBuffer$SimpleByteWriter.writeVarInt(long, int, boolean) where default case is missing - + At SimpleByteBuffer.java:[lines 841-1383] In class com.amazon.ion.impl.SimpleByteBuffer$SimpleByteWriter - + In method com.amazon.ion.impl.SimpleByteBuffer$SimpleByteWriter.writeVarInt(long, int, boolean) - + At SimpleByteBuffer.java:[lines 1123-1133] @@ -1605,16 +1496,16 @@ Switch statement found where default case is missing Switch statement found in com.amazon.ion.impl.SimpleByteBuffer$SimpleByteWriter.writeVarUInt(int, int, boolean) where default case is missing - + At SimpleByteBuffer.java:[lines 841-1383] In class com.amazon.ion.impl.SimpleByteBuffer$SimpleByteWriter - + In method com.amazon.ion.impl.SimpleByteBuffer$SimpleByteWriter.writeVarUInt(int, int, boolean) - + At SimpleByteBuffer.java:[lines 1020-1030] @@ -1622,17 +1513,17 @@ May expose internal representation by incorporating reference to mutable object new com.amazon.ion.impl.UnifiedDataPageX$Bytes(byte[], int, int) may expose internal representation by storing an externally mutable object into UnifiedDataPageX$Bytes._bytes - + At UnifiedDataPageX.java:[lines 168-204] In class com.amazon.ion.impl.UnifiedDataPageX$Bytes - + In method new com.amazon.ion.impl.UnifiedDataPageX$Bytes(byte[], int, int) - + In UnifiedDataPageX.java Field com.amazon.ion.impl.UnifiedDataPageX$Bytes._bytes @@ -1640,7 +1531,7 @@ Local variable named bytes - + At UnifiedDataPageX.java:[line 175] @@ -1648,17 +1539,17 @@ May expose internal representation by incorporating reference to mutable object new com.amazon.ion.impl.UnifiedDataPageX$Chars(char[], int, int) may expose internal representation by storing an externally mutable object into UnifiedDataPageX$Chars._characters - + At UnifiedDataPageX.java:[lines 210-251] In class com.amazon.ion.impl.UnifiedDataPageX$Chars - + In method new com.amazon.ion.impl.UnifiedDataPageX$Chars(char[], int, int) - + In UnifiedDataPageX.java Field com.amazon.ion.impl.UnifiedDataPageX$Chars._characters @@ -1666,7 +1557,7 @@ Local variable named chars - + At UnifiedDataPageX.java:[line 217] @@ -1674,17 +1565,17 @@ May expose internal representation by incorporating reference to mutable object new com.amazon.ion.impl._Private_FastAppendableDecorator(_Private_FastAppendable) may expose internal representation by storing an externally mutable object into _Private_FastAppendableDecorator.myOutput - + At _Private_FastAppendableDecorator.java:[lines 31-100] In class com.amazon.ion.impl._Private_FastAppendableDecorator - + In method new com.amazon.ion.impl._Private_FastAppendableDecorator(_Private_FastAppendable) - + In _Private_FastAppendableDecorator.java Field com.amazon.ion.impl._Private_FastAppendableDecorator.myOutput @@ -1692,7 +1583,7 @@ Local variable named output - + At _Private_FastAppendableDecorator.java:[line 32] @@ -1700,22 +1591,22 @@ May expose internal representation by returning reference to mutable object com.amazon.ion.impl._Private_IonBinaryWriterBuilder.getInitialSymbolTable() may expose internal representation by returning _Private_IonBinaryWriterBuilder.myInitialSymbolTable - - At _Private_IonBinaryWriterBuilder.java:[lines 39-384] + + At _Private_IonBinaryWriterBuilder.java:[lines 39-414] In class com.amazon.ion.impl._Private_IonBinaryWriterBuilder - + In method com.amazon.ion.impl._Private_IonBinaryWriterBuilder.getInitialSymbolTable() - + In _Private_IonBinaryWriterBuilder.java Field com.amazon.ion.impl._Private_IonBinaryWriterBuilder.myInitialSymbolTable - + At _Private_IonBinaryWriterBuilder.java:[line 135] @@ -1723,25 +1614,25 @@ May expose internal representation by incorporating reference to mutable object com.amazon.ion.impl._Private_IonBinaryWriterBuilder.setInitialSymbolTable(SymbolTable) may expose internal representation by storing an externally mutable object into _Private_IonBinaryWriterBuilder.myInitialSymbolTable - - At _Private_IonBinaryWriterBuilder.java:[lines 39-384] + + At _Private_IonBinaryWriterBuilder.java:[lines 39-414] In class com.amazon.ion.impl._Private_IonBinaryWriterBuilder - + In method com.amazon.ion.impl._Private_IonBinaryWriterBuilder.setInitialSymbolTable(SymbolTable) - + In _Private_IonBinaryWriterBuilder.java Field com.amazon.ion.impl._Private_IonBinaryWriterBuilder.myInitialSymbolTable - + Local variable named symtab - + At _Private_IonBinaryWriterBuilder.java:[line 179] @@ -1749,37 +1640,37 @@ Field is a mutable array com.amazon.ion.impl._Private_IonConstants.BINARY_VERSION_MARKER_1_0 is a mutable array - - At _Private_IonConstants.java:[lines 23-275] + + At _Private_IonConstants.java:[lines 23-282] In class com.amazon.ion.impl._Private_IonConstants - + In _Private_IonConstants.java Field com.amazon.ion.impl._Private_IonConstants.BINARY_VERSION_MARKER_1_0 - - At _Private_IonConstants.java:[line 103] + + At _Private_IonConstants.java:[line 111] Field is a mutable array com.amazon.ion.impl._Private_IonTextAppender.ZERO_PADDING is a mutable array - - At _Private_IonTextAppender.java:[lines 43-1008] + + At _Private_IonTextAppender.java:[lines 43-1032] In class com.amazon.ion.impl._Private_IonTextAppender - + In _Private_IonTextAppender.java Field com.amazon.ion.impl._Private_IonTextAppender.ZERO_PADDING - + At _Private_IonTextAppender.java:[line 111] @@ -1787,18 +1678,18 @@ Field should be package protected com.amazon.ion.impl._Private_IonTextAppender.OPERATOR_CHAR_FLAGS should be package protected - - At _Private_IonTextAppender.java:[lines 43-1008] + + At _Private_IonTextAppender.java:[lines 43-1032] In class com.amazon.ion.impl._Private_IonTextAppender - + In _Private_IonTextAppender.java Field com.amazon.ion.impl._Private_IonTextAppender.OPERATOR_CHAR_FLAGS - + At _Private_IonTextAppender.java:[line 98] @@ -1806,16 +1697,16 @@ Switch statement found where default case is missing Switch statement found in com.amazon.ion.impl._Private_IonTextAppender.isIdentifierKeyword(CharSequence) where default case is missing - - At _Private_IonTextAppender.java:[lines 43-1008] + + At _Private_IonTextAppender.java:[lines 43-1032] In class com.amazon.ion.impl._Private_IonTextAppender - + In method com.amazon.ion.impl._Private_IonTextAppender.isIdentifierKeyword(CharSequence) - + At _Private_IonTextAppender.java:[lines 421-460] @@ -1823,18 +1714,18 @@ Field isn't final but should be com.amazon.ion.impl._Private_IonTextWriterBuilder.STANDARD isn't final but should be - - At _Private_IonTextWriterBuilder.java:[lines 33-314] + + At _Private_IonTextWriterBuilder.java:[lines 33-329] In class com.amazon.ion.impl._Private_IonTextWriterBuilder - + In _Private_IonTextWriterBuilder.java Field com.amazon.ion.impl._Private_IonTextWriterBuilder.STANDARD - + At _Private_IonTextWriterBuilder.java:[line 44] @@ -1842,22 +1733,22 @@ May expose internal representation by returning reference to mutable object com.amazon.ion.impl._Private_MarkupCallback.getAppendable() may expose internal representation by returning _Private_MarkupCallback.myAppendable - + At _Private_MarkupCallback.java:[lines 190-351] In class com.amazon.ion.impl._Private_MarkupCallback - + In method com.amazon.ion.impl._Private_MarkupCallback.getAppendable() - + In _Private_MarkupCallback.java Field com.amazon.ion.impl._Private_MarkupCallback.myAppendable - + At _Private_MarkupCallback.java:[line 200] @@ -1865,17 +1756,17 @@ May expose internal representation by incorporating reference to mutable object new com.amazon.ion.impl._Private_MarkupCallback(_Private_FastAppendable) may expose internal representation by storing an externally mutable object into _Private_MarkupCallback.myAppendable - + At _Private_MarkupCallback.java:[lines 190-351] In class com.amazon.ion.impl._Private_MarkupCallback - + In method new com.amazon.ion.impl._Private_MarkupCallback(_Private_FastAppendable) - + In _Private_MarkupCallback.java Field com.amazon.ion.impl._Private_MarkupCallback.myAppendable @@ -1883,7 +1774,7 @@ Local variable named appendable - + At _Private_MarkupCallback.java:[line 191] @@ -1891,18 +1782,18 @@ Field isn't final but should be com.amazon.ion.impl._Private_ScalarConversions.FNID_identity isn't final but should be - + At _Private_ScalarConversions.java:[lines 30-333] In class com.amazon.ion.impl._Private_ScalarConversions - + In _Private_ScalarConversions.java Field com.amazon.ion.impl._Private_ScalarConversions.FNID_identity - + At _Private_ScalarConversions.java:[line 114] @@ -1910,18 +1801,18 @@ Field isn't final but should be com.amazon.ion.impl._Private_ScalarConversions.FNID_no_conversion isn't final but should be - + At _Private_ScalarConversions.java:[lines 30-333] In class com.amazon.ion.impl._Private_ScalarConversions - + In _Private_ScalarConversions.java Field com.amazon.ion.impl._Private_ScalarConversions.FNID_no_conversion - + At _Private_ScalarConversions.java:[line 113] @@ -1929,23 +1820,23 @@ Unchecked/unconfirmed cast Unchecked/unconfirmed cast from java.math.BigDecimal to com.amazon.ion.Decimal in com.amazon.ion.impl._Private_ScalarConversions$ValueVariant.addValue(BigDecimal) - + At _Private_ScalarConversions.java:[lines 373-873] In class com.amazon.ion.impl._Private_ScalarConversions$ValueVariant - + In method com.amazon.ion.impl._Private_ScalarConversions$ValueVariant.addValue(BigDecimal) - - At BigDecimal.java:[lines 228-5723] + + At BigDecimal.java:[lines 224-5315] Actual type java.math.BigDecimal - + At Decimal.java:[lines 48-426] Expected com.amazon.ion.Decimal @@ -1953,7 +1844,7 @@ Value loaded from value - + At _Private_ScalarConversions.java:[line 505] @@ -1961,22 +1852,22 @@ May expose internal representation by returning reference to mutable object com.amazon.ion.impl._Private_ScalarConversions$ValueVariant.getDate() may expose internal representation by returning _Private_ScalarConversions$ValueVariant._date_value - + At _Private_ScalarConversions.java:[lines 373-873] In class com.amazon.ion.impl._Private_ScalarConversions$ValueVariant - + In method com.amazon.ion.impl._Private_ScalarConversions$ValueVariant.getDate() - + In _Private_ScalarConversions.java Field com.amazon.ion.impl._Private_ScalarConversions$ValueVariant._date_value - + At _Private_ScalarConversions.java:[line 566] @@ -1984,22 +1875,22 @@ May expose internal representation by returning reference to mutable object com.amazon.ion.impl._Private_ScalarConversions$ValueVariant.getDecimal() may expose internal representation by returning _Private_ScalarConversions$ValueVariant._decimal_value - + At _Private_ScalarConversions.java:[lines 373-873] In class com.amazon.ion.impl._Private_ScalarConversions$ValueVariant - + In method com.amazon.ion.impl._Private_ScalarConversions$ValueVariant.getDecimal() - + In _Private_ScalarConversions.java Field com.amazon.ion.impl._Private_ScalarConversions$ValueVariant._decimal_value - + At _Private_ScalarConversions.java:[line 562] @@ -2007,22 +1898,22 @@ May expose internal representation by returning reference to mutable object com.amazon.ion.impl._Private_ScalarConversions$ValueVariant.getTimestamp() may expose internal representation by returning _Private_ScalarConversions$ValueVariant._timestamp_value - + At _Private_ScalarConversions.java:[lines 373-873] In class com.amazon.ion.impl._Private_ScalarConversions$ValueVariant - + In method com.amazon.ion.impl._Private_ScalarConversions$ValueVariant.getTimestamp() - + In _Private_ScalarConversions.java Field com.amazon.ion.impl._Private_ScalarConversions$ValueVariant._timestamp_value - + At _Private_ScalarConversions.java:[line 570] @@ -2030,17 +1921,17 @@ May expose internal representation by incorporating reference to mutable object com.amazon.ion.impl._Private_ScalarConversions$ValueVariant.addValue(Decimal) may expose internal representation by storing an externally mutable object into _Private_ScalarConversions$ValueVariant._decimal_value - + At _Private_ScalarConversions.java:[lines 373-873] In class com.amazon.ion.impl._Private_ScalarConversions$ValueVariant - + In method com.amazon.ion.impl._Private_ScalarConversions$ValueVariant.addValue(Decimal) - + In _Private_ScalarConversions.java Field com.amazon.ion.impl._Private_ScalarConversions$ValueVariant._decimal_value @@ -2048,7 +1939,7 @@ Local variable named value - + At _Private_ScalarConversions.java:[line 509] @@ -2056,17 +1947,17 @@ May expose internal representation by incorporating reference to mutable object com.amazon.ion.impl._Private_ScalarConversions$ValueVariant.addValue(Timestamp) may expose internal representation by storing an externally mutable object into _Private_ScalarConversions$ValueVariant._timestamp_value - + At _Private_ScalarConversions.java:[lines 373-873] In class com.amazon.ion.impl._Private_ScalarConversions$ValueVariant - + In method com.amazon.ion.impl._Private_ScalarConversions$ValueVariant.addValue(Timestamp) - + In _Private_ScalarConversions.java Field com.amazon.ion.impl._Private_ScalarConversions$ValueVariant._timestamp_value @@ -2074,7 +1965,7 @@ Local variable named value - + At _Private_ScalarConversions.java:[line 517] @@ -2082,17 +1973,17 @@ May expose internal representation by incorporating reference to mutable object com.amazon.ion.impl._Private_ScalarConversions$ValueVariant.addValue(BigDecimal) may expose internal representation by storing an externally mutable object into _Private_ScalarConversions$ValueVariant._decimal_value - + At _Private_ScalarConversions.java:[lines 373-873] In class com.amazon.ion.impl._Private_ScalarConversions$ValueVariant - + In method com.amazon.ion.impl._Private_ScalarConversions$ValueVariant.addValue(BigDecimal) - + In _Private_ScalarConversions.java Field com.amazon.ion.impl._Private_ScalarConversions$ValueVariant._decimal_value @@ -2100,7 +1991,7 @@ Local variable named value - + At _Private_ScalarConversions.java:[line 505] @@ -2108,17 +1999,17 @@ May expose internal representation by incorporating reference to mutable object com.amazon.ion.impl._Private_ScalarConversions$ValueVariant.addValue(Date) may expose internal representation by storing an externally mutable object into _Private_ScalarConversions$ValueVariant._date_value - + At _Private_ScalarConversions.java:[lines 373-873] In class com.amazon.ion.impl._Private_ScalarConversions$ValueVariant - + In method com.amazon.ion.impl._Private_ScalarConversions$ValueVariant.addValue(Date) - + In _Private_ScalarConversions.java Field com.amazon.ion.impl._Private_ScalarConversions$ValueVariant._date_value @@ -2126,7 +2017,7 @@ Local variable named value - + At _Private_ScalarConversions.java:[line 513] @@ -2134,17 +2025,17 @@ May expose internal representation by incorporating reference to mutable object com.amazon.ion.impl._Private_ScalarConversions$ValueVariant.setValue(Decimal) may expose internal representation by storing an externally mutable object into _Private_ScalarConversions$ValueVariant._decimal_value - + At _Private_ScalarConversions.java:[lines 373-873] In class com.amazon.ion.impl._Private_ScalarConversions$ValueVariant - + In method com.amazon.ion.impl._Private_ScalarConversions$ValueVariant.setValue(Decimal) - + In _Private_ScalarConversions.java Field com.amazon.ion.impl._Private_ScalarConversions$ValueVariant._decimal_value @@ -2152,7 +2043,7 @@ Local variable named value - + At _Private_ScalarConversions.java:[line 463] @@ -2160,17 +2051,17 @@ May expose internal representation by incorporating reference to mutable object com.amazon.ion.impl._Private_ScalarConversions$ValueVariant.setValue(Timestamp) may expose internal representation by storing an externally mutable object into _Private_ScalarConversions$ValueVariant._timestamp_value - + At _Private_ScalarConversions.java:[lines 373-873] In class com.amazon.ion.impl._Private_ScalarConversions$ValueVariant - + In method com.amazon.ion.impl._Private_ScalarConversions$ValueVariant.setValue(Timestamp) - + In _Private_ScalarConversions.java Field com.amazon.ion.impl._Private_ScalarConversions$ValueVariant._timestamp_value @@ -2178,7 +2069,7 @@ Local variable named value - + At _Private_ScalarConversions.java:[line 471] @@ -2186,17 +2077,17 @@ May expose internal representation by incorporating reference to mutable object com.amazon.ion.impl._Private_ScalarConversions$ValueVariant.setValue(Date) may expose internal representation by storing an externally mutable object into _Private_ScalarConversions$ValueVariant._date_value - + At _Private_ScalarConversions.java:[lines 373-873] In class com.amazon.ion.impl._Private_ScalarConversions$ValueVariant - + In method com.amazon.ion.impl._Private_ScalarConversions$ValueVariant.setValue(Date) - + In _Private_ScalarConversions.java Field com.amazon.ion.impl._Private_ScalarConversions$ValueVariant._date_value @@ -2204,7 +2095,7 @@ Local variable named value - + At _Private_ScalarConversions.java:[line 467] @@ -2212,17 +2103,17 @@ May expose internal representation by incorporating reference to mutable object com.amazon.ion.impl._Private_SymtabExtendsCache.symtabsCompat(SymbolTable, SymbolTable) may expose internal representation by storing an externally mutable object into _Private_SymtabExtendsCache.myReaderSymtab - + At _Private_SymtabExtendsCache.java:[lines 27-64] In class com.amazon.ion.impl._Private_SymtabExtendsCache - + In method com.amazon.ion.impl._Private_SymtabExtendsCache.symtabsCompat(SymbolTable, SymbolTable) - + In _Private_SymtabExtendsCache.java Field com.amazon.ion.impl._Private_SymtabExtendsCache.myReaderSymtab @@ -2230,7 +2121,7 @@ Local variable named readerSymtab - + At _Private_SymtabExtendsCache.java:[line 58] @@ -2238,17 +2129,17 @@ May expose internal representation by incorporating reference to mutable object com.amazon.ion.impl._Private_SymtabExtendsCache.symtabsCompat(SymbolTable, SymbolTable) may expose internal representation by storing an externally mutable object into _Private_SymtabExtendsCache.myWriterSymtab - + At _Private_SymtabExtendsCache.java:[lines 27-64] In class com.amazon.ion.impl._Private_SymtabExtendsCache - + In method com.amazon.ion.impl._Private_SymtabExtendsCache.symtabsCompat(SymbolTable, SymbolTable) - + In _Private_SymtabExtendsCache.java Field com.amazon.ion.impl._Private_SymtabExtendsCache.myWriterSymtab @@ -2256,7 +2147,7 @@ Local variable named writerSymtab - + At _Private_SymtabExtendsCache.java:[line 57] @@ -2264,96 +2155,73 @@ Switch statement found where default case is missing Switch statement found in com.amazon.ion.impl.bin.IonManagedBinaryWriter$UserState$2.beforeStepIn(IonManagedBinaryWriter, IonType) where default case is missing - - At IonManagedBinaryWriter.java:[lines 328-420] + + At IonManagedBinaryWriter.java:[lines 327-419] In class com.amazon.ion.impl.bin.IonManagedBinaryWriter$UserState$2 - + In method com.amazon.ion.impl.bin.IonManagedBinaryWriter$UserState$2.beforeStepIn(IonManagedBinaryWriter, IonType) - - At IonManagedBinaryWriter.java:[lines 335-351] + + At IonManagedBinaryWriter.java:[lines 334-350] Switch statement found where default case is missing Switch statement found in com.amazon.ion.impl.bin.IonManagedBinaryWriter$UserState$3.afterStepOut(IonManagedBinaryWriter) where default case is missing - - At IonManagedBinaryWriter.java:[lines 422-510] + + At IonManagedBinaryWriter.java:[lines 421-509] In class com.amazon.ion.impl.bin.IonManagedBinaryWriter$UserState$3 - + In method com.amazon.ion.impl.bin.IonManagedBinaryWriter$UserState$3.afterStepOut(IonManagedBinaryWriter) - - At IonManagedBinaryWriter.java:[lines 437-473] + + At IonManagedBinaryWriter.java:[lines 436-472] Switch statement found where default case is missing Switch statement found in com.amazon.ion.impl.bin.IonManagedBinaryWriter$UserState$3.writeInt(IonManagedBinaryWriter, long) where default case is missing - - At IonManagedBinaryWriter.java:[lines 422-510] + + At IonManagedBinaryWriter.java:[lines 421-509] In class com.amazon.ion.impl.bin.IonManagedBinaryWriter$UserState$3 - + In method com.amazon.ion.impl.bin.IonManagedBinaryWriter$UserState$3.writeInt(IonManagedBinaryWriter, long) - - At IonManagedBinaryWriter.java:[lines 500-506] - - - - May expose internal representation by returning reference to mutable object - com.amazon.ion.impl.bin.utf8.PoolableByteBuffer.getBuffer() may expose internal representation by returning PoolableByteBuffer.buffer - - - At PoolableByteBuffer.java:[lines 12-31] - - In class com.amazon.ion.impl.bin.utf8.PoolableByteBuffer - - - - In method com.amazon.ion.impl.bin.utf8.PoolableByteBuffer.getBuffer() - - - - In PoolableByteBuffer.java - - Field com.amazon.ion.impl.bin.utf8.PoolableByteBuffer.buffer - - - At PoolableByteBuffer.java:[line 31] + + At IonManagedBinaryWriter.java:[lines 499-505] May expose internal representation by returning reference to mutable object com.amazon.ion.impl.bin.utf8.Utf8StringEncoder$Result.getBuffer() may expose internal representation by returning Utf8StringEncoder$Result.buffer - + At Utf8StringEncoder.java:[lines 128-148] In class com.amazon.ion.impl.bin.utf8.Utf8StringEncoder$Result - + In method com.amazon.ion.impl.bin.utf8.Utf8StringEncoder$Result.getBuffer() - + In Utf8StringEncoder.java Field com.amazon.ion.impl.bin.utf8.Utf8StringEncoder$Result.buffer - + At Utf8StringEncoder.java:[line 141] @@ -2361,17 +2229,17 @@ May expose internal representation by incorporating reference to mutable object new com.amazon.ion.impl.bin.utf8.Utf8StringEncoder$Result(int, byte[]) may expose internal representation by storing an externally mutable object into Utf8StringEncoder$Result.buffer - + At Utf8StringEncoder.java:[lines 128-148] In class com.amazon.ion.impl.bin.utf8.Utf8StringEncoder$Result - + In method new com.amazon.ion.impl.bin.utf8.Utf8StringEncoder$Result(int, byte[]) - + In Utf8StringEncoder.java Field com.amazon.ion.impl.bin.utf8.Utf8StringEncoder$Result.buffer @@ -2379,7 +2247,7 @@ Local variable named buffer - + At Utf8StringEncoder.java:[line 130] @@ -2387,13 +2255,13 @@ Bad comparison of nonnegative value with negative constant or zero Bad comparison of nonnegative value with 0 in com.amazon.ion.impl.lite.IonContainerLite.add(int, IonValueLite) - - At IonContainerLite.java:[lines 35-751] + + At IonContainerLite.java:[lines 39-857] In class com.amazon.ion.impl.lite.IonContainerLite - + In method com.amazon.ion.impl.lite.IonContainerLite.add(int, IonValueLite) @@ -2402,71 +2270,71 @@ Local variable named index - - At IonContainerLite.java:[line 569] + + At IonContainerLite.java:[line 663] May expose internal representation by returning reference to mutable object com.amazon.ion.impl.lite.IonContainerLite$SequenceContentIterator.next() may expose internal representation by returning IonContainerLite$SequenceContentIterator.__current - - At IonContainerLite.java:[lines 191-361] + + At IonContainerLite.java:[lines 275-463] In class com.amazon.ion.impl.lite.IonContainerLite$SequenceContentIterator - + In method com.amazon.ion.impl.lite.IonContainerLite$SequenceContentIterator.next() - + In IonContainerLite.java Field com.amazon.ion.impl.lite.IonContainerLite$SequenceContentIterator.__current - - At IonContainerLite.java:[line 283] + + At IonContainerLite.java:[line 367] May expose internal representation by returning reference to mutable object com.amazon.ion.impl.lite.IonContainerLite$SequenceContentIterator.previous() may expose internal representation by returning IonContainerLite$SequenceContentIterator.__current - - At IonContainerLite.java:[lines 191-361] + + At IonContainerLite.java:[lines 275-463] In class com.amazon.ion.impl.lite.IonContainerLite$SequenceContentIterator - + In method com.amazon.ion.impl.lite.IonContainerLite$SequenceContentIterator.previous() - + In IonContainerLite.java Field com.amazon.ion.impl.lite.IonContainerLite$SequenceContentIterator.__current - - At IonContainerLite.java:[line 309] + + At IonContainerLite.java:[line 408] May expose internal representation by incorporating reference to mutable object new com.amazon.ion.impl.lite.IonContainerLite$SequenceContentIterator(IonContainerLite, int, boolean) may expose internal representation by storing an externally mutable object into IonContainerLite$SequenceContentIterator.this$0 - - At IonContainerLite.java:[lines 191-361] + + At IonContainerLite.java:[lines 275-463] In class com.amazon.ion.impl.lite.IonContainerLite$SequenceContentIterator - + In method new com.amazon.ion.impl.lite.IonContainerLite$SequenceContentIterator(IonContainerLite, int, boolean) - + In IonContainerLite.java Field com.amazon.ion.impl.lite.IonContainerLite$SequenceContentIterator.this$0 @@ -2474,48 +2342,48 @@ Local variable named this$0 - - At IonContainerLite.java:[line 200] + + At IonContainerLite.java:[line 284] Self assignment of field Self assignment of field IonContainerLite$SequenceContentIterator.__pos in com.amazon.ion.impl.lite.IonContainerLite$SequenceContentIterator.force_position_sync_helper() - - At IonContainerLite.java:[lines 191-361] + + At IonContainerLite.java:[lines 275-463] In class com.amazon.ion.impl.lite.IonContainerLite$SequenceContentIterator - + In method com.amazon.ion.impl.lite.IonContainerLite$SequenceContentIterator.force_position_sync_helper() - + In IonContainerLite.java Field com.amazon.ion.impl.lite.IonContainerLite$SequenceContentIterator.__pos - - At IonContainerLite.java:[line 234] + + At IonContainerLite.java:[line 318] May expose internal representation by incorporating reference to mutable object new com.amazon.ion.impl.lite.IonDatagramLite$SystemContentIterator(IonDatagramLite, boolean) may expose internal representation by storing an externally mutable object into IonDatagramLite$SystemContentIterator.this$0 - - At IonDatagramLite.java:[lines 604-853] + + At IonDatagramLite.java:[lines 585-834] In class com.amazon.ion.impl.lite.IonDatagramLite$SystemContentIterator - + In method new com.amazon.ion.impl.lite.IonDatagramLite$SystemContentIterator(IonDatagramLite, boolean) - + In IonDatagramLite.java Field com.amazon.ion.impl.lite.IonDatagramLite$SystemContentIterator.this$0 @@ -2523,75 +2391,75 @@ Local variable named this$0 - - At IonDatagramLite.java:[line 614] + + At IonDatagramLite.java:[line 595] Nullcheck of value previously dereferenced - Nullcheck of IonDatagramLite$SystemIteratorPosition.__local_values at line 1094 of value previously dereferenced in com.amazon.ion.impl.lite.IonDatagramLite$SystemIteratorPosition.push_system_value(IonValueLite) + Nullcheck of IonDatagramLite$SystemIteratorPosition.__local_values at line 1075 of value previously dereferenced in com.amazon.ion.impl.lite.IonDatagramLite$SystemIteratorPosition.push_system_value(IonValueLite) - - At IonDatagramLite.java:[lines 856-1157] + + At IonDatagramLite.java:[lines 837-1138] In class com.amazon.ion.impl.lite.IonDatagramLite$SystemIteratorPosition - + In method com.amazon.ion.impl.lite.IonDatagramLite$SystemIteratorPosition.push_system_value(IonValueLite) - + In IonDatagramLite.java Value loaded from field com.amazon.ion.impl.lite.IonDatagramLite$SystemIteratorPosition.__local_values - - At IonDatagramLite.java:[line 1093] + + At IonDatagramLite.java:[line 1074] - - Redundant null check at IonDatagramLite.java:[line 1094] + + Redundant null check at IonDatagramLite.java:[line 1075] Nullcheck of value previously dereferenced - Nullcheck of curr at line 1153 of value previously dereferenced in com.amazon.ion.impl.lite.IonDatagramLite$SystemIteratorPosition.count_system_values(IonSystem, SymbolTable, SymbolTable) + Nullcheck of curr at line 1134 of value previously dereferenced in com.amazon.ion.impl.lite.IonDatagramLite$SystemIteratorPosition.count_system_values(IonSystem, SymbolTable, SymbolTable) - - At IonDatagramLite.java:[lines 856-1157] + + At IonDatagramLite.java:[lines 837-1138] In class com.amazon.ion.impl.lite.IonDatagramLite$SystemIteratorPosition - + In method com.amazon.ion.impl.lite.IonDatagramLite$SystemIteratorPosition.count_system_values(IonSystem, SymbolTable, SymbolTable) Value loaded from curr - - At IonDatagramLite.java:[line 1148] + + At IonDatagramLite.java:[line 1129] - - Redundant null check at IonDatagramLite.java:[line 1153] + + Redundant null check at IonDatagramLite.java:[line 1134] Comparison of String objects using == or != Comparison of String objects using == or != in com.amazon.ion.impl.lite.IonStructLite.validate() - - At IonStructLite.java:[lines 41-818] + + At IonStructLite.java:[lines 38-753] In class com.amazon.ion.impl.lite.IonStructLite - + In method com.amazon.ion.impl.lite.IonStructLite.validate() - - At String.java:[lines 125-3345] + + At String.java:[lines 111-3141] Actual type String @@ -2601,8 +2469,8 @@ Value loaded from error - - At IonStructLite.java:[line 233] + + At IonStructLite.java:[line 230] @@ -2610,84 +2478,59 @@ Load of known null value Load of known null value in com.amazon.ion.impl.lite.IonStructLite.add(SymbolToken, IonValue) - - At IonStructLite.java:[lines 41-818] + + At IonStructLite.java:[lines 38-753] In class com.amazon.ion.impl.lite.IonStructLite - + In method com.amazon.ion.impl.lite.IonStructLite.add(SymbolToken, IonValue) Value loaded from text - - At IonStructLite.java:[line 528] + + At IonStructLite.java:[line 500] Method concatenates strings using + in a loop com.amazon.ion.impl.lite.IonStructLite.validate() concatenates strings using + in a loop - - At IonStructLite.java:[lines 41-818] + + At IonStructLite.java:[lines 38-753] In class com.amazon.ion.impl.lite.IonStructLite - + In method com.amazon.ion.impl.lite.IonStructLite.validate() - - At IonStructLite.java:[line 229] - - - - Method invokes inefficient Number constructor; use static valueOf instead - com.amazon.ion.impl.lite.IonTimestampLite.setLocalOffset(int) invokes inefficient new Integer(int) constructor; use Integer.valueOf(int) instead - - - At IonTimestampLite.java:[lines 29-246] - - In class com.amazon.ion.impl.lite.IonTimestampLite - - - - In method com.amazon.ion.impl.lite.IonTimestampLite.setLocalOffset(int) - - - - Called method new Integer(int) - - - - Should call Integer.valueOf(int) instead - - - At IonTimestampLite.java:[line 215] + + At IonStructLite.java:[line 226] Unsigned right shift cast to short/byte Unsigned right shift cast to short/byte in com.amazon.ion.impl.lite.ReverseBinaryEncoder.writeVarInt(int) - + At ReverseBinaryEncoder.java:[lines 90-1464] In class com.amazon.ion.impl.lite.ReverseBinaryEncoder - + In method com.amazon.ion.impl.lite.ReverseBinaryEncoder.writeVarInt(int) - + At ReverseBinaryEncoder.java:[line 571] - + Another occurrence at ReverseBinaryEncoder.java:[line 581] - + Another occurrence at ReverseBinaryEncoder.java:[line 592] @@ -2695,66 +2538,164 @@ Unsigned right shift cast to short/byte Unsigned right shift cast to short/byte in com.amazon.ion.impl.lite.ReverseBinaryEncoder.writeVarUInt(int) - + At ReverseBinaryEncoder.java:[lines 90-1464] In class com.amazon.ion.impl.lite.ReverseBinaryEncoder - + In method com.amazon.ion.impl.lite.ReverseBinaryEncoder.writeVarUInt(int) - + At ReverseBinaryEncoder.java:[line 486] - + Another occurrence at ReverseBinaryEncoder.java:[line 494] - + Another occurrence at ReverseBinaryEncoder.java:[line 503] - + Another occurrence at ReverseBinaryEncoder.java:[line 513] + + May expose internal representation by returning reference to mutable object + com.amazon.ion.system.IonSystemBuilder.getIonBinaryWriterBuilder() may expose internal representation by returning IonSystemBuilder.binaryWriterBuilder + + + At IonSystemBuilder.java:[lines 85-471] + + In class com.amazon.ion.system.IonSystemBuilder + + + + In method com.amazon.ion.system.IonSystemBuilder.getIonBinaryWriterBuilder() + + + + In IonSystemBuilder.java + + Field com.amazon.ion.system.IonSystemBuilder.binaryWriterBuilder + + + At IonSystemBuilder.java:[line 343] + + + + May expose internal representation by returning reference to mutable object + com.amazon.ion.system.IonSystemBuilder.getIonTextWriterBuilder() may expose internal representation by returning IonSystemBuilder.textWriterBuilder + + + At IonSystemBuilder.java:[lines 85-471] + + In class com.amazon.ion.system.IonSystemBuilder + + + + In method com.amazon.ion.system.IonSystemBuilder.getIonTextWriterBuilder() + + + + In IonSystemBuilder.java + + Field com.amazon.ion.system.IonSystemBuilder.textWriterBuilder + + + At IonSystemBuilder.java:[line 290] + + May expose internal representation by returning reference to mutable object com.amazon.ion.system.IonSystemBuilder.getReaderBuilder() may expose internal representation by returning IonSystemBuilder.readerBuilder - - At IonSystemBuilder.java:[lines 84-358] + + At IonSystemBuilder.java:[lines 85-471] In class com.amazon.ion.system.IonSystemBuilder - + In method com.amazon.ion.system.IonSystemBuilder.getReaderBuilder() - + In IonSystemBuilder.java Field com.amazon.ion.system.IonSystemBuilder.readerBuilder - - At IonSystemBuilder.java:[line 287] + + At IonSystemBuilder.java:[line 396] + + + + May expose internal representation by incorporating reference to mutable object + com.amazon.ion.system.IonSystemBuilder.setIonBinaryWriterBuilder(IonBinaryWriterBuilder) may expose internal representation by storing an externally mutable object into IonSystemBuilder.binaryWriterBuilder + + + At IonSystemBuilder.java:[lines 85-471] + + In class com.amazon.ion.system.IonSystemBuilder + + + + In method com.amazon.ion.system.IonSystemBuilder.setIonBinaryWriterBuilder(IonBinaryWriterBuilder) + + + + In IonSystemBuilder.java + + Field com.amazon.ion.system.IonSystemBuilder.binaryWriterBuilder + + + Local variable named builder + + + At IonSystemBuilder.java:[line 362] + + + + May expose internal representation by incorporating reference to mutable object + com.amazon.ion.system.IonSystemBuilder.setIonTextWriterBuilder(IonTextWriterBuilder) may expose internal representation by storing an externally mutable object into IonSystemBuilder.textWriterBuilder + + + At IonSystemBuilder.java:[lines 85-471] + + In class com.amazon.ion.system.IonSystemBuilder + + + + In method com.amazon.ion.system.IonSystemBuilder.setIonTextWriterBuilder(IonTextWriterBuilder) + + + + In IonSystemBuilder.java + + Field com.amazon.ion.system.IonSystemBuilder.textWriterBuilder + + + Local variable named builder + + + At IonSystemBuilder.java:[line 309] May expose internal representation by incorporating reference to mutable object com.amazon.ion.system.IonSystemBuilder.setReaderBuilder(IonReaderBuilder) may expose internal representation by storing an externally mutable object into IonSystemBuilder.readerBuilder - - At IonSystemBuilder.java:[lines 84-358] + + At IonSystemBuilder.java:[lines 85-471] In class com.amazon.ion.system.IonSystemBuilder - + In method com.amazon.ion.system.IonSystemBuilder.setReaderBuilder(IonReaderBuilder) - + In IonSystemBuilder.java Field com.amazon.ion.system.IonSystemBuilder.readerBuilder @@ -2762,108 +2703,108 @@ Local variable named builder - - At IonSystemBuilder.java:[line 306] + + At IonSystemBuilder.java:[line 415] Public static method may expose internal representation by returning array Public static com.amazon.ion.system.IonSystemBuilder.standard() may expose internal representation by returning IonSystemBuilder.STANDARD - - At IonSystemBuilder.java:[lines 84-358] + + At IonSystemBuilder.java:[lines 85-471] In class com.amazon.ion.system.IonSystemBuilder - + In method com.amazon.ion.system.IonSystemBuilder.standard() - + In IonSystemBuilder.java Field com.amazon.ion.system.IonSystemBuilder.STANDARD - - At IonSystemBuilder.java:[line 96] + + At IonSystemBuilder.java:[line 97] Equals method should not assume anything about the type of its argument Equals method for com.amazon.ion.util.Equivalence$Field assumes the argument is of type Equivalence$Field - - At Equivalence.java:[lines 421-471] + + At Equivalence.java:[lines 444-496] In class com.amazon.ion.util.Equivalence$Field - + In method com.amazon.ion.util.Equivalence$Field.equals(Object) - - At Equivalence.java:[line 468] + + At Equivalence.java:[line 493] equals() method does not check for null argument com.amazon.ion.util.Equivalence$Field.equals(Object) does not check for null argument - - At Equivalence.java:[lines 421-471] + + At Equivalence.java:[lines 444-496] In class com.amazon.ion.util.Equivalence$Field - + In method com.amazon.ion.util.Equivalence$Field.equals(Object) Parameter other - - At Equivalence.java:[lines 468-470] + + At Equivalence.java:[lines 493-495] May expose internal representation by returning reference to mutable object com.amazon.ion.util.JarInfo.getBuildTime() may expose internal representation by returning JarInfo.ourBuildTime - - At JarInfo.java:[lines 48-125] + + At JarInfo.java:[lines 43-120] In class com.amazon.ion.util.JarInfo - + In method com.amazon.ion.util.JarInfo.getBuildTime() - + In JarInfo.java Field com.amazon.ion.util.JarInfo.ourBuildTime - - At JarInfo.java:[line 70] + + At JarInfo.java:[line 65] May expose internal representation by incorporating reference to mutable object new com.amazon.ion.util.Printer$Options(Printer) may expose internal representation by storing an externally mutable object into Printer$Options.this$0 - - At Printer.java:[lines 84-111] + + At Printer.java:[lines 88-115] In class com.amazon.ion.util.Printer$Options - + In method new com.amazon.ion.util.Printer$Options(Printer) - + In Printer.java Field com.amazon.ion.util.Printer$Options.this$0 @@ -2871,21 +2812,21 @@ Local variable named this$0 - - At Printer.java:[line 84] + + At Printer.java:[line 88] Should be a static inner class Should com.amazon.ion.util.Printer$Options be a _static_ inner class? - - At Printer.java:[lines 84-111] + + At Printer.java:[lines 88-115] In class com.amazon.ion.util.Printer$Options - - At Printer.java:[lines 84-111] + + At Printer.java:[lines 88-115] diff --git a/src/main/java/com/amazon/ion/system/IonSystemBuilder.java b/src/main/java/com/amazon/ion/system/IonSystemBuilder.java index c6c69c74f8..7674d17437 100644 --- a/src/main/java/com/amazon/ion/system/IonSystemBuilder.java +++ b/src/main/java/com/amazon/ion/system/IonSystemBuilder.java @@ -24,6 +24,7 @@ import com.amazon.ion.SymbolTable; import com.amazon.ion.impl._Private_IonBinaryWriterBuilder; import com.amazon.ion.impl._Private_Utils; +import java.util.Optional; /** * The builder for creating {@link IonSystem}s. @@ -101,6 +102,8 @@ public static IonSystemBuilder standard() IonCatalog myCatalog; boolean myStreamCopyOptimized = false; + IonTextWriterBuilder textWriterBuilder; + IonBinaryWriterBuilder binaryWriterBuilder; IonReaderBuilder readerBuilder; @@ -114,6 +117,8 @@ private IonSystemBuilder(IonSystemBuilder that) { this.myCatalog = that.myCatalog; this.myStreamCopyOptimized = that.myStreamCopyOptimized; + this.textWriterBuilder = that.textWriterBuilder; + this.binaryWriterBuilder = that.binaryWriterBuilder; this.readerBuilder = that.readerBuilder; } @@ -271,7 +276,111 @@ public final IonSystemBuilder withStreamCopyOptimized(boolean optimized) return b; } + //========================================================================= + + /** + * Gets the text writer builder whose options will be used when building an + * {@link IonSystem}. By default, {@link IonTextWriterBuilder#standard()} will + * be used. + * + * @see #setIonTextWriterBuilder(IonTextWriterBuilder) + * @see #withIonTextWriterBuilder(IonTextWriterBuilder) + */ + public final IonTextWriterBuilder getIonTextWriterBuilder() { + return textWriterBuilder; + } + + /** + * Sets the text writer builder whose options will be used to use when building + * an {@link IonSystem}. The writer builder's catalog will never be used; the + * catalog provided to {@link #setCatalog(IonCatalog)} or + * {@link #withCatalog(IonCatalog)} will always be used instead. + * + * @param builder the writer builder to use in built systems. + * If null, each system will be built with {@link IonTextWriterBuilder#standard()}. + * + * @see #getIonTextWriterBuilder() + * @see #withIonTextWriterBuilder(IonTextWriterBuilder) + * + * @throws UnsupportedOperationException if this is immutable. + */ + public final void setIonTextWriterBuilder(IonTextWriterBuilder builder) { + mutationCheck(); + textWriterBuilder = builder; + } + + /** + * Declares the text writer builder whose options will be used to use when building + * an {@link IonSystem}, returning a new mutable builder if this is immutable. + * The writer builder's catalog will never be used; the catalog provided to + * {@link #setCatalog(IonCatalog)} or {@link #withCatalog(IonCatalog)} will + * always be used instead. + * + * @param builder the writer builder to use in built systems. + * If null, each system will be built with {@link IonTextWriterBuilder#standard()}. + * + * @see #getIonTextWriterBuilder() + * @see #setIonTextWriterBuilder(IonTextWriterBuilder) + */ + public final IonSystemBuilder withIonTextWriterBuilder(IonTextWriterBuilder builder) + { + IonSystemBuilder b = mutable(); + b.setIonTextWriterBuilder(builder); + return b; + } + + //========================================================================= + /** + * Gets the binary writer builder whose options will be used when building an + * {@link IonSystem}. By default, {@link IonBinaryWriterBuilder#standard()} will + * be used. + * + * @see #setIonBinaryWriterBuilder(IonBinaryWriterBuilder) + * @see #withIonBinaryWriterBuilder(IonBinaryWriterBuilder) + */ + public final IonBinaryWriterBuilder getIonBinaryWriterBuilder() { + return binaryWriterBuilder; + } + + /** + * Sets the binary writer builder whose options will be used to use when building + * an {@link IonSystem}. The writer builder's catalog will never be used; the + * catalog provided to {@link #setCatalog(IonCatalog)} or + * {@link #withCatalog(IonCatalog)} will always be used instead. + * + * @param builder the writer builder to use in built systems. + * If null, each system will be built with {@link IonBinaryWriterBuilder#standard()}. + * + * @see #getIonBinaryWriterBuilder() + * @see #withIonBinaryWriterBuilder(IonBinaryWriterBuilder) + * + * @throws UnsupportedOperationException if this is immutable. + */ + public final void setIonBinaryWriterBuilder(IonBinaryWriterBuilder builder) { + mutationCheck(); + binaryWriterBuilder = builder; + } + + /** + * Declares the binary writer builder whose options will be used to use when building + * an {@link IonSystem}, returning a new mutable builder if this is immutable. + * The writer builder's catalog will never be used; the catalog provided to + * {@link #setCatalog(IonCatalog)} or {@link #withCatalog(IonCatalog)} will + * always be used instead. + * + * @param builder the writer builder to use in built systems. + * If null, each system will be built with {@link IonBinaryWriterBuilder#standard()}. + * + * @see #getIonBinaryWriterBuilder() + * @see #setIonBinaryWriterBuilder(IonBinaryWriterBuilder) + */ + public final IonSystemBuilder withIonBinaryWriterBuilder(IonBinaryWriterBuilder builder) + { + IonSystemBuilder b = mutable(); + b.setIonBinaryWriterBuilder(builder); + return b; + } //========================================================================= @@ -334,17 +443,18 @@ public final IonSystemBuilder withReaderBuilder(IonReaderBuilder builder) */ public final IonSystem build() { - IonCatalog catalog = - (myCatalog != null ? myCatalog : new SimpleCatalog()); + IonCatalog catalog = Optional.ofNullable(myCatalog) + .orElseGet(SimpleCatalog::new); - IonTextWriterBuilder twb = - IonTextWriterBuilder.standard().withCharsetAscii(); - twb.setCatalog(catalog); + IonTextWriterBuilder twb = Optional.ofNullable(textWriterBuilder) + .orElseGet(() -> IonTextWriterBuilder.standard() + .withCharsetAscii()) + .withCatalog(catalog); - _Private_IonBinaryWriterBuilder bwb = - _Private_IonBinaryWriterBuilder.standard(); - bwb.setCatalog(catalog); - bwb.setStreamCopyOptimized(myStreamCopyOptimized); + IonBinaryWriterBuilder bwb = Optional.ofNullable(binaryWriterBuilder) + .orElseGet(() -> IonBinaryWriterBuilder.standard() + .withStreamCopyOptimized(myStreamCopyOptimized)) + .withCatalog(catalog); // TODO Would be nice to remove this since it's implied by the BWB. // However that currently causes problems in the IonSystem @@ -353,9 +463,12 @@ public final IonSystem build() bwb.setInitialSymbolTable(systemSymtab); // This is what we need, more or less. // bwb = bwb.fillDefaults(); - IonReaderBuilder rb = readerBuilder == null ? IonReaderBuilder.standard() : readerBuilder; - rb = rb.withCatalog(catalog); - return newLiteSystem(twb, bwb, rb); + + IonReaderBuilder rb = Optional.ofNullable(readerBuilder) + .orElseGet(IonReaderBuilder::standard) + .withCatalog(catalog); + + return newLiteSystem(twb, (_Private_IonBinaryWriterBuilder) bwb, rb); } //========================================================================= diff --git a/src/test/java/com/amazon/ion/system/IonSystemBuilderTest.java b/src/test/java/com/amazon/ion/system/IonSystemBuilderTest.java index ad3f40b0fb..b9456908b1 100644 --- a/src/test/java/com/amazon/ion/system/IonSystemBuilderTest.java +++ b/src/test/java/com/amazon/ion/system/IonSystemBuilderTest.java @@ -133,6 +133,34 @@ public void testStreamCopyOptimizedImmutability() b2.setStreamCopyOptimized(false); } + //------------------------------------------------------------------------- + + @Test + public void testIonTextWriterBuilder() + { + IonTextWriterBuilder textWriterBuilder = IonTextWriterBuilder.standard(); + + IonSystemBuilder b = IonSystemBuilder.standard().withIonTextWriterBuilder(textWriterBuilder); + assertSame(textWriterBuilder, b.getIonTextWriterBuilder()); + } + + @Test + public void testIonBinaryWriterBuilder() + { + IonBinaryWriterBuilder binaryWriterBuilder = IonBinaryWriterBuilder.standard(); + + IonSystemBuilder b = IonSystemBuilder.standard().withIonBinaryWriterBuilder(binaryWriterBuilder); + assertSame(binaryWriterBuilder, b.getIonBinaryWriterBuilder()); + } + + @Test + public void testIonReaderBuilder() + { + IonReaderBuilder readerBuilder = IonReaderBuilder.standard(); + + IonSystemBuilder b = IonSystemBuilder.standard().withReaderBuilder(readerBuilder); + assertSame(readerBuilder, b.getReaderBuilder()); + } //-------------------------------------------------------------------------