Fix for JavaTranslator handling of has with null last argument#3278
Fix for JavaTranslator handling of has with null last argument#3278andreachild merged 3 commits intoapache:3.8-devfrom
Conversation
…third arguments are null. If a null second or third argument is encountered, the method overload with a predicate type for the last arg should be avoided as a null predicate will throw NullPointerException.
|
VOTE +1 |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 3.8-dev #3278 +/- ##
==========================================
Coverage ? 77.31%
Complexity ? 15022
==========================================
Files ? 1159
Lines ? 71961
Branches ? 8031
==========================================
Hits ? 55640
Misses ? 13270
Partials ? 3051 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
VOTE +1 |
|
Oh @andreachild, thank you, really appreciate it. |
|
Though I think the observation written in the comment to the code that fixing the issue is incorrect, the problem is not in ByteCode per se, but how JavaTranslator handles it, simple sorting by tree inheritance will providea general solution, I will create new version with this approach but will reuse tests that you already created it will cover all similar bugs without need to keep an eye on how JavaTranslator calls them. |
Fixed JavaTranslator to handle scenarios for has where the second or third arguments are null. If a null second or third argument is encountered, the method overload with a predicate type for the last arg should be avoided as a null predicate will throw NullPointerException.
This is the quick solution to @andrii0lomakin's open PR to address the same issue but will not be ready in time for the 3.8.0 release: #3274.
VOTE +1