Thanks Otavio. Make sure you stick with Java 8 though because master is targeting Java EE 8. -- Jean-Louis Monteiro http://twitter.com/jlouismonteiro http://www.tomitribe.com
On Thu, Jan 10, 2019 at 3:18 PM Otávio Gonçalves de Santana < [email protected]> wrote: > Updates the API > > This PR has the goal to update the code using the newest API until Java 8. > These improvements are: > > - > > Use switch instead of multiple if/else: The switch is faster because > there are special bytecodes that allow efficient switch statement > evaluation when there are a lot of cases. > - > > Simplifies code using Objects.equals: It reduces the number of lines of > code using the Objects.equals > < > https://docs.oracle.com/javase/8/docs/api/java/util/Objects.html#equals-java.lang.Object-java.lang.Object- > >also > it will be faster considering the JIT factor. > - > > Simplifies the primitive compare using Integer.compare > < > https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html#compare-int-int- > > > - > > Reduces code using removeif condition in the collection. > - > > from the JVM specification it repleaces L instead of l > <https://docs.oracle.com/javase/specs/jls/se8/html/jls-3.html#jls-3.10 > >. > > ref: https://github.com/apache/tomee/pull/370 >
