openamf/src/java/org/openamf/recordset ASRecordSet.java,1.22,1.23

[email protected] Fri, 19 Sep 2003 17:04:18 -0700
Newsgroups gmane.comp.java.openamf.cvs
Message-ID <[email protected]>
Update of /cvsroot/openamf/openamf/src/java/org/openamf/recordset
In directory sc8-pr-cvs1:/tmp/cvs-serv15964/src/java/org/openamf/recordset

Modified Files:
	ASRecordSet.java 
Log Message:
added check for null collumnNames array

Index: ASRecordSet.java
===================================================================
RCS file: /cvsroot/openamf/openamf/src/java/org/openamf/recordset/ASRecordSet.java,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** ASRecordSet.java	20 Aug 2003 22:30:17 -0000	1.22
--- ASRecordSet.java	20 Sep 2003 00:04:16 -0000	1.23
***************
*** 280,291 ****
  		StringBuffer names = new StringBuffer();
  		String[] columnNames = getColumnNames();
! 		for (int i = 0; i < columnNames.length; i++) {
! 			String name = columnNames[i];
! 			if (i > 0) {
! 				names.append(", ");
  			}
- 			names.append(name);
  		}
- 
  		addInfo(info, SI_COLUMN_NAMES, names);
  		addInfo(info, SI_INITIAL_DATA, getInitialData().toString());
--- 280,292 ----
  		StringBuffer names = new StringBuffer();
  		String[] columnNames = getColumnNames();
! 		if (columnNames != null) {
! 			for (int i = 0; i < columnNames.length; i++) {
! 				String name = columnNames[i];
! 				if (i > 0) {
! 					names.append(", ");
! 				}
! 				names.append(name);
  			}
  		}
  		addInfo(info, SI_COLUMN_NAMES, names);
  		addInfo(info, SI_INITIAL_DATA, getInitialData().toString());




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf