NPE in isExportable from SAM-2705
GENERAL
TESTING
GENERAL
TESTING
Description
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
Is this a duplicate of https://github.com/sakaiproject/sakai/pull/3304 ?
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
.