Skip to content

Replace Assert.hasText() method with Utils.hasText() for reducing duplicate code - #71

Closed
codeboyzhou wants to merge 1 commit into
modelcontextprotocol:mainfrom
codeboyzhou:avoid-duplicate-code
Closed

Replace Assert.hasText() method with Utils.hasText() for reducing duplicate code#71
codeboyzhou wants to merge 1 commit into
modelcontextprotocol:mainfrom
codeboyzhou:avoid-duplicate-code

Conversation

@codeboyzhou

Copy link
Copy Markdown
Contributor

Replace Assert.hasText() method with Utils.hasText() for reducing duplicate code.

Motivation and Context

There is already Utils.hasText() method in the Utils class, and it's exactly the same as Assert.hasText().

How Has This Been Tested?

Running tests with ./mvnw test (the related unit test is in my previous PR #70)

Breaking Changes

No breaking changes

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

No additional context

@tzolov

tzolov commented Mar 27, 2025

Copy link
Copy Markdown
Contributor

I don't think this change is necessary. The Assert and the Utils serve different purpose and both are valid.

@tzolov tzolov closed this Mar 27, 2025
@codeboyzhou
codeboyzhou deleted the avoid-duplicate-code branch March 27, 2025 14:25
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