Package: libxml-commons-resolver1.1-java
Version: 1.2-2
Severity: wishlist
Tags: patch
Hi,
resolver.jar is a third party library being used in netbeans.
But it needs to be patched to cater to NetBeans needs.
There are three ways:
1) vote for a new API on [EMAIL PROTECTED]
2) create forked package for patched resolver
3) request the original libxml-commons-resolver1.1-jaqva package to add
our patch
Results:
1) a letter on [EMAIL PROTECTED] was sent.
The answer was:
------
Since the 1.2 release there hasn't been any discussion on future
development or any changes made to the resolver codebase. There
currently are no plans for a 1.3. If one were happen it needs content
and volunteers to do the development and release managment.
-------
Based on this, it seems to be not the fastest way.
2) I've created a forked resolver. It is on mentors.debian.net now. But
I'm afraid it can be rejected because of duplication of code.
3) this bug is a result
So is it possible to add my patch into existing package?
-- System Information:
Debian Release: lenny/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'stable')
Architecture: i386 (i686)
Kernel: Linux 2.6.24-1-686 (SMP w/2 CPU cores)
Locale: LANG=ru_RU.UTF-8, LC_CTYPE=ru_RU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages libxml-commons-resolver1.1-java depends on:
ii default-jre [java2-runtime] 1.5-30 Standard Java or Java
compatible R
ii java-gcj-compat [java2-runtim 1.0.78-1 Java runtime environment
using GIJ
ii openjdk-6-jre [java2-runtime] 6b10dfsg-2 OpenJDK Java runtime
libxml-commons-resolver1.1-java recommends no packages.
Versions of packages libxml-commons-resolver1.1-java suggests:
pn libxml-commons-resolver1.1-ja <none> (no description available)
-- no debconf information
diff -Nur -x '*.orig' -x '*~' libnb-resolver-java-1.2/resolver.xml libnb-resolver-java-1.2.new/resolver.xml
--- libnb-resolver-java-1.2/resolver.xml 2006-11-20 23:23:07.000000000 +0300
+++ libnb-resolver-java-1.2.new/resolver.xml 2008-07-08 16:12:49.000000000 +0400
@@ -88,7 +88,7 @@
<echo message="Compiling..." />
- <javac srcdir="${src.dir}" destdir="${build.classes.dir}" debug="true" optimize="true" deprecation="true" verbose="false">
+ <javac srcdir="${src.dir}" destdir="${build.classes.dir}" debug="true" optimize="true" deprecation="true" verbose="false" source="1.4">
<!-- <classpath> not needed since Ant already supplies these Sep-03 -sc -->
<include name="${resolver.subdir}/*.java"/>
<include name="${resolver.subdir}/helpers/*.java"/>
diff -Nur -x '*.orig' -x '*~' libnb-resolver-java-1.2/src/org/apache/xml/resolver/Catalog.java libnb-resolver-java-1.2.new/src/org/apache/xml/resolver/Catalog.java
--- libnb-resolver-java-1.2/src/org/apache/xml/resolver/Catalog.java 2006-11-20 23:23:06.000000000 +0300
+++ libnb-resolver-java-1.2.new/src/org/apache/xml/resolver/Catalog.java 2008-07-08 14:28:31.000000000 +0400
@@ -29,7 +29,7 @@
import java.util.Enumeration;
import java.util.Hashtable;
import java.util.Vector;
-
+import java.util.Iterator;
import java.net.URL;
import java.net.MalformedURLException;
@@ -1167,6 +1167,23 @@
}
+ /**
+ * Return all registered public IDs.
+ */
+ public Iterator getPublicIDs() {
+ Vector v = new Vector();
+ Enumeration enum = catalogEntries.elements();
+
+ while (enum.hasMoreElements()) {
+ CatalogEntry e = (CatalogEntry) enum.nextElement();
+ if (e.getEntryType() == PUBLIC) {
+ v.add(e.getEntryArg(0));
+ }
+ }
+ return v.iterator();
+ }
+
+
/**
* Return the applicable DOCTYPE system identifier.
*
diff -Nur -x '*.orig' -x '*~' libnb-resolver-java-1.2/src/org/apache/xml/resolver/CatalogManager.java libnb-resolver-java-1.2.new/src/org/apache/xml/resolver/CatalogManager.java
--- libnb-resolver-java-1.2/src/org/apache/xml/resolver/CatalogManager.java 2006-11-20 23:23:06.000000000 +0300
+++ libnb-resolver-java-1.2.new/src/org/apache/xml/resolver/CatalogManager.java 2008-07-08 16:06:47.000000000 +0400
@@ -1,3 +1,4 @@
+
// CatalogManager.java - Access CatalogManager.properties
/*
@@ -212,7 +213,11 @@
// to avoid it.
}
- /** Constructor that specifies an explicit property file. */
+ /**
+ * Constructor that specifies an explicit property file.
+ * @param propertyFile path to property file (e.g. com/resources/CatalogManager).
+ * <code>null</code> means that no property file is consulted at all.
+ */
public CatalogManager(String propertyFile) {
this.propertyFile = propertyFile;
@@ -239,13 +244,14 @@
* resources from it.
*/
private synchronized void readProperties() {
+ if (propertyFile == null) return;
try {
propertyFileURI = CatalogManager.class.getResource("/"+propertyFile);
InputStream in =
CatalogManager.class.getResourceAsStream("/"+propertyFile);
if (in==null) {
if (!ignoreMissingProperties) {
- System.err.println("Cannot find "+propertyFile);
+ debug.message(2,"Cannot find "+propertyFile);
// there's no reason to give this warning more than once
ignoreMissingProperties = true;
}
diff -Nur -x '*.orig' -x '*~' libnb-resolver-java-1.2/src/org/apache/xml/resolver/tools/CatalogResolver.java libnb-resolver-java-1.2.new/src/org/apache/xml/resolver/tools/CatalogResolver.java
--- libnb-resolver-java-1.2/src/org/apache/xml/resolver/tools/CatalogResolver.java 2006-11-20 23:23:06.000000000 +0300
+++ libnb-resolver-java-1.2.new/src/org/apache/xml/resolver/tools/CatalogResolver.java 2008-07-08 16:09:14.000000000 +0400
@@ -192,33 +192,8 @@
String resolved = getResolvedEntity(publicId, systemId);
if (resolved != null) {
- try {
InputSource iSource = new InputSource(resolved);
iSource.setPublicId(publicId);
-
- // Ideally this method would not attempt to open the
- // InputStream, but there is a bug (in Xerces, at least)
- // that causes the parser to mistakenly open the wrong
- // system identifier if the returned InputSource does
- // not have a byteStream.
- //
- // It could be argued that we still shouldn't do this here,
- // but since the purpose of calling the entityResolver is
- // almost certainly to open the input stream, it seems to
- // do little harm.
- //
- URL url = new URL(resolved);
- InputStream iStream = url.openStream();
- iSource.setByteStream(iStream);
-
- return iSource;
- } catch (Exception e) {
- catalogManager.debug.message(1,
- "Failed to create InputSource ("
- + e.toString()
- + ")", resolved);
- return null;
- }
}
return null;
_______________________________________________
pkg-java-maintainers mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/pkg-java-maintainers