Skip to content

Commit e30215d

Browse files
committed
clean up
1 parent cd1a92a commit e30215d

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

src/com/cleancoder/args/Args.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@ public Args(String schema, String[] args) throws ArgsException {
1515
}
1616

1717
private void parseSchema(String schema) throws ArgsException {
18-
for (String element : schema.split(","))
19-
if (!element.isEmpty())
18+
for (String element : schema.split(",")) {
19+
if (!element.isEmpty()) {
2020
parseSchemaElement(element.trim());
21+
}
22+
}
2123
}
2224

2325
private void parseSchemaElement(String element) throws ArgsException {
@@ -41,8 +43,9 @@ else if (elementTail.equals("&"))
4143
}
4244

4345
private void validateSchemaElementId(char elementId) throws ArgsException {
44-
if (!Character.isLetter(elementId))
46+
if (!Character.isLetter(elementId)) {
4547
throw new ArgsException(INVALID_ARGUMENT_NAME, elementId, null);
48+
}
4649
}
4750

4851
private void parseArgumentStrings(List<String> argsList) throws ArgsException {

0 commit comments

Comments
 (0)