Project

General

Profile

« Previous | Next » 

Revision 4673

Added by Jing Tao about 16 years ago

Use a while loop to replace if.

View differences:

src/edu/ucsb/nceas/metacat/util/EMLVersionsTransformer.java
130 130
    	if(newId != null)
131 131
    	{
132 132
    	     transformEML200ToEML210(eml200Source, eml210StyleFile,  strWriter, newId);
133
    	     String eml210Content = "";
134
    	     strWriter.write(eml210Content);
133
    	     String eml210Content = strWriter.toString();
135 134
    	     String rule = DocumentImpl.EML210;
136 135
             // using emlparser to check id validation
137 136
             EMLParser parser = new EMLParser(eml210Content);
......
239 238
             pstmt.execute();
240 239
             ResultSet rs = pstmt.getResultSet();
241 240
             boolean tableHasRows = rs.next();
242
             if (tableHasRows) {
241
             while (tableHasRows) {
243 242
                 String docidWithoutRev = rs.getString(1);
244 243
                 int rev = rs.getInt(2);
245 244
                 String owner = rs.getString(3);

Also available in: Unified diff