Yorubaname/yorubaname-website

Perfomance issue: String concatenation as argument to 'StringBuffer.append()'

Closed this issue · 2 comments

Hi,

String concatenation used as the argument to StringBuffer.append():

builder.append(error.getField() + " " + error.getDefaultMessage() + " ");

This way may be turned into chained append calls on the existing StringBuilder, its better for reading and saving the cost of an extra StringBuilder allocation.

Like this:

builder.append(error.getField()).append(" ").append(error.getDefaultMessage()).append(" ");

problem solved at #64

Merged #69