Migration Guide

Migrating from pre jadiceŽ 4.2 versions

User property support of Page, PageSegment and Document

Beginning with jadiceŽ 4.2 there was some API cleanup regarding the methods for handling user properties of the classes com.levigo.jadice.docs.Page, com.levigo.jadice.docs.PageSegment and com.levigo.jadice.docs.Document. Before jadiceŽ 4.2 it was allowed to supply a key of any type. This was incorrect, as there are a lot of assumptions expecting the key to be of type java.lang.String.

The following methods are affected (the method declarations are identical in all of the three classes):

  • putUserProperty(Object key, Object value)
  • getUserProperty(Object key)
  • removeUserProperty(Object key)

    These methods have been deprecated and replaced by identically named methods with the key as a string:

  • putUserProperty(String key, Object value)
  • getUserProperty(String key)
  • removeUserProperty(String key)

    The old methods will remain in all jadiceŽ 4.2 releases. Calling those methods with a key not of type java.lang.String will result in IllegalArgumentExceptions!