Copilot commented on code in PR #4601:
URL: 
https://github.com/apache/incubator-kie-docs/pull/4601#discussion_r4130404769


##########
drools-docs/src/modules/ROOT/pages/rule-engine/_property-change-listeners-con.adoc:
##########
@@ -137,14 +137,55 @@ The {RULE_ENGINE} generates a compilation error if you 
use the `@watch` tag for
 
 
 @propertyChangeSupport::
-For facts that implement support for property changes as defined in the 
https://download.oracle.com/otndocs/jcp/7224-javabeans-1.01-fr-spec-oth-JSpec/[JavaBeans
 Specification], this tag enables the {RULE_ENGINE} to monitor changes in the 
fact properties.
+For facts that support property changes as defined in the 
https://download.oracle.com/otndocs/jcp/7224-javabeans-1.01-fr-spec-oth-JSpec/[JavaBeans
 Specification], this tag enables the {RULE_ENGINE} to monitor changes in the 
fact properties.
 +
 --
-.Example: Declare property change support in JavaBeans object
+To use this tag, your Java class must use `PropertyChangeSupport` and fire 
property change events in each setter method. The {RULE_ENGINE} registers 
itself as a listener and reacts to changes without requiring explicit 
`update()` calls.

Review Comment:
   `PropertyChangeSupport` is only a convenience helper, not a requirement. The 
engine discovers and invokes the bean's public 
`addPropertyChangeListener(PropertyChangeListener)` and 
`removePropertyChangeListener(PropertyChangeListener)` methods, so a class can 
implement the listener contract another way. Stating that the class “must use” 
this concrete helper unnecessarily excludes valid JavaBeans implementations.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to