-
-
Notifications
You must be signed in to change notification settings - Fork 70
chore: more java 21 idiomatic code #2143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferencesFootnotes
|
cb196b1
to
31ed06e
Compare
31ed06e
to
433252c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 134 out of 134 changed files in this pull request and generated 5 comments.
Comments suppressed due to low confidence (5)
engine/src/main/java/com/arcadedb/index/TypeIndex.java:499
- Ensure that 'indexesOnBuckets' is of a type that supports getFirst() (e.g. LinkedList) as replacing get(0) may cause incompatibility if it remains an ArrayList.
return indexesOnBuckets.getFirst();
engine/src/main/java/com/arcadedb/engine/PageManagerFlushThread.java:52
- Ensure that the 'pages' list is of a type that supports getFirst(); otherwise, consider using pages.get(0) if pages is an ArrayList.
this.database = pages == null || pages.isEmpty() ? null : pages.getFirst().pageId.getDatabase();
engine/src/main/java/com/arcadedb/engine/LocalBucket.java:1719
- Verify that 'orderedRecordContentInPage' supports getLast(); if it is an ArrayList, this call will not compile. Consider using get(orderedRecordContentInPage.size()-1) if necessary.
final int[] lastRecord = orderedRecordContentInPage.getLast();
engine/src/main/java/com/arcadedb/database/TransactionContext.java:194
- Confirm that the 'transactions' list supports removeLast(); if it is an ArrayList, this will fail at runtime. Consider using an appropriate collection type (e.g. Deque or LinkedList).
return transactions.removeLast();
console/src/test/java/com/arcadedb/console/TerminalParser.java:91
- Verify that the 'words' collection’s implementation supports getLast(); if it is an ArrayList, use get(words.size() - 1).
wordCursor = words.getLast().length();
What does this PR do?
A brief description of the change being made with this pull request.
Motivation
What inspired you to submit this pull request?
Related issues
A list of issues either fixed, containing architectural discussions, otherwise relevant
for this Pull Request.
Additional Notes
Anything else we should know when reviewing?
Checklist
mvn clean package
command