History log of /libcore/luni/src/main/java/java/nio/charset/CharsetDecoderICU.java
Revision Date Author Comments
e31b37859051d3902e06e4ba384995df7188917f 02-Dec-2017 Hans Boehm <hboehm@google.com> Add reachabilityFence, ReachabilitySensitive

Add the @ReachabilitySensitive annotation itself, and use it
in libcore itself, where needed.

Import OpenJDK9+181's reachabilityFence, so that it can be used in
preference to the annotation where it makes sense. Java 9's
stopgap reachabilityFence implementation doesn't work for us,
so replace it with a different stopgap.

The libcore changes correct many situations in which finalizers
could previously run prematurely according to the JLS. Or they
would correct them if we had a real implementation for
@ReachabilitySensitive.

The ZipFile constructor could close the file before notifying the
CloseGuard that it was open.

Aside from the ZipFile change, there should be no functional
change, yet.

Note that the ExemptionMechanism.java fix is the same as upstream.

Conspicuously missing:

- Any code, e.g. in ART or D8, that actually looks for the annotation.
- Uses in frameworks code, where it's probably most critical.

Bug: 63934467
Bug: 70906684
Bug: 28342794
Test: Build & boot AOSP
Change-Id: I652f0625b39b2ba9ac901d4f63e6aa6cf3b74af5
59b140db4c4bd7617792256cd5d52713409137bc 12-Jan-2018 Hans Boehm <hboehm@google.com> Avoid duplicate free in CharsetXcoderICU on OOME

NativeAllocationRegistry registration attempts that throw should
immediately deallocate, and not register a Cleaner.

CharsetEncoder/CharsetDecoder should not deallocate the native
object on OOME when NativeAllocationRegistry already did.

Bug: 71750393
Bug: 70631114

Test: Build & boot AOSP, run art host tests,
vogar --mode host libcore/luni/src/test/java/libcore/libcore/util/NativeAllocationRegistryTest.java

Change-Id: If35db36387b53f14ce1eeba09029f7a10fd7bbb5
1bdc6bc1c72b033ed860360e69fc9f1f1121579b 22-Apr-2016 Narayan Kamath <narayan@google.com> CharsetEncoder/Decoder: Use NativeAllocationRegistry.

Works around issues with finalizer ordering.

bug: 26076560

(cherry picked from commit c672ce800bbc27cb79f78d9204a51ec06ef1ec3d)

Change-Id: I434842966fe2cda70aa955250162c562ce0f8991
c672ce800bbc27cb79f78d9204a51ec06ef1ec3d 22-Apr-2016 Narayan Kamath <narayan@google.com> CharsetEncoder/Decoder: Use NativeAllocationRegistry.

Works around issues with finalizer ordering.

bug: 26076560
Change-Id: I4977ff9e2f6234283bd23dfc39a574d4854f6655
f4462f3331e254f6e88e28387ab6683c605a63e9 28-May-2015 Piotr Jastrzebski <haaawk@google.com> Fix CharsetDecoderICU / Use OpenJdk InputStreamReader.

Take the output arrayOffset into account.

Change-Id: Iab56b7cd4efc1bc8378bbeaceb56cb9957d8a912
654e8191641085aa6bff6df6aaef9a8cb0c03ec1 28-May-2015 Narayan Kamath <narayan@google.com> Fix incorrect position calculation in CharsetDecoder.

Data OUTPUT_OFFSET always gives us the number of bytes written
on output, so it's sufficient to increment the position by that number.
In particular, we do not have to subtract arrayOffset() from that
number.

Reported-By: Piotr Jastrzębski <haaawk@google.com>

Change-Id: I39ac470101f72aa4a87e31c4eb0665fe6a162e1d
bd024cc687470a008999d96fd3af4a1261413d55 26-Nov-2013 Narayan Kamath <narayan@google.com> Fix several decoder bugs.

- NativeConverter should report unterminated character
sequences to managed code.
- CharsetDecoderIcu should report those errors correctly
from flush()
- InputStreamReader should check the return value of
flush() and not ignore it altogether.

bug: 11665359
bug: 10729779

Change-Id: Ic678a645a4ef2b3fe70e2c900c0cd393679f1037
5ec69b20ab9b3e2dcbe225d548168b09afbbbac2 24-Jul-2012 Elliott Hughes <enh@google.com> Clean up ICU error reporting.

Throw all ICU exceptions from the native side, and include the name of the
function that failed.

Bug: 5037042
Change-Id: I49b5493a7e7365226d612479294b5b8f47ec4e8c
4fd8ac297725190c6d81e9538b1faf7cfb0f5bb8 08-Feb-2011 Elliott Hughes <enh@google.com> Fix build.

The *ICU classes shouldn't be public.

Change-Id: I1ca75c696c52f75b70d6aef29888a5a48ef7b32a
3664d8839f0ba794f428119ee7f7304a66861da5 08-Feb-2011 Elliott Hughes <enh@google.com> Clean up the CharsetDecoder/CharsetEncoder implementation a bit more.

Moving CharsetEncoderICU into java.nio.charset lets us use a cleaner workaround
for the constructor-calling-abstract method API bug.

Change-Id: I2312580b2c27711e9d4c88fe4dc057eec13c12e0