You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Matt Juntunen (Jira)" <ji...@apache.org> on 2021/07/07 02:40:00 UTC

[jira] [Commented] (TEXT-210) Spotbugs Failures

    [ https://issues.apache.org/jira/browse/TEXT-210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17376172#comment-17376172 ] 

Matt Juntunen commented on TEXT-210:
------------------------------------

PR is in: [https://github.com/apache/commons-text/pull/249]

I considered the errors regarding the {{Locale}} properties as false positives since {{Locale}} instances are immutable. For the other errors, I made copies of mutable inputs in constructors instead of referencing the inputs directly.

> Spotbugs Failures
> -----------------
>
>                 Key: TEXT-210
>                 URL: https://issues.apache.org/jira/browse/TEXT-210
>             Project: Commons Text
>          Issue Type: Bug
>            Reporter: Matt Juntunen
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Since updating to spotbugs 4.3.0, the build is failing with the following errors:
> {code:java}
> [ERROR] Medium: new org.apache.commons.text.io.StringSubstitutorReader(Reader, StringSubstitutor) may expose internal representation by storing an externally mutable object into StringSubstitutorReader.stringSubstitutor [org.apache.commons.text.io.StringSubstitutorReader] At StringSubstitutorReader.java:[line 76] EI_EXPOSE_REP2
> [ERROR] Medium: org.apache.commons.text.similarity.FuzzyScore.getLocale() may expose internal representation by returning FuzzyScore.locale [org.apache.commons.text.similarity.FuzzyScore] At FuzzyScore.java:[line 142] EI_EXPOSE_REP
> [ERROR] Medium: new org.apache.commons.text.similarity.FuzzyScore(Locale) may expose internal representation by storing an externally mutable object into FuzzyScore.locale [org.apache.commons.text.similarity.FuzzyScore] At FuzzyScore.java:[line 56] EI_EXPOSE_REP2
> [INFO] 
>  {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)