Project

General

Profile

« Previous | Next » 

Revision 9268

Added by Jing Tao almost 9 years ago

Fixed a possible null pointer exception bug. https://redmine.dataone.org/issues/7280

View differences:

MNResourceHandler.java
1186 1186
            	}
1187 1187
            }
1188 1188
            if (mediaType != null) {
1189
                mimeType = sm.getMediaType().getName();
1190
                if (sm.getMediaType().getPropertyList() != null) {
1191
                	Iterator<MediaTypeProperty> iter = sm.getMediaType().getPropertyList().iterator();
1189
                mimeType = mediaType.getName();
1190
                if (mediaType.getPropertyList() != null) {
1191
                	Iterator<MediaTypeProperty> iter = mediaType.getPropertyList().iterator();
1192 1192
                	while (iter.hasNext()) {
1193 1193
                		MediaTypeProperty mtp = iter.next();
1194 1194
                		if (mtp.getName().equalsIgnoreCase("charset")) {

Also available in: Unified diff