Project

General

Profile

« Previous | Next » 

Revision 6352

Added by Chris Jones over 13 years ago

MNResourceHandler.getObject() was making a call to ObjectFormat.getFmtid() when an object format was null. Check that it is not null before trying getFmtid().

View differences:

src/edu/ucsb/nceas/metacat/restservice/MNResourceHandler.java
757 757
                    objectFormat + " replicaStatus: " + replicaStatus + 
758 758
                    " start: " + start + " count: " + count);
759 759
           
760
            ObjectFormatIdentifier fmtid = new ObjectFormatIdentifier();
761
           
762
            if ( objectFormat != null ) {
763
          	 fmtid = objectFormat.getFmtid();
764
          	 
765
            }
760 766
            ObjectList ol = 
761
            	MNodeService.getInstance().listObjects(session, startTime, endTime, 
762
                    objectFormat.getFmtid(), replicaStatus, start, count);
763
            
767
           	 MNodeService.getInstance().listObjects(session, startTime, endTime, 
768
               fmtid, replicaStatus, start, count);
769
           
764 770
            out = response.getOutputStream();  
765 771
            response.setStatus(200);
766 772
            response.setContentType("text/xml");

Also available in: Unified diff