Skip to content

Commit

Permalink
Use Java 5+ features
Browse files Browse the repository at this point in the history
  • Loading branch information
Gintas Grigelionis committed Mar 19, 2018
1 parent 70d8de7 commit 39edf7e
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -379,13 +379,13 @@ public boolean isGreaterThanOrEqual(final DeweyDecimal other) {
*/
@Override
public String toString() {
final StringBuffer sb = new StringBuffer();
final StringBuilder sb = new StringBuilder();

for (int i = 0; i < components.length; i++) {
if (i != 0) {
for (int component : components) {
if (sb.length() > 0) {
sb.append('.');
}
sb.append(components[i]);
sb.append(component);
}

return sb.toString();
Expand Down

0 comments on commit 39edf7e

Please sign in to comment.