22
22
import java .io .File ;
23
23
import org .apache .maven .surefire .api .util .RunOrder ;
24
24
25
+ import static org .apache .maven .surefire .api .util .RunOrder .ALPHABETICAL ;
26
+ import static org .apache .maven .surefire .api .util .RunOrder .DEFAULT ;
27
+
25
28
/**
26
29
* @author Kristian Rosenvold
27
30
*/
28
- public class RunOrderParameters
31
+ public final class RunOrderParameters
29
32
{
30
33
private final RunOrder [] runOrder ;
31
34
@@ -35,35 +38,29 @@ public class RunOrderParameters
35
38
36
39
public RunOrderParameters ( RunOrder [] runOrder , File runStatisticsFile )
37
40
{
38
- this .runOrder = runOrder ;
39
- this .runStatisticsFile = runStatisticsFile ;
40
- this .runOrderRandomSeed = null ;
41
+ this ( runOrder , runStatisticsFile , null );
41
42
}
42
43
43
44
public RunOrderParameters ( String runOrder , File runStatisticsFile )
44
45
{
45
- this .runOrder = runOrder == null ? RunOrder .DEFAULT : RunOrder .valueOfMulti ( runOrder );
46
- this .runStatisticsFile = runStatisticsFile ;
47
- this .runOrderRandomSeed = null ;
46
+ this ( runOrder , runStatisticsFile , null );
48
47
}
49
48
50
- public RunOrderParameters ( RunOrder [] runOrder , File runStatisticsFile , Long runOrderRandomSeed )
49
+ public RunOrderParameters ( String runOrder , File runStatisticsFile , Long runOrderRandomSeed )
51
50
{
52
- this .runOrder = runOrder ;
53
- this .runStatisticsFile = runStatisticsFile ;
54
- this .runOrderRandomSeed = runOrderRandomSeed ;
51
+ this ( runOrder == null ? DEFAULT : RunOrder .valueOfMulti ( runOrder ), runStatisticsFile , runOrderRandomSeed );
55
52
}
56
53
57
- public RunOrderParameters ( String runOrder , File runStatisticsFile , Long runOrderRandomSeed )
54
+ public RunOrderParameters ( RunOrder [] runOrder , File runStatisticsFile , Long runOrderRandomSeed )
58
55
{
59
- this .runOrder = runOrder == null ? RunOrder . DEFAULT : RunOrder . valueOfMulti ( runOrder ) ;
56
+ this .runOrder = runOrder ;
60
57
this .runStatisticsFile = runStatisticsFile ;
61
58
this .runOrderRandomSeed = runOrderRandomSeed ;
62
59
}
63
60
64
61
public static RunOrderParameters alphabetical ()
65
62
{
66
- return new RunOrderParameters ( new RunOrder []{ RunOrder . ALPHABETICAL }, null );
63
+ return new RunOrderParameters ( new RunOrder []{ ALPHABETICAL }, null );
67
64
}
68
65
69
66
public RunOrder [] getRunOrder ()
@@ -80,5 +77,4 @@ public File getRunStatisticsFile()
80
77
{
81
78
return runStatisticsFile ;
82
79
}
83
-
84
80
}
0 commit comments