[jboss-jira] [JBoss JIRA] (WFLY-12152) Remove redundant subString endIndex .length() calls
William Collishaw (Jira)
issues at jboss.org
Sat Jun 1 11:20:00 EDT 2019
[ https://issues.jboss.org/browse/WFLY-12152?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
William Collishaw updated WFLY-12152:
-------------------------------------
Description:
Remove all instances of redundant .length() calls in the Sting substring calls.
Both the following samples produce the same output:
{code:java}
str2 = str1.substring(beginIndex, str1.length());
str2 = str1.substring(beginIndex);
{code}
This minor enhancement removes unnecessary String length() calls.
was:
Remove all instances of redundant .length() calls in the Sting substring calls.
Both the following samples produce the same output.
{code:java}
str2 = str1.substring(beginIndex, str1.length());
str2 = str1.substring(beginIndex);
{code}
This minor enhancement removes unnecessary String length() calls.
> Remove redundant subString endIndex .length() calls
> ---------------------------------------------------
>
> Key: WFLY-12152
> URL: https://issues.jboss.org/browse/WFLY-12152
> Project: WildFly
> Issue Type: Enhancement
> Reporter: William Collishaw
> Assignee: Brian Stansberry
> Priority: Optional
>
> Remove all instances of redundant .length() calls in the Sting substring calls.
> Both the following samples produce the same output:
> {code:java}
> str2 = str1.substring(beginIndex, str1.length());
> str2 = str1.substring(beginIndex);
> {code}
> This minor enhancement removes unnecessary String length() calls.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
More information about the jboss-jira
mailing list