rmannibucau commented on a change in pull request #69: URL: https://github.com/apache/openjpa/pull/69#discussion_r456512187
########## File path: openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/Table.java ########## @@ -312,11 +315,20 @@ public String getResourceName() { return _rels; } + /** + * Return the list of column names, used only for informative (error) messages. + * @return + */ public String[] getColumnNames() { if (_colMap == null) { return new String[0]; } - DBIdentifier[] sNames = _colMap.keySet().toArray(new DBIdentifier[_colMap.size()]); Review comment: Proposal was just to not to toList().toArray which allocates twice for no real reason the same structure. Probably missed a .map in my snippet but the double allocation should be avoided IMHO. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org