jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • groovy
  • GROOVY-3285

Implement String.replace(CharSequence, CharSequence), a JDK 1.5 method, for backwards compatibility

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.6-rc-1
  • Fix Version/s: 1.6-rc-2, 1.5.8
  • Component/s: None
  • Labels:
    None

Description

JDK 1.5 introduced String.replace(CharSequence, CharSequence), which is effectively what folks often expect String.replaceAll(String, String) (a JDK 1.4 method) to do, which is do literal string replacement.

Issue Links

depends upon

Improvement - An improvement or enhancement to an existing feature or task. GROOVY-3287 Implement workaround for JDK 1.4 String.replaceAll bug.

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Paul King added a comment - 15/Jan/09 4:34 PM

You mean implement for the 1_5_X branch?

Show
Paul King added a comment - 15/Jan/09 4:34 PM You mean implement for the 1_5_X branch?
Hide
Permalink
Jim White added a comment - 15/Jan/09 6:05 PM - edited

Yeah. Too annoying to write the tests for JDK 1.4 otherwise.

Also turns out I've hit a bug in String.replaceAll in JDK 1.4 that appears when there is a backslash in between \Q...\E. Implementing a workaround in RegexUtils.quote now...

Show
Jim White added a comment - 15/Jan/09 6:05 PM - edited Yeah. Too annoying to write the tests for JDK 1.4 otherwise. Also turns out I've hit a bug in String.replaceAll in JDK 1.4 that appears when there is a backslash in between \Q...\E. Implementing a workaround in RegexUtils.quote now...
Hide
Permalink
blackdrag blackdrag added a comment - 15/Jan/09 6:48 PM

isn't CharSequence a jdk 1.5 class?

Show
blackdrag blackdrag added a comment - 15/Jan/09 6:48 PM isn't CharSequence a jdk 1.5 class?
Hide
Permalink
Jim White added a comment - 15/Jan/09 7:03 PM

Nope.

Show
Jim White added a comment - 15/Jan/09 7:03 PM Nope.
Hide
Permalink
Paul King added a comment - 08/Feb/09 10:54 PM

I am not sure this was needed for the 1_6_X branch as when running under a 1.4 JVM I think we will get the retrotranslated version of String.replaceAll(CharSequence, CharSequence).

Show
Paul King added a comment - 08/Feb/09 10:54 PM I am not sure this was needed for the 1_6_X branch as when running under a 1.4 JVM I think we will get the retrotranslated version of String.replaceAll(CharSequence, CharSequence).

People

  • Assignee:
    Jim White
    Reporter:
    Jim White
Vote (0)
Watch (1)

Dates

  • Created:
    15/Jan/09 3:30 PM
    Updated:
    08/Feb/09 10:54 PM
    Resolved:
    15/Jan/09 7:40 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.