commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Work logged] (TEXT-151) JaroWinklerSimilarity uses Object.equals to test for equality
Date Sat, 02 Mar 2019 21:21:00 GMT

     [ https://issues.apache.org/jira/browse/TEXT-151?focusedWorklogId=206794&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-206794
]

ASF GitHub Bot logged work on TEXT-151:
---------------------------------------

                Author: ASF GitHub Bot
            Created on: 02/Mar/19 21:20
            Start Date: 02/Mar/19 21:20
    Worklog Time Spent: 10m 
      Work Description: coveralls commented on issue #105: TEXT-151: Use StringUtils.equals
to test for CharSequence equality.
URL: https://github.com/apache/commons-text/pull/105#issuecomment-468961411
 
 
   
   [![Coverage Status](https://coveralls.io/builds/21949966/badge)](https://coveralls.io/builds/21949966)
   
   Coverage remained the same at 97.899% when pulling **ce04947d71b21dca5a059e6ce20296b0c6648d34
on aherbert:fix-TEXT-151** into **33ae30ba6ed160f05cd2989a232b8de6558643f0 on apache:master**.
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 206794)
    Time Spent: 20m  (was: 10m)

> JaroWinklerSimilarity uses Object.equals to test for equality
> -------------------------------------------------------------
>
>                 Key: TEXT-151
>                 URL: https://issues.apache.org/jira/browse/TEXT-151
>             Project: Commons Text
>          Issue Type: Bug
>    Affects Versions: 1.7
>            Reporter: Alex D Herbert
>            Priority: Trivial
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> Using Object.equals to test for equality of a {{CharSequence}} is wrong:
> {code:java}
> CharSequence cs1, cs2;
> cs1.equals(cs2);
> {code}
> The Unit test passes because the test uses the same String on both sides. When I changed
the unit test to wrap the string with a {{CharSequence}} interface it fails.
> It should be replaced with:
> {code:java}
> CharSequence cs1, cs2;
> StringUtils.equals(cs1, cs2);
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message