personium / personium-core

Core module of Personium
https://personium.io
Apache License 2.0
88 stars 16 forks source link

BAR installation incorrectly assigns CollectionKind to "NONE" #272

Closed dixonsiu closed 5 years ago

dixonsiu commented 5 years ago

BAR installation incorrectly assigns CollectionKind to "NONE". The expected value should be "None".

Related issue in Unit Manager.

shimono commented 5 years ago

Personium defines a constant representing the string "None" https://github.com/personium/personium-core/blob/7c15227cf66c9c5002023d1c5de855c8dafc36d2/src/main/java/io/personium/core/model/ctl/Property.java#L40

whereas OData4J defines a constant representing the string "NONE" http://odata4j.org/v/0.7/javadoc/org/odata4j/edm/EdmProperty.CollectionKind.html

And bar file uses the latter constant. https://github.com/personium/personium-core/blob/master/src/main/java/io/personium/core/bar/BarFileContentsInstallVisitor.java#L722

shimono commented 5 years ago

All capitalized "NONE" should be a bug in odata4j since CSDL spec says

In CSDL 1.1, CSDL 1.2, CSDL 2.0, and CSDL 3.0, a Property element can define a CollectionKind attribute. The possible values are "None", "List", and "Bag".

https://winprotocoldoc.blob.core.windows.net/productionwindowsarchives/MC-CSDL/%5bMC-CSDL%5d-170316.pdf

SawamiWataru commented 5 years ago

Released v1.7.6