Uploaded image for project: 'Tapestry'
  1. Tapestry
  2. TAPESTRY-1872

Fix on using method String.replace()

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.1.3
    • Fix Version/s: 4.1.5
    • Component/s: Contrib
    • Labels:
      None
    • Environment:
      Websphere App Server 5.1

      Description

      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

        Attachments

          Activity

            People

            • Assignee:
              andyhot Andreas Andreou
              Reporter:
              thejavafreak Joshua Partogi
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: