Project

General

Profile

« Previous | Next » 

Revision 6304

use docImpl getBytes() to preserve encoding
no need to catch an exception only to throw it (those I was playing around with looking up the fmt from the d1_common lib if it was not found on the server...but this is redundant with other client code)

View differences:

src/edu/ucsb/nceas/metacat/dataone/ObjectFormatService.java
132 132
	public ObjectFormatList listFormats() throws InvalidRequest,
133 133
			ServiceFailure, NotFound, InsufficientResources, NotImplemented {
134 134

  
135
		try {
136
			objectFormatList = getCachedList();
135
		objectFormatList = getCachedList();
137 136

  
138
		} catch (ServiceFailure sfe) {
139
			throw sfe;
140

  
141
		} catch (NotFound nfe) {
142
			throw nfe;
143

  
144
		}
145

  
146 137
		return objectFormatList;
147 138
	}
148 139

  
......
195 186
				DocumentImpl objectFormatsDocument = new DocumentImpl(
196 187
						accNumber, false);
197 188
				ByteArrayInputStream bais = new ByteArrayInputStream(
198
						objectFormatsDocument.toString().getBytes());
189
						objectFormatsDocument.getBytes());
199 190

  
200 191
				// deserialize the object format list
201 192
				try {

Also available in: Unified diff