This is an automated email from the git hooks/post-receive script. ebourg-guest pushed a commit to branch master in repository dom4j.
commit d22af6d3d46913c847fa4d47d7f4c538f978babf Author: Marcus Better <mar...@better.se> Date: Tue Oct 31 11:54:43 2006 +0000 Merge debian and remove-nonfree-concurrent-class branches (r2693). --- dom4j/build.xml | 5 +- dom4j/debian/control | 2 +- dom4j/debian/copyright | 91 +++++++++-------------- dom4j/debian/rules | 2 +- dom4j/src/java/org/dom4j/tree/NamespaceCache.java | 36 +++++---- 5 files changed, 61 insertions(+), 75 deletions(-) diff --git a/dom4j/build.xml b/dom4j/build.xml index b089033..17169b2 100644 --- a/dom4j/build.xml +++ b/dom4j/build.xml @@ -17,9 +17,10 @@ <path id="test.classpath"> <fileset dir="/usr/share/java"> - <include name="xalan2.jar" /> - <include name="xerces*.jar" /> + <include name="backport-util-concurrent.jar" /> <include name="jaxen.jar" /> + <include name="xalan2.jar" /> + <include name="xercesImpl.jar" /> <include name="xpp3.jar" /> </fileset> </path> diff --git a/dom4j/debian/control b/dom4j/debian/control index c55998a..e0418a5 100644 --- a/dom4j/debian/control +++ b/dom4j/debian/control @@ -4,7 +4,7 @@ Priority: optional Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org> Uploaders: Marcus Better <mar...@better.se> Build-Depends: debhelper (>= 5.0.0), ant, ant-optional -Build-Depends-Indep: antlr, java-gcj-compat-dev, libjaxp1.2-java, libjaxen-java (>= 1.1~beta11), libjaxme-java, libxpp2-java, libxpp3-java, libxerces2-java, libxalan2-java, libbackport-util-concurrent-java, junit, libjunitperf-java +Build-Depends-Indep: antlr, java-gcj-compat-dev, libjaxp1.2-java, libjaxen-java (>= 1.1~beta11), libjaxme-java, libxpp2-java, libxpp3-java, libxerces2-java, libxalan2-java (>= 2.7.0), libbackport-util-concurrent-java, junit, libjunitperf-java Standards-Version: 3.7.2 Package: libdom4j-java diff --git a/dom4j/debian/copyright b/dom4j/debian/copyright index 153317e..5bba111 100644 --- a/dom4j/debian/copyright +++ b/dom4j/debian/copyright @@ -53,58 +53,39 @@ Upstream Authors: Curt Arnold, David Lucas, David White, Jakob Jenkov, ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -The debian package also contains two classes from the jaxen project to -workaround circular dependencies. These classes are licensed as follows: - -The source was downloaded from <http://jaxen.org/> - -Upstream Authors: Bob McWhirter <b...@werken.com> and - James Strachan <jstrac...@apache.org> - -Copyright: - -/* - $Id: LICENSE.txt,v 1.3 2003/06/29 18:22:02 ssanders Exp $ - - Copyright 2003 (C) The Werken Company. All Rights Reserved. - - Redistribution and use of this software and associated documentation - ("Software"), with or without modification, are permitted provided - that the following conditions are met: - - 1. Redistributions of source code must retain copyright - statements and notices. Redistributions must also contain a - copy of this document. - - 2. Redistributions in binary form must reproduce the - above copyright notice, this list of conditions and the - following disclaimer in the documentation and/or other - materials provided with the distribution. - - 3. The name "jaxen" must not be used to endorse or promote - products derived from this Software without prior written - permission of The Werken Company. For written permission, - please contact b...@werken.com. - - 4. Products derived from this Software may not be called "jaxen" - nor may "jaxen" appear in their names without prior written - permission of The Werken Company. "jaxen" is a registered - trademark of The Werken Company. - - 5. Due credit should be given to The Werken Company. - (http://jaxen.werken.com/). - - THIS SOFTWARE IS PROVIDED BY THE WERKEN COMPANY AND CONTRIBUTORS - ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT - NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL - THE WERKEN COMPANY OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - OF THE POSSIBILITY OF SUCH DAMAGE. - - */ +The contributions to the Debian packaging by Marcus Better are +Copyright (C) 2006 Marcus Better <mar...@better.se> and are licensed +under the same license as dom4j, see above. + +The files `DocumentNavigator.java' and `Dom4jXPath.java' from the +jaxme package are Copyright (C) 2000-2005 Bob McWhirter and James +Strachan, and are licensed as follows: + + Copyright 2003 (C) The Werken Company. All Rights Reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of the Jaxen Project nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS + IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/dom4j/debian/rules b/dom4j/debian/rules index 787cfad..443c99c 100755 --- a/dom4j/debian/rules +++ b/dom4j/debian/rules @@ -4,7 +4,7 @@ JAVA_HOME := /usr/lib/jvm/java-gcj DEB_JARS_BASE := /usr/share/java JAVACMD := $(JAVA_HOME)/bin/java -DEB_JARS := ant ant-launcher jaxp-1.2.jar xpp2 xpp3 jaxen jaxme-api \ +DEB_JARS := ant ant-launcher jaxp-1.2.jar xpp2 xpp3 jaxen jaxmeapi \ xalan2 xercesImpl ant-junit junit junitperf DEB_CLASSPATH = $(shell for jar in $(DEB_JARS); do \ diff --git a/dom4j/src/java/org/dom4j/tree/NamespaceCache.java b/dom4j/src/java/org/dom4j/tree/NamespaceCache.java index f2ee222..5969aba 100644 --- a/dom4j/src/java/org/dom4j/tree/NamespaceCache.java +++ b/dom4j/src/java/org/dom4j/tree/NamespaceCache.java @@ -26,42 +26,46 @@ import org.dom4j.Namespace; * @version $Revision: 1.15 $ */ public class NamespaceCache { - private static final String CONCURRENTREADERHASHMAP_CLASS - = "edu.emory.mathcs.backport.java.util.concurrent.ConcurrentHashMap"; + private static final String BACKPORT_CONCURRENTHASHMAP_CLASS + = "edu.emory.mathcs.backport.java.util.concurrent.ConcurrentHashMap"; + private static final String OSWEGO_CONCURRENTHASHMAP_CLASS + = "EDU.oswego.cs.dl.util.concurrent.ConcurrentReaderHashMap"; /** * Cache of {@link Map}instances indexed by URI which contain caches of * {@link Namespace}for each prefix */ - protected static Map cache; + protected static Map cache = newConcurrentHashMap(); /** * Cache of {@link Namespace}instances indexed by URI for default * namespaces with no prefixes */ - protected static Map noPrefixCache; + protected static Map noPrefixCache = newConcurrentHashMap(); - static { + protected static Map newConcurrentHashMap() + { /* Try the java.util.concurrent.ConcurrentHashMap first. */ try { Class clazz = Class .forName("java.util.concurrent.ConcurrentHashMap"); Constructor construct = clazz.getConstructor(new Class[] { Integer.TYPE, Float.TYPE, Integer.TYPE }); - cache = (Map) construct.newInstance(new Object[] {new Integer(11), + return (Map) construct.newInstance(new Object[] {new Integer(11), new Float(0.75f), new Integer(1) }); - noPrefixCache = (Map) construct.newInstance(new Object[] { - new Integer(11), new Float(0.75f), new Integer(1) }); } catch (Throwable t1) { - /* Try to use the util.concurrent library (if in classpath) */ try { - Class clazz = Class.forName(CONCURRENTREADERHASHMAP_CLASS); - cache = (Map) clazz.newInstance(); - noPrefixCache = (Map) clazz.newInstance(); + /* Try to use the backport-util-concurrent library */ + Class clazz = Class.forName(BACKPORT_CONCURRENTHASHMAP_CLASS); + return (Map) clazz.newInstance(); } catch (Throwable t2) { - /* If previous implementations fail, use internal one */ - cache = new ConcurrentReaderHashMap(); - noPrefixCache = new ConcurrentReaderHashMap(); + try { + /* Try to use the oswego concurrent library */ + Class clazz = Class.forName(OSWEGO_CONCURRENTHASHMAP_CLASS); + return (Map) clazz.newInstance(); + } catch (Throwable t3) { + return null; + } } } } @@ -154,7 +158,7 @@ public class NamespaceCache { answer = (Map) cache.get(uri); if (answer == null) { - answer = new ConcurrentReaderHashMap(); + answer = newConcurrentHashMap(); cache.put(uri, answer); } } -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/dom4j.git _______________________________________________ pkg-java-commits mailing list pkg-java-comm...@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-java-commits