Skip to content

Commit

Permalink
sputs fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
RichardHightower committed Apr 23, 2015
1 parent 46dfd3f commit 253cc73
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions reflekt/src/main/java/io/advantageous/boon/core/Str.java
Original file line number Diff line number Diff line change
Expand Up @@ -964,31 +964,24 @@ public static CharBuf sputl(CharBuf buf, Object... messages) {
* @return string created.
*/
public static CharBuf sputs(CharBuf buf, Object... messages) {

int index = 0;
for (Object message : messages) {
if (index != 0) {
buf.add(' ');
}
index++;

if (message == null) {
buf.add("<NULL>");
} if (message instanceof char[]) {

} else if (message instanceof char[]) {
buf.add(((char[]) message));
}

else if (message.getClass().isArray()) {
} else if (message.getClass().isArray()) {
buf.add(toListOrSingletonList(message).toString());
} else {
buf.add(message.toString());
}
}
buf.add('\n');

return buf;

}

public static StringBuilder sputs(StringBuilder buf, Object... messages) {
Expand Down

0 comments on commit 253cc73

Please sign in to comment.