RFR: 8292698: Improve performance of DataInputStream [v3]
Alan Bateman
alanb at openjdk.org
Tue Sep 13 13:10:52 UTC 2022
On Thu, 25 Aug 2022 09:25:55 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> Btw, I've tried to reimplement `readInt()` in a way similar to `readLong()`:
>>
>> public final int readInt() throws IOException {
>> readFully(readBuffer, 0, 4);
>> return (readBuffer[0] & 0xff) << 24
>> + (readBuffer[1] & 0xff) << 16
>> + (readBuffer[2] & 0xff) << 8
>> + (readBuffer[3] & 0xff);
>> }
>>
>> but with this change the build fails with
>>
>> Building target 'test' in configuration 'macosx-x86_64-server-release'
>> Compiling 3158 files for java.base
>> Updating support/src.zip
>> Optimizing the exploded image
>> Error occurred during initialization of boot layer
>> java.lang.module.FindException: Error reading module: /Users/stsypanov/IdeaProjects/jdk/build/macosx-x86_64-server-release/jdk/modules/java.management.rmi
>> Caused by: java.lang.module.InvalidModuleDescriptorException: Bad magic number
>> make[3]: *** [/Users/stsypanov/IdeaProjects/jdk/build/macosx-x86_64-server-release/jdk/_optimize_image_exec.marker] Error 1
>> make[2]: *** [exploded-image-optimize] Error 2
>>
>> ERROR: Build failed for target 'test' in configuration 'macosx-x86_64-server-release' (exit code 2)
>> Stopping sjavac server
>>
>> === Output from failing command(s) repeated here ===
>> * For target jdk__optimize_image_exec:
>> Error occurred during initialization of boot layer
>> java.lang.module.FindException: Error reading module: /Users/stsypanov/IdeaProjects/jdk/build/macosx-x86_64-server-release/jdk/modules/java.management.rmi
>> Caused by: java.lang.module.InvalidModuleDescriptorException: Bad magic number
>>
>> * All command lines available in /Users/stsypanov/IdeaProjects/jdk/build/macosx-x86_64-server-release/make-support/failure-logs.
>> === End of repeated output ===
>>
>> What is wrong with the change?
>
>> What is wrong with the change?
>
> You'll need parentheses to make that work, changing it to use '|' would work too.
> @AlanBateman what do you think?
The latest (3ea66641) looks okay.
-------------
PR: https://git.openjdk.org/jdk/pull/9956
More information about the core-libs-dev
mailing list