Re: Convert old-style array declarations (was: Re: ByteArrayOutputStream should not have a new writeBytes method in Java)

2018-10-09 Thread Tagir Valeev
Hello! So the conversion was successfully performed for client components: https://bugs.openjdk.java.net/browse/JDK-8211300 http://hg.openjdk.java.net/jdk/client/rev/2e330da7cbf4 https://bugs.openjdk.java.net/browse/JDK-8211693 http://hg.openjdk.java.net/jdk/client/rev/de9486d74a74 Now we can mov

Re: Convert old-style array declarations (was: Re: ByteArrayOutputStream should not have a new writeBytes method in Java)

2018-10-01 Thread Martin Buchholz
Thank you very much for working on these cleanups. I've occasionally done similar in the past. I've made big changesets with only one automated change at a time. So e.g. I would do only "C-style array declaration" in one changeset. This is one example of a change that should leave zero impact on

Convert old-style array declarations (was: Re: ByteArrayOutputStream should not have a new writeBytes method in Java)

2018-09-30 Thread Tagir Valeev
Hello! Ok, let's start with smaller thing which is java.desktop. Created a JBS issue and posted a patch here: http://mail.openjdk.java.net/pipermail/2d-dev/2018-October/009486.html Jonathan, > Although cleanup like this is nice, I'll give a word of warning that pervasive > changes like that can

Re: ByteArrayOutputStream should not have a new writeBytes method in Java

2018-09-28 Thread Jonathan Gibbons
On 09/28/2018 04:13 AM, Alan Bateman wrote: On 28/09/2018 05:51, Tagir Valeev wrote: Hello! I can volunteer doing this if OpenJDK community is really interested. I've launched the inspection over all java.* and jdk.* modules and found 4064 warnings. As an example, I converted all C-style arr

Re: ByteArrayOutputStream should not have a new writeBytes method in Java

2018-09-28 Thread Sergey Bylokhov
I can review the changes in java.desktop, please use these email alias awt-dev/2d-dev/swing-dev. On 28/09/2018 04:13, Alan Bateman wrote: As regards doing the entire source base then I think that would be good. Due to the complexity of testing, changes to the java.desktop module are pushed to

Re: ByteArrayOutputStream should not have a new writeBytes method in Java

2018-09-28 Thread Alan Bateman
On 28/09/2018 05:51, Tagir Valeev wrote: Hello! I can volunteer doing this if OpenJDK community is really interested. I've launched the inspection over all java.* and jdk.* modules and found 4064 warnings. As an example, I converted all C-style array declarations in java.base module (660 warning

Re: ByteArrayOutputStream should not have a new writeBytes method in Java

2018-09-27 Thread Tagir Valeev
> To: "ullenb...@gmail.com <mailto:ullenb...@gmail.com>" > > mailto:ullenb...@gmail.com>> > > Cc: "core-libs-dev@openjdk.java.net > > <mailto:core-libs-dev@openjdk.java.net>" > <mailto:core-libs-dev@openjdk.java.net>>

Re: ByteArrayOutputStream should not have a new writeBytes method in Java 11

2018-09-12 Thread Stuart Marks
On 9/11/18 10:36 PM, Michael Rasmussen wrote: Can a language syntax/feature be deprecated to produce a warning in javac? Perhaps this one should. We haven't reached the point of formally deprecating language features, but certain features like this one (and others) are certainly frowned upo

Re: ByteArrayOutputStream should not have a new writeBytes method in Java

2018-09-12 Thread Stuart Marks
nb...@gmail.com>> Cc: "core-libs-dev@openjdk.java.net <mailto:core-libs-dev@openjdk.java.net>" mailto:core-libs-dev@openjdk.java.net>> Bcc: Date: Tue, 11 Sep 2018 13:23:41 -0700 Subject: Re: ByteArrayOutputStream should not have a new writeBytes method

Re: ByteArrayOutputStream should not have a new writeBytes method in Java 11

2018-09-11 Thread Michael Rasmussen
> I noticed a few others nearby. It's startling that a new occurrence has crept > it. At least I haven't seen it on return types, like: public byte toArray() [] { ... } > An interesting exercise would be to write a detector for this declaration > style. Can a language syntax/feature be deprecat

Re: ByteArrayOutputStream should not have a new writeBytes method in Java

2018-09-11 Thread Tomasz Linkowski
13:23:41 -0700 > Subject: Re: ByteArrayOutputStream should not have a new writeBytes method > in Java 11 2. even if, it should not be byte b[] but byte[] b > Yeah we need to clean occurrences of this anachronistic array declaration > from the JDK. I noticed a few others nearby. It

Re: ByteArrayOutputStream should not have a new writeBytes method in Java 11

2018-09-11 Thread Martin Buchholz
It's an errorprone warning, for "easy" removal ... __IF__ you can run errorprone on the head sources. I think it's http://errorprone.info/bugpattern/MixedArrayDimensions On Tue, Sep 11, 2018 at 2:35 PM, Brian Burkhalter wrote: > > On Sep 11, 2018, at 1:23 PM, Stuart Marks wrote: > >>> 2. even i

Re: ByteArrayOutputStream should not have a new writeBytes method in Java 11

2018-09-11 Thread Brian Burkhalter
On Sep 11, 2018, at 1:23 PM, Stuart Marks wrote: >> 2. even if, it should not be byte b[] but byte[] b > > Yeah we need to clean occurrences of this anachronistic array declaration > from the JDK. I noticed a few others nearby. It's startling that a new > occurrence has crept it. (Or maybe n

Re: ByteArrayOutputStream should not have a new writeBytes method in Java 11

2018-09-11 Thread Stuart Marks
2. even if, it should not be byte b[] but byte[] b Yeah we need to clean occurrences of this anachronistic array declaration from the JDK. I noticed a few others nearby. It's startling that a new occurrence has crept it. (Or maybe not, perhaps it was done to conform to the nearby code.) Any

Re: ByteArrayOutputStream should not have a new writeBytes method in Java 11

2018-09-11 Thread Michael Rasmussen
See the comments here https://bugs.openjdk.java.net/browse/JDK-8180410 /Michael From: core-libs-dev on behalf of Christian Ullenboom Sent: 11 September 2018 01:18:42 To: core-libs-dev@openjdk.java.net Subject: ByteArrayOutputStream should not have a new

ByteArrayOutputStream should not have a new writeBytes method in Java 11

2018-09-11 Thread Christian Ullenboom
1. There is write(byte[]) already 2. even if, it should not be byte b[] but byte[] b