Menu

#12 SimpleCommandLineAdapter throws NPE if parameterList is not provided

2.0
open
nobody
None
Low
Defect
2014-12-03
2014-12-03
chahuistle
No

The method de.mosgrid.adapter.defaults.SimpleCommandLineAdapter.calculateAdaption throws a NullPointerException if the element <parameterList> is absent from an MSML template. The workaround is to include an empty <parameterList> element as follows:

<module dictRef="compchem:initialization">
  <cmlx:adapterConfiguration adapterID="cmdadapter" 
    fileExtension="sdf" portName="results.sdf"/>
  <parameterList/>
  ...
</module>

The problem is in this line of code:

for (ParameterType parameter : init.getParamList().getParameter())

Discussion

MongoDB Logo MongoDB