Skip to content

Commit 1b1ac53

Browse files
committed
Add missing @deprecated annotations, reorder fields due to checkstyle warnings.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/cli/trunk@1439942 13f79535-47bb-0310-9956-ffa450edef68
1 parent 582c15e commit 1b1ac53

3 files changed

Lines changed: 14 additions & 4 deletions

File tree

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
* @version $Revision$, $Date$
2929
* @deprecated Use the {@link DefaultParser} instead
3030
*/
31+
@Deprecated
3132
public class GnuParser extends Parser
3233
{
3334
/**

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

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ public class HelpFormatter
108108
* @deprecated Scope will be made private for next major version
109109
* - use get/setWidth methods instead.
110110
*/
111+
@Deprecated
111112
public int defaultWidth = DEFAULT_WIDTH;
112113

113114
/**
@@ -116,6 +117,7 @@ public class HelpFormatter
116117
* @deprecated Scope will be made private for next major version
117118
* - use get/setLeftPadding methods instead.
118119
*/
120+
@Deprecated
119121
public int defaultLeftPad = DEFAULT_LEFT_PAD;
120122

121123
/**
@@ -125,6 +127,7 @@ public class HelpFormatter
125127
* @deprecated Scope will be made private for next major version
126128
* - use get/setDescPadding methods instead.
127129
*/
130+
@Deprecated
128131
public int defaultDescPad = DEFAULT_DESC_PAD;
129132

130133
/**
@@ -133,6 +136,7 @@ public class HelpFormatter
133136
* @deprecated Scope will be made private for next major version
134137
* - use get/setSyntaxPrefix methods instead.
135138
*/
139+
@Deprecated
136140
public String defaultSyntaxPrefix = DEFAULT_SYNTAX_PREFIX;
137141

138142
/**
@@ -141,6 +145,7 @@ public class HelpFormatter
141145
* @deprecated Scope will be made private for next major version
142146
* - use get/setNewLine methods instead.
143147
*/
148+
@Deprecated
144149
public String defaultNewLine = System.getProperty("line.separator");
145150

146151
/**
@@ -149,6 +154,7 @@ public class HelpFormatter
149154
* @deprecated Scope will be made private for next major version
150155
* - use get/setOptPrefix methods instead.
151156
*/
157+
@Deprecated
152158
public String defaultOptPrefix = DEFAULT_OPT_PREFIX;
153159

154160
/**
@@ -157,17 +163,16 @@ public class HelpFormatter
157163
* @deprecated Scope will be made private for next major version
158164
* - use get/setLongOptPrefix methods instead.
159165
*/
166+
@Deprecated
160167
public String defaultLongOptPrefix = DEFAULT_LONG_OPT_PREFIX;
161168

162-
/** The separator displayed between the long option and its value. */
163-
private String longOptSeparator = DEFAULT_LONG_OPT_SEPARATOR;
164-
165169
/**
166170
* the name of the argument
167171
*
168172
* @deprecated Scope will be made private for next major version
169173
* - use get/setArgName methods instead.
170174
*/
175+
@Deprecated
171176
public String defaultArgName = DEFAULT_ARG_NAME;
172177

173178
/**
@@ -176,7 +181,10 @@ public class HelpFormatter
176181
* Defaults to case-insensitive alphabetical sorting by option key
177182
*/
178183
protected Comparator<Option> optionComparator = new OptionComparator();
179-
184+
185+
/** The separator displayed between the long option and its value. */
186+
private String longOptSeparator = DEFAULT_LONG_OPT_SEPARATOR;
187+
180188
/**
181189
* Sets the 'width'.
182190
*

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
* @version $Revision$, $Date$
3131
* @deprecated Use the {@link DefaultParser} instead
3232
*/
33+
@Deprecated
3334
public class PosixParser extends Parser
3435
{
3536
/** holder for flattened tokens */

0 commit comments

Comments
 (0)