Skip to content

Commit d39535c

Browse files
author
tgardner1959
committed
Cleanup of BindDemo, AuthDemo, and CompareDemo
1 parent 5dbe413 commit d39535c

11 files changed

Lines changed: 1517 additions & 1686 deletions
Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
package samplecode.args;
22

33

4-
import com.unboundid.util.args.ArgumentException;
5-
import com.unboundid.util.args.StringArgument;
6-
4+
import com.unboundid.util.args.*;
75
import java.util.ResourceBundle;
86

97

@@ -12,44 +10,46 @@
1210
* {@link String}
1311
*/
1412
public class StringPropertiesBackedArgument
15-
extends PropertiesBackedArgument<StringArgument,String> {
16-
17-
18-
/**
19-
* @param resourceBundle
20-
* the resource bundle from which the command line argument
21-
* are taken
22-
* @param basePropertyName
23-
* the base property name
24-
*
25-
* @return a new {@code StringPropertiesBackedArgument} object.
26-
*/
27-
public static StringPropertiesBackedArgument newStringPropertiesBackedArgument(
28-
final ResourceBundle resourceBundle, final String basePropertyName) {
29-
return new StringPropertiesBackedArgument(resourceBundle,basePropertyName);
30-
}
31-
32-
33-
34-
@Override
35-
public StringArgument getArgument() throws ArgumentException {
36-
return new StringArgument(getShortIdentifier(),getLongIdentifier(),isRequired(),
37-
getMaxOccurrences(),getValuePlaceholder(),getDescription(),getDefaultValue());
38-
}
39-
40-
41-
42-
@Override
43-
protected String convertString(final String value) {
44-
return value;
45-
}
46-
47-
48-
49-
private StringPropertiesBackedArgument(
50-
final ResourceBundle resourceBundle, final String basePropertyName) {
51-
super(resourceBundle,basePropertyName);
52-
}
13+
extends PropertiesBackedArgument<StringArgument,String>
14+
{
15+
16+
/**
17+
* @param resourceBundle
18+
* the resource bundle from which the command line argument
19+
* are taken
20+
* @param basePropertyName
21+
* the base property name
22+
*
23+
* @return a new {@code StringPropertiesBackedArgument} object.
24+
*/
25+
public static StringPropertiesBackedArgument newStringPropertiesBackedArgument(
26+
final ResourceBundle resourceBundle,final String basePropertyName)
27+
{
28+
return new StringPropertiesBackedArgument(resourceBundle,basePropertyName);
29+
}
30+
31+
32+
private StringPropertiesBackedArgument(
33+
final ResourceBundle resourceBundle,final String basePropertyName)
34+
{
35+
super(resourceBundle,basePropertyName);
36+
}
37+
38+
39+
@Override
40+
protected String convertString(final String value)
41+
{
42+
return value;
43+
}
44+
45+
46+
@Override
47+
public StringArgument getArgument() throws ArgumentException
48+
{
49+
return new StringArgument(getShortIdentifier(),getLongIdentifier(),isRequired(),
50+
getMaxOccurrences(),getValuePlaceholder(),getDescription(),
51+
getDefaultValue());
52+
}
5353

5454

5555
}

src/main/java/samplecode/auth/AuthDemo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public String toString()
7474
StringBuilder sb = new StringBuilder("AuthDemo{");
7575
sb.append("authId='").append(authId).append('\'');
7676
sb.append(", authorizedIdentity=").append(authorizedIdentity);
77-
sb.append(", msg='").append(msg).append('\'');
77+
sb.append(", displayControl='").append(msg).append('\'');
7878
sb.append('}');
7979
return sb.toString();
8080
}

0 commit comments

Comments
 (0)