Reformat java.nio.Buffer impls for update to 8u121-b13.
This CL integrates (mostly) javadoc reformatting changes from upstream OpenJDK8u121-b13 for some java.nio.*Buffer classes. Behavior changes and Android change markers are left for a future CL. This CL also updates the copyright years to be those of 8u121-b13. The upstream classes are generated from the same template but separate in Android. - The upstream classes have a lot of redundant empty lines. Most of those are not kept on Android. - The decision which redundant empty lines are kept (and perhaps also minor other formatting changes) may not be 100% consistent between the files in this CL. The following is left for a future CL to investigate: - upstream's put() has logic for throwing ReadOnlyBufferException. Needs to be looked at for a follow-up CL. It may be related to this Android change in CharBuffer: "Android-changed: Throw ReadOnlyBufferException as soon as possible." - Extra super ctor argument for Buffer._elementSizeShift is missing a change marker. Note that this area is reformatted by this CL. - *Unchecked() methods added in Android libcore commit e20e1b55 need change markers. - Need to look into diff in the following changes to figure out whether they are Android vs. upstream changes and whether they change behavior: - ByteBuffer.allocateDirect(int) - ByteBuffer.put(ByteBuffer). - CharBuffer.chars() - Need to check whether DoubleBuffer.compareTo() change is a bug fix ("duplicating pointlessly" suggests it's only a refactoring?). - Other (generally indirect) subclasses of java.nio.Buffer, e.g. DirectByteBuffer or ByteBufferAsCharBuffer, were not considered. A typo in the updated upstream javadoc for bulk get() methods is fixed (the typo is not taken) in this CL: upstream javadoc contains "src.get():" in a code snippet, which should be "src.get();". Bug: 35910877 Test: libcore/tools/upstream/upstream-diff \ java.nio.{Byte,Char,Double,Float,Int,Long,Short}Buffer Change-Id: I50c3abe0951946223e26cd38abd8caa0b3b73d60
Loading
Please sign in to comment