Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optional Variable Groups in AzimuthThrusterFeedback is not optional. #72

Open
THEvang opened this issue Jun 22, 2020 · 0 comments
Open

Comments

@THEvang
Copy link
Member

THEvang commented Jun 22, 2020

When defining the variable group AzimuthThrusterFeedback, BladePitchand ShaftSpeed are not treated as optional elements. The following definition leads to an exception in osp-cli

<AzimuthThrusterFeedback name="main_propeller_port_feedback"> <AzimuthAngle name="main_propeller_port_azimuth"> <Variable ref="thruster_states.main_propeller_port.azimuth"/> </AzimuthAngle> <Force name="main_propeller_port_thrust"> <Variable ref="thruster_states.main_propeller_port.thrust"/> </Force> </AzimuthThrusterFeedback>

with the following exception:

Exception in thread "main" java.lang.NullPointerException at com.opensimulationplatform.modeldescription.xml.converter.tentative.BladePitchTypeConverter.convert(BladePitchTypeConverter.java:26) at com.opensimulationplatform.modeldescription.xml.converter.tentative.AzimuthThrusterFeedbackTypeConverter.convert(AzimuthThrusterFeedbackTypeConverter.java:28) at com.opensimulationplatform.modeldescription.xml.converter.tentative.AzimuthThrusterFeedbackTypeConverter.convert(AzimuthThrusterFeedbackTypeConverter.java:18) at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195) at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1654) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578) at com.opensimulationplatform.modeldescription.xml.converter.Converter.convert(Converter.java:26) at com.opensimulationplatform.modeldescription.xml.converter.generic.GenericTypeConverter.convert(GenericTypeConverter.java:273) at com.opensimulationplatform.modeldescription.xml.converter.generic.GenericTypeConverter.convert(GenericTypeConverter.java:66) at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195) at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1654) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578) at com.opensimulationplatform.modeldescription.xml.converter.Converter.convert(Converter.java:26) at com.opensimulationplatform.modeldescription.xml.converter.ospmodeldescriptiontype.OspModelDescriptionTypeConverter.convert(OspModelDescriptionTypeConverter.java:110) at com.opensimulationplatform.modeldescription.xml.factory.ModelDescriptionFactory.create(ModelDescriptionFactory.java:22) at com.opensimulationplatform.cli.Validator.validate(Validator.java:60) at com.opensimulationplatform.cli.Main.main(Main.java:85)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant