How about having a compiler warning when there's a mismatch between @Modifies 
and @PropSpecific?  That way both use cases are satisfied.

--- On Wed, 1/18/12, Geoffrey De Smet <ge0ffrey.s...@gmail.com> wrote:

> From: Geoffrey De Smet <ge0ffrey.s...@gmail.com>

> >>     throw new
> IllegalStateException("The factClass (" + factClass + ")
> >> has a property (" + property + ") that has a
> @Modifies annotation, but
> >> the class isn't annotated with @PropSpecific.");
> > Use less words:
> > "In class (" + factClass + ") property (" + property +
> ") is annotated
> > with @Modifies, but the class isn't annotated with
> @PropSpecific."
> +1
> > However, there's a good case for permitting this:
> testing to try both
> > ways, to track down a (user) bug,... Commenting out
> @PropSpecific is
> > just like turning off the main switch. If you get
> errors, you'll have
> > to mess with all the @Modifies, too.
> -1 The other case, where a user adds @Modifies but forgets
> to add 
> @PropSpecific and then sees in production that drools
> doesn't behave as 
> expected (it just ignores the @Modifies) is worse imo.

_______________________________________________
rules-dev mailing list
rules-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev

Reply via email to