Skip to content

Commit 445ddaa

Browse files
committed
Missing @OverRide
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/cli/trunk@1440517 13f79535-47bb-0310-9956-ffa450edef68
1 parent 853dabc commit 445ddaa

17 files changed

Lines changed: 76 additions & 1 deletion

src/main/java/org/apache/commons/cli/GnuParser.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ public class GnuParser extends Parser
4848
* a non option has been encountered
4949
* @return a String array of the flattened arguments
5050
*/
51+
@Override
5152
protected String[] flatten(Options options, String[] arguments, boolean stopAtNonOption)
5253
{
5354
List<String> tokens = new ArrayList<String>();

src/main/java/org/apache/commons/cli/Option.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -560,6 +560,7 @@ public List<String> getValuesList()
560560
*
561561
* @return Stringified form of this object
562562
*/
563+
@Override
563564
public String toString()
564565
{
565566
StringBuilder buf = new StringBuilder().append("[ option: ");
@@ -604,6 +605,7 @@ private boolean hasNoValues()
604605
return values.isEmpty();
605606
}
606607

608+
@Override
607609
public boolean equals(Object o)
608610
{
609611
if (this == o)
@@ -630,6 +632,7 @@ public boolean equals(Object o)
630632
return true;
631633
}
632634

635+
@Override
633636
public int hashCode()
634637
{
635638
int result;
@@ -650,6 +653,7 @@ public int hashCode()
650653
* @throws RuntimeException if a {@link CloneNotSupportedException} has been thrown
651654
* by {@link super#clone()}
652655
*/
656+
@Override
653657
public Object clone()
654658
{
655659
try

src/main/java/org/apache/commons/cli/OptionGroup.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ public boolean isRequired()
137137
*
138138
* @return the stringified representation of this group
139139
*/
140+
@Override
140141
public String toString()
141142
{
142143
StringBuilder buff = new StringBuilder();

src/main/java/org/apache/commons/cli/Options.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,7 @@ public OptionGroup getOptionGroup(Option opt)
292292
*
293293
* @return Stringified form of this object
294294
*/
295+
@Override
295296
public String toString()
296297
{
297298
StringBuilder buf = new StringBuilder();

src/main/java/org/apache/commons/cli/PosixParser.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ private void init()
9494
* when an non option is found.
9595
* @return The flattened <code>arguments</code> String array.
9696
*/
97+
@Override
9798
protected String[] flatten(Options options, String[] arguments, boolean stopAtNonOption) throws ParseException
9899
{
99100
init();

src/test/java/org/apache/commons/cli/ArgumentIsOptionTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ public class ArgumentIsOptionTest extends TestCase
2424
private Options options = null;
2525
private CommandLineParser parser = null;
2626

27+
@Override
2728
public void setUp()
2829
{
2930
options = new Options().addOption("p", false, "Option p").addOption("attr", true, "Option accepts argument");

src/test/java/org/apache/commons/cli/BasicParserTest.java

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,127 +23,152 @@
2323
*/
2424
public class BasicParserTest extends ParserTestCase
2525
{
26+
@Override
2627
public void setUp()
2728
{
2829
super.setUp();
2930
parser = new BasicParser();
3031
}
3132

33+
@Override
3234
public void testDoubleDash2() throws Exception
3335
{
3436
// not supported by the BasicParser
3537
}
3638

39+
@Override
3740
public void testLongWithoutEqualSingleDash() throws Exception
3841
{
3942
// not supported by the BasicParser
4043
}
4144

45+
@Override
4246
public void testAmbiguousLongWithoutEqualSingleDash() throws Exception
4347
{
4448
// not supported by the basicParser
4549
}
4650

51+
@Override
4752
public void testNegativeOption() throws Exception
4853
{
4954
// not supported by the BasicParser (CLI-184)
5055
}
5156

57+
@Override
5258
public void testPropertiesOption1() throws Exception
5359
{
5460
// not supported by the BasicParser
5561
}
5662

63+
@Override
5764
public void testPropertiesOption2() throws Exception
5865
{
5966
// not supported by the BasicParser
6067
}
6168

69+
@Override
6270
public void testShortWithEqual() throws Exception
6371
{
6472
// not supported by the BasicParser
6573
}
6674

75+
@Override
6776
public void testShortWithoutEqual() throws Exception
6877
{
6978
// not supported by the BasicParser
7079
}
7180

81+
@Override
7282
public void testLongWithEqualDoubleDash() throws Exception
7383
{
7484
// not supported by the BasicParser
7585
}
7686

87+
@Override
7788
public void testLongWithEqualSingleDash() throws Exception
7889
{
7990
// not supported by the BasicParser
8091
}
8192

93+
@Override
8294
public void testUnambiguousPartialLongOption1() throws Exception
8395
{
8496
// not supported by the BasicParser
8597
}
8698

99+
@Override
87100
public void testUnambiguousPartialLongOption2() throws Exception
88101
{
89102
// not supported by the BasicParser
90103
}
91104

105+
@Override
92106
public void testUnambiguousPartialLongOption3() throws Exception
93107
{
94108
// not supported by the BasicParser
95109
}
96110

111+
@Override
97112
public void testUnambiguousPartialLongOption4() throws Exception
98113
{
99114
// not supported by the BasicParser
100115
}
101116

117+
@Override
102118
public void testAmbiguousPartialLongOption1() throws Exception
103119
{
104120
// not supported by the BasicParser
105121
}
106122

123+
@Override
107124
public void testAmbiguousPartialLongOption2() throws Exception
108125
{
109126
// not supported by the BasicParser
110127
}
111128

129+
@Override
112130
public void testAmbiguousPartialLongOption3() throws Exception
113131
{
114132
// not supported by the BasicParser
115133
}
116134

135+
@Override
117136
public void testAmbiguousPartialLongOption4() throws Exception
118137
{
119138
// not supported by the BasicParser
120139
}
121140

141+
@Override
122142
public void testPartialLongOptionSingleDash() throws Exception
123143
{
124144
// not supported by the BasicParser
125145
}
126146

147+
@Override
127148
public void testBursting() throws Exception
128149
{
129150
// not supported by the BasicParser
130151
}
131152

153+
@Override
132154
public void testUnrecognizedOptionWithBursting() throws Exception
133155
{
134156
// not supported by the BasicParser
135157
}
136158

159+
@Override
137160
public void testMissingArgWithBursting() throws Exception
138161
{
139162
// not supported by the BasicParser
140163
}
141164

165+
@Override
142166
public void testStopBursting() throws Exception
143167
{
144168
// not supported by the BasicParser
145169
}
146170

171+
@Override
147172
public void testStopBursting2() throws Exception
148173
{
149174
// not supported by the BasicParser

src/test/java/org/apache/commons/cli/DefaultParserTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
*/
2424
public class DefaultParserTest extends ParserTestCase {
2525

26+
@Override
2627
public void setUp() {
2728
super.setUp();
2829
parser = new DefaultParser();

src/test/java/org/apache/commons/cli/GnuParserTest.java

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,112 +19,134 @@
1919

2020
public class GnuParserTest extends ParserTestCase
2121
{
22+
@Override
2223
public void setUp()
2324
{
2425
super.setUp();
2526
parser = new GnuParser();
2627
}
2728

29+
@Override
2830
public void testDoubleDash2() throws Exception
2931
{
3032
// not supported by the GnuParser
3133
}
3234

35+
@Override
3336
public void testLongWithoutEqualSingleDash() throws Exception
3437
{
3538
// not supported by the GnuParser
3639
}
3740

41+
@Override
3842
public void testAmbiguousLongWithoutEqualSingleDash() throws Exception
3943
{
4044
// not supported by the GnuParser
4145
}
4246

47+
@Override
4348
public void testNegativeOption() throws Exception
4449
{
4550
// not supported by the GnuParser (CLI-184)
4651
}
4752

53+
@Override
4854
public void testLongWithUnexpectedArgument1() throws Exception
4955
{
5056
// not supported by the GnuParser
5157
}
5258

59+
@Override
5360
public void testLongWithUnexpectedArgument2() throws Exception
5461
{
5562
// not supported by the GnuParser
5663
}
5764

65+
@Override
5866
public void testShortWithUnexpectedArgument() throws Exception
5967
{
6068
// not supported by the GnuParser
6169
}
6270

71+
@Override
6372
public void testUnambiguousPartialLongOption1() throws Exception
6473
{
6574
// not supported by the GnuParser
6675
}
6776

77+
@Override
6878
public void testUnambiguousPartialLongOption2() throws Exception
6979
{
7080
// not supported by the GnuParser
7181
}
7282

83+
@Override
7384
public void testUnambiguousPartialLongOption3() throws Exception
7485
{
7586
// not supported by the GnuParser
7687
}
7788

89+
@Override
7890
public void testUnambiguousPartialLongOption4() throws Exception
7991
{
8092
// not supported by the GnuParser
8193
}
8294

95+
@Override
8396
public void testAmbiguousPartialLongOption1() throws Exception
8497
{
8598
// not supported by the GnuParser
8699
}
87100

101+
@Override
88102
public void testAmbiguousPartialLongOption2() throws Exception
89103
{
90104
// not supported by the GnuParser
91105
}
92106

93-
public void testAmbiguousPartialLongOption3() throws Exception
107+
@Override
108+
public void testAmbiguousPartialLongOption3() throws Exception
94109
{
95110
// not supported by the GnuParser
96111
}
97112

113+
@Override
98114
public void testAmbiguousPartialLongOption4() throws Exception
99115
{
100116
// not supported by the GnuParser
101117
}
102118

119+
@Override
103120
public void testPartialLongOptionSingleDash() throws Exception
104121
{
105122
// not supported by the GnuParser
106123
}
107124

125+
@Override
108126
public void testBursting() throws Exception
109127
{
110128
// not supported by the GnuParser
111129
}
112130

131+
@Override
113132
public void testUnrecognizedOptionWithBursting() throws Exception
114133
{
115134
// not supported by the GnuParser
116135
}
117136

137+
@Override
118138
public void testMissingArgWithBursting() throws Exception
119139
{
120140
// not supported by the GnuParser
121141
}
122142

143+
@Override
123144
public void testStopBursting() throws Exception
124145
{
125146
// not supported by the GnuParser
126147
}
127148

149+
@Override
128150
public void testStopBursting2() throws Exception
129151
{
130152
// not supported by the GnuParser

src/test/java/org/apache/commons/cli/OptionGroupTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ public class OptionGroupTest extends TestCase
3030
private Options _options = null;
3131
private Parser parser = new PosixParser();
3232

33+
@Override
3334
public void setUp()
3435
{
3536
Option file = new Option( "f", "file", false, "file to process" );

0 commit comments

Comments
 (0)