NPE in isExportable from SAM-2705

Description

There's an unchecked NPE in the code from SMA-2705

This is the line

if (section.getSectionMetaDataByLabel(SectionDataIfc.AUTHOR_TYPE).equals(SectionDataIfc.QUESTIONS_AUTHORED_ONE_BY_ONE.toString()))

Both section and section.getMetaDataByLabel(SectionDataIfc.AUTHOR_TYPE) should be checked.

I believe there's some other code in here that also isn't being correctly NPE checked as you can't guarantee a non-null result from getSectionMetaDataByLabel.

Activity

Show:

Matthew Jones September 12, 2016 at 12:34 PM

Yeah, looks like it is. I don't know if you need an NPE there against the section object too though. Other code in Samigo protects section from NPE, This might be 90% complete on that ticket and need reopened. but I'll mark this as duplicate.

Sam Ottenhoff September 12, 2016 at 12:24 PM

Duplicate

Details

Priority

Affects versions

Components

Assignee

Reporter

Created September 9, 2016 at 6:01 PM
Updated April 17, 2018 at 8:39 AM
Resolved September 12, 2016 at 12:34 PM