Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37793005
en ru br
Репозитории ALT
S:6.7.1-alt1_20jpp8
5.1: 6.1-alt1_5jpp6
www.altlinux.org/Changes

Группа :: Разработка/Прочее
Пакет: netbeans-resolver

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: netbeans-resolver-6.7.1-resolver.patch
Скачать


diff -Nur xml-commons-resolver-1.2/resolver.xml xml-commons-resolver-1.2.new/resolver.xml
--- xml-commons-resolver-1.2/resolver.xml	2006-11-20 15:23:08.000000000 +0300
+++ xml-commons-resolver-1.2.new/resolver.xml	2009-08-12 01:21:03.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 xml-commons-resolver-1.2/src/org/apache/xml/resolver/Catalog.java xml-commons-resolver-1.2.new/src/org/apache/xml/resolver/Catalog.java
--- xml-commons-resolver-1.2/src/org/apache/xml/resolver/Catalog.java	2006-11-20 15:23:08.000000000 +0300
+++ xml-commons-resolver-1.2.new/src/org/apache/xml/resolver/Catalog.java	2009-08-12 01:44:32.000000000 +0400
@@ -27,6 +27,7 @@
 import java.io.DataInputStream;
 
 import java.util.Enumeration;
+import java.util.Iterator;
 import java.util.Hashtable;
 import java.util.Vector;
 
@@ -1167,6 +1168,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 xml-commons-resolver-1.2/src/org/apache/xml/resolver/CatalogManager.java xml-commons-resolver-1.2.new/src/org/apache/xml/resolver/CatalogManager.java
--- xml-commons-resolver-1.2/src/org/apache/xml/resolver/CatalogManager.java	2006-11-20 15:23:08.000000000 +0300
+++ xml-commons-resolver-1.2.new/src/org/apache/xml/resolver/CatalogManager.java	2009-08-12 01:50:54.000000000 +0400
@@ -212,7 +212,11 @@
     // to avoid it.
   }
 
-  /** Constructor that specifies an explicit property file. */
+  /**
+   * Constructor that specifies an explicit property file.
+   * @param propertyFile path to poperty 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,14 +243,15 @@
    * resources from it.
    */
   private synchronized void readProperties() {
-    try {
+     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);
-	  // there's no reason to give this warning more than once
+	  debug.message(2, "Cannot find "+propertyFile);
+ 	  // there's no reason to give this warning more than once
 	  ignoreMissingProperties = true;
 	}
 	return;
diff -Nur xml-commons-resolver-1.2/src/org/apache/xml/resolver/tools/CatalogResolver.java xml-commons-resolver-1.2.new/src/org/apache/xml/resolver/tools/CatalogResolver.java
--- xml-commons-resolver-1.2/src/org/apache/xml/resolver/tools/CatalogResolver.java	2006-11-20 15:23:08.000000000 +0300
+++ xml-commons-resolver-1.2.new/src/org/apache/xml/resolver/tools/CatalogResolver.java	2009-08-12 01:53:48.000000000 +0400
@@ -192,33 +192,9 @@
     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;
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin