- edited description
Nullpointer exception on theory append
Issue #18
new
This codeline in the Theory class creates an null pointer exception
this.theory = this.theory.toString() + "\n" + th;
If I create a theory with a struct and append a theory with a string
Theory s = new Theory( new Struct(<some data>) );
Theory t = new Theory( "doit(X) :- X, X > 5." );
s.append( t )
the call
this.theory.toString()
create the NPE, because the theory
member is set to null. the problem can be solved if the string member theory is set to an empty string on the top of the class. I recommand that the clauseList is also set to an empty object, to avoid NPEs
Comments (1)
-
reporter - Log in to comment