Uploaded image for project: 'Commons Codec'
  1. Commons Codec
  2. CODEC-320

Wrong output of DoubleMetaphone in 1.16.1

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.17.0
    • None
    • Patch

    Description

      It looks like there is a bug in DoubleMetaphone implementation in version 1.16.1. Older 1.16.0 is fine. In fact I'm not 100% sure it is a bug, but it behaves differently and the old output looks much more reasonable than the new one.

      Old code contains index+=2 -
      https://github.com/apache/commons-codec/blob/rel/commons-codec-1.16.0/src/main/java/org/apache/commons/codec/language/DoubleMetaphone.java#L462
      New code does not contain that line -
      https://github.com/apache/commons-codec/blob/rel/commons-codec-1.16.1/src/main/java/org/apache/commons/codec/language/DoubleMetaphone.java#L619

      Attachments

        1. fix.patch
          0.7 kB
          Martin Frydl
        2. Test.java
          0.3 kB
          Martin Frydl

        Activity

          People

            Unassigned Unassigned
            mfry4109 Martin Frydl
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: