Skip to content
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

Update QuarkusPluginExtension.java #33656

Closed
wants to merge 1 commit into from
Closed

Update QuarkusPluginExtension.java #33656

wants to merge 1 commit into from

Conversation

zestzoe
Copy link

@zestzoe zestzoe commented May 28, 2023

No description provided.

@quarkus-bot quarkus-bot bot added area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/gradle Gradle labels May 28, 2023
@maxandersen
Copy link
Contributor

what is this change for?

@zestzoe
Copy link
Author

zestzoe commented May 29, 2023

what is this change for?

The purpose of this code change was to address a warning in the existing codebase and introduce a new method that allows retrieval of the last file from a given file collection.

  • In the original code, it was observed that the method getLastFile lacked a documentation element : the @param Javadoc tag for the fileCollection parameter.
  • this resulted in a warning during the build process. To rectify this, the change incorporates the necessary Javadoc tag
  • Regarding the implementation of the method itself, it employs a simple loop structure to iterate over the elements of the fileCollection. With each iteration, the lastFile variable is assigned the current file, effectively tracking the most recent file encountered. Once the loop concludes, the lastFile variable holds the final file in the collection. In scenarios where the file collection is empty, the method gracefully returns null as an indication that no files were found.

* @param fileCollection The file collection from which to retrieve the last file.
* @return The last file in the file collection, or null if the file collection is empty.
*/
public static File getLastFile(FileCollection fileCollection) {
Copy link
Member

Choose a reason for hiding this comment

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

I read your answer to Max but I still don't understand why this change is needed? Why do you need this method?

@zestzoe zestzoe closed this Jun 23, 2023
@quarkus-bot quarkus-bot bot added the triage/invalid This doesn't seem right label Jun 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/gradle Gradle triage/invalid This doesn't seem right
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants