Hi, On Jan 21, 2008 10:36 AM, Carsten Ziegeler <[EMAIL PROTECTED]> wrote: > after updating to jackrabbit 1.4 I noticed that the Locked class has > moved from the jcr-commons to the spi-commons package. > > Now, this may be a dumb question, but why this move? The Locked class > has been a utility class which was usable with any jcr implementation as > no jackrabbit specific code is required. Now I need dependencies to > jackrabbit spi just in order to use this simple class :(
Good point. AFAIK the main reason for the move are the five imports to name handling classes in spi-commons. We don't want to make jcr-commons depend on spi-commons and so once the name classes were moved, Locked had to follow. However, looking at the code in more detail, the only use for the name handling classes is to calculate the prefixed name of "mix:lockable" (it can't be hardcoded as "mix:" could be remapped). We could remove the dependency fairly easily with a Session.getNamespacePrefix() call. Luckily, to avoid breaking existing clients, we just deprecated the Locked class in jcr-commons instead of removing it. I guess the proper solution is then to file a bug about improper deprecation and we'll drop the @deprecated mark along with the spi-commons dependency in the 1.4.1 release. BR, Jukka Zitting
