[9] RFR: 8168923: Use unsigned random long in a temp directory name

2016-10-29 Thread Ivan Gerasimov
Hello everyone! When File.createTempFile() is called, a random long value is generated, which is then made positive with Math.abs() and then used as a part of the directory name. Instead of using Math.abs() and Long.toString(), it would be better to use Long.toUnsignedString(): 1) no need t

[9] RFR: 8168921: Inconsistent Annotation.toString()

2016-10-29 Thread Ivan Gerasimov
Hello! Suppose an annotation is of form @interface MyAnnotation { long value(); } Create the annotation object with sun.reflect.annotation.AnnotationParser.annotationForMap(MyAnnotation.class, Map.of("value", some_value)). Annotation.toString() method, called for the object,

Re: Request/discussion: BufferedReader reading using async API while providing sync API

2016-10-29 Thread Brunoais
Here's my try on going async. On my tests on my local windows 10 machine (I don't have access to the linux one without a VM ATM) , now with 1GB file, I noticed: ~2s of speed improvement from BufferedInputStream to BufferedNonBlockStream when BufferedNonBlockStream is at its most advantageous