You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Brent Thomas (JIRA)" <de...@tapestry.apache.org> on 2007/11/08 15:30:52 UTC

[jira] Commented: (TAPESTRY-1872) Fix on using method String.replace()

    [ https://issues.apache.org/jira/browse/TAPESTRY-1872?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12541054 ] 

Brent Thomas commented on TAPESTRY-1872:
----------------------------------------

Can someone elaborate on the fix because I don't understand what was wrong here. A String is CharSequence in Java 1.5, so why would the original form not work?

> Fix on using method String.replace()
> ------------------------------------
>
>                 Key: TAPESTRY-1872
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1872
>             Project: Tapestry
>          Issue Type: Bug
>          Components: Contrib
>    Affects Versions: 4.1.3
>         Environment: Websphere App Server 5.1
>            Reporter: Joshua Partogi
>            Assignee: Andreas Andreou
>             Fix For: 4.1.4
>
>
> One example that cause bugs on using String.replace is located on:
> org.apache.tapestry.contrib.table.model.simple.SimpleTableColumn.setDisplayName(String displayName) line 161:
> displayName = displayName.replace("_", ".");
> will cause this exception:
> java.lang.String: method replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String; not found
> because it uses double quotation so it is assumed as String instead of char.
> It should be displayName.replace('_', '.'); 
> with single quotation

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org