Project

General

Profile

« Previous | Next » 

Revision 6502

correctly implement MN.describe
https://redmine.dataone.org/issues/1799

View differences:

MNodeService.java
448 448
    public DescribeResponse describe(Session session, Identifier pid) throws InvalidToken, ServiceFailure, NotAuthorized, NotFound, NotImplemented,
449 449
            InvalidRequest {
450 450

  
451
        if (session == null) {
452
            throw new InvalidToken("1370", "The session object is null");
453
        }
454

  
455
        if (pid == null || pid.getValue().trim().equals("")) {
456
            throw new InvalidRequest("1362", "The object identifier is null. " + "A valid identifier is required.");
457
        }
458

  
451
    	// get system metadata and construct the describe response
459 452
        SystemMetadata sysmeta = getSystemMetadata(session, pid);
460 453
        DescribeResponse describeResponse = new DescribeResponse(sysmeta.getFmtid(), sysmeta.getSize(), sysmeta.getDateSysMetadataModified(),
461 454
                sysmeta.getChecksum());

Also available in: Unified diff