Project

General

Profile

« Previous | Next » 

Revision 6727

ensure that the revision list is ordered ascending in case someone changes the sql query without realizing that it matters...

View differences:

src/edu/ucsb/nceas/metacat/dataone/SystemMetadataFactory.java
32 32
import java.security.NoSuchAlgorithmException;
33 33
import java.sql.SQLException;
34 34
import java.util.ArrayList;
35
import java.util.Collections;
35 36
import java.util.Date;
36 37
import java.util.HashMap;
37 38
import java.util.Hashtable;
......
247 248
		Identifier obsoletedBy = null;
248 249
		Identifier obsoletes = null;
249 250
		Vector<Integer> revisions = DBUtil.getRevListFromRevisionTable(docidWithoutRev);
251
		// ensure this ordering since processing depends on it
252
		Collections.sort(revisions);
250 253
		for (int existingRev: revisions) {
251 254
			// use the docid+rev as the guid
252 255
			String existingPid = docidWithoutRev + "." + existingRev;

Also available in: Unified diff