Skip to content

Code style and Java language level adoptions - #982

Open
snazy wants to merge 1 commit into
projectnessie:mainfrom
snazy:code-style-stuff
Open

snazy wants to merge 1 commit into
projectnessie:mainfrom
snazy:code-style-stuff

Conversation

@snazy

@snazy snazy commented Sep 17, 2026

Copy link
Copy Markdown
Member
  • Replace Arrays.asList() with single element with List.of()
  • enhanced switch expression
  • pattern variable
  • Use String.repeat()
  • Use .isEmpty()
  • Remove unused ParseError
  • Remove unused function in TypeErrors
  • Remove duplicate if

* Replace `Arrays.asList()` with single element with `List.of()`
* enhanced switch expression
* pattern variable
* Use String.repeat()
* Use `.isEmpty()`
* Remove unused `ParseError`
* Remove unused function in TypeErrors
* Remove duplicate `if`
@snazy
snazy requested a review from XN137 September 17, 2026 14:44
for (int i = 0; i < location.column(); i++) {
result.append(dot);
}
result.append(String.valueOf(dot).repeat(Math.max(0, location.column())));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are these kind of changes really an improvement in terms of readability/performance?


import org.projectnessie.cel.common.Location;

public final class ParseError extends RuntimeException {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this break backward-compatibility of our public api?
if yes maybe need to document this in the release notes

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.

2 participants