Skip to content

Avoid use toString() or substring() in favor of a simplified expression.#126

Merged
garydgregory merged 1 commit into
apache:masterfrom
arturobernalg:feature/redundant
Apr 17, 2022
Merged

Avoid use toString() or substring() in favor of a simplified expression.#126
garydgregory merged 1 commit into
apache:masterfrom
arturobernalg:feature/redundant

Conversation

@arturobernalg

Copy link
Copy Markdown
Member

No description provided.

@garydgregory garydgregory merged commit 8993f9a into apache:master Apr 17, 2022
@garydgregory garydgregory changed the title Avoid use toString() or substring()in favor of a simplified expression. Avoid use toString() or substring() in favor of a simplified expression. Apr 17, 2022

if (this.nameType == NameType.GENERIC) {
if (input.length() >= 2 && input.substring(0, 2).equals("d'")) { // check for d'
if (input.length() >= 2 && input.startsWith("d'")) { // check for d'

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.

@arturobernalg
Why still check for length >=2 ? What is change automatically generated through IntelliJ or Eclipse?

asfgit pushed a commit that referenced this pull request Dec 2, 2022
omosteven pushed a commit to omosteven/commons-codec-lab-work that referenced this pull request Jan 8, 2025
omosteven pushed a commit to omosteven/commons-codec-lab-work that referenced this pull request Jan 8, 2025
omosteven pushed a commit to omosteven/commons-codec-lab-work that referenced this pull request Jan 8, 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.

2 participants