gitgabrio commented on issue #1026: URL: https://github.com/apache/incubator-kie-issues/issues/1026#issuecomment-2012972377
@baldimir @yesamer @tkobayas @mariofusco helped me to better understand the code (please correct me if something is wrong) The important details are: 1. a BaseDescr (may) represent a part of a bigger one; if we (ideally) translate all that to `String`, we may think that the former is a "substring" of the latter, and the `startCharacter` and `endCharacter` define its position 2. that specific method is used to verify if a given "rule" has changed, so the `byte[]` parameters are the string representation of the same rule at two different moments; 3. the logic of this method is to extract the substring that represent the `BaseDescr` from both the new and old string representation of the rule, and compare them; the `startCharacter` and `endCharacter` are used to point to correct boundaries 4. the only point that I still see a little bit brittle is that the population of `startCharacter` and `endCharacter` has to be done explicitily/manually, and IIUC there are different places where this happen; it could be an improvement if, instead, those values are automaticaly set/updated while the BaseDecr is instantiated/populated, but I have no clear idea of the feasibility Thanks again @mariofusco for explenation! -- 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]
