manifoldcf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karl Wright (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CONNECTORS-1304) ban usage of String.toUpperCase() without Locale
Date Mon, 15 Aug 2016 14:50:20 GMT

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

Karl Wright commented on CONNECTORS-1304:
-----------------------------------------

[~kamaci]: If the forbidden-api's target needs to be involved so that it is run on every class
produced during the build, then the right way to do it is to have a "forbidden-check" target
in every build.xml in the tree.  This is actually easier than you might think because you
can add this in two main places: framework/build.xml, and in framework/buildfiles/connector-build.xml.
 The latter place is where the code goes for the individual connectors, which may be overridden
in the individual connector's build.xml.  Most connectors, though, have no such override necessary.

This is more work, obviously, but I think it is the correct way to proceed.

Since tests are compiled separately, we may also need a forbidden-check-test target as well,
which would be run only after the tests are compiled.



> ban usage of String.toUpperCase() without Locale
> ------------------------------------------------
>
>                 Key: CONNECTORS-1304
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-1304
>             Project: ManifoldCF
>          Issue Type: Improvement
>          Components: SearchBlox connector
>    Affects Versions: ManifoldCF 2.4
>            Reporter: Ahmet Arslan
>            Assignee: Ahmet Arslan
>             Fix For: ManifoldCF 2.5
>
>
> When relied on the default Locale, toUpperCase() is not reliable. For example: In SearchBloxConnector.java,
"title_boost".toUpperCase() will yield {{TÄ°TLE_BOOST}} on Turkish Locale and won't match
{{TITLE_BOOST}}. We should prevent this in a more permanent way. I would like to integrate
Uwe's [forbidden apis|https://github.com/policeman-tools/forbidden-apis] when I have time.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message