[JBoss JIRA] Created: (ARQAJO-27) Reduce overusage of static imports
by Karel Piwko (JIRA)
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
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: http://www.atlassian.com/software/jira
13 years, 1 month
[JBoss JIRA] Created: (ARQ-321) Test enrichers should provide a ready-made deployment appender dependency
by Dan Allen (JIRA)
Test enrichers should provide a ready-made deployment appender dependency
-------------------------------------------------------------------------
Key: ARQ-321
URL: https://jira.jboss.org/browse/ARQ-321
Project: Arquillian
Issue Type: Feature Request
Components: Packaging Enricher SPI, Runtime Enricher SPI
Affects Versions: 1.0.0.Alpha4
Reporter: Dan Allen
Priority: Minor
Fix For: 1.0.0.CR1
Each test enrichers implementation should provide a dependency that packages the test enricher as an auxiliary archive. Currently, a container adapter will assemble an auxiliary archive of the test enrichers that are supported by that container. But there are cases when the container may have been enhanced with additional capabilities that allow it to support an additional enricher. At this point, it's up to the developer to package the enricher.
We could alleviate this requirement by providing ready-made test enrichers that include the auxiliary archive packaging. This supplementary dependency could be named using an additional classifier on the test enricher artifact, as such:
<groupId>org.jboss.arquillian.testenricher</groupId>
<artifactId>arquillian-testenricher-cdi</artifactId>
<classifier>auxiliary-archive</classifier>
<version>...</version>
This will give you not only the test enricher, but also enlistment as an auxiliary archive. The containers will still do their own packaging...this is for standalone usage.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 1 month