You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by Joern Kottmann <ko...@gmail.com> on 2018/11/30 08:20:47 UTC

Automatic refactoring tools for UIMA 3.x

Hello all,

due to some CAS Editor bug I looked a bit through the code and noticed
we can probably do a few refactorings to move up the code to use more
Java 7 and 8 level language features.

Not everything makes sense, but some new features allow to remove
(duplicate) code.
- Java 5 supports auto boxing of primitives
- Java 5 for each loops can replace iterator style loops
- Java 7 introduced multi-catch blocks (uimaj-core has 63 that can be
refactored)
- Java 7 supports diamond (<>) type arguments
- Java 7 introduced try with resources (finally block can often be removed)

If there is an interest I would prepare a patch for each refactoring,
and then it would be good if someone else could review it.

Jörn

Re: Automatic refactoring tools for UIMA 3.x

Posted by Marshall Schor <ms...@schor.com>.
I would be willing to review such changes for the uimaj area.

-Marshall

On 11/30/2018 3:20 AM, Joern Kottmann wrote:
> Hello all,
>
> due to some CAS Editor bug I looked a bit through the code and noticed
> we can probably do a few refactorings to move up the code to use more
> Java 7 and 8 level language features.
>
> Not everything makes sense, but some new features allow to remove
> (duplicate) code.
> - Java 5 supports auto boxing of primitives
> - Java 5 for each loops can replace iterator style loops
> - Java 7 introduced multi-catch blocks (uimaj-core has 63 that can be
> refactored)
> - Java 7 supports diamond (<>) type arguments
> - Java 7 introduced try with resources (finally block can often be removed)
>
> If there is an interest I would prepare a patch for each refactoring,
> and then it would be good if someone else could review it.
>
> Jörn
>