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 1/9] 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()); + } //------------------------------------------------------------------------- From 331538a2955c8627ce3f259b75fa316d4db946b2 Mon Sep 17 00:00:00 2001 From: Yoann Vernageau <6807151+yvrng@users.noreply.github.com> Date: Wed, 3 Apr 2024 11:33:31 +0200 Subject: [PATCH 2/9] Update baseline.xml with JDK 17 --- config/spotbugs/baseline.xml | 99 ++++++++++++++++++++++-------------- 1 file changed, 61 insertions(+), 38 deletions(-) diff --git a/config/spotbugs/baseline.xml b/config/spotbugs/baseline.xml index 0960fbe2f0..9f173f4778 100644 --- a/config/spotbugs/baseline.xml +++ b/config/spotbugs/baseline.xml @@ -1,4 +1,4 @@ - + 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) @@ -39,8 +39,8 @@ In method com.amazon.ion.Timestamp.make_localtime() - - At Integer.java:[lines 52-1590] + + At Integer.java:[lines 71-1872] Actual type Integer @@ -68,8 +68,8 @@ In method com.amazon.ion.Timestamp.print(Appendable, Timestamp) - - At Integer.java:[lines 52-1590] + + At Integer.java:[lines 71-1872] Actual type Integer @@ -79,16 +79,16 @@ Value loaded from field com.amazon.ion.Timestamp.UNKNOWN_OFFSET - + At Timestamp.java:[line 2171] - + Another occurrence at Timestamp.java:[line 2179] - + Another occurrence at Timestamp.java:[line 2187] - + Another occurrence at Timestamp.java:[line 2205] @@ -106,8 +106,8 @@ In method com.amazon.ion.Timestamp.printZ(Appendable) - - At Integer.java:[lines 52-1590] + + At Integer.java:[lines 71-1872] Actual type Integer @@ -135,8 +135,8 @@ In method com.amazon.ion.Timestamp.set_fields_from_calendar(Calendar, Timestamp$Precision, boolean) - - At Integer.java:[lines 52-1590] + + At Integer.java:[lines 71-1872] Actual type Integer @@ -278,8 +278,8 @@ In method new com.amazon.ion.impl.BlockedBuffer(InputStream) - - At OutputStream.java:[lines 46-152] + + At OutputStream.java:[lines 52-198] Need to close java.io.OutputStream @@ -816,13 +816,13 @@ In class com.amazon.ion.impl.IonReaderTextRawTokensX - + In method com.amazon.ion.impl.IonReaderTextRawTokensX.read_base64_byte_helper() - + At IonReaderTextRawTokensX.java:[lines 2579-2582] - + Another occurrence at IonReaderTextRawTokensX.java:[lines 2583-2586] @@ -856,7 +856,7 @@ In class com.amazon.ion.impl.IonReaderTextRawTokensX - + In method com.amazon.ion.impl.IonReaderTextRawTokensX.skip_over_container(int) @@ -907,10 +907,10 @@ 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 2490-2509] @@ -992,7 +992,7 @@ In class com.amazon.ion.impl.IonReaderTextRawTokensX - + In method com.amazon.ion.impl.IonReaderTextRawTokensX.read_base64_getchar_helper(int) @@ -1015,7 +1015,7 @@ In class com.amazon.ion.impl.IonReaderTextRawTokensX - + In method com.amazon.ion.impl.IonReaderTextRawTokensX.read_base64_getchar_helper(int) @@ -1038,7 +1038,7 @@ In class com.amazon.ion.impl.IonReaderTextRawTokensX - + In method com.amazon.ion.impl.IonReaderTextRawTokensX.read_hex_escape_sequence_value(int) @@ -1061,10 +1061,10 @@ In class com.amazon.ion.impl.IonReaderTextRawX - + In method com.amazon.ion.impl.IonReaderTextRawX.parseSymbolToken(String, StringBuilder, int) - + At IonReaderTextRawX.java:[lines 756-758] @@ -1121,13 +1121,13 @@ 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] @@ -1162,8 +1162,8 @@ In method com.amazon.ion.impl.IonTokenReader$Type.setNumericValue(IonTokenReader, String) - - At String.java:[lines 111-3141] + + At String.java:[lines 140-4657] Actual type String @@ -1670,7 +1670,7 @@ Field com.amazon.ion.impl._Private_IonTextAppender.ZERO_PADDING - + At _Private_IonTextAppender.java:[line 111] @@ -1830,8 +1830,8 @@ In method com.amazon.ion.impl._Private_ScalarConversions$ValueVariant.addValue(BigDecimal) - - At BigDecimal.java:[lines 224-5315] + + At BigDecimal.java:[lines 305-5815] Actual type java.math.BigDecimal @@ -2202,6 +2202,29 @@ At IonManagedBinaryWriter.java:[lines 499-505] + + 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] + + 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 @@ -2458,8 +2481,8 @@ In method com.amazon.ion.impl.lite.IonStructLite.validate() - - At String.java:[lines 111-3141] + + At String.java:[lines 140-4657] Actual type String @@ -2487,10 +2510,10 @@ In method com.amazon.ion.impl.lite.IonStructLite.add(SymbolToken, IonValue) - + Value loaded from text - + At IonStructLite.java:[line 500] From 7045ce703c60676918d6d1d4d2687d86dea895b5 Mon Sep 17 00:00:00 2001 From: Yoann Vernageau <6807151+yvrng@users.noreply.github.com> Date: Fri, 5 Apr 2024 10:57:37 +0200 Subject: [PATCH 3/9] fix: fix typo in javadoc Co-authored-by: Zack Slayton --- src/main/java/com/amazon/ion/system/IonSystemBuilder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/amazon/ion/system/IonSystemBuilder.java b/src/main/java/com/amazon/ion/system/IonSystemBuilder.java index 7674d17437..7baa64c4bf 100644 --- a/src/main/java/com/amazon/ion/system/IonSystemBuilder.java +++ b/src/main/java/com/amazon/ion/system/IonSystemBuilder.java @@ -291,7 +291,7 @@ public final IonTextWriterBuilder getIonTextWriterBuilder() { } /** - * Sets the text writer builder whose options will be used to use when building + * Sets the text writer builder whose options will be used 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. From 06ca4916ec14067e714c4e9bc31fa5e87392df06 Mon Sep 17 00:00:00 2001 From: Yoann Vernageau <6807151+yvrng@users.noreply.github.com> Date: Fri, 5 Apr 2024 10:58:16 +0200 Subject: [PATCH 4/9] fix: typo in javadoc Co-authored-by: Zack Slayton --- src/main/java/com/amazon/ion/system/IonSystemBuilder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/amazon/ion/system/IonSystemBuilder.java b/src/main/java/com/amazon/ion/system/IonSystemBuilder.java index 7baa64c4bf..e4421c7109 100644 --- a/src/main/java/com/amazon/ion/system/IonSystemBuilder.java +++ b/src/main/java/com/amazon/ion/system/IonSystemBuilder.java @@ -310,7 +310,7 @@ public final void setIonTextWriterBuilder(IonTextWriterBuilder builder) { } /** - * Declares the text writer builder whose options will be used to use when building + * Declares the text writer builder whose options will be used 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 From de916d2a11d1912d1d8ba4ef2e400889cd2539d6 Mon Sep 17 00:00:00 2001 From: Yoann Vernageau <6807151+yvrng@users.noreply.github.com> Date: Fri, 5 Apr 2024 10:58:33 +0200 Subject: [PATCH 5/9] fix: typo in javadoc Co-authored-by: Zack Slayton --- src/main/java/com/amazon/ion/system/IonSystemBuilder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/amazon/ion/system/IonSystemBuilder.java b/src/main/java/com/amazon/ion/system/IonSystemBuilder.java index e4421c7109..a7e4403bd5 100644 --- a/src/main/java/com/amazon/ion/system/IonSystemBuilder.java +++ b/src/main/java/com/amazon/ion/system/IonSystemBuilder.java @@ -344,7 +344,7 @@ public final IonBinaryWriterBuilder getIonBinaryWriterBuilder() { } /** - * Sets the binary writer builder whose options will be used to use when building + * Sets the binary writer builder whose options will be used 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. From a6edac464457bbb62c04c947aa39fa5d21339ed4 Mon Sep 17 00:00:00 2001 From: Yoann Vernageau <6807151+yvrng@users.noreply.github.com> Date: Mon, 8 Apr 2024 21:43:47 +0200 Subject: [PATCH 6/9] Add default values on builders --- config/spotbugs/baseline.xml | 446 +++++++++--------- .../amazon/ion/system/IonSystemBuilder.java | 34 +- 2 files changed, 237 insertions(+), 243 deletions(-) diff --git a/config/spotbugs/baseline.xml b/config/spotbugs/baseline.xml index 9f173f4778..656a32390c 100644 --- a/config/spotbugs/baseline.xml +++ b/config/spotbugs/baseline.xml @@ -1,4 +1,4 @@ - + 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) @@ -26,8 +26,8 @@ - Suspicious reference comparison - Suspicious comparison of Integer references in com.amazon.ion.Timestamp.make_localtime() + Comparaison de références suspecte + Comparaison suspecte des références com.amazon.ion.Timestamp._offset dans com.amazon.ion.Timestamp.make_localtime() At Timestamp.java:[lines 74-2884] @@ -151,8 +151,8 @@ - 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 + Un switch comporte un cas qui déborde sur le suivant + Un switch de new com.amazon.ion.Timestamp(BigDecimal, Timestamp$Precision, Integer) comporte un cas qui déborde sur le suivant At Timestamp.java:[lines 74-2884] @@ -174,8 +174,8 @@ - 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 + Un switch comporte un cas qui déborde sur le suivant + Un switch de com.amazon.ion.Timestamp.clearUnusedPrecision() comporte un cas qui déborde sur le suivant At Timestamp.java:[lines 74-2884] @@ -265,8 +265,8 @@ - Method may fail to close stream - new com.amazon.ion.impl.BlockedBuffer(InputStream) may fail to close stream + La méthode peut ne pas fermer un flux + La méthode new com.amazon.ion.impl.BlockedBuffer(InputStream) peut ne pas fermer un flux At BlockedBuffer.java:[lines 38-1041] @@ -288,8 +288,8 @@ - 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 + Une méthode expose sa représentation interne en incorporant une référence à un objet modifiable + La méthode new com.amazon.ion.impl.BlockedBuffer$BlockedByteOutputStream(BlockedBuffer) risque d'exposer sa représentation interne en stockant un objet externe modifiable dans com.amazon.ion.impl.BlockedBuffer$BlockedByteOutputStream._buf At BlockedBuffer.java:[lines 1310-1656] @@ -314,8 +314,8 @@ - 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 + Une méthode expose sa représentation interne en incorporant une référence à un objet modifiable + La méthode new com.amazon.ion.impl.BlockedBuffer$BlockedByteOutputStream(BlockedBuffer, int) risque d'exposer sa représentation interne en stockant un objet externe modifiable dans com.amazon.ion.impl.BlockedBuffer$BlockedByteOutputStream._buf At BlockedBuffer.java:[lines 1310-1656] @@ -340,8 +340,8 @@ - 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 + Une méthode expose sa représentation interne en incorporant une référence à un objet modifiable + La méthode new com.amazon.ion.impl.BlockedBuffer$BufferedOutputStream(BlockedBuffer) risque d'exposer sa représentation interne en stockant un objet externe modifiable dans com.amazon.ion.impl.BlockedBuffer$BufferedOutputStream._buffer At BlockedBuffer.java:[lines 1674-1776] @@ -472,8 +472,8 @@ - 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 + Une méthode peut exposer sa représentation interne en renvoyant une référence à un objet modifiable + La méthode com.amazon.ion.impl.IonBinary$BufferManager.buffer() risque d'exposer sa représentation interne en renvoyant com.amazon.ion.impl.IonBinary$BufferManager._buf At IonBinary.java:[lines 322-437] @@ -495,8 +495,8 @@ - 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 + Une méthode peut exposer sa représentation interne en renvoyant une référence à un objet modifiable + La méthode com.amazon.ion.impl.IonBinary$BufferManager.openReader() risque d'exposer sa représentation interne en renvoyant com.amazon.ion.impl.IonBinary$BufferManager._reader At IonBinary.java:[lines 322-437] @@ -518,8 +518,8 @@ - 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 + Une méthode peut exposer sa représentation interne en renvoyant une référence à un objet modifiable + La méthode com.amazon.ion.impl.IonBinary$BufferManager.openWriter() risque d'exposer sa représentation interne en renvoyant com.amazon.ion.impl.IonBinary$BufferManager._writer At IonBinary.java:[lines 322-437] @@ -541,8 +541,8 @@ - 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 + Une méthode peut exposer sa représentation interne en renvoyant une référence à un objet modifiable + La méthode com.amazon.ion.impl.IonBinary$BufferManager.reader() risque d'exposer sa représentation interne en renvoyant com.amazon.ion.impl.IonBinary$BufferManager._reader At IonBinary.java:[lines 322-437] @@ -564,8 +564,8 @@ - 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 + Une méthode peut exposer sa représentation interne en renvoyant une référence à un objet modifiable + La méthode com.amazon.ion.impl.IonBinary$BufferManager.reader(int) risque d'exposer sa représentation interne en renvoyant com.amazon.ion.impl.IonBinary$BufferManager._reader At IonBinary.java:[lines 322-437] @@ -587,8 +587,8 @@ - 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 + Une méthode peut exposer sa représentation interne en renvoyant une référence à un objet modifiable + La méthode com.amazon.ion.impl.IonBinary$BufferManager.writer() risque d'exposer sa représentation interne en renvoyant com.amazon.ion.impl.IonBinary$BufferManager._writer At IonBinary.java:[lines 322-437] @@ -610,8 +610,8 @@ - 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 + Une méthode peut exposer sa représentation interne en renvoyant une référence à un objet modifiable + La méthode com.amazon.ion.impl.IonBinary$BufferManager.writer(int) risque d'exposer sa représentation interne en renvoyant com.amazon.ion.impl.IonBinary$BufferManager._writer At IonBinary.java:[lines 322-437] @@ -633,8 +633,8 @@ - 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 + Une méthode expose sa représentation interne en incorporant une référence à un objet modifiable + La méthode new com.amazon.ion.impl.IonBinary$BufferManager(BlockedBuffer) risque d'exposer sa représentation interne en stockant un objet externe modifiable dans com.amazon.ion.impl.IonBinary$BufferManager._buf At IonBinary.java:[lines 322-437] @@ -659,8 +659,8 @@ - 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 + Un switch comporte un cas qui déborde sur le suivant + Un switch de com.amazon.ion.impl.IonBinary$Reader.readIntAsInt(int) comporte un cas qui déborde sur le suivant At IonBinary.java:[lines 942-1815] @@ -710,8 +710,8 @@ - Incompatible bit masks - Incompatible bit masks in (e & 0x80 == 0x40) yields a constant result in com.amazon.ion.impl.IonBinary$Writer.writeIntValue(long) + Masques binaires incompatibles + Des masques binaires incompatibles renvoient un résultat constant dans com.amazon.ion.impl.IonBinary$Writer.writeIntValue(long) At IonBinary.java:[lines 1819-2917] @@ -733,8 +733,8 @@ - Method concatenates strings using + in a loop - com.amazon.ion.impl.IonReaderTextRawTokensX.peekNullTypeSymbolUndo(int[], int) concatenates strings using + in a loop + La méthode concatène des chaînes au moyen de + en boucle + La méthode com.amazon.ion.impl.IonReaderTextRawTokensX.peekNullTypeSymbolUndo(int[], int) concatène des chaînes au moyen de + en boucle At IonReaderTextRawTokensX.java:[lines 66-2915] @@ -750,8 +750,8 @@ - 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 + Un switch comporte un cas qui déborde sur le suivant + Un switch de com.amazon.ion.impl.IonReaderTextRawTokensX.load_double_quoted_string(StringBuilder, boolean) comporte un cas qui déborde sur le suivant At IonReaderTextRawTokensX.java:[lines 66-2915] @@ -767,8 +767,8 @@ - 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 + Un switch comporte un cas qui déborde sur le suivant + Un switch de com.amazon.ion.impl.IonReaderTextRawTokensX.load_fixed_digits(StringBuilder, int) comporte un cas qui déborde sur le suivant At IonReaderTextRawTokensX.java:[lines 66-2915] @@ -790,8 +790,8 @@ - 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 + Un switch comporte un cas qui déborde sur le suivant + Un switch de com.amazon.ion.impl.IonReaderTextRawTokensX.load_single_quoted_string(StringBuilder, boolean) comporte un cas qui déborde sur le suivant At IonReaderTextRawTokensX.java:[lines 66-2915] @@ -807,8 +807,8 @@ - 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 + Un switch comporte un cas qui déborde sur le suivant + Un switch de com.amazon.ion.impl.IonReaderTextRawTokensX.read_base64_byte_helper() comporte un cas qui déborde sur le suivant At IonReaderTextRawTokensX.java:[lines 66-2915] @@ -827,8 +827,8 @@ - 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 + Un switch comporte un cas qui déborde sur le suivant + Un switch de com.amazon.ion.impl.IonReaderTextRawTokensX.skip_double_quoted_string_helper() comporte un cas qui déborde sur le suivant At IonReaderTextRawTokensX.java:[lines 66-2915] @@ -847,8 +847,8 @@ - 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 + Un switch comporte un cas qui déborde sur le suivant + Un switch de com.amazon.ion.impl.IonReaderTextRawTokensX.skip_over_container(int) comporte un cas qui déborde sur le suivant At IonReaderTextRawTokensX.java:[lines 66-2915] @@ -864,8 +864,8 @@ - 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 + Un switch comporte un cas qui déborde sur le suivant + Un switch de com.amazon.ion.impl.IonReaderTextRawTokensX.skip_single_quoted_string(UnifiedSavePointManagerX$SavePoint) comporte un cas qui déborde sur le suivant At IonReaderTextRawTokensX.java:[lines 66-2915] @@ -881,8 +881,8 @@ - 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 + Un switch comporte un cas qui déborde sur le suivant + Un switch de com.amazon.ion.impl.IonReaderTextRawTokensX.skip_triple_quoted_string(UnifiedSavePointManagerX$SavePoint, IonReaderTextRawTokensX$CommentStrategy) comporte un cas qui déborde sur le suivant At IonReaderTextRawTokensX.java:[lines 66-2915] @@ -1052,8 +1052,8 @@ - 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 + Un switch comporte un cas qui déborde sur le suivant + Un switch de com.amazon.ion.impl.IonReaderTextRawX.parseSymbolToken(String, StringBuilder, int) comporte un cas qui déborde sur le suivant At IonReaderTextRawX.java:[lines 72-1446] @@ -1112,8 +1112,8 @@ - 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 + Un switch comporte un cas qui déborde sur le suivant + Un switch de com.amazon.ion.impl.IonTokenReader.readEscapedCharacter(PushbackReader, boolean) comporte un cas qui déborde sur le suivant At IonTokenReader.java:[lines 41-1620] @@ -1149,8 +1149,8 @@ - Comparison of String objects using == or != - Comparison of String objects using == or != in com.amazon.ion.impl.IonTokenReader$Type.setNumericValue(IonTokenReader, String) + Comparaison d'objets String utilisant == ou != + Comparaison d'objets String utilisant == ou != dans com.amazon.ion.impl.IonTokenReader$Type.setNumericValue(IonTokenReader, String) At IonTokenReader.java:[lines 54-209] @@ -1179,8 +1179,8 @@ - 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 + Nom de classe devant commencer par une majuscule + Le nom de la classe com.amazon.ion.impl.IonTokenReader$Type$timeinfo ne commence pas par une majusucle At IonTokenReader.java:[lines 132-143] @@ -1192,8 +1192,8 @@ - Bitwise OR of signed byte value - Bitwise OR of signed byte value computed in com.amazon.ion.impl.IonUTF8.getAs4BytesReversed(int) + Ou binaire d'un octet signé + Ou binaire d'un octet signé calculé dans com.amazon.ion.impl.IonUTF8.getAs4BytesReversed(int) At IonUTF8.java:[lines 35-406] @@ -1215,8 +1215,8 @@ - Bitwise OR of signed byte value - Bitwise OR of signed byte value computed in com.amazon.ion.impl.IonUTF8.packBytesAfter1(int, int) + Ou binaire d'un octet signé + Ou binaire d'un octet signé calculé dans com.amazon.ion.impl.IonUTF8.packBytesAfter1(int, int) At IonUTF8.java:[lines 35-406] @@ -1252,8 +1252,8 @@ - Nullcheck of value previously dereferenced - Nullcheck of IonWriterSystemBinary._patch at line 519 of value previously dereferenced in com.amazon.ion.impl.IonWriterSystemBinary.closeValue() + Test de nullité d'une valeur préalablement déréférencée + Test de nullité dans com.amazon.ion.impl.IonWriterSystemBinary._patch d'une valeur préalablement déréférencée dans com.amazon.ion.impl.IonWriterSystemBinary.closeValue() At IonWriterSystemBinary.java:[lines 40-1049] @@ -1278,8 +1278,8 @@ - Inconsistent synchronization - Inconsistent synchronization of com.amazon.ion.impl.LocalSymbolTable.mySymbolNames; locked 58% of time + Synchronisation incohérente + Synchronisation incohérente de com.amazon.ion.impl.LocalSymbolTable.mySymbolNames; verrouillée à 58% At LocalSymbolTable.java:[lines 52-863] @@ -1333,8 +1333,8 @@ - Inconsistent synchronization - Inconsistent synchronization of com.amazon.ion.impl.LocalSymbolTable.mySymbolsCount; locked 81% of time + Synchronisation incohérente + Synchronisation incohérente de com.amazon.ion.impl.LocalSymbolTable.mySymbolsCount; verrouillée à 81% At LocalSymbolTable.java:[lines 52-863] @@ -1385,8 +1385,8 @@ - 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) + Méthode passant null à un paramètre déréférencé inconditionnellement + L'appel de méthode dans com.amazon.ion.impl.SimpleByteBuffer$SimpleByteReader.readTimestamp(int) passe null à un paramètre de com.amazon.ion.Timestamp.createFromUtcFields(Timestamp$Precision, int, int, int, int, int, int, BigDecimal, Integer) déréférencé de façon inconditionnelle At SimpleByteBuffer.java:[lines 135-660] @@ -1419,8 +1419,8 @@ - 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 + Un switch comporte un cas qui déborde sur le suivant + Un switch de com.amazon.ion.impl.SimpleByteBuffer$SimpleByteWriter.writeVarInt(int, int, boolean) comporte un cas qui déborde sur le suivant At SimpleByteBuffer.java:[lines 841-1383] @@ -1510,8 +1510,8 @@ - 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 + Une méthode expose sa représentation interne en incorporant une référence à un objet modifiable + La méthode new com.amazon.ion.impl.UnifiedDataPageX$Bytes(byte[], int, int) risque d'exposer sa représentation interne en stockant un objet externe modifiable dans com.amazon.ion.impl.UnifiedDataPageX$Bytes._bytes At UnifiedDataPageX.java:[lines 168-204] @@ -1536,8 +1536,8 @@ - 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 + Une méthode expose sa représentation interne en incorporant une référence à un objet modifiable + La méthode new com.amazon.ion.impl.UnifiedDataPageX$Chars(char[], int, int) risque d'exposer sa représentation interne en stockant un objet externe modifiable dans com.amazon.ion.impl.UnifiedDataPageX$Chars._characters At UnifiedDataPageX.java:[lines 210-251] @@ -1562,8 +1562,8 @@ - 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 + Une méthode expose sa représentation interne en incorporant une référence à un objet modifiable + La méthode new com.amazon.ion.impl._Private_FastAppendableDecorator(_Private_FastAppendable) risque d'exposer sa représentation interne en stockant un objet externe modifiable dans com.amazon.ion.impl._Private_FastAppendableDecorator.myOutput At _Private_FastAppendableDecorator.java:[lines 31-100] @@ -1588,8 +1588,8 @@ - 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 + Une méthode peut exposer sa représentation interne en renvoyant une référence à un objet modifiable + La méthode com.amazon.ion.impl._Private_IonBinaryWriterBuilder.getInitialSymbolTable() risque d'exposer sa représentation interne en renvoyant com.amazon.ion.impl._Private_IonBinaryWriterBuilder.myInitialSymbolTable At _Private_IonBinaryWriterBuilder.java:[lines 39-414] @@ -1611,8 +1611,8 @@ - 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 + Une méthode expose sa représentation interne en incorporant une référence à un objet modifiable + La méthode com.amazon.ion.impl._Private_IonBinaryWriterBuilder.setInitialSymbolTable(SymbolTable) risque d'exposer sa représentation interne en stockant un objet externe modifiable dans com.amazon.ion.impl._Private_IonBinaryWriterBuilder.myInitialSymbolTable At _Private_IonBinaryWriterBuilder.java:[lines 39-414] @@ -1637,8 +1637,8 @@ - Field is a mutable array - com.amazon.ion.impl._Private_IonConstants.BINARY_VERSION_MARKER_1_0 is a mutable array + Un champ est un tableau modifiable + com.amazon.ion.impl._Private_IonConstants.BINARY_VERSION_MARKER_1_0 est un tableau modifiable At _Private_IonConstants.java:[lines 23-282] @@ -1656,8 +1656,8 @@ - Field is a mutable array - com.amazon.ion.impl._Private_IonTextAppender.ZERO_PADDING is a mutable array + Un champ est un tableau modifiable + com.amazon.ion.impl._Private_IonTextAppender.ZERO_PADDING est un tableau modifiable At _Private_IonTextAppender.java:[lines 43-1032] @@ -1675,8 +1675,8 @@ - Field should be package protected - com.amazon.ion.impl._Private_IonTextAppender.OPERATOR_CHAR_FLAGS should be package protected + Un champ devrait être package protected + com.amazon.ion.impl._Private_IonTextAppender.OPERATOR_CHAR_FLAGS devrait être package protected At _Private_IonTextAppender.java:[lines 43-1032] @@ -1711,8 +1711,8 @@ - Field isn't final but should be - com.amazon.ion.impl._Private_IonTextWriterBuilder.STANDARD isn't final but should be + Un champ n'est pas final alors qu'il devrait l'être + com.amazon.ion.impl._Private_IonTextWriterBuilder.STANDARD n'est pas final mais devrait l'être At _Private_IonTextWriterBuilder.java:[lines 33-329] @@ -1730,8 +1730,8 @@ - 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 + Une méthode peut exposer sa représentation interne en renvoyant une référence à un objet modifiable + La méthode com.amazon.ion.impl._Private_MarkupCallback.getAppendable() risque d'exposer sa représentation interne en renvoyant com.amazon.ion.impl._Private_MarkupCallback.myAppendable At _Private_MarkupCallback.java:[lines 190-351] @@ -1753,8 +1753,8 @@ - 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 + Une méthode expose sa représentation interne en incorporant une référence à un objet modifiable + La méthode new com.amazon.ion.impl._Private_MarkupCallback(_Private_FastAppendable) risque d'exposer sa représentation interne en stockant un objet externe modifiable dans com.amazon.ion.impl._Private_MarkupCallback.myAppendable At _Private_MarkupCallback.java:[lines 190-351] @@ -1779,8 +1779,8 @@ - Field isn't final but should be - com.amazon.ion.impl._Private_ScalarConversions.FNID_identity isn't final but should be + Un champ n'est pas final alors qu'il devrait l'être + com.amazon.ion.impl._Private_ScalarConversions.FNID_identity n'est pas final mais devrait l'être At _Private_ScalarConversions.java:[lines 30-333] @@ -1798,8 +1798,8 @@ - Field isn't final but should be - com.amazon.ion.impl._Private_ScalarConversions.FNID_no_conversion isn't final but should be + Un champ n'est pas final alors qu'il devrait l'être + com.amazon.ion.impl._Private_ScalarConversions.FNID_no_conversion n'est pas final mais devrait l'être At _Private_ScalarConversions.java:[lines 30-333] @@ -1817,8 +1817,8 @@ - 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) + Transtypage non vérifié/non confirmé + Transtypage non vérifié/non confirmé de com.amazon.ion.Decimal vers value dans com.amazon.ion.impl._Private_ScalarConversions$ValueVariant.addValue(BigDecimal) At _Private_ScalarConversions.java:[lines 373-873] @@ -1849,8 +1849,8 @@ - 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 + Une méthode peut exposer sa représentation interne en renvoyant une référence à un objet modifiable + La méthode com.amazon.ion.impl._Private_ScalarConversions$ValueVariant.getDate() risque d'exposer sa représentation interne en renvoyant com.amazon.ion.impl._Private_ScalarConversions$ValueVariant._date_value At _Private_ScalarConversions.java:[lines 373-873] @@ -1872,8 +1872,8 @@ - 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 + Une méthode peut exposer sa représentation interne en renvoyant une référence à un objet modifiable + La méthode com.amazon.ion.impl._Private_ScalarConversions$ValueVariant.getDecimal() risque d'exposer sa représentation interne en renvoyant com.amazon.ion.impl._Private_ScalarConversions$ValueVariant._decimal_value At _Private_ScalarConversions.java:[lines 373-873] @@ -1895,8 +1895,8 @@ - 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 + Une méthode peut exposer sa représentation interne en renvoyant une référence à un objet modifiable + La méthode com.amazon.ion.impl._Private_ScalarConversions$ValueVariant.getTimestamp() risque d'exposer sa représentation interne en renvoyant com.amazon.ion.impl._Private_ScalarConversions$ValueVariant._timestamp_value At _Private_ScalarConversions.java:[lines 373-873] @@ -1918,8 +1918,8 @@ - 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 + Une méthode expose sa représentation interne en incorporant une référence à un objet modifiable + La méthode com.amazon.ion.impl._Private_ScalarConversions$ValueVariant.addValue(Decimal) risque d'exposer sa représentation interne en stockant un objet externe modifiable dans com.amazon.ion.impl._Private_ScalarConversions$ValueVariant._decimal_value At _Private_ScalarConversions.java:[lines 373-873] @@ -1944,8 +1944,8 @@ - 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 + Une méthode expose sa représentation interne en incorporant une référence à un objet modifiable + La méthode com.amazon.ion.impl._Private_ScalarConversions$ValueVariant.addValue(Timestamp) risque d'exposer sa représentation interne en stockant un objet externe modifiable dans com.amazon.ion.impl._Private_ScalarConversions$ValueVariant._timestamp_value At _Private_ScalarConversions.java:[lines 373-873] @@ -1970,8 +1970,8 @@ - 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 + Une méthode expose sa représentation interne en incorporant une référence à un objet modifiable + La méthode com.amazon.ion.impl._Private_ScalarConversions$ValueVariant.addValue(BigDecimal) risque d'exposer sa représentation interne en stockant un objet externe modifiable dans com.amazon.ion.impl._Private_ScalarConversions$ValueVariant._decimal_value At _Private_ScalarConversions.java:[lines 373-873] @@ -1996,8 +1996,8 @@ - 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 + Une méthode expose sa représentation interne en incorporant une référence à un objet modifiable + La méthode com.amazon.ion.impl._Private_ScalarConversions$ValueVariant.addValue(Date) risque d'exposer sa représentation interne en stockant un objet externe modifiable dans com.amazon.ion.impl._Private_ScalarConversions$ValueVariant._date_value At _Private_ScalarConversions.java:[lines 373-873] @@ -2022,8 +2022,8 @@ - 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 + Une méthode expose sa représentation interne en incorporant une référence à un objet modifiable + La méthode com.amazon.ion.impl._Private_ScalarConversions$ValueVariant.setValue(Decimal) risque d'exposer sa représentation interne en stockant un objet externe modifiable dans com.amazon.ion.impl._Private_ScalarConversions$ValueVariant._decimal_value At _Private_ScalarConversions.java:[lines 373-873] @@ -2048,8 +2048,8 @@ - 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 + Une méthode expose sa représentation interne en incorporant une référence à un objet modifiable + La méthode com.amazon.ion.impl._Private_ScalarConversions$ValueVariant.setValue(Timestamp) risque d'exposer sa représentation interne en stockant un objet externe modifiable dans com.amazon.ion.impl._Private_ScalarConversions$ValueVariant._timestamp_value At _Private_ScalarConversions.java:[lines 373-873] @@ -2074,8 +2074,8 @@ - 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 + Une méthode expose sa représentation interne en incorporant une référence à un objet modifiable + La méthode com.amazon.ion.impl._Private_ScalarConversions$ValueVariant.setValue(Date) risque d'exposer sa représentation interne en stockant un objet externe modifiable dans com.amazon.ion.impl._Private_ScalarConversions$ValueVariant._date_value At _Private_ScalarConversions.java:[lines 373-873] @@ -2100,8 +2100,8 @@ - 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 + Une méthode expose sa représentation interne en incorporant une référence à un objet modifiable + La méthode com.amazon.ion.impl._Private_SymtabExtendsCache.symtabsCompat(SymbolTable, SymbolTable) risque d'exposer sa représentation interne en stockant un objet externe modifiable dans com.amazon.ion.impl._Private_SymtabExtendsCache.myReaderSymtab At _Private_SymtabExtendsCache.java:[lines 27-64] @@ -2126,8 +2126,8 @@ - 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 + Une méthode expose sa représentation interne en incorporant une référence à un objet modifiable + La méthode com.amazon.ion.impl._Private_SymtabExtendsCache.symtabsCompat(SymbolTable, SymbolTable) risque d'exposer sa représentation interne en stockant un objet externe modifiable dans com.amazon.ion.impl._Private_SymtabExtendsCache.myWriterSymtab At _Private_SymtabExtendsCache.java:[lines 27-64] @@ -2203,8 +2203,8 @@ - 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 + Une méthode peut exposer sa représentation interne en renvoyant une référence à un objet modifiable + La méthode com.amazon.ion.impl.bin.utf8.PoolableByteBuffer.getBuffer() risque d'exposer sa représentation interne en renvoyant com.amazon.ion.impl.bin.utf8.PoolableByteBuffer.buffer At PoolableByteBuffer.java:[lines 12-31] @@ -2226,8 +2226,8 @@ - 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 + Une méthode peut exposer sa représentation interne en renvoyant une référence à un objet modifiable + La méthode com.amazon.ion.impl.bin.utf8.Utf8StringEncoder$Result.getBuffer() risque d'exposer sa représentation interne en renvoyant com.amazon.ion.impl.bin.utf8.Utf8StringEncoder$Result.buffer At Utf8StringEncoder.java:[lines 128-148] @@ -2249,8 +2249,8 @@ - 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 + Une méthode expose sa représentation interne en incorporant une référence à un objet modifiable + La méthode new com.amazon.ion.impl.bin.utf8.Utf8StringEncoder$Result(int, byte[]) risque d'exposer sa représentation interne en stockant un objet externe modifiable dans com.amazon.ion.impl.bin.utf8.Utf8StringEncoder$Result.buffer At Utf8StringEncoder.java:[lines 128-148] @@ -2298,8 +2298,8 @@ - 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 + Une méthode peut exposer sa représentation interne en renvoyant une référence à un objet modifiable + La méthode com.amazon.ion.impl.lite.IonContainerLite$SequenceContentIterator.next() risque d'exposer sa représentation interne en renvoyant com.amazon.ion.impl.lite.IonContainerLite$SequenceContentIterator.__current At IonContainerLite.java:[lines 275-463] @@ -2321,8 +2321,8 @@ - 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 + Une méthode peut exposer sa représentation interne en renvoyant une référence à un objet modifiable + La méthode com.amazon.ion.impl.lite.IonContainerLite$SequenceContentIterator.previous() risque d'exposer sa représentation interne en renvoyant com.amazon.ion.impl.lite.IonContainerLite$SequenceContentIterator.__current At IonContainerLite.java:[lines 275-463] @@ -2344,8 +2344,8 @@ - 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 + Une méthode expose sa représentation interne en incorporant une référence à un objet modifiable + La méthode new com.amazon.ion.impl.lite.IonContainerLite$SequenceContentIterator(IonContainerLite, int, boolean) risque d'exposer sa représentation interne en stockant un objet externe modifiable dans com.amazon.ion.impl.lite.IonContainerLite$SequenceContentIterator.this$0 At IonContainerLite.java:[lines 275-463] @@ -2370,8 +2370,8 @@ - Self assignment of field - Self assignment of field IonContainerLite$SequenceContentIterator.__pos in com.amazon.ion.impl.lite.IonContainerLite$SequenceContentIterator.force_position_sync_helper() + Auto-alimentation d'un champs + Auto-alimentation du champs com.amazon.ion.impl.lite.IonContainerLite$SequenceContentIterator.__pos dans com.amazon.ion.impl.lite.IonContainerLite$SequenceContentIterator.force_position_sync_helper() At IonContainerLite.java:[lines 275-463] @@ -2393,8 +2393,8 @@ - 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 + Une méthode expose sa représentation interne en incorporant une référence à un objet modifiable + La méthode new com.amazon.ion.impl.lite.IonDatagramLite$SystemContentIterator(IonDatagramLite, boolean) risque d'exposer sa représentation interne en stockant un objet externe modifiable dans com.amazon.ion.impl.lite.IonDatagramLite$SystemContentIterator.this$0 At IonDatagramLite.java:[lines 585-834] @@ -2419,8 +2419,8 @@ - Nullcheck of value previously dereferenced - 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) + Test de nullité d'une valeur préalablement déréférencée + Test de nullité dans com.amazon.ion.impl.lite.IonDatagramLite$SystemIteratorPosition.__local_values d'une valeur préalablement déréférencée dans com.amazon.ion.impl.lite.IonDatagramLite$SystemIteratorPosition.push_system_value(IonValueLite) At IonDatagramLite.java:[lines 837-1138] @@ -2445,8 +2445,8 @@ - Nullcheck of value previously dereferenced - Nullcheck of curr at line 1134 of value previously dereferenced in com.amazon.ion.impl.lite.IonDatagramLite$SystemIteratorPosition.count_system_values(IonSystem, SymbolTable, SymbolTable) + Test de nullité d'une valeur préalablement déréférencée + Test de nullité dans curr d'une valeur préalablement déréférencée dans com.amazon.ion.impl.lite.IonDatagramLite$SystemIteratorPosition.count_system_values(IonSystem, SymbolTable, SymbolTable) At IonDatagramLite.java:[lines 837-1138] @@ -2468,8 +2468,8 @@ - Comparison of String objects using == or != - Comparison of String objects using == or != in com.amazon.ion.impl.lite.IonStructLite.validate() + Comparaison d'objets String utilisant == ou != + Comparaison d'objets String utilisant == ou != dans com.amazon.ion.impl.lite.IonStructLite.validate() At IonStructLite.java:[lines 38-753] @@ -2498,8 +2498,8 @@ - Load of known null value - Load of known null value in com.amazon.ion.impl.lite.IonStructLite.add(SymbolToken, IonValue) + Chargement d'une valeur connue pour être à null + Chargement d'une valeur connue pour être à null dans com.amazon.ion.impl.lite.IonStructLite.add(SymbolToken, IonValue) At IonStructLite.java:[lines 38-753] @@ -2518,8 +2518,8 @@ - Method concatenates strings using + in a loop - com.amazon.ion.impl.lite.IonStructLite.validate() concatenates strings using + in a loop + La méthode concatène des chaînes au moyen de + en boucle + La méthode com.amazon.ion.impl.lite.IonStructLite.validate() concatène des chaînes au moyen de + en boucle At IonStructLite.java:[lines 38-753] @@ -2535,8 +2535,8 @@ - Unsigned right shift cast to short/byte - Unsigned right shift cast to short/byte in com.amazon.ion.impl.lite.ReverseBinaryEncoder.writeVarInt(int) + Décalage à droite non signé et transtypage short/byte + Décalage à droite non signé et transtypage vers un short/byte dans com.amazon.ion.impl.lite.ReverseBinaryEncoder.writeVarInt(int) At ReverseBinaryEncoder.java:[lines 90-1464] @@ -2558,8 +2558,8 @@ - Unsigned right shift cast to short/byte - Unsigned right shift cast to short/byte in com.amazon.ion.impl.lite.ReverseBinaryEncoder.writeVarUInt(int) + Décalage à droite non signé et transtypage short/byte + Décalage à droite non signé et transtypage vers un short/byte dans com.amazon.ion.impl.lite.ReverseBinaryEncoder.writeVarUInt(int) At ReverseBinaryEncoder.java:[lines 90-1464] @@ -2584,16 +2584,16 @@ - May expose internal representation by returning reference to mutable object - com.amazon.ion.system.IonSystemBuilder.getIonBinaryWriterBuilder() may expose internal representation by returning IonSystemBuilder.binaryWriterBuilder + Une méthode peut exposer sa représentation interne en renvoyant une référence à un objet modifiable + La méthode com.amazon.ion.system.IonSystemBuilder.getIonBinaryWriterBuilder() risque d'exposer sa représentation interne en renvoyant com.amazon.ion.system.IonSystemBuilder.binaryWriterBuilder - - At IonSystemBuilder.java:[lines 85-471] + + At IonSystemBuilder.java:[lines 86-465] In class com.amazon.ion.system.IonSystemBuilder - + In method com.amazon.ion.system.IonSystemBuilder.getIonBinaryWriterBuilder() @@ -2602,21 +2602,21 @@ Field com.amazon.ion.system.IonSystemBuilder.binaryWriterBuilder - - At IonSystemBuilder.java:[line 343] + + At IonSystemBuilder.java:[line 345] - May expose internal representation by returning reference to mutable object - com.amazon.ion.system.IonSystemBuilder.getIonTextWriterBuilder() may expose internal representation by returning IonSystemBuilder.textWriterBuilder + Une méthode peut exposer sa représentation interne en renvoyant une référence à un objet modifiable + La méthode com.amazon.ion.system.IonSystemBuilder.getIonTextWriterBuilder() risque d'exposer sa représentation interne en renvoyant com.amazon.ion.system.IonSystemBuilder.textWriterBuilder - - At IonSystemBuilder.java:[lines 85-471] + + At IonSystemBuilder.java:[lines 86-465] In class com.amazon.ion.system.IonSystemBuilder - + In method com.amazon.ion.system.IonSystemBuilder.getIonTextWriterBuilder() @@ -2625,21 +2625,21 @@ Field com.amazon.ion.system.IonSystemBuilder.textWriterBuilder - - At IonSystemBuilder.java:[line 290] + + At IonSystemBuilder.java:[line 292] - May expose internal representation by returning reference to mutable object - com.amazon.ion.system.IonSystemBuilder.getReaderBuilder() may expose internal representation by returning IonSystemBuilder.readerBuilder + Une méthode peut exposer sa représentation interne en renvoyant une référence à un objet modifiable + La méthode com.amazon.ion.system.IonSystemBuilder.getReaderBuilder() risque d'exposer sa représentation interne en renvoyant com.amazon.ion.system.IonSystemBuilder.readerBuilder - - At IonSystemBuilder.java:[lines 85-471] + + At IonSystemBuilder.java:[lines 86-465] In class com.amazon.ion.system.IonSystemBuilder - + In method com.amazon.ion.system.IonSystemBuilder.getReaderBuilder() @@ -2648,21 +2648,21 @@ Field com.amazon.ion.system.IonSystemBuilder.readerBuilder - - At IonSystemBuilder.java:[line 396] + + At IonSystemBuilder.java:[line 398] - - 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 + + Une méthode expose sa représentation interne en incorporant une référence à un objet modifiable + La méthode com.amazon.ion.system.IonSystemBuilder.setIonBinaryWriterBuilder(IonBinaryWriterBuilder) risque d'exposer sa représentation interne en stockant un objet externe modifiable dans com.amazon.ion.system.IonSystemBuilder.binaryWriterBuilder - - At IonSystemBuilder.java:[lines 85-471] + + At IonSystemBuilder.java:[lines 86-465] In class com.amazon.ion.system.IonSystemBuilder - + In method com.amazon.ion.system.IonSystemBuilder.setIonBinaryWriterBuilder(IonBinaryWriterBuilder) @@ -2671,24 +2671,24 @@ Field com.amazon.ion.system.IonSystemBuilder.binaryWriterBuilder - - Local variable named builder + + Local variable stored in JVM register ? - - At IonSystemBuilder.java:[line 362] + + At IonSystemBuilder.java:[line 364] - - 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 + + Une méthode expose sa représentation interne en incorporant une référence à un objet modifiable + La méthode com.amazon.ion.system.IonSystemBuilder.setIonTextWriterBuilder(IonTextWriterBuilder) risque d'exposer sa représentation interne en stockant un objet externe modifiable dans com.amazon.ion.system.IonSystemBuilder.textWriterBuilder - - At IonSystemBuilder.java:[lines 85-471] + + At IonSystemBuilder.java:[lines 86-465] In class com.amazon.ion.system.IonSystemBuilder - + In method com.amazon.ion.system.IonSystemBuilder.setIonTextWriterBuilder(IonTextWriterBuilder) @@ -2697,24 +2697,24 @@ Field com.amazon.ion.system.IonSystemBuilder.textWriterBuilder - - Local variable named builder + + Local variable stored in JVM register ? - - At IonSystemBuilder.java:[line 309] + + At IonSystemBuilder.java:[line 311] - - 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 + + Une méthode expose sa représentation interne en incorporant une référence à un objet modifiable + La méthode com.amazon.ion.system.IonSystemBuilder.setReaderBuilder(IonReaderBuilder) risque d'exposer sa représentation interne en stockant un objet externe modifiable dans com.amazon.ion.system.IonSystemBuilder.readerBuilder - - At IonSystemBuilder.java:[lines 85-471] + + At IonSystemBuilder.java:[lines 86-465] In class com.amazon.ion.system.IonSystemBuilder - + In method com.amazon.ion.system.IonSystemBuilder.setReaderBuilder(IonReaderBuilder) @@ -2723,24 +2723,24 @@ Field com.amazon.ion.system.IonSystemBuilder.readerBuilder - - Local variable named builder + + Local variable stored in JVM register ? - - At IonSystemBuilder.java:[line 415] + + At IonSystemBuilder.java:[line 417] - 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 + Une méthode statique publique risque d'exposer une représentation interne en renvoyant un tableau + La méthode statique publique com.amazon.ion.system.IonSystemBuilder.standard() peut exposer une représentation interne en renvoyant com.amazon.ion.system.IonSystemBuilder.STANDARD - - At IonSystemBuilder.java:[lines 85-471] + + At IonSystemBuilder.java:[lines 86-465] In class com.amazon.ion.system.IonSystemBuilder - + In method com.amazon.ion.system.IonSystemBuilder.standard() @@ -2749,8 +2749,8 @@ Field com.amazon.ion.system.IonSystemBuilder.STANDARD - - At IonSystemBuilder.java:[line 97] + + At IonSystemBuilder.java:[line 98] @@ -2771,8 +2771,8 @@ - equals() method does not check for null argument - com.amazon.ion.util.Equivalence$Field.equals(Object) does not check for null argument + Méthode equals() ne vérifiant pas la nullité + com.amazon.ion.util.Equivalence$Field.equals(Object) ne vérifie pas la nullité d'un paramètre At Equivalence.java:[lines 444-496] @@ -2791,8 +2791,8 @@ - May expose internal representation by returning reference to mutable object - com.amazon.ion.util.JarInfo.getBuildTime() may expose internal representation by returning JarInfo.ourBuildTime + Une méthode peut exposer sa représentation interne en renvoyant une référence à un objet modifiable + La méthode com.amazon.ion.util.JarInfo.getBuildTime() risque d'exposer sa représentation interne en renvoyant com.amazon.ion.util.JarInfo.ourBuildTime At JarInfo.java:[lines 43-120] @@ -2814,8 +2814,8 @@ - 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 + Une méthode expose sa représentation interne en incorporant une référence à un objet modifiable + La méthode new com.amazon.ion.util.Printer$Options(Printer) risque d'exposer sa représentation interne en stockant un objet externe modifiable dans com.amazon.ion.util.Printer$Options.this$0 At Printer.java:[lines 88-115] @@ -2840,8 +2840,8 @@ - Should be a static inner class - Should com.amazon.ion.util.Printer$Options be a _static_ inner class? + Devrait être une classe interne statique + La classe com.amazon.ion.util.Printer$Options devrait-elle être une classe interne static ? 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 a7e4403bd5..39436b4ca3 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.Objects; import java.util.Optional; /** @@ -102,9 +103,10 @@ public static IonSystemBuilder standard() IonCatalog myCatalog; boolean myStreamCopyOptimized = false; - IonTextWriterBuilder textWriterBuilder; - IonBinaryWriterBuilder binaryWriterBuilder; - IonReaderBuilder readerBuilder; + + IonTextWriterBuilder textWriterBuilder = IonTextWriterBuilder.standard().withCharsetAscii(); + IonBinaryWriterBuilder binaryWriterBuilder = IonBinaryWriterBuilder.standard(); + IonReaderBuilder readerBuilder = IonReaderBuilder.standard(); /** You no touchy. */ @@ -306,7 +308,7 @@ public final IonTextWriterBuilder getIonTextWriterBuilder() { */ public final void setIonTextWriterBuilder(IonTextWriterBuilder builder) { mutationCheck(); - textWriterBuilder = builder; + textWriterBuilder = Objects.requireNonNull(builder); } /** @@ -359,7 +361,7 @@ public final IonBinaryWriterBuilder getIonBinaryWriterBuilder() { */ public final void setIonBinaryWriterBuilder(IonBinaryWriterBuilder builder) { mutationCheck(); - binaryWriterBuilder = builder; + binaryWriterBuilder = Objects.requireNonNull(builder); } /** @@ -412,7 +414,7 @@ public final IonReaderBuilder getReaderBuilder() { */ public final void setReaderBuilder(IonReaderBuilder builder) { mutationCheck(); - readerBuilder = builder; + readerBuilder = Objects.requireNonNull(builder); } /** @@ -443,18 +445,14 @@ public final IonSystemBuilder withReaderBuilder(IonReaderBuilder builder) */ public final IonSystem build() { - IonCatalog catalog = Optional.ofNullable(myCatalog) - .orElseGet(SimpleCatalog::new); + IonCatalog catalog = Optional.ofNullable(myCatalog).orElseGet(SimpleCatalog::new); - IonTextWriterBuilder twb = Optional.ofNullable(textWriterBuilder) - .orElseGet(() -> IonTextWriterBuilder.standard() - .withCharsetAscii()) - .withCatalog(catalog); + IonTextWriterBuilder twb = textWriterBuilder.copy().withCatalog(catalog); + IonBinaryWriterBuilder bwb = binaryWriterBuilder.copy().withCatalog(catalog); + IonReaderBuilder rb = readerBuilder.copy().withCatalog(catalog); - IonBinaryWriterBuilder bwb = Optional.ofNullable(binaryWriterBuilder) - .orElseGet(() -> IonBinaryWriterBuilder.standard() - .withStreamCopyOptimized(myStreamCopyOptimized)) - .withCatalog(catalog); + // TODO Use #setStreamCopyOptimized directly on the BWB + bwb.setStreamCopyOptimized(myStreamCopyOptimized); // TODO Would be nice to remove this since it's implied by the BWB. // However that currently causes problems in the IonSystem @@ -464,10 +462,6 @@ public final IonSystem build() // This is what we need, more or less. // bwb = bwb.fillDefaults(); - IonReaderBuilder rb = Optional.ofNullable(readerBuilder) - .orElseGet(IonReaderBuilder::standard) - .withCatalog(catalog); - return newLiteSystem(twb, (_Private_IonBinaryWriterBuilder) bwb, rb); } From 6374884f3b40a6d4cab4fb2420769a1c6a1749de Mon Sep 17 00:00:00 2001 From: Yoann Vernageau <6807151+yvrng@users.noreply.github.com> Date: Mon, 8 Apr 2024 22:12:12 +0200 Subject: [PATCH 7/9] Add javadoc --- .../java/com/amazon/ion/system/IonSystemBuilder.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/amazon/ion/system/IonSystemBuilder.java b/src/main/java/com/amazon/ion/system/IonSystemBuilder.java index 39436b4ca3..35db2ef2a0 100644 --- a/src/main/java/com/amazon/ion/system/IonSystemBuilder.java +++ b/src/main/java/com/amazon/ion/system/IonSystemBuilder.java @@ -282,8 +282,8 @@ public final IonSystemBuilder withStreamCopyOptimized(boolean optimized) /** * Gets the text writer builder whose options will be used when building an - * {@link IonSystem}. By default, {@link IonTextWriterBuilder#standard()} will - * be used. + * {@link IonSystem}. By default, {@link IonTextWriterBuilder#standard()} + * using {@code US-ASCII} encoding will be used. * * @see #setIonTextWriterBuilder(IonTextWriterBuilder) * @see #withIonTextWriterBuilder(IonTextWriterBuilder) @@ -299,7 +299,8 @@ public final IonTextWriterBuilder getIonTextWriterBuilder() { * {@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()}. + * If null, each system will be built with {@link IonTextWriterBuilder#standard()} + * using {@code US-ASCII} encoding. * * @see #getIonTextWriterBuilder() * @see #withIonTextWriterBuilder(IonTextWriterBuilder) @@ -319,7 +320,8 @@ public final void setIonTextWriterBuilder(IonTextWriterBuilder builder) { * 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()}. + * If null, each system will be built with {@link IonTextWriterBuilder#standard()} + * using {@code US-ASCII} encoding. * * @see #getIonTextWriterBuilder() * @see #setIonTextWriterBuilder(IonTextWriterBuilder) From 5dd9664f30cdfa74a9b76d5ad39b68d572e8d1b0 Mon Sep 17 00:00:00 2001 From: Yoann Vernageau <6807151+yvrng@users.noreply.github.com> Date: Mon, 8 Apr 2024 22:41:56 +0200 Subject: [PATCH 8/9] Add more tests on catalog --- .../ion/system/IonSystemBuilderTest.java | 33 ++++++++++++++----- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/src/test/java/com/amazon/ion/system/IonSystemBuilderTest.java b/src/test/java/com/amazon/ion/system/IonSystemBuilderTest.java index b9456908b1..f8594646da 100644 --- a/src/test/java/com/amazon/ion/system/IonSystemBuilderTest.java +++ b/src/test/java/com/amazon/ion/system/IonSystemBuilderTest.java @@ -138,28 +138,43 @@ public void testStreamCopyOptimizedImmutability() @Test public void testIonTextWriterBuilder() { - IonTextWriterBuilder textWriterBuilder = IonTextWriterBuilder.standard(); + IonCatalog textWriterCatalog = new SimpleCatalog(); // should be ignored + IonTextWriterBuilder textWriterBuilder = IonTextWriterBuilder.standard().withCatalog(textWriterCatalog); - IonSystemBuilder b = IonSystemBuilder.standard().withIonTextWriterBuilder(textWriterBuilder); - assertSame(textWriterBuilder, b.getIonTextWriterBuilder()); + IonSystemBuilder systemBuilder = IonSystemBuilder.standard().withIonTextWriterBuilder(textWriterBuilder); + assertSame(textWriterBuilder, systemBuilder.getIonTextWriterBuilder()); + + IonCatalog systemCatalog = new SimpleCatalog(); + IonSystem system = systemBuilder.withCatalog(systemCatalog).build(); + assertSame(systemCatalog, system.getCatalog()); } @Test public void testIonBinaryWriterBuilder() { - IonBinaryWriterBuilder binaryWriterBuilder = IonBinaryWriterBuilder.standard(); + IonCatalog binaryWriterCatalog = new SimpleCatalog(); // should be ignored + IonBinaryWriterBuilder binaryWriterBuilder = IonBinaryWriterBuilder.standard().withCatalog(binaryWriterCatalog); + + IonSystemBuilder systemBuilder = IonSystemBuilder.standard().withIonBinaryWriterBuilder(binaryWriterBuilder); + assertSame(binaryWriterBuilder, systemBuilder.getIonBinaryWriterBuilder()); - IonSystemBuilder b = IonSystemBuilder.standard().withIonBinaryWriterBuilder(binaryWriterBuilder); - assertSame(binaryWriterBuilder, b.getIonBinaryWriterBuilder()); + IonCatalog systemCatalog = new SimpleCatalog(); + IonSystem system = systemBuilder.build(); + assertSame(systemCatalog, system.getCatalog()); } @Test public void testIonReaderBuilder() { - IonReaderBuilder readerBuilder = IonReaderBuilder.standard(); + IonCatalog readerCatalog = new SimpleCatalog(); // should be ignored + IonReaderBuilder readerBuilder = IonReaderBuilder.standard().withCatalog(readerCatalog); + + IonSystemBuilder systemBuilder = IonSystemBuilder.standard().withReaderBuilder(readerBuilder); + assertSame(readerBuilder, systemBuilder.getReaderBuilder()); - IonSystemBuilder b = IonSystemBuilder.standard().withReaderBuilder(readerBuilder); - assertSame(readerBuilder, b.getReaderBuilder()); + IonCatalog systemCatalog = new SimpleCatalog(); + IonSystem system = systemBuilder.build(); + assertSame(systemCatalog, system.getCatalog()); } //------------------------------------------------------------------------- From 8e38bd0b54b22a1839adbf96d8742d59ec5dc3a2 Mon Sep 17 00:00:00 2001 From: Yoann Vernageau <6807151+yvrng@users.noreply.github.com> Date: Mon, 8 Apr 2024 22:50:46 +0200 Subject: [PATCH 9/9] Fix tests on catalog --- src/test/java/com/amazon/ion/system/IonSystemBuilderTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/java/com/amazon/ion/system/IonSystemBuilderTest.java b/src/test/java/com/amazon/ion/system/IonSystemBuilderTest.java index f8594646da..6e0379f275 100644 --- a/src/test/java/com/amazon/ion/system/IonSystemBuilderTest.java +++ b/src/test/java/com/amazon/ion/system/IonSystemBuilderTest.java @@ -159,7 +159,7 @@ public void testIonBinaryWriterBuilder() assertSame(binaryWriterBuilder, systemBuilder.getIonBinaryWriterBuilder()); IonCatalog systemCatalog = new SimpleCatalog(); - IonSystem system = systemBuilder.build(); + IonSystem system = systemBuilder.withCatalog(systemCatalog).build(); assertSame(systemCatalog, system.getCatalog()); } @@ -173,7 +173,7 @@ public void testIonReaderBuilder() assertSame(readerBuilder, systemBuilder.getReaderBuilder()); IonCatalog systemCatalog = new SimpleCatalog(); - IonSystem system = systemBuilder.build(); + IonSystem system = systemBuilder.withCatalog(systemCatalog).build(); assertSame(systemCatalog, system.getCatalog()); }