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 2017/06/04 21:44:04 UTC

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

     [ https://issues.apache.org/jira/browse/SUREFIRE-1381?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tibor Digana closed SUREFIRE-1381.
----------------------------------
    Resolution: Fixed

https://git-wip-us.apache.org/repos/asf?p=maven-surefire.git;a=commit;h=9c77aa40d1d4fc3455f6059d06a21341ba593c99

> 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)