Hi,

> I think we should switch to Java 7 post-3.14, I don't think any of those
> things will reduce code size a lot, but most of these are quite useful as
> soon as you get used to them.

Most of them can be applied automatically using Eclipse (e.g. diamonds). 
Multi-catch is very useful. Also think of refactoring reflection stuff with the 
new ReflectiveOperationException, common superclass of all reflection 
exceptions. Those changes reduce code size and improve readability.

Try-with-resources should be applied with great care for existing code. New 
code should always use it where possible (try-with resources won't work for 
classes that open a file in constructor and close them afterwards). I think 
there should be some code review that checks for leaks on resources, also 
making classes Closeable.

Uwe

> 
> Dominik.
> 
> On Wed, Dec 23, 2015 at 10:52 AM, Javen O'Neal <javenon...@gmail.com>
> wrote:
> 
> > Oracle released Java 6 in 2006, ended support for Java 6 in 2013 and
> > released Java 7 in 2011 and ended support in 2015. Java 8 was released
> > in 2014.
> >
> > There are a few language features introduced in Java 7 that would be
> > nice to use in POI. This would mean asking everyone to move off of
> > Java 6, but seems justifiable.
> >
> > I'd really like to use some of the Java 8 features, but usage of Java
> > 7 is too prevalent today.
> >
> > A few Java 7 features that would be nice to use in the POI library:
> > * switch statements on strings
> > * improved generics type inference (diamond operator)
> > * try-with-resources
> > * try/multi-catch
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
> > For additional commands, e-mail: dev-h...@poi.apache.org
> >
> >


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org

Reply via email to