GitHub user otaviojava opened a pull request:
https://github.com/apache/tomee/pull/323
Optmizes try catch
* Optimizes the try using the try-with-resources that allows us to declare
resources to be used in a try block with the assurance that the resources will
be closed when after execution of that block. An ARM automatic resource
management by the JVM.
* The use of multi-catch that removes redundancies catch treatment.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/otaviojava/tomee optmizes_try_catch
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/tomee/pull/323.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #323
----
commit e590f9a9844e0ea221f3e0980c6a736cff0ccecf
Author: Otavio Santana <otaviopolianasantana@...>
Date: 2018-12-28T13:56:42Z
updates to use try-catch
commit b9d0ce812d5bd9453c80fd9d585f0d0b5b1da44a
Author: Otavio Santana <otaviopolianasantana@...>
Date: 2018-12-28T13:57:36Z
updates the try to use try-with-resources
commit 8f7b8370bc191a2ca96b4a686d23562a286ae23f
Author: Otavio Santana <otaviopolianasantana@...>
Date: 2018-12-28T16:10:35Z
uses contains instead of indexof
commit 17d787556b93b82005e2af6e93b573d3dc149f34
Author: Otavio Santana <otaviopolianasantana@...>
Date: 2018-12-28T16:11:01Z
removes unnecessary unboxking
commit c00a2b7c2777fe4d7d6d3732b32a9148f2fb9949
Author: Otavio Santana <otaviopolianasantana@...>
Date: 2018-12-28T16:17:38Z
optmizes try-catch
----
---