Merge branch 'master' of ssh://git.eclipse.org/gitroot/jetty/org.eclipse.jetty.project

This commit is contained in:
Greg Wilkins 2011-07-15 15:22:51 +10:00
commit 6349100c9d
3 changed files with 27 additions and 6 deletions

View File

@ -3,6 +3,7 @@ jetty-7.5.0-SNAPSHOT
+ 351516 Refactored sessions to better support nosql session managers
+ 351576 Do not use deprecated method File.toURL()
+ 352046 Need try/catch around features set in XmlParser
+ 352176 xml parsing on startElement should be more flexible on using qName or localName
jetty-7.4.4.v20110707 July 7th 2011
+ 308851 Converted all jetty-client module tests to JUnit 4

View File

@ -16,6 +16,7 @@ import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.net.URL;
import java.net.URLConnection;
import java.util.List;
import org.eclipse.jetty.osgi.boot.utils.BundleClassLoaderHelper;
import org.osgi.framework.Bundle;
@ -145,8 +146,21 @@ public class DefaultBundleClassLoaderHelper implements BundleClassLoaderHelper
"m_modules");
Felix_BundleImpl_m_modules_field.setAccessible(true);
}
Object[] moduleArray = (Object[])Felix_BundleImpl_m_modules_field.get(bundle);
Object currentModuleImpl = moduleArray[moduleArray.length - 1];
// Figure out which version of the modules is exported
Object currentModuleImpl;
try
{
Object[] moduleArray = (Object[])Felix_BundleImpl_m_modules_field.get(bundle);
currentModuleImpl = moduleArray[moduleArray.length - 1];
}
catch (Throwable t2)
{
@SuppressWarnings("unchecked")
List<Object> moduleArray = (List<Object>)Felix_BundleImpl_m_modules_field.get(bundle);
currentModuleImpl = moduleArray.get(moduleArray.size() - 1);
}
if (Felix_ModuleImpl_m_classLoader_field == null && currentModuleImpl != null)
{
Felix_ModuleImpl_m_classLoader_field = bundle.getClass().getClassLoader().loadClass("org.apache.felix.framework.ModuleImpl").getDeclaredField(

View File

@ -70,7 +70,6 @@ public class XmlParser
boolean validating_dft = factory.getClass().toString().startsWith("org.apache.xerces.");
String validating_prop = System.getProperty("org.eclipse.jetty.xml.XmlParser.Validating", validating_dft ? "true" : "false");
boolean validating = Boolean.valueOf(validating_prop).booleanValue();
setValidating(validating);
}
@ -110,11 +109,12 @@ public class XmlParser
_parser.getXMLReader().setFeature("http://xml.org/sax/features/namespace-prefixes", false);
try
{
_parser.getXMLReader().setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", validating);
if (validating)
_parser.getXMLReader().setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", validating);
}
catch (Exception e)
{
Log.warn(Log.EXCEPTION, e);
Log.warn(e.getMessage());
}
}
catch (Exception e)
@ -296,7 +296,13 @@ public class XmlParser
/* ------------------------------------------------------------ */
public void startElement(String uri, String localName, String qName, Attributes attrs) throws SAXException
{
String name = (uri == null || uri.equals("")) ? qName : localName;
String name = null;
if (_parser.isNamespaceAware())
name = localName;
if (name == null || "".equals(name))
name = qName;
Node node = new Node(_context, name, attrs);