[
https://issues.apache.org/jira/browse/SUREFIRE-1381?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Tibor Digana updated SUREFIRE-1381:
-----------------------------------
Description:
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.
was:
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.
> 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)