This is a snippet from the toString method of Message.java:
for (Object o : largs) {
if (o instanceof Object[]) {
sb.append(Arrays.deepToString((Object[]) o));
} else if (o instanceof byte[]) {
sb.append(Arrays.toString((byte[]) o));
} else if (o instanceof int[]) {
sb.append(Arrays.toString((int[]) o));
} else if (o instanceof short[]) {
sb.append(Arrays.toString((short[]) o));
} else if (o instanceof long[]) {
sb.append(Arrays.toString((long[]) o));
} else if (o instanceof boolean[]) {
sb.append(Arrays.toString((boolean[]) o));
} else if (o instanceof double[]) {
sb.append(Arrays.toString((double[]) o));
} else if (o instanceof float[]) {
sb.append(Arrays.toString((float[]) o));
} else {
sb.append(o.toString());
}
sb.append(',');
sb.append(' ');
}
When I used 2.7.5, this regularly throwed a NullPointerException for me since o was apparently null in some cases. I haven't had the Exception after upgrading to version 3, but I am unsure whether it is correct to not handle null here.
Even if o can never be null you should add a little Objects.requireNonNull or something to catch potential problems immediately.
This is a snippet from the toString method of Message.java:
When I used 2.7.5, this regularly throwed a NullPointerException for me since
o
was apparently null in some cases. I haven't had the Exception after upgrading to version 3, but I am unsure whether it is correct to not handle null here. Even ifo
can never be null you should add a littleObjects.requireNonNull
or something to catch potential problems immediately.