[jira] [Commented] (JCRVLT-788) use of 'toUppercase' with default locale should be avoided
[ https://issues.apache.org/jira/browse/JCRVLT-788?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17907466#comment-17907466 ] Julian Reschke commented on JCRVLT-788: --- Yes, this was about the new modes. We can't fix that for old versions, but we could do that in the current version for new enums we might add later. Maybe a utility class we can use throughout, providing better diagnostics? Such as "This value is not supported in this version of FileVault. Reasons could be (a) a spelling problem or (b) that this version predates the introduction of the new value; so an update of FV from this version (x.y.z) is needed". > use of 'toUppercase' with default locale should be avoided > -- > > Key: JCRVLT-788 > URL: https://issues.apache.org/jira/browse/JCRVLT-788 > Project: Jackrabbit FileVault > Issue Type: Bug >Reporter: Julian Reschke >Assignee: Julian Reschke >Priority: Minor > > This may lead to surprising results, such as uppercasing "i" not resulting in > "I". > See https://mattryall.net/blog/the-infamous-turkish-locale-bug -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (JCRVLT-788) use of 'toUppercase' with default locale should be avoided
[ https://issues.apache.org/jira/browse/JCRVLT-788?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17907353#comment-17907353 ] Konrad Windszus commented on JCRVLT-788: [~reschke] Was this due to using some of the "new" modes introduced in JCRVLT-255 with FileVault < 3.5.0. I think improving the exception message in https://github.com/apache/jackrabbit-filevault/blob/367ffb423d84993c5bb0eb0186f810a58b6227be/vault-core/src/main/java/org/apache/jackrabbit/vault/fs/config/DefaultWorkspaceFilter.java#L433 with the actual mode found would help here. > use of 'toUppercase' with default locale should be avoided > -- > > Key: JCRVLT-788 > URL: https://issues.apache.org/jira/browse/JCRVLT-788 > Project: Jackrabbit FileVault > Issue Type: Bug >Reporter: Julian Reschke >Assignee: Julian Reschke >Priority: Minor > > This may lead to surprising results, such as uppercasing "i" not resulting in > "I". > See https://mattryall.net/blog/the-infamous-turkish-locale-bug -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (JCRVLT-788) use of 'toUppercase' with default locale should be avoided
[ https://issues.apache.org/jira/browse/JCRVLT-788?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17907188#comment-17907188 ] Julian Reschke commented on JCRVLT-788: --- It seems that in this case it was caused by some component using a too ancient version of FV, not having these properties (ack [~jsedding]), so the Locale is not the issue. Will close this one, but we still should eliminate all the warnings as discussed in JCRVLT-702. > use of 'toUppercase' with default locale should be avoided > -- > > Key: JCRVLT-788 > URL: https://issues.apache.org/jira/browse/JCRVLT-788 > Project: Jackrabbit FileVault > Issue Type: Bug >Reporter: Julian Reschke >Assignee: Julian Reschke >Priority: Minor > > This may lead to surprising results, such as uppercasing "i" not resulting in > "I". > See https://mattryall.net/blog/the-infamous-turkish-locale-bug -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (JCRVLT-788) use of 'toUppercase' with default locale should be avoided
[ https://issues.apache.org/jira/browse/JCRVLT-788?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17907135#comment-17907135 ] Konrad Windszus commented on JCRVLT-788: I would think that just enriching the exception message in https://github.com/apache/jackrabbit-filevault/blob/367ffb423d84993c5bb0eb0186f810a58b6227be/vault-core/src/main/java/org/apache/jackrabbit/vault/fs/config/DefaultWorkspaceFilter.java#L433 with original mode value, converted to uppercase value and optionally default locale should be enough. However there definitely is an issue here with Turkish locale (even if you are not affected currently), so fixing all issues being highlighted by https://github.com/apache/jackrabbit-filevault/pull/287 needs fixing by using the Locale.ROOT locale (in case one can be sure that only ASCII characters are used there). > use of 'toUppercase' with default locale should be avoided > -- > > Key: JCRVLT-788 > URL: https://issues.apache.org/jira/browse/JCRVLT-788 > Project: Jackrabbit FileVault > Issue Type: Bug >Reporter: Julian Reschke >Assignee: Julian Reschke >Priority: Minor > > This may lead to surprising results, such as uppercasing "i" not resulting in > "I". > See https://mattryall.net/blog/the-infamous-turkish-locale-bug -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (JCRVLT-788) use of 'toUppercase' with default locale should be avoided
[ https://issues.apache.org/jira/browse/JCRVLT-788?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17906708#comment-17906708 ] Julian Reschke commented on JCRVLT-788: --- How about: - checking all cases where we do "valueOf()" for an enum - make sure that IllegalArgumentException is catched early - when the exception happens, add the value of the default locale to the reason text That would at least allow use to collect more information. > use of 'toUppercase' with default locale should be avoided > -- > > Key: JCRVLT-788 > URL: https://issues.apache.org/jira/browse/JCRVLT-788 > Project: Jackrabbit FileVault > Issue Type: Bug >Reporter: Julian Reschke >Assignee: Julian Reschke >Priority: Minor > > This may lead to surprising results, such as uppercasing "i" not resulting in > "I". > See https://mattryall.net/blog/the-infamous-turkish-locale-bug -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (JCRVLT-788) use of 'toUppercase' with default locale should be avoided
[
https://issues.apache.org/jira/browse/JCRVLT-788?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17906403#comment-17906403
]
Julian Reschke commented on JCRVLT-788:
---
Ok, what we see is:
{code}
4:32:17.117 [main] ERROR o.a.j.v.p.impl.ZipVaultPackage - Archive not valid.
java.io.IOException:
org.apache.jackrabbit.vault.fs.config.ConfigurationException: Invalid value
given for attribute 'mode'
at
org.apache.jackrabbit.vault.fs.io.ZipArchive.open(ZipArchive.java:116)
at
org.apache.jackrabbit.vault.packaging.impl.ZipVaultPackage.getArchive(ZipVaultPackage.java:98)
at
org.apache.jackrabbit.vault.packaging.impl.ZipVaultPackage.getMetaInf(ZipVaultPackage.java:137)
>>>
Caused by: org.apache.jackrabbit.vault.fs.config.ConfigurationException:
Invalid value given for attribute 'mode'
at
org.apache.jackrabbit.vault.fs.config.DefaultWorkspaceFilter.readDef(DefaultWorkspaceFilter.java:432)
at
org.apache.jackrabbit.vault.fs.config.DefaultWorkspaceFilter.read(DefaultWorkspaceFilter.java:410)
at
org.apache.jackrabbit.vault.fs.config.DefaultWorkspaceFilter.load(DefaultWorkspaceFilter.java:398)
at
org.apache.jackrabbit.vault.fs.config.DefaultWorkspaceFilter.load(DefaultWorkspaceFilter.java:370)
at
org.apache.jackrabbit.vault.fs.config.DefaultMetaInf.loadFilter(DefaultMetaInf.java:164)
at
org.apache.jackrabbit.vault.fs.config.DefaultMetaInf.load(DefaultMetaInf.java:123)
at
org.apache.jackrabbit.vault.fs.io.ZipArchive.open(ZipArchive.java:114)
... 66 common frames omitted
{code}
The source file uses lower-case mode names, as documented in
{{./vault-validation/src/main/resources/workspacefilter-1.0.xsd}}.
I've been told that there's definitively no Turkish locale involved.
What am I missing here?
> use of 'toUppercase' with default locale should be avoided
> --
>
> Key: JCRVLT-788
> URL: https://issues.apache.org/jira/browse/JCRVLT-788
> Project: Jackrabbit FileVault
> Issue Type: Bug
>Reporter: Julian Reschke
>Assignee: Julian Reschke
>Priority: Minor
>
> This may lead to surprising results, such as uppercasing "i" not resulting in
> "I".
> See https://mattryall.net/blog/the-infamous-turkish-locale-bug
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
[jira] [Commented] (JCRVLT-788) use of 'toUppercase' with default locale should be avoided
[ https://issues.apache.org/jira/browse/JCRVLT-788?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17905093#comment-17905093 ] Julian Reschke commented on JCRVLT-788: --- [~kwin] - see [https://github.com/apache/jackrabbit-filevault/pull/356.] I''m sure there's a way to run the full test suite with a diffent locale? (I tried several things but failed so far) > use of 'toUppercase' with default locale should be avoided > -- > > Key: JCRVLT-788 > URL: https://issues.apache.org/jira/browse/JCRVLT-788 > Project: Jackrabbit FileVault > Issue Type: Bug >Reporter: Julian Reschke >Assignee: Julian Reschke >Priority: Minor > > This may lead to surprising results, such as uppercasing "i" not resulting in > "I". > See https://mattryall.net/blog/the-infamous-turkish-locale-bug -- This message was sent by Atlassian Jira (v8.20.10#820010)
