-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 thanks for the feedback.
i created an issue for jcr 2.1 http://java.net/jira/browse/JSR_333-41 cheers,david Am 11.08.2011 17:53, schrieb Stefan Guggisberg: > On Thu, Aug 11, 2011 at 5:22 PM, David Buchmann <[email protected]> > wrote: > hi, > > implementing the php port of jcr as closely to the java spec as the > language differences permit, i have a question about the javadoc of > Property.setValue(Value value) > > the javadoc [1] tells that "If the property type is constrained, then a > best-effort conversion is attempted." > however, the jcr 2.0 specification defines in 3.6.4 an exact list of > what can be converted into which types and when to throw the > ValueFormatException. > the best-effort conversion suggerates that the implementation might > convert more of the cases or "just does something" like convert string > "hello" to integer 1. > >> no, that's not the intention. best-effort in this case means that a >> conversion >> is attempted but it's not guaranteed to succeed. > > however, such behaviour would result in > non-portable client code because what works with one implementation > works not with an other. > > should the setValue method javadoc read "...then a conversion *according > to jcr spec paragraph 3.6.4* is attempted." ? > >> i agree that the javadoc could be more specific WRT the supported >> value conversions. > >> could you please file a jira issue [0]? > >> thanks >> stefan > >> [0] http://java.net/jira/browse/JSR_333 > > > > cheers,david > > [1] > http://www.day.com/maven/javax.jcr/javadocs/jcr-2.0/javax/jcr/Property.html#setValue%28javax.jcr.Value%29 > [2] > http://www.day.com/specs/jcr/2.0/3_Repository_Model.html#3.6.4%20Property%20Type%20Conversion >> - -- Liip AG // Agile Web Development // T +41 26 422 25 11 CH-1700 Fribourg // PGP 0xA581808B // www.liip.ch -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk5EAgIACgkQqBnXnqWBgIuiPwCdHl1htMLEDpjWTsannp0ZLqDS JgwAoKnnAbit3Rioq98KGAHJcwMGGaHp =qiKm -----END PGP SIGNATURE-----
