You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@syncope.apache.org by te...@net-c.com on 2020/10/28 09:22:42 UTC

language and label edition regression in 2.1.7 when having " " ?

HI all,


in 2.1.7, language id having a "_" in their name (like "fr_CA") makes schemas not editable and leads to an exception:

In the same way, impossible to create a label for these languages.



java.lang.ArrayIndexOutOfBoundsException: 2
at org.apache.syncope.common.lib.to.SchemaTO.toLocale(SchemaTO.java:63)
at org.apache.syncope.client.console.panels.SchemaTypeWizardBuilder$Labels.lambda$new$0(SchemaTypeWizardBuilder.java:139)
at java.util.LinkedHashMap.forEach(LinkedHashMap.java:684)
at org.apache.syncope.client.console.panels.SchemaTypeWizardBuilder$Labels.<init>(SchemaTypeWizardBuilder.java:138



It works well in 2.1.6.

When trying to add a label for these kind of language the REST payload looks weird like:



{"@class":"org.apache.syncope.common.lib.to.PlainSchemaTO","key":"test","anyTypeClass":null,"labels":{"fr;CA;":"test"},"type":"String","mandatoryCondition":"false","multivalue":false,"uniqueConstraint":false,"readonly":false,"conversionPattern":null,"validator":null,"enumerationValues":"","enumerationKeys":"","secretKey":null,"cipherAlgorithm":null,"mimeType":null}


Re: language and label edition regression in 2.1.7 when having " " ?

Posted by Francesco Chicchiriccò <il...@apache.org>.
On 28/10/20 10:22, tempo@net-c.com wrote:
> HI all,
>
> in 2.1.7, language id having a "_" in their name (like "fr_CA") makes schemas not editable and leads to an exception:
> In the same way, impossible to create a label for these languages.
>
> java.lang.ArrayIndexOutOfBoundsException: 2
> at org.apache.syncope.common.lib.to.SchemaTO.toLocale(SchemaTO.java:63)
> at org.apache.syncope.client.console.panels.SchemaTypeWizardBuilder$Labels.lambda$new$0(SchemaTypeWizardBuilder.java:139)
> at java.util.LinkedHashMap.forEach(LinkedHashMap.java:684)
> at org.apache.syncope.client.console.panels.SchemaTypeWizardBuilder$Labels.<init>(SchemaTypeWizardBuilder.java:138 <https://schematypewizardbuilder.java:138/>
>
> It works well in 2.1.6.
> When trying to add a label for these kind of language the REST payload looks weird like:
>
> {"@class":"org.apache.syncope.common.lib.to.PlainSchemaTO","key":"test","anyTypeClass":null,"labels":{"*fr;CA*;":"test"},"type":"String","mandatoryCondition":"false","multivalue":false,"uniqueConstraint":false,"readonly":false,"conversionPattern":null,"validator":null,"enumerationValues":"","enumerationKeys":"","secretKey":null,"cipherAlgorithm":null,"mimeType":null}

Hi.
this is already captured as

https://issues.apache.org/jira/browse/SYNCOPE-1590

and fixed in 2.1.8-SNAPSHOT.

Regards.

-- 
Francesco Chicchiriccò

Tirasa - Open Source Excellence
http://www.tirasa.net/

Member at The Apache Software Foundation
Syncope, Cocoon, Olingo, CXF, OpenJPA, PonyMail
http://home.apache.org/~ilgrosso/