[
https://issues.apache.org/jira/browse/JCRVLT-98?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14900754#comment-14900754
]
Tommaso Teofili commented on JCRVLT-98:
---------------------------------------
I've tested and I can reproduce it too with the following test and a test
package having a property _mvProp = [foo]_ in the user's profile node:
{code}
@Test
public void installUserWithSingleValuedMVProp() throws Exception {
UserManager mgr = ((JackrabbitSession) admin).getUserManager();
assertNull("test-user-a must not exist",
mgr.getAuthorizable(ID_TEST_USER_A));
User u = mgr.createUser(ID_TEST_USER_A, "nonce");
final String authPath = u.getPath();
// create test property and node
u.setProperty(NAME_USER_PROPERTY,
admin.getValueFactory().createValue("initial"));
admin.getNode(u.getPath()).addNode(NAME_PROFILE_PRIVATE_NODE,
NodeType.NT_UNSTRUCTURED);
admin.save();
JcrPackage pack =
packMgr.upload(getStream("testpackages/test_user_a_mv.zip"), false);
assertNotNull(pack);
ImportOptions opts = getDefaultOptions();
pack.install(opts);
// check if user exists
User userA = (User) mgr.getAuthorizable(ID_TEST_USER_A);
assertNotNull(ID_TEST_USER_A + " must exist", userA);
Node profile = admin.getNode(userA.getPath() + "/profile");
assertTrue(profile.hasProperty("mvProp"));
assertTrue(profile.getProperty("mvProp").isMultiple());
}
{code}
> Multivalued properties of users are saved as single valued properties
> ---------------------------------------------------------------------
>
> Key: JCRVLT-98
> URL: https://issues.apache.org/jira/browse/JCRVLT-98
> Project: Jackrabbit FileVault
> Issue Type: Bug
> Components: Packaging
> Affects Versions: 3.1.18
> Reporter: Marius Petria
> Assignee: Tobias Bocanegra
> Fix For: 3.1.24
>
> Attachments: JCRVLT-98.patch, JCRVLT-98.test.patch,
> test-mv-prop-user.zip
>
>
> Installing a package with an user that has a multivalue property with just
> one value causes the type of the property to be switched from String[] to
> String.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)