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 array declarations in java.base
module (660 warnings in 168 files). Here's the webrev:
http://cr.openjdk.java.net/~tvaleev/patches/array_decl_java_base/
To me it's easier to review the whole patch rather than click on
every file:
http://cr.openjdk.java.net/~tvaleev/patches/array_decl_java_base/jdk.patch
I checked the result by eyes thoroughly and did not find anything
wrong. So if you're interested I can prepare a patch which covers any
full JDK sources or any subset of it.
The only questions are which subset should be processed and should I
also update copyrights for changed files (doing this automatically
could be more risky unless there's
already well-tested utility to do this).
Good to see this. Updating the copyright dates is annoying but if you
can do that then it would be good. There is a script to do a bulk
update that I think is better for cases like this but it doesn't seem
to be run very often these days.
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 jdk/client repo rather than jdk/jdk so if it's
not too awkward then it might be helper if the patch for java.desktop
were a separate change that gets pushed to jdk/client rather than
jdk/jdk.
-Alan
Although cleanup like this is nice, I'll give a word of warning that
pervasive
changes like that can sometimes cause difficulties when there are lots of
changes in code which is undergoing different lines of development in
different
branches or repos. If nothing else, I'd consider doing it on a per-component
or per-module basis.
As regards copyrights, there are scripts to fix dates that only modify the
affected files (as compared to what I think Alan is referring to, which is
a script to modify all files in the repo which have been edited that year.)
-- Jon