pddl4j
pddl4j copied to clipboard
Parsing Problem without Domain results in Exception
I am using version 4.0.0. I tried to parse a problem file with the method 'parseProblem(...)' (see documentation). I do not care for the domain in my application, so I did not parse any domain file. Doing this results in the following Exception:
java.lang.NullPointerException at fr.uga.pddl4j.parser.Parser.checkDomainName(Parser.java:886) at fr.uga.pddl4j.parser.Parser.parseProblem(Parser.java:357) at fr.uga.pddl4j.parser.Parser.parseProblem(Parser.java:314)
For me, the ideal behavior would be that one can parse a problem file without any domain file (at least for me, it worked with version 3.8.3). If this is not possible, I think it would be helpful to add a comment to the documentation, that a domain file needs to be parsed before a program file can be parsed. Please tell me if you need any further information, e.g. if I should create a minimal example.
The parser make tests before reading the problem using the domain. I didn't the check behaviour when reading only problem. You're right, launching a exception is not the good behaviour. We have to change it.