Skip to content

Conversation

@andreachild
Copy link
Contributor

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

…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.
@Cole-Greer
Copy link
Contributor

VOTE +1

@codecov-commenter
Copy link

codecov-commenter commented Nov 13, 2025

Codecov Report

❌ Patch coverage is 85.71429% with 1 line in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (3.8-dev@eeeb273). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...pache/tinkerpop/gremlin/jsr223/JavaTranslator.java 85.71% 0 Missing and 1 partial ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@kenhuuu
Copy link
Contributor

kenhuuu commented Nov 13, 2025

VOTE +1

@andreachild andreachild merged commit 743fd1d into apache:3.8-dev Nov 13, 2025
19 checks passed
@andrii0lomakin
Copy link
Contributor

Oh @andreachild, thank you, really appreciate it.

@andrii0lomakin
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants