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

NPE in rare cases in Command.canReduce, invoked by XML export #36

Closed
bengtmartensson opened this issue Dec 24, 2022 · 0 comments
Closed
Assignees
Labels
bug Fixed/solved Implementation Issue concering implementing code

Comments

@bengtmartensson
Copy link
Owner

bengtmartensson commented Dec 24, 2022

If the commands to be exported starts with a signal without a certain parameter (except F), and a later command, with the same protocol contains that parameter, a NPE will occur.

For example NEC1 D=123,F=... followed by NEC1 D=123,S=45,F=... will trigger the problem.

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException: Cannot invoke "java.lang.Long.equals(Object)" because the return value of "java.util.Map.get(Object)" is null
	at org.harctoolbox.girr.Command.canReduce(Command.java:1278)
	at org.harctoolbox.girr.Command.toElement(Command.java:1173)
	at org.harctoolbox.girr.CommandSet.lambda$toElement$4(CommandSet.java:317)
	at java.base/java.util.LinkedHashMap$LinkedValues.forEach(LinkedHashMap.java:647)
	at org.harctoolbox.girr.CommandSet.toElement(CommandSet.java:316)
	at org.harctoolbox.girr.Remote.toElement(Remote.java:280)
	at org.harctoolbox.girr.RemoteSet.toElement(RemoteSet.java:552)
	at org.harctoolbox.girr.XmlExporter.toDocument(XmlExporter.java:204)```
@bengtmartensson bengtmartensson added bug Implementation Issue concering implementing code labels Dec 24, 2022
@bengtmartensson bengtmartensson self-assigned this Dec 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixed/solved Implementation Issue concering implementing code
Projects
None yet
Development

No branches or pull requests

1 participant