Skip to content

chore: remove fully qualified names for improved readability#2624

Merged
robfrank merged 1 commit intomainfrom
chore/remove-fqn
Oct 10, 2025
Merged

chore: remove fully qualified names for improved readability#2624
robfrank merged 1 commit intomainfrom
chore/remove-fqn

Conversation

@robfrank
Copy link
Collaborator

This pull request primarily refactors imports and type usages across multiple files to remove redundant package qualifiers and standardize type references. The changes improve code readability and maintainability by directly importing classes and using them without full package names. Additionally, minor improvements are made to exception handling and file operations.

Type and Import Refactoring

  • Removed redundant package qualifiers for LocalDateTime, LocalDate, and other types in configuration and test files, now relying on direct imports for cleaner code [1] [2] [3] [4] [5] [6] [7] [8] [9].
  • Updated references to Bucket, Supplier, IOException, and collection types to use direct imports and simplified type declarations throughout the codebase [1] [2] [3] [4] [5] [6] [7].

Exception and File Handling Improvements

  • Standardized exception handling by using direct imports for IOException and ClosedChannelException and removing redundant package qualifiers in exception throws and catches [1] [2] [3] [4] [5] [6] [7] [8] [9].
  • Simplified file operations by using directly imported Files and StandardCopyOption in file move logic [1] [2].

Miscellaneous

  • Minor updates to import statements for improved clarity and consistency, such as adding missing imports and updating usages in profiler and SQL parser classes [1] [2] [3] [4].

These changes are mostly focused on code cleanup, improving readability, and ensuring consistency in type usage and imports across the project.

@robfrank robfrank merged commit c225ddd into main Oct 10, 2025
6 of 8 checks passed
@robfrank robfrank deleted the chore/remove-fqn branch October 10, 2025 18:26
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @robfrank, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on a significant code cleanup effort aimed at improving the overall readability and maintainability of the codebase. By refactoring imports and type usages to remove verbose fully qualified names, the changes make the code easier to understand and navigate. Additionally, it standardizes exception and file handling patterns, contributing to a more consistent and robust application structure.

Highlights

  • Code Readability: Removed fully qualified names for types like LocalDateTime, LocalDate, Bucket, Supplier, IOException, and various collection types across numerous files, relying on direct imports for cleaner and more readable code.
  • Exception Handling: Standardized exception handling by directly importing IOException and ClosedChannelException, eliminating redundant package qualifiers in throws and catch clauses.
  • File Operations: Simplified file operations by directly importing Files and StandardCopyOption in file movement logic, enhancing clarity.
  • Import Consistency: Made minor updates to import statements throughout the codebase, including adding missing imports and updating usages in profiler and SQL parser classes, to improve overall clarity and consistency.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request is a good refactoring that improves code readability by removing fully qualified names and using direct imports. The changes are consistent and well-applied across the codebase. I've added a couple of suggestions to further improve code conciseness by using the diamond operator for ArrayList instantiations, which aligns with the goal of this PR.

Comment on lines +35 to +36
nodes = new ArrayList<Node>();
marks = new ArrayList<Integer>();
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

You can use the diamond operator <> here for a more concise instantiation, which is in line with modern Java practices.

Suggested change
nodes = new ArrayList<Node>();
marks = new ArrayList<Integer>();
nodes = new ArrayList<>();
marks = new ArrayList<>();

boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtn000.jjtSetFirstToken(getToken(1));java.util.List<ProjectionItem> items = new java.util.ArrayList<ProjectionItem>();
jjtn000.jjtSetFirstToken(getToken(1));List<ProjectionItem> items = new ArrayList<ProjectionItem>();
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

While you're refactoring, you could also use the diamond operator <> for ArrayList instantiations to make the code more concise. This can be applied here and in other places in this file where new ArrayList(...) is used, such as lines 5476, 5598, 6349, 9265, 16149, and 27480.

Suggested change
jjtn000.jjtSetFirstToken(getToken(1));List<ProjectionItem> items = new ArrayList<ProjectionItem>();
jjtn000.jjtSetFirstToken(getToken(1));List<ProjectionItem> items = new ArrayList<>();

@codacy-production
Copy link

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
-0.01% 29.03%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (25e480f) 73027 46288 63.38%
Head commit (1a63023) 73027 (+0) 46281 (-7) 63.38% (-0.01%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#2624) 93 27 29.03%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

robfrank added a commit that referenced this pull request Nov 10, 2025
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.

1 participant