Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [henshin-dev] Attribute default value "null" check

Hi Christian,

sure, when I include the errorenous rule in my transformation unit
(Object "Transition", Attribute "action": action = null), I get this:

Exception in thread "main" java.lang.NullPointerException
at
org.eclipse.emf.henshin.internal.matching.AttributeConstraint.check(AttributeConstraint.java:34)
at
org.eclipse.emf.henshin.internal.matching.DomainSlot.instanciate(DomainSlot.java:137)
at
org.eclipse.emf.henshin.internal.conditions.nested.ApplicationCondition.findMatch(ApplicationCondition.java:56)
at
org.eclipse.emf.henshin.internal.conditions.nested.ApplicationCondition.findGraph(ApplicationCondition.java:38)
at
org.eclipse.emf.henshin.internal.matching.Matchfinder.findSolution(Matchfinder.java:52)
at
org.eclipse.emf.henshin.internal.matching.Matchfinder.getNextMatch(Matchfinder.java:87)
at
org.eclipse.emf.henshin.interpreter.EmfEngine.findMatch(EmfEngine.java:252)
at
org.eclipse.emf.henshin.interpreter.EmfEngine.applyRule(EmfEngine.java:272)
at
org.eclipse.emf.henshin.interpreter.RuleApplication.apply(RuleApplication.java:89)
at
org.eclipse.emf.henshin.interpreter.UnitApplication.executeRule(UnitApplication.java:204)
at
org.eclipse.emf.henshin.interpreter.UnitApplication.execute(UnitApplication.java:95)
at
org.eclipse.emf.henshin.interpreter.UnitApplication.executeIndependentUnit(UnitApplication.java:182)
at
org.eclipse.emf.henshin.interpreter.UnitApplication.execute(UnitApplication.java:99)
at
de.jtietje.fh.ma.ttc2011.TCPStateExtract.executeTransformationUnit(TCPStateExtract.java:186)
at
de.jtietje.fh.ma.ttc2011.TCPStateExtract.applyHenshinRules(TCPStateExtract.java:141)
at
de.jtietje.fh.ma.ttc2011.TCPStateExtract.main(TCPStateExtract.java:73)

Greets,
Johannes

PS.: Sorry, forgot to "reply to all"

Am Montag, den 04.04.2011, 10:38 +0200 schrieb Christian Krause: 
> Hi Johannes,
> 
> to me that sounds like a bug in the interpreter, but Enrico is the 
> person who can say this with certainty. Anyway, do you happen to have a 
> stacktrace of the NPE?
> 
> Cheers,
> Christian
> 
> On 04/04/11 10:31, Johannes Tietje wrote:
> > Hello,
> >
> > I recently created a set of Henshin rules operating on a Ecore model
> > with an object (Transition) whose attributes (action, trigger) are of
> > type String and have a default value of "null".
> >
> > How do I specify that an objects attribute is assigned with "null"
> > without receiving a NullPointerException (which comes up when the rule
> > matcher tries to match the LHS to the model, i guess)?
> >
> > Kind regards,
> > Johannes
> >
> >
> > _______________________________________________
> > henshin-dev mailing list
> > henshin-dev@xxxxxxxxxxx
> > https://dev.eclipse.org/mailman/listinfo/henshin-dev
> 





Back to the top