Closed alastairduncan closed 10 years ago
Good catch Alastair :) The main problem is not enforcing, in the XML schema, the presence of that attribute and therefore it can be null if the attribute is not set in the XML document. I'll see the best way to address this problem.
Alastair, I've provided a fix. I've made some tests, for the case where the attribute was missing, for the case where the attribute is present but has no value and for the case where the attribute is present but an invalid value is set. And it performed as expected, that is, falling because the schema validation failed. Can you please try it out and see if any other case if possible (I think those 3 cover all the cases but you never know)? Checkout into master branch, update it (pull), recompile source code with mvn clean package and try to generate the bash wrapper again.
Hélder, this has fixed the problem when the value is missing I get a nice error message: [ERROR] Unable to process the toolspec provided! Please check it and also if all mandatory parameters were provided properly!
Nice ;) Closing this one... Thanks Alastair...
Output.isRequired() is of type Boolean so it can be null.
Exception in thread "main" java.lang.NullPointerException at eu.scape_project.tool.toolwrapper.toolwrapper_bash_generator.BashWrapperGenerator.addCommandInformationToContext(BashWrapperGenerator.java:324) at eu.scape_project.tool.toolwrapper.toolwrapper_bash_generator.BashWrapperGenerator.generateWrapper(BashWrapperGenerator.java:154) at eu.scape_project.tool.toolwrapper.toolwrapper_bash_generator.BashWrapperGenerator.main(BashWrapperGenerator.java:584)