[pkg-java] r2695 - in trunk/dom4j/dom4j: . debian src/java/org
src/java/org/dom4j/tree
Marcus Better
marcusb-guest at alioth.debian.org
Tue Oct 31 11:54:43 UTC 2006
Author: marcusb-guest
Date: 2006-10-31 12:54:43 +0100 (Tue, 31 Oct 2006)
New Revision: 2695
Modified:
trunk/dom4j/dom4j/build.xml
trunk/dom4j/dom4j/debian/control
trunk/dom4j/dom4j/debian/copyright
trunk/dom4j/dom4j/debian/rules
trunk/dom4j/dom4j/src/java/org/
trunk/dom4j/dom4j/src/java/org/dom4j/tree/NamespaceCache.java
Log:
Merge debian and remove-nonfree-concurrent-class branches (r2693).
Modified: trunk/dom4j/dom4j/build.xml
===================================================================
--- trunk/dom4j/dom4j/build.xml 2006-10-31 11:26:52 UTC (rev 2694)
+++ trunk/dom4j/dom4j/build.xml 2006-10-31 11:54:43 UTC (rev 2695)
@@ -17,9 +17,10 @@
<path id="test.classpath">
<fileset dir="/usr/share/java">
+ <include name="backport-util-concurrent.jar" />
+ <include name="jaxen.jar" />
<include name="xalan2.jar" />
- <include name="xerces*.jar" />
- <include name="jaxen.jar" />
+ <include name="xercesImpl.jar" />
<include name="xpp3.jar" />
</fileset>
</path>
Modified: trunk/dom4j/dom4j/debian/control
===================================================================
--- trunk/dom4j/dom4j/debian/control 2006-10-31 11:26:52 UTC (rev 2694)
+++ trunk/dom4j/dom4j/debian/control 2006-10-31 11:54:43 UTC (rev 2695)
@@ -4,7 +4,7 @@
Maintainer: Debian Java Maintainers <pkg-java-maintainers at lists.alioth.debian.org>
Uploaders: Marcus Better <marcus at 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
Modified: trunk/dom4j/dom4j/debian/copyright
===================================================================
--- trunk/dom4j/dom4j/debian/copyright 2006-10-31 11:26:52 UTC (rev 2694)
+++ trunk/dom4j/dom4j/debian/copyright 2006-10-31 11:54:43 UTC (rev 2695)
@@ -53,58 +53,39 @@
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 contributions to the Debian packaging by Marcus Better are
+Copyright (C) 2006 Marcus Better <marcus at better.se> and are licensed
+under the same license as dom4j, see above.
-The source was downloaded from <http://jaxen.org/>
+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:
-Upstream Authors: Bob McWhirter <bob at werken.com> and
- James Strachan <jstrachan at apache.org>
+ Copyright 2003 (C) The Werken Company. All Rights Reserved.
-Copyright:
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
-/*
- $Id: LICENSE.txt,v 1.3 2003/06/29 18:22:02 ssanders Exp $
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
- 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:
+ * 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.
- 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 bob at 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.
+ * 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.
Modified: trunk/dom4j/dom4j/debian/rules
===================================================================
--- trunk/dom4j/dom4j/debian/rules 2006-10-31 11:26:52 UTC (rev 2694)
+++ trunk/dom4j/dom4j/debian/rules 2006-10-31 11:54:43 UTC (rev 2695)
@@ -4,7 +4,7 @@
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 \
Property changes on: trunk/dom4j/dom4j/src/java/org
___________________________________________________________________
Name: svn:externals
+ jaxen/dom4j -r2612 svn://svn.debian.org/pkg-java/trunk/libjaxen-java/libjaxen-java/src/java/main/org/jaxen/dom4j
Modified: trunk/dom4j/dom4j/src/java/org/dom4j/tree/NamespaceCache.java
===================================================================
--- trunk/dom4j/dom4j/src/java/org/dom4j/tree/NamespaceCache.java 2006-10-31 11:26:52 UTC (rev 2694)
+++ trunk/dom4j/dom4j/src/java/org/dom4j/tree/NamespaceCache.java 2006-10-31 11:54:43 UTC (rev 2695)
@@ -26,42 +26,46 @@
* @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 @@
answer = (Map) cache.get(uri);
if (answer == null) {
- answer = new ConcurrentReaderHashMap();
+ answer = newConcurrentHashMap();
cache.put(uri, answer);
}
}
More information about the pkg-java-commits
mailing list