[ 
http://jira.codehaus.org/browse/SUREFIRE-696?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stefan Birkner updated SUREFIRE-696:
------------------------------------

    Attachment: SUREFIRE-696.patch

Thanks for your advice.

Unfortunately there are two other problems with Java 1.3. PropertiesWrapper, 
SurefireStarter and SurefireReflectorTest are using RuntimeException 
constructors, which have an Exception parameter. Foo.java uses 
Boolean.valueOf(...). Maybe we should make surefire-booter a Java 1.4 project.

I don't understand in which way a private copy-constructor retains 
immutability. Classpath objects are not immutable, because there is a method 
addClassPathElementUrl(...). We could replace this method by a static method
 Classpath add( Classpath classpath, String element )
in order to get an immutable class. But for me there's no reason for having an 
immutable class.

> Improve the design of the class Classpath
> -----------------------------------------
>
>                 Key: SUREFIRE-696
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-696
>             Project: Maven Surefire
>          Issue Type: Improvement
>          Components: Maven Surefire Plugin
>    Affects Versions: 2.7.2
>            Reporter: Stefan Birkner
>            Priority: Minor
>         Attachments: SUREFIRE-696.patch, SUREFIRE-Classpath.patch
>
>
> This patch contains some improvements for the class Classpath:
> * Only use a set for storing the elements.
> * append(Classpath) has been changed to Classpath.join(Classpath, Classpath), 
> because the classpath doesn't get appended. Instead a new one is created.
> * Renamed setForkProperties to writeToForkProperties.
> * Renamed setAsSystemProperty to writeToSystemProperty.
> * Moved getClassPathAsString() into writeToSystemProperty and only call 
> writeToSystemProperty from outside.
> * Added readFromForkProperties in order to have serialization and 
> deseralization being part of the same class.
> From my point of view these changes improve the readability of the Surefire 
> code and are another step on the way to clean code.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to