From: <one...@us...> - 2002-11-02 15:48:59
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/tools/codegen In directory usw-pr-cvs1:/tmp/cvs-serv28216 Modified Files: BasicRenderer.java Log Message: fixed another bug Index: BasicRenderer.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/tools/codegen/BasicRenderer.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** BasicRenderer.java 2 Nov 2002 15:33:42 -0000 1.11 --- BasicRenderer.java 2 Nov 2002 15:48:54 -0000 1.12 *************** *** 87,99 **** if(!field.isIdentifier() || (field.isIdentifier() && !field.isGenerated())) { fullCons = fullCons + field.getType() + " " + field.getName(); ! if(fields.hasNext()) { ! fullCons = fullCons + ", "; ! fullConsArgCount++; ! } } } ! if(fullConsArgCount>0) { // only remove the last , and space if there was an arg! ! fullCons = fullCons.substring(0, fullCons.length() - 2); ! } writer.println(fullCons + ") {"); for(Iterator fields = classMapping.getFields().iterator(); fields.hasNext();) { --- 87,96 ---- if(!field.isIdentifier() || (field.isIdentifier() && !field.isGenerated())) { fullCons = fullCons + field.getType() + " " + field.getName(); ! fullCons = fullCons + ", "; ! fullConsArgCount++; } } ! if ( fullCons.endsWith(", ") ) fullCons = fullCons.substring(0, fullCons.length()-2); ! writer.println(fullCons + ") {"); for(Iterator fields = classMapping.getFields().iterator(); fields.hasNext();) { *************** *** 126,130 **** } } ! minCons = minCons.substring(0, minCons.length() - 2); writer.println(minCons + ") {"); for(Iterator fields = classMapping.getFields().iterator(); fields.hasNext();) { --- 123,128 ---- } } ! if ( minCons.endsWith(", ") ) minCons = minCons.substring(0, minCons.length()-2); ! writer.println(minCons + ") {"); for(Iterator fields = classMapping.getFields().iterator(); fields.hasNext();) { |