[
https://issues.apache.org/jira/browse/SUREFIRE-1155?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Tibor Digana closed SUREFIRE-1155.
----------------------------------
Resolution: Fixed
commit 84fd7235b6214fae9a32b44d748e0b519dde5058
> REFACTORING for Java 5
> ----------------------
>
> Key: SUREFIRE-1155
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1155
> Project: Maven Surefire
> Issue Type: Improvement
> Components: Maven Failsafe Plugin, Maven Surefire Plugin
> Affects Versions: 2.18.1
> Reporter: Tibor Digana
> Assignee: Tibor Digana
> Priority: Minor
> Fix For: 2.19
>
>
> This is the list of refactoring activities
> Java 5 for-each instead of Iterator
> optimized loops
> optimized branching
> some conditions in if-else could not happen -> therefore was simplified
> improved loops variables
> optimized use of this pointer
> using Java Generics instead of java.util.Properties
> removed unnecessary cast
> boolean instead of Boolean
> isEmpty() instead of Collection#size() == 0
> removed unused code
> resolved warnings shown by IntelliJ IDEA
> use Arrays.asList( o ) to Collections.singletonList( o ) with single
> object
> @SuppressWarnings where code generics cannot be improved
> substitute Java 4 StringBuilder with String concatination for better code
> clarity. Java Compilet 5 will compile to use StringBuilder in bytecode.
> using ternary operator
> added remark @todo use try-with-resources JDK7, search in all code
> get rid of Class[] in Reflection and use var args
> caught InvocationTargetException and use exception cause in rethrown
> RuntimeException
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)