lehmi commented on PR #107: URL: https://github.com/apache/pdfbox/pull/107#issuecomment-1186565205
> > > > > re [85368a5](https://github.com/apache/pdfbox/pull/107/commits/85368a5312e69b3a863e9163f19d63c8945b6c3f) - this is good but shouldn't the returns be changed as well? > > re those 2 LGTM alerts - can you please revert the `getDelta()` change in your huge PR (I've already mentioned that I don't want to introduce that change because it makes the code less readable, but LGTM keeps mentioning it) and fix the `getSignatureFields()` change (it ignores "fields") > > Also, this optimization of `getSignatureFields()` isn't needed because this is just a null check against fuzzers etc, this shouldn't be null in production. > > "shouldn't the returns be changed as well?" I didn't get. What I see: > > Your version //if all not contains if (!true && !true && !true) return false //(then) one or more contains return true > > My version //if one or more contains else false return true || true || true > > So, logic is the same but the code has been simplified. This is De Morgan's law https://en.wikipedia.org/wiki/De_Morgan%27s_laws And, yes the return value has to be changed and it is changed. The origin returns "false" if the condition is true and the proposed solution returns "true". Everything is fine -- 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]
