I'd like to point out that rodde has also asked this project to be
included in Apache Commons Collections:
https://lists.apache.org/thread/klwtkbz96rp9zfr1077sc9r8tjtthfl4
On 11/06/2022 15:53, - wrote:
Hello,
What do you think?
First, for your benchmarks, I recommend you write them with
On Fri, 27 May 2022 14:18:19 GMT, Claes Redestad wrote:
> In preparation of #8855 this PR refactors the conversions from `List` to
> array and array to `List`, reducing the number of conversions when calling
> `MethodHandles.dropArguments` in particular. This remove about ~5% of
> allocations
value: 1100_1000.
On 30/12/2021 13:13, Fabrice Tiercelin wrote:
Hi,
Le mercredi 29 décembre 2021, 11:35:12 UTC+1, Rob Spoor
a écrit :
An example is
reading input streams byte-by-byte: the result is an int between 0 and > 255
(inclusive), or -1 for EOF. If the result is not -1, the res
This isn't a security leak in Java (because that would mean it would be
a security leak in any language that supports narrowing). This is a
security leak in the application that does the narrowing. Developers
should be aware that narrowing can change values. And furthermore, I
don't think
If this is really something that's desired, then why use an annotation
when there's a keyword already available: const. However, there's a
reason that's never been actually used in Java, and that's because it's
so hard to get right.
On 26/11/2021 00:11, Alan Snyder wrote:
I like the idea of
Hi all,
I've been writing a few annotations lately that have one required
attribute and some optional ones. That leaves me with three options:
1) Use value() for the required attribute. That becomes ugly when the
optional attributes are given though.
2) Make developers write the attribute
This is a regression, because Java 11 shows "default" twice for the
TreeMap, whereas Java 15 shows "null" twice.
On 11/01/2021 19:05, Phil Smith wrote:
Hello, I submitted bug report 9068554 recently, but I consider this a
pretty big issue and I'd like for this not to get lost in triage.
With
On 20/12/2020 19:15, Philippe Marschall wrote:
On 20.12.20 18:47, Rob Spoor wrote:
...
That "> 0" is incorrect here; it's allowed to return 0 before EOF
I don't think the method is allowed to return 0 before EOF. To quote
from the method Javadoc.
> This method blocks
According to the documentation of InputStream.readNBytes:
Reads up to a specified number of bytes from the input stream. This
method blocks until the requested number of bytes have been read, end
of stream is detected, or an exception is thrown. This method does not
close the input
Hi all,
In Java 9, compact strings were added. Ever since, I've been trying to
use getChars instead of charAt for Strings. However, I prefer to also do
the same for StringBuilder and StringBuffer. This can lead to some
special cases. For instance, in Apache Commons I/O:
know what the community thinks about it.
Regards,
Justin Dekeyser
On Wednesday, November 4, 2020, Rob Spoor wrote:
On 04/11/2020 14:18, Justin Dekeyser wrote:
Hello everyone,
I have been following this mailing list for several months, and
earlier today my attention was draw
On 04/11/2020 14:18, Justin Dekeyser wrote:
Hello everyone,
I have been following this mailing list for several months, and
earlier today my attention was drawn to
https://bugs.openjdk.java.net/browse/JDK-8140283. Actually I've been
dreaming of such a feature for a long time now.
I would
On 15/09/2020 22:02, Pavel Rappo wrote:
On 15 Sep 2020, at 20:50, Brian Burkhalter wrote:
On Sep 15, 2020, at 12:38 PM, Kevin Rushforth
wrote:
I see this in DecimalFormatSymbols:
/**
* Override hashCode.
*/
private volatile int hashCode;
@Override
public
/java.base/java/text/DecimalFormatSymbols.html
On Sep 15, 2020, at 12:14 PM, Rob Spoor wrote:
In Java 14 and before, DecimalFormatSymbols had overrides for both equals and
hashCode. In Java 15, the override for hashCode has disappeared, and it now
inherits hashCode from java.lang.Object
In Java 14 and before, DecimalFormatSymbols had overrides for both
equals and hashCode. In Java 15, the override for hashCode has
disappeared, and it now inherits hashCode from java.lang.Object. That
means it now violates the contract for equals + hashCode: two equal
DecimalFormatSymbols
If you need something right now, you can try
https://commons.apache.org/proper/commons-text/javadocs/api-release/org/apache/commons/text/StringSubstitutor.html.
On 21/07/2020 09:29, Jessica wrote:
Hi,
I would like to strongly request Java have the ability to do string
interpolation.
It is
There's still a little regression there since Java 8, if you add the
keySet(), values() or entrySet() to the Properties object as either key
or value; in Java 8 this would cause "(this Collection)" to be included,
while even with this fix that would cause a StackOverflowError. However,
given
On 23/05/2020 21:13, Rob Spoor wrote:
Hi,
I was working on upgrading a library of mine from Java 8 to 11, and I
noticed my unit tests started failing. Some investigation showed that in
Java 9, java.util.Properties was rewritten to no longer rely on the fact
that it extends Hashtable. One
Hi,
I was working on upgrading a library of mine from Java 8 to 11, and I
noticed my unit tests started failing. Some investigation showed that in
Java 9, java.util.Properties was rewritten to no longer rely on the fact
that it extends Hashtable. One of the changes was to use a private
On 28/10/2019 21:34, Florian Weimer wrote:
* Сергей Цыпанов:
Hello,
current implementation of e.g. String.toUpperCase() returns the object
it was called on in case all code points are in upper case.
E.g. this test
@Test
public void upperCase() {
String str = "AZ";//
Hi,
When you wrap a resource (InputStream, etc) using a class constructor
(e.g. new BufferedInputStream(...)), compilers usually don't complain.
If you do the exact same thing using a utility method, compilers aren't
that smart anymore. For instance, the following produces a warning that
the
I found a bug in Inet6Adress.isIPv4CompatibleAddress(). While parsing
correctly uses the ::: format, isIPv4CompatibleAddress()
checks for :: instead. An example:
Inet6Address address = (Inet6Address)
InetAddress.getByName("::192.168.1.13");
System.out.printf("%s: %b%n", address,
Maybe because Appendable comes with IOExceptions?
On 21/06/2019 17:06, Robert Marcano wrote:
Greetings. Is there a reason the newest APIs added to Matcher
(performance maybe?) with StringBuilder arguments weren't added as
Appendable instead?
For example:
public StringBuilder
If you already know the size and are not going to parallelize your
stream, you can simply use Collectors.toCollection:
Stream.of(1,2,3)
.map(i -> i+1)
.collect(Collectors.toCollection(() -> new ArrayList<>(3)));
It could perhaps be a bit easier if Collectors.toList would be
dditional API surface area here is negative. But, we can
surely have a discussion on this.
On 2/16/2019 7:52 AM, Rob Spoor wrote:
I noticed that, while Stream and its primitive equivalents have
multiple map and flapMap methods, Optional and its primitive
equivalents were missing those. Sin
I noticed that, while Stream and its primitive equivalents have multiple
map and flapMap methods, Optional and its primitive equivalents were
missing those. Since these can still be very useful, I wrote a patch to
add the following methods:
* Optional: mapToInt, mapToLong, mapToDouble,
On 10/01/2019 22:59, Mandy Chung wrote:
On 1/10/19 11:30 AM, Rob Spoor wrote:
I had an idea that can possibly help solve three issues:
* 8212620
Provide a mechansim to allow a class/method to request filtering from
the stack trace
This RFE is not just about stack trace format and a generic
I had an idea that can possibly help solve three issues:
* 8212620
Provide a mechansim to allow a class/method to request filtering from
the stack trace
* 8211152
Improve unclear and incomplete Exception stack trace
* 6507809
"Caused by" notation for stack traces unnecessarily hard to read
Java 8 added Base64 with its nested classes Encoder and Decoder. These
both have methods to wrap an OutputStream / InputStream respectively.
However, base64 is text; the alphabets exist out of ASCII characters
only. This is (somewhat) acknowledged by the presence of the
encodeToString(byte[])
29 matches
Mail list logo