On 13 Apr 2008, at 19:10, Jean-Marc Orliaguet wrote:

in nuxeo-platform/nuxeo-platform-syndication/src/main/java/org/nuxeo/ ecm/platform/syndication/FeedItemAdapter.java I read:

      // List<String> contributors = Arrays.asList((String[])
      // doc.getProperty("dublincore", "contributors"));
// direct cast fails for some ResultDocuments returned by search service Object[] contribs = (Object[]) doc.getProperty("dublincore", "contributors");

Any idea why it fails?

No idea. Anyway this comment was written a long time ago, and by an intern that has since left us, so I wouldn't pay too much attention to it. The right thing would be to have chased down the unknown behavior at that time.

Have you witnessed anything strange with this?

It would seem more intuitive, using the document model, to write directly: String[] contribs = (String[]) doc.getProperty("schema", "someStringArray");

Indeed that's what I would have written to.

Florent

--
Florent Guillaume, Director of R&D, Nuxeo
Open Source Enterprise Content Management (ECM)
http://www.nuxeo.com   http://www.nuxeo.org   +33 1 40 33 79 87



_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm

Reply via email to