So etwas bei RowSetMetaDataImpl in den Sun-Quellen zu sehen tut weh
Neue String-Objekte als Kopie von existierende Strings aufzubauen ist ganz schön übel. Aus javax.sql.rowset.RowSetMetaDataImpl:
public void setColumnLabel(int columnIndex, String label) throws SQLException{ checkColRange(columnIndex); if (label != null) { colInfo[columnIndex].columnLabel = new String(label); } else { colInfo[columnIndex].columnLabel = new String(""); }}
Wie die API-Doku zum Konsturktor so schön schreibt:
Unless an explicit copy of {@code original} is needed, use of this constructor is unnecessary since Strings are immutable.