Skip to content

Add super.validate() call in OAuth2TokenResponse.validate() method - #8376

Merged
justinmclean merged 2 commits into
apache:mainfrom
JeonDaehong:main
Sep 2, 2025
Merged

justinmclean merged 2 commits into
apache:mainfrom
JeonDaehong:main

Conversation

@JeonDaehong

@JeonDaehong JeonDaehong commented Sep 1, 2025 •

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?
In common/src/main/java/org/apache/gravitino/dto/responses/OAuth2TokenResponse.java, the validate() method was missing a call to super.validate(). This PR adds the super.validate() call to ensure that the parent class validation logic is executed before the subclass-specific checks.

Why are the changes needed?
Without calling super.validate(), the validation logic defined in BaseResponse is skipped, which could allow invalid responses to pass through. Adding the call ensures both parent and subclass validations are performed correctly.

Does this PR introduce any user-facing change?
No. This change only affects internal validation logic.

Fixes #8303

@justinmclean

Copy link
Copy Markdown
Member

You'll need to run Spottless to fix teh code formatting, please run ./gradlew :server:spotlessApply and commit the changes.

System.exit(1);
}
confPath = args[0];
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't think this change needs to be in this PR.

@JeonDaehong

Copy link
Copy Markdown
Contributor Author

@justinmclean

Sorry, it seems some unrelated code from another PR was mixed in. I've revised it and pushed the corrected version.

@justinmclean justinmclean left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for fixing this.

@justinmclean
justinmclean merged commit 90d7243 into apache:main Sep 2, 2025
diqiu50 pushed a commit to diqiu50/gravitino that referenced this pull request Sep 15, 2025
…pache#8376)

**What changes were proposed in this pull request?**
In
common/src/main/java/org/apache/gravitino/dto/responses/OAuth2TokenResponse.java,
the validate() method was missing a call to super.validate(). This PR
adds the super.validate() call to ensure that the parent class
validation logic is executed before the subclass-specific checks.

**Why are the changes needed?**
Without calling super.validate(), the validation logic defined in
BaseResponse is skipped, which could allow invalid responses to pass
through. Adding the call ensures both parent and subclass validations
are performed correctly.

**Does this PR introduce any user-facing change?**
No. This change only affects internal validation logic.

 **Fixes:** apache#8303
bharos pushed a commit to bharos/gravitino that referenced this pull request Oct 3, 2025
…pache#8376)

**What changes were proposed in this pull request?**
In
common/src/main/java/org/apache/gravitino/dto/responses/OAuth2TokenResponse.java,
the validate() method was missing a call to super.validate(). This PR
adds the super.validate() call to ensure that the parent class
validation logic is executed before the subclass-specific checks.

**Why are the changes needed?**
Without calling super.validate(), the validation logic defined in
BaseResponse is skipped, which could allow invalid responses to pass
through. Adding the call ensures both parent and subclass validations
are performed correctly.

**Does this PR introduce any user-facing change?**
No. This change only affects internal validation logic.

 **Fixes:** apache#8303
bharos pushed a commit to bharos/gravitino that referenced this pull request Oct 7, 2025
…pache#8376)

**What changes were proposed in this pull request?**
In
common/src/main/java/org/apache/gravitino/dto/responses/OAuth2TokenResponse.java,
the validate() method was missing a call to super.validate(). This PR
adds the super.validate() call to ensure that the parent class
validation logic is executed before the subclass-specific checks.

**Why are the changes needed?**
Without calling super.validate(), the validation logic defined in
BaseResponse is skipped, which could allow invalid responses to pass
through. Adding the call ensures both parent and subclass validations
are performed correctly.

**Does this PR introduce any user-facing change?**
No. This change only affects internal validation logic.

 **Fixes:** apache#8303
danhuawang pushed a commit to danhuawang/gravitino that referenced this pull request Jun 8, 2026
…pache#8376)

**What changes were proposed in this pull request?**
In
common/src/main/java/org/apache/gravitino/dto/responses/OAuth2TokenResponse.java,
the validate() method was missing a call to super.validate(). This PR
adds the super.validate() call to ensure that the parent class
validation logic is executed before the subclass-specific checks.

**Why are the changes needed?**
Without calling super.validate(), the validation logic defined in
BaseResponse is skipped, which could allow invalid responses to pass
through. Adding the call ensures both parent and subclass validations
are performed correctly.

**Does this PR introduce any user-facing change?**
No. This change only affects internal validation logic.

 **Fixes:** apache#8303
danhuawang pushed a commit to danhuawang/gravitino that referenced this pull request Jun 9, 2026
…pache#8376)

**What changes were proposed in this pull request?**
In
common/src/main/java/org/apache/gravitino/dto/responses/OAuth2TokenResponse.java,
the validate() method was missing a call to super.validate(). This PR
adds the super.validate() call to ensure that the parent class
validation logic is executed before the subclass-specific checks.

**Why are the changes needed?**
Without calling super.validate(), the validation logic defined in
BaseResponse is skipped, which could allow invalid responses to pass
through. Adding the call ensures both parent and subclass validations
are performed correctly.

**Does this PR introduce any user-facing change?**
No. This change only affects internal validation logic.

 **Fixes:** apache#8303
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.

[Improvement] OAuth2TokenResponse.java validate method is missing a super call

3 participants