On Sat, Jan 2, 2021 at 11:56 AM Matthias Bläsing <mblaes...@doppel-helix.eu>
wrote:

> Hi,
>
> Am Samstag, den 02.01.2021, 11:38 -0600 schrieb Eric Bresie:
> > On Thu, Dec 31, 2020 at 1:41 AM Matthias Bläsing <
> > mblaes...@doppel-helix.eu>
> > wrote:
> >
> > > Am Mittwoch, den 30.12.2020, 16:24 -0600 schrieb Eric Bresie:
> > >
> > > Licenses from Oracle can be directly replaced, if there are files
> > > found, that are not owned by oracle, more analysis is required.
> > >
> > > See the "Convert" Tool, this might help with the correct mostly
> > > automatic translation:
> > >
> > >
> https://github.com/apache/netbeans-tools/blob/master/convert/src/convert/Convert.java
> > >
> > > This is part of the netbeans-tools repository:
> > >
> > > https://github.com/apache/netbeans-tools/
> > >
> > > And the whole project is here:
> > >
> > > https://github.com/apache/netbeans-tools/tree/master/convert
> > >
> >
> > EB ==>  Pulled the tool and started attempting to use this on the local
> > codebase.
> >
> > EB ==> However when attempting it finds a "META-INF\LICENSE" file without
> > an extension which when attempting the "name.indexOf(".") on the file
> > causes an index out of bound issue (i.e. there is no extension so checks
> on
> > specific extensions fails).
>
> Feel free to fix. The netbeans-tools repository is also just an Apache
> repository holding tools (as the name implies).


Okay with a minor tweak to account for this case I was able to get it to
iterate through each of the files and replace the header with the Apache
licenses in most cases.

However I noticed the following possible further issues:
(1) When dealing with many of the properties files, it seemed to strip
comments starting with # all together.  Assume this may require changes to
the logic where it's replacing the header to avoid this.
(2) If there is no header presently, it does not modify this. Assume this
would be a case where when an existing header is not present then add it as
well where applicable
(3) When iterating through, it seems to iterate through some binary
files (i.e. class and jar files).  Not sure if it tries to modify these but
seems like that might be unnecessary.  Maybe need some additional "exclude"
logics with some defaults included in some way (maybe a properties file
with exclusions or a parameter with exclusions included)

If I was to make some of these changes, are changes for this tracked in the
Netbeans JIRA (i.e. does a ticket need raising here or elsewhere [git
Issue?]).  Or would making the changes with a PR suffice?

Eric Bresie
ebre...@gmail.com

Reply via email to