GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Reduce stack utilization of TestTemplateTestDescriptor::execute by amaembo · Pull Request #4024 · junit-team/junit-framework

Conversation

@amaembo

@amaembo amaembo commented Sep 25, 2024 •
edited by marcphilipp
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Overview

Fixes issue #4020


I hereby agree to the terms of the JUnit Contributor License Agreement.


Definition of Done

  • There are no TODOs left in the code
  • Method preconditions are checked and documented in the method's Javadoc -- no method declarations changed
  • Coding conventions (e.g. for logging) have been followed
  • Change is covered by automated tests including corner cases, errors, and exception handling -- refactoring only change, I believe no new tests are necessary
  • Public API has Javadoc and @API annotations -- no public APIs changed
  • Change is documented in the User Guide and Release Notes -- should I write something there, or the change is minor and doesn't worth mentioning?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

marcphilipp and sormuras reacted with thumbs up emoji
All reactions
  • 👍 2 reactions
@amaembo
amaembo force-pushed the amaembo-patch-1 branch from 3be8b10 to c3ed3b3 Compare September 25, 2024 06:47
@amaembo amaembo mentioned this pull request Sep 25, 2024
Reduce stack utilization by getting rid of outer Stream API call in TestTemplateTestDescriptor::execute #4020
Closed
@marcphilipp marcphilipp linked an issue Sep 25, 2024 that may be closed by this pull request
Reduce stack utilization by getting rid of outer Stream API call in TestTemplateTestDescriptor::execute #4020
Closed
marcphilipp
marcphilipp approved these changes Sep 25, 2024
View reviewed changes
@amaembo

amaembo commented Sep 25, 2024

Copy link
Copy Markdown
Contributor Author

Not sure about formatting. I've formatted the changed fragment using spotlessApply, even though it's inside the formatter:off section. Probably it worth removing formatter:off.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jbduncan

jbduncan commented Sep 25, 2024

Copy link
Copy Markdown
Contributor

Not sure about formatting. I've formatted the changed fragment using spotlessApply, even though it's inside the formatter:off section. Probably it worth removing formatter:off.

I think so too. From what I've observed of Spotless over the years, users like JUnit 5 use formatter:(off|on) because the bundled Eclipse formatter can't handle fluent chains like streams very well, so the comments are used as an escape hatch. Thus they should be safe to remove, if the team is happy of course. :)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@marcphilipp

marcphilipp commented Sep 25, 2024

Copy link
Copy Markdown
Member

Agreed, let's remove them

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

amaembo added 3 commits September 25, 2024 09:37
@amaembo
Reduce stack utilization by getting rid of outer Stream API call in T…
d6c063a
…estTemplateTestDescriptor::execute

Fixes issue junit-team#4020
@amaembo
TestTemplateTestDescriptor.execute: fix support for closeable streams
efb7ef9
@amaembo
TestTemplateTestDescriptor.execute: remove redundant formatter tags
906a13f
@amaembo
amaembo force-pushed the amaembo-patch-1 branch from 0655c7d to 906a13f Compare September 25, 2024 07:37
@marcphilipp marcphilipp self-assigned this Sep 25, 2024
@marcphilipp marcphilipp changed the title Reduce stack utilization by getting rid of outer Stream API call in TestTemplateTestDescriptor::execute Reduce stack utilization of TestTemplateTestDescriptor::execute Sep 25, 2024
@marcphilipp
marcphilipp merged commit 8491772 into junit-team:main Sep 25, 2024
@amaembo
amaembo deleted the amaembo-patch-1 branch September 25, 2024 07:55
@marcphilipp

marcphilipp commented Sep 25, 2024

Copy link
Copy Markdown
Member

@amaembo Thank you for your contribution! I polished it a bit in c29dbb2.

amaembo reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This was referenced Feb 24, 2025
Bump junit from 5.11.4 to 5.12.0 kousen/java_8_recipes#125
Closed
Bump junit from 5.11.4 to 5.12.0 kousen/IntroGroovy#128
Closed
Bump junit from 5.11.4 to 5.12.0 kousen/junit5_workshop#251
Closed
Bump org.junit.jupiter:junit-jupiter from 5.11.4 to 5.12.0 kousen/http-client-demo#43
Merged
Bump org.junit.jupiter:junit-jupiter from 5.11.4 to 5.12.0 kousen/functional_modern_java#31
Closed
Bump org.junit.jupiter:junit-jupiter from 5.11.4 to 5.12.0 kousen/java_upgrade#44
Merged
Bump org.junit.jupiter:junit-jupiter from 5.11.4 to 5.12.0 kousen/java_9_recipes#45
Closed
Bump junit from 5.11.4 to 5.12.0 kousen/java_groovy_kotlin#194
Merged
This was referenced Mar 17, 2025
Bump junit from 5.11.4 to 5.12.1 kousen/java_8_recipes#127
Closed
Bump junit from 5.11.4 to 5.12.1 kousen/IntroGroovy#130
Closed
Bump junit from 5.11.4 to 5.12.1 kousen/junit5_workshop#254
Merged
Bump org.junit.jupiter:junit-jupiter from 5.11.4 to 5.12.1 kousen/java_9_recipes#46
Closed
Bump org.junit.jupiter:junit-jupiter from 5.11.4 to 5.12.1 kousen/functional_modern_java#32
Closed
@kousen kousen mentioned this pull request Apr 14, 2025
Bump org.junit.jupiter:junit-jupiter from 5.11.4 to 5.12.2 kousen/java_9_recipes#47
Closed
This was referenced Apr 14, 2025
Bump org.junit.jupiter:junit-jupiter from 5.11.4 to 5.12.2 kousen/functional_modern_java#33
Closed
Bump junit from 5.11.4 to 5.12.2 kousen/java_8_recipes#131
Closed
Bump junit from 5.11.4 to 5.12.2 kousen/IntroGroovy#132
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@marcphilipp marcphilipp marcphilipp approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@marcphilipp marcphilipp

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Reduce stack utilization by getting rid of outer Stream API call in TestTemplateTestDescriptor::execute

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@amaembo @jbduncan @marcphilipp
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.