Re: Implementing JEP 400 on Windows 10 and Windows 11

2021-10-06 Thread John Platts
PerMonitor, system UTF-8 From: Magnus Ihse Bursie Sent: Tuesday, October 5, 2021 3:34 AM To: John Platts ; core-libs-dev Subject: Re:

Re: Implementing JEP 400 on Windows 10 and Windows 11

2021-10-06 Thread John Platts
r argv would be great plus (if converted correctly), right? -- http://bernd.eckenfels.net Von: core-libs-dev im Auftrag von Magnus Ihse Bursie Gesendet: Tuesday, October 5, 2021 10:34:26 AM An: John Platts ; core-libs-dev Betreff: Re: Implementing JEP 400 on

Implementing JEP 400 on Windows 10 and Windows 11

2021-10-04 Thread John Platts
I wrote a test program (in C++) to detect the codepages that would be returned by the GetACP(), GetOEMCP(), and GetConsoleCP() functions when the UTF-8 setting is added to the manifest. The manifest element (supported on Windows 10 Version 1903 or later) is in the http://schemas.microsoft.com

Windows 10 (since Windows 10 version 1903) and Windows 11 support UTF-8 as the default codepage through an executable manifest option

2021-10-04 Thread John Platts
Windows 10 (since Windows 10 version 1903) and Windows 11 support UTF-8 as the default codepage by setting an option in the application manifest. To enable UTF-8 as the default codepage for JDK executables on Windows 10 (starting with the May 2019 update) and Windows 11, the following modificati

Reimplementing sun.nio.ch.WindowsSelectorImpl using WSAEventSelect and WSAWaitForMultipleEvents instead of a wakeup socket

2018-05-18 Thread John Platts
The need to allocate a wakeup socket can be eliminated in  sun.nio.ch.WindowsSelectorImpl on Windows platforms by reimplementing  sun.nio.ch.WindowsSelectorImpl to use the WSAEventSelect and WSAWaitForMultipleEvents APIs introduced in Windows Vista. If WSAEventSelect and WSAWaitForMultipleEvents

Enhancements to the java.lang.StringCoding class

2017-07-02 Thread John Platts
I was looking at the OpenJDK 9 code, and I noticed that optimizations for encoding and decoding from UTF-16 text could be added to the java.lang.StringCoding class. Here is how the optimized UTF-16 decoding could be implemented in java.lang.StringCoding: private static void byteSwapUTF16(byte[]

Re: Add support for Unicode versions of JNI_CreateJavaVM and JNI_GetDefaultJavaVMInitArgs on Windows platforms

2017-05-08 Thread John Platts
: David Holmes Sent: Sunday, May 7, 2017 7:47 PM To: John Platts Cc: hotspot-dev developers; core-libs-dev Libs Subject: Re: Add support for Unicode versions of JNI_CreateJavaVM and JNI_GetDefaultJavaVMInitArgs on Windows platforms Added back jdk10-dev as a bcc. Added hotspot-dev and core-libs-dev

Possible memory leak in java.nio.DirectByteBuffer and java.nio.ByteBuffer.allocateDirect if OutOfMemoryError is thrown

2017-01-21 Thread John Platts
Here is the code for the java.nio.DirectByteBuffer(int) constructor, which is contained in the Direct-X-Buffer.java.template file, starting at line 117: Direct$Type$Buffer$RW$(int cap) { // package-private #if[rw] super(-1, 0, cap, cap); boolean pa = VM.isDirectMe

Backport of JEP 254 (Compact Strings) to OpenJDK 8

2017-01-12 Thread John Platts
I am interested in OpenJDK 8 builds with JEP 254 (Compact Strings) support backported from OpenJDK 9. I like the compact strings work that is being done in JDK 9, but I am interested in a OpenJDK 8 build with backported JEP 254 support since I am working with Java applications that might not wor

Enhancements to Java Collections API

2016-11-29 Thread John Platts
There are many features that are missing from the Java Collections API that should be added to the Java Collections API, including the following: * Bidirectional iterators for collections other than lists * New interfaces * BidiIterator - bidirectional iterator *

Improvements to BigDecimal(double, MathContext) constructor

2016-07-07 Thread John Platts
Here is the current significand normalization loop below in the  BigDecimal(double, MathContext) constructor:         // Normalize         while ((significand & 1) == 0) { // i.e., significand is even             significand >>= 1;             exponent++;         } Here is a better way to normaliz

Better implementation of Long.divideUnsigned and Long.remainderUnsigned

2016-07-07 Thread John Platts
In the implementations of Long.divideUnsigned and Long.remainderUnsigned, there is a better way to handle the case where dividend > Long.MAX_VALUE and divisor <= Long.MAX_VALUE than doing it through a BigInteger. Here is the current implementation of Long.divideUnsigned and Long.remainderUnsign

Improved Java Collection APIs

2010-11-19 Thread John Platts
Here are improvements that I really want to see to Java Collection APIs: - Addition of an equality comparator interface. - An wrapper that wraps a java.util.Comparator as a equality comparator. - Map and set classes that allow an equality comparator to be used instead of the equals() method or id

Bug in java.nio.StringCharBuffer.slice

2010-11-17 Thread John Platts
Here is the current implementation of slice in java.nio.StringCharBuffer (as found in OpenJDK 7): 44 public CharBuffer slice() { 45 return new StringCharBuffer(str, 46 -1, 47 0, 48

Java SE Mobile Profile

2010-11-10 Thread John Platts
Here are the reasons why a Java SE Mobile Profile is really needed: - Java ME does not support all of the Java SE 5, 6, and 7 language features. - Even though the Android platform is not a Java SE or Java ME implementation, the Android platform supports Java SE 5 and 6 language features plus API'