Project

General

Profile

« Previous | Next » 

Revision 9017

Added by Jing Tao over 9 years ago

1. In the identifierExists method, the code to check if the identifier exist on the serial-id fields of the system metadata table.
2. Fixed a bug on the identifierExists - it considered an identifier didn't exist when the determining process threw an exception.

View differences:

D1NodeService.java
350 350

  
351 351
    logMetacat.debug("Checking if identifier exists: " + pid.getValue());
352 352
    // Check that the identifier does not already exist
353
    if (IdentifierManager.getInstance().identifierExists(pid.getValue())) {
353
    boolean idExists = false;
354
    try {
355
        idExists = IdentifierManager.getInstance().identifierExists(pid.getValue());
356
    } catch (SQLException e) {
357
        throw new ServiceFailure("1190", 
358
                                "The requested identifier " + pid.getValue() +
359
                                " couldn't be determined if it is unique since : "+e.getMessage());
360
    }
361
    if (idExists) {
354 362
	    	throw new IdentifierNotUnique("1120", 
355 363
			          "The requested identifier " + pid.getValue() +
356 364
			          " is already used by another object and" +

Also available in: Unified diff