You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Hudson (JIRA)" <ji...@apache.org> on 2017/06/04 23:48:04 UTC

[jira] [Commented] (SUREFIRE-1381) Refactoring in AbstractCommandStream and MasterProcessCommand

    [ https://issues.apache.org/jira/browse/SUREFIRE-1381?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16036433#comment-16036433 ] 

Hudson commented on SUREFIRE-1381:
----------------------------------

SUCCESS: Integrated in Jenkins build maven-surefire #1714 (See [https://builds.apache.org/job/maven-surefire/1714/])
[SUREFIRE-1381] Refactoring in AbstractCommandStream and (tibor17: [http://git-wip-us.apache.org/repos/asf/?p=maven-surefire.git&a=commit&h=9c77aa40d1d4fc3455f6059d06a21341ba593c99])
* (edit) surefire-api/src/main/java/org/apache/maven/surefire/booter/MasterProcessCommand.java
* (edit) maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/lazytestprovider/AbstractCommandStream.java


> Refactoring in AbstractCommandStream and MasterProcessCommand
> -------------------------------------------------------------
>
>                 Key: SUREFIRE-1381
>                 URL: https://issues.apache.org/jira/browse/SUREFIRE-1381
>             Project: Maven Surefire
>          Issue Type: Task
>          Components: process forking
>            Reporter: Tibor Digana
>            Assignee: Tibor Digana
>             Fix For: 2.20.1
>
>
> I have removed deprecated method
> {code}
>     @Deprecated
>     protected final MasterProcessCommand getLastCommand()
>     {
>         return lastCommand;
>     }
> {code}
> and the variable 
> {code}
> private volatile MasterProcessCommand lastCommand;
> {code}
> can be inlined in {{read()}} method.
> {{MasterProcessCommand}} has method 
> {code}public byte[] encode( String data ){code}
> and uses {{dataBytes.length}} with fixed length of array in three places. Therefore the refactoring would be to store it to constant {len}}
> {code}final int len = dataBytes.length;{code}
> and use it in three places as before.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)