]
Lukas Fryc updated ARQAJO-27:
-----------------------------
Fix Version/s: 1.0.0.Alpha2
I'm going to do extensive code/documentation review post Alpha2, but I will trigger
some lesser searchs in scope of Alpha2 in order to remove heavily used static imports in
code.
Reduce overusage of static imports
----------------------------------
Key: ARQAJO-27
URL:
https://issues.jboss.org/browse/ARQAJO-27
Project: Arquillian Ajocado
Issue Type: Bug
Affects Versions: 1.0.0.Alpha1
Reporter: Karel Piwko
Assignee: Lukas Fryc
Fix For: 1.0.0.Alpha2
It is extremely difficult to follow and read the code overfilled with static imports
especially when reading the code without an IDE.
The main reason why static imports exist is to make code more readable not the opposite.
See guideline at
http://download.oracle.com/javase/1.5.0/docs/guide/language/static-import...
For instance, see SystemPropertiesConfiguration:
import static org.jboss.arquillian.ajocado.utils.URLUtils.buildUrl; (used twice)
import static java.lang.System.getProperty; (used a lot of time, but I don't consider
statically importing System as a good practice either)
import static org.jboss.arquillian.ajocado.utils.PrimitiveUtils.*; (I have no idea what
is imported from there, I guess methods like asBoolean(String))
Suggestion:
a getPropertyAs(Class<?> clazz, String value, String default) method can easily
encapsulate calls to System.getProperty() and asType wrappers.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: