Imported GNU Classpath 0.90
Imported GNU Classpath 0.90
* scripts/makemake.tcl: Set gnu/java/awt/peer/swing to ignore.
* gnu/classpath/jdwp/VMFrame.java (SIZE): New constant.
* java/lang/VMCompiler.java: Use gnu.java.security.hash.MD5.
* java/lang/Math.java: New override file.
* java/lang/Character.java: Merged from Classpath.
(start, end): Now 'int's.
(canonicalName): New field.
(CANONICAL_NAME, NO_SPACES_NAME, CONSTANT_NAME): New constants.
(UnicodeBlock): Added argument.
(of): New overload.
(forName): New method.
Updated unicode blocks.
(sets): Updated.
* sources.am: Regenerated.
* Makefile.in: Likewise.
From-SVN: r111942
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/* DomCharacterData.java --
|
||||
Copyright (C) 1999,2000,2001,2004 Free Software Foundation, Inc.
|
||||
Copyright (C) 1999,2000,2001,2004,2006 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Classpath.
|
||||
|
||||
@@ -39,6 +39,8 @@ package gnu.xml.dom;
|
||||
|
||||
import org.w3c.dom.CharacterData;
|
||||
import org.w3c.dom.DOMException;
|
||||
import org.w3c.dom.Node;
|
||||
import org.w3c.dom.NodeList;
|
||||
import org.w3c.dom.events.MutationEvent;
|
||||
|
||||
|
||||
@@ -55,6 +57,30 @@ public abstract class DomCharacterData
|
||||
implements CharacterData
|
||||
{
|
||||
|
||||
/**
|
||||
* Empty node list representing the children of character data nodes.
|
||||
*/
|
||||
static class EmptyNodeList
|
||||
implements NodeList
|
||||
{
|
||||
|
||||
public int getLength()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public Node item(int index)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Singleton empty node list for character data nodes.
|
||||
*/
|
||||
static final NodeList CHILD_NODES = new EmptyNodeList();
|
||||
|
||||
private String text;
|
||||
|
||||
// package private
|
||||
@@ -279,6 +305,15 @@ public abstract class DomCharacterData
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an empty node list.
|
||||
* Character data nodes do not have children.
|
||||
*/
|
||||
public NodeList getChildNodes()
|
||||
{
|
||||
return CHILD_NODES;
|
||||
}
|
||||
|
||||
/**
|
||||
* The base URI for character data is <code>null</code>.
|
||||
* @since DOM Level 3 Core
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* DomDocumentBuilder.java --
|
||||
Copyright (C) 2004 Free Software Foundation, Inc.
|
||||
Copyright (C) 2004,2006 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Classpath.
|
||||
|
||||
@@ -37,9 +37,11 @@ exception statement from your version. */
|
||||
|
||||
package gnu.xml.dom;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.InputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.Reader;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import javax.xml.parsers.DocumentBuilder;
|
||||
import org.w3c.dom.Document;
|
||||
@@ -157,8 +159,18 @@ class DomDocumentBuilder
|
||||
}
|
||||
else
|
||||
{
|
||||
URL url = new URL(systemId);
|
||||
input.setByteStream(url.openStream());
|
||||
try
|
||||
{
|
||||
URL url = new URL(systemId);
|
||||
input.setByteStream(url.openStream());
|
||||
}
|
||||
catch (MalformedURLException e)
|
||||
{
|
||||
// Maybe this is a relative file URL
|
||||
File cwd = new File(System.getProperty("user.dir"));
|
||||
URL url = new URL(cwd.toURL(), systemId);
|
||||
input.setByteStream(url.openStream());
|
||||
}
|
||||
}
|
||||
}
|
||||
input.setPublicId(is.getPublicId());
|
||||
|
||||
@@ -37,6 +37,7 @@ exception statement from your version. */
|
||||
|
||||
package gnu.xml.dom;
|
||||
|
||||
import javax.xml.XMLConstants;
|
||||
import javax.xml.parsers.DocumentBuilder;
|
||||
import javax.xml.parsers.DocumentBuilderFactory;
|
||||
import javax.xml.parsers.FactoryConfigurationError;
|
||||
@@ -59,6 +60,7 @@ public class DomDocumentBuilderFactory
|
||||
|
||||
final DOMImplementation impl;
|
||||
final DOMImplementationLS ls;
|
||||
private boolean secureProcessing;
|
||||
|
||||
public DomDocumentBuilderFactory()
|
||||
{
|
||||
@@ -124,5 +126,26 @@ public class DomDocumentBuilderFactory
|
||||
// TODO
|
||||
}
|
||||
|
||||
public void setFeature(String name, boolean value)
|
||||
throws ParserConfigurationException
|
||||
{
|
||||
if (name == null)
|
||||
throw new NullPointerException();
|
||||
if (XMLConstants.FEATURE_SECURE_PROCESSING.equals(name))
|
||||
{
|
||||
secureProcessing = true;
|
||||
return;
|
||||
}
|
||||
throw new ParserConfigurationException(name);
|
||||
}
|
||||
|
||||
public boolean getFeature(String name)
|
||||
throws ParserConfigurationException
|
||||
{
|
||||
if (XMLConstants.FEATURE_SECURE_PROCESSING.equals(name))
|
||||
return secureProcessing;
|
||||
throw new ParserConfigurationException(name);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -49,6 +49,7 @@ import org.xml.sax.XMLReader;
|
||||
import org.xml.sax.SAXException;
|
||||
import org.xml.sax.SAXParseException;
|
||||
|
||||
import javax.xml.XMLConstants;
|
||||
import javax.xml.parsers.DocumentBuilder;
|
||||
import javax.xml.parsers.DocumentBuilderFactory;
|
||||
import javax.xml.parsers.ParserConfigurationException;
|
||||
@@ -70,6 +71,7 @@ public final class JAXPFactory
|
||||
private static final String FEATURE = "http://xml.org/sax/features/";
|
||||
|
||||
private SAXParserFactory pf;
|
||||
private boolean secureProcessing;
|
||||
|
||||
/**
|
||||
* Default constructor.
|
||||
@@ -138,6 +140,27 @@ public final class JAXPFactory
|
||||
throw new IllegalArgumentException(name);
|
||||
}
|
||||
|
||||
public void setFeature(String name, boolean value)
|
||||
throws ParserConfigurationException
|
||||
{
|
||||
if (name == null)
|
||||
throw new NullPointerException();
|
||||
if (XMLConstants.FEATURE_SECURE_PROCESSING.equals(name))
|
||||
{
|
||||
secureProcessing = true;
|
||||
return;
|
||||
}
|
||||
throw new ParserConfigurationException(name);
|
||||
}
|
||||
|
||||
public boolean getFeature(String name)
|
||||
throws ParserConfigurationException
|
||||
{
|
||||
if (XMLConstants.FEATURE_SECURE_PROCESSING.equals(name))
|
||||
return secureProcessing;
|
||||
throw new ParserConfigurationException(name);
|
||||
}
|
||||
|
||||
static final class JAXPBuilder
|
||||
extends DocumentBuilder
|
||||
implements ErrorHandler
|
||||
|
||||
Reference in New Issue
Block a user