Project

General

Profile

« Previous | Next » 

Revision 7639

Allow null SM.submitter (per schema). There were null values in cn-dev (and probably elsewhere since it is technically allowed in the schema. But with a null value, we need to have a null Subject for the SM.submitter field, not a Subject with a null getValue() return. Encountered this when testing for: https://projects.ecoinformatics.org/ecoinfo/issues/5929.

View differences:

src/edu/ucsb/nceas/metacat/IdentifierManager.java
311 311
	                sysMeta.setAuthoritativeMemberNode(amn);
312 312
                }
313 313
                sysMeta.setDateSysMetadataModified(dateModified);
314
                Subject submitterSubject = new Subject();
315
                submitterSubject.setValue(submitter);
316
                sysMeta.setSubmitter(submitterSubject);
314
                if (submitter != null) {
315
	                Subject submitterSubject = new Subject();
316
	                submitterSubject.setValue(submitter);
317
	                sysMeta.setSubmitter(submitterSubject);
318
                }
317 319
                ObjectFormatIdentifier fmtid = new ObjectFormatIdentifier();
318 320
                fmtid.setValue(fmtidStr);
319 321
            	sysMeta.setFormatId(fmtid);

Also available in: Unified diff