You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Tibor Digana (JIRA)" <ji...@apache.org> on 2015/05/06 09:25:59 UTC
[jira] [Created] (SUREFIRE-1155) REFACTORING for Java 5
Tibor Digana created SUREFIRE-1155:
--------------------------------------
Summary: 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)