Author: mbenson
Date: Fri Feb 26 03:55:46 2010
New Revision: 916559
URL: http://svn.apache.org/viewvc?rev=916559&view=rev
Log:
[JXPATH-127] Change dynamic classloading to consult context ClassLoader
Added:
commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/util/ClassLoaderUtil.java
(with props)
commons/proper/jxpath/trunk/src/test/org/apache/commons/jxpath/util/ClassLoaderUtilTest.java
(with props)
commons/proper/jxpath/trunk/src/test/org/apache/commons/jxpath/util/ClassLoadingExampleClass.java
(with props)
Modified:
commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/JXPathContextFactory.java
commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/JXPathIntrospector.java
commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/PackageFunctions.java
commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/JXPathContextReferenceImpl.java
commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/xml/DocumentContainer.java
Modified:
commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/JXPathContextFactory.java
URL:
http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/JXPathContextFactory.java?rev=916559&r1=916558&r2=916559&view=diff
==============================================================================
---
commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/JXPathContextFactory.java
(original)
+++
commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/JXPathContextFactory.java
Fri Feb 26 03:55:46 2010
@@ -24,6 +24,8 @@
import java.io.InputStreamReader;
import java.util.Properties;
+import org.apache.commons.jxpath.util.ClassLoaderUtil;
+
/**
* Defines a factory API that enables applications to obtain a
* {...@link JXPathContext} instance. To acquire a JXPathContext, first call
the
@@ -107,7 +109,7 @@
JXPathContextFactory factoryImpl;
try {
- Class clazz = Class.forName(factoryImplName);
+ Class clazz = ClassLoaderUtil.getClass(factoryImplName, true);
factoryImpl = (JXPathContextFactory) clazz.newInstance();
}
catch (ClassNotFoundException cnfe) {
Modified:
commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/JXPathIntrospector.java
URL:
http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/JXPathIntrospector.java?rev=916559&r1=916558&r2=916559&view=diff
==============================================================================
---
commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/JXPathIntrospector.java
(original)
+++
commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/JXPathIntrospector.java
Fri Feb 26 03:55:46 2010
@@ -20,6 +20,8 @@
import java.util.Map;
import java.util.HashMap;
+import org.apache.commons.jxpath.util.ClassLoaderUtil;
+
/**
* JXPathIntrospector maintains a registry of {...@link JXPathBeanInfo
* JXPathBeanInfo} objects for Java classes.
@@ -205,12 +207,12 @@
return cls.newInstance();
}
catch (Exception ex) { //NOPMD
- // Just drop through and try the system classloader.
+ // Just drop through and use the ClassLoaderUtil.
}
}
- // Now try the bootstrap classloader.
- Class cls = Class.forName(className);
+ // Now try the ClassLoaderUtil.
+ Class cls = ClassLoaderUtil.getClass(className);
return cls.newInstance();
}
}
Modified:
commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/PackageFunctions.java
URL:
http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/PackageFunctions.java?rev=916559&r1=916558&r2=916559&view=diff
==============================================================================
---
commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/PackageFunctions.java
(original)
+++
commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/PackageFunctions.java
Fri Feb 26 03:55:46 2010
@@ -25,6 +25,7 @@
import org.apache.commons.jxpath.functions.ConstructorFunction;
import org.apache.commons.jxpath.functions.MethodFunction;
+import org.apache.commons.jxpath.util.ClassLoaderUtil;
import org.apache.commons.jxpath.util.MethodLookupUtils;
import org.apache.commons.jxpath.util.TypeUtils;
@@ -185,7 +186,7 @@
Class functionClass;
try {
- functionClass = Class.forName(className);
+ functionClass = ClassLoaderUtil.getClass(className, true);
}
catch (ClassNotFoundException ex) {
throw new JXPathException(
Modified:
commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/JXPathContextReferenceImpl.java
URL:
http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/JXPathContextReferenceImpl.java?rev=916559&r1=916558&r2=916559&view=diff
==============================================================================
---
commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/JXPathContextReferenceImpl.java
(original)
+++
commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/JXPathContextReferenceImpl.java
Fri Feb 26 03:55:46 2010
@@ -51,6 +51,7 @@
import org.apache.commons.jxpath.ri.model.container.ContainerPointerFactory;
import org.apache.commons.jxpath.ri.model.dynamic.DynamicPointerFactory;
import org.apache.commons.jxpath.util.ReverseComparator;
+import org.apache.commons.jxpath.util.ClassLoaderUtil;
import org.apache.commons.jxpath.util.TypeUtils;
/**
@@ -811,12 +812,12 @@
String existenceCheckClassName) {
try {
try {
- Class.forName(existenceCheckClassName);
+ ClassLoaderUtil.getClass(existenceCheckClassName, true);
}
catch (ClassNotFoundException ex) {
return null;
}
- Class cls = Class.forName(className);
+ Class cls = ClassLoaderUtil.getClass(className, true);
return cls.newInstance();
}
catch (Exception ex) {
Added:
commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/util/ClassLoaderUtil.java
URL:
http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/util/ClassLoaderUtil.java?rev=916559&view=auto
==============================================================================
---
commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/util/ClassLoaderUtil.java
(added)
+++
commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/util/ClassLoaderUtil.java
Fri Feb 26 03:55:46 2010
@@ -0,0 +1,177 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.jxpath.util;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Port of class loading methods from
<code>org.apache.commons.lang.ClassUtils</code> from
+ * the Apache Commons Lang Component. Some adjustments made to remove
dependency on
+ * <code>org.apache.commons.lang.StringUtils</code>. Also modified to fall
back on the
+ * current class loader when an attempt to load a class with the context class
loader
+ * results in a <code>java.lang.ClassNotFoundException</code>.
+ *
+ * @see org.apache.commons.lang.ClassUtils
+ *
+ * @author Stephen Colebourne
+ * @author Gary Gregory
+ * @author Norm Deane
+ * @author Alban Peignier
+ * @author Tomasz Blachowicz
+ * @author John Trimble
+ */
+public class ClassLoaderUtil {
+ /**
+ * Maps a primitive class name to its corresponding abbreviation used in
array class names.
+ */
+ private static Map abbreviationMap = new HashMap();
+
+ /**
+ * Maps an abbreviation used in array class names to corresponding primitive
class name.
+ */
+ private static Map reverseAbbreviationMap = new HashMap();
+
+ /**
+ * Add primitive type abbreviation to maps of abbreviations.
+ *
+ * @param primitive Canonical name of primitive type
+ * @param abbreviation Corresponding abbreviation of primitive type
+ */
+ private static void addAbbreviation(String primitive, String abbreviation) {
+ abbreviationMap.put(primitive, abbreviation);
+ reverseAbbreviationMap.put(abbreviation, primitive);
+ }
+
+ /**
+ * Feed abbreviation maps
+ */
+ static {
+ addAbbreviation("int", "I");
+ addAbbreviation("boolean", "Z");
+ addAbbreviation("float", "F");
+ addAbbreviation("long", "J");
+ addAbbreviation("short", "S");
+ addAbbreviation("byte", "B");
+ addAbbreviation("double", "D");
+ addAbbreviation("char", "C");
+ }
+
+ // Class loading
+ // ----------------------------------------------------------------------
+ /**
+ * Returns the class represented by <code>className</code> using the
+ * <code>classLoader</code>. This implementation supports names like
+ * "<code>java.lang.String[]</code>" as well as
"<code>[Ljava.lang.String;</code>".
+ *
+ * @param classLoader the class loader to use to load the class
+ * @param className the class name
+ * @param initialize whether the class must be initialized
+ * @return the class represented by <code>className</code> using the
<code>classLoader</code>
+ * @throws ClassNotFoundException if the class is not found
+ */
+ public static Class getClass(
+ ClassLoader classLoader, String className, boolean initialize)
throws ClassNotFoundException {
+ Class clazz;
+ if (abbreviationMap.containsKey(className)) {
+ String clsName = "[" + abbreviationMap.get(className);
+ clazz = Class.forName(clsName, initialize,
classLoader).getComponentType();
+ } else {
+ clazz = Class.forName(toCanonicalName(className), initialize,
classLoader);
+ }
+ return clazz;
+ }
+
+ /**
+ * Returns the (initialized) class represented by <code>className</code>
+ * using the <code>classLoader</code>. This implementation supports names
+ * like "<code>java.lang.String[]</code>" as well as
+ * "<code>[Ljava.lang.String;</code>".
+ *
+ * @param classLoader the class loader to use to load the class
+ * @param className the class name
+ * @return the class represented by <code>className</code> using the
<code>classLoader</code>
+ * @throws ClassNotFoundException if the class is not found
+ */
+ public static Class getClass(ClassLoader classLoader, String className)
throws ClassNotFoundException {
+ return getClass(classLoader, className, true);
+ }
+
+ /**
+ * Returns the (initialized) class represented by <code>className</code>
+ * using the current thread's context class loader. This implementation
+ * supports names like "<code>java.lang.String[]</code>" as well as
+ * "<code>[Ljava.lang.String;</code>".
+ *
+ * @param className the class name
+ * @return the class represented by <code>className</code> using the current
thread's context class loader
+ * @throws ClassNotFoundException if the class is not found
+ */
+ public static Class getClass(String className) throws ClassNotFoundException
{
+ return getClass(className, true);
+ }
+
+ /**
+ * Returns the class represented by <code>className</code> using the
+ * current thread's context class loader. This implementation supports
+ * names like "<code>java.lang.String[]</code>" as well as
+ * "<code>[Ljava.lang.String;</code>".
+ *
+ * @param className the class name
+ * @param initialize whether the class must be initialized
+ * @return the class represented by <code>className</code> using the current
thread's context class loader
+ * @throws ClassNotFoundException if the class is not found
+ */
+ public static Class getClass(String className, boolean initialize) throws
ClassNotFoundException {
+ ClassLoader contextCL = Thread.currentThread().getContextClassLoader();
+ ClassLoader currentCL = ClassLoaderUtil.class.getClassLoader();
+ if( contextCL != null ) {
+ try {
+ return getClass(contextCL, className, initialize);
+ } catch( ClassNotFoundException e ) {
+ // ignore this exception and try the current class loader.
+ }
+ }
+ return getClass(currentCL, className, initialize);
+ }
+
+ /**
+ * Converts a class name to a JLS style class name.
+ *
+ * @param className the class name
+ * @return the converted name
+ */
+ private static String toCanonicalName(String className) {
+ if (className == null) {
+ throw new RuntimeException("Argument className was null.");
+ } else if (className.endsWith("[]")) {
+ StringBuffer classNameBuffer = new StringBuffer();
+ while (className.endsWith("[]")) {
+ className = className.substring(0, className.length() - 2);
+ classNameBuffer.append("[");
+ }
+ String abbreviation = (String) abbreviationMap.get(className);
+ if (abbreviation != null) {
+ classNameBuffer.append(abbreviation);
+ } else {
+ classNameBuffer.append("L").append(className).append(";");
+ }
+ className = classNameBuffer.toString();
+ }
+ return className;
+ }
+}
Propchange:
commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/util/ClassLoaderUtil.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified:
commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/xml/DocumentContainer.java
URL:
http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/xml/DocumentContainer.java?rev=916559&r1=916558&r2=916559&view=diff
==============================================================================
---
commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/xml/DocumentContainer.java
(original)
+++
commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/xml/DocumentContainer.java
Fri Feb 26 03:55:46 2010
@@ -23,6 +23,7 @@
import org.apache.commons.jxpath.Container;
import org.apache.commons.jxpath.JXPathException;
+import org.apache.commons.jxpath.util.ClassLoaderUtil;
/**
* An XML document container reads and parses XML only when it is
@@ -178,7 +179,7 @@
throw new JXPathException("Unsupported XML model: " + model);
}
try {
- Class clazz = Class.forName(className);
+ Class clazz = ClassLoaderUtil.getClass(className, true);
parser = (XMLParser) clazz.newInstance();
}
catch (Exception ex) {
Added:
commons/proper/jxpath/trunk/src/test/org/apache/commons/jxpath/util/ClassLoaderUtilTest.java
URL:
http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/test/org/apache/commons/jxpath/util/ClassLoaderUtilTest.java?rev=916559&view=auto
==============================================================================
---
commons/proper/jxpath/trunk/src/test/org/apache/commons/jxpath/util/ClassLoaderUtilTest.java
(added)
+++
commons/proper/jxpath/trunk/src/test/org/apache/commons/jxpath/util/ClassLoaderUtilTest.java
Fri Feb 26 03:55:46 2010
@@ -0,0 +1,216 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.jxpath.util;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.net.URL;
+
+import org.apache.commons.jxpath.JXPathContext;
+import org.apache.commons.jxpath.JXPathException;
+
+import junit.framework.TestCase;
+
+/**
+ * Tests org.apache.commons.jxpath.util.ClassLoaderUtil.
+ *
+ * @author John Trimble
+ */
+public class ClassLoaderUtilTest extends TestCase {
+
+ // These must be string literals, and not populated by calling getName() on
+ // the respective classes, since the tests below will load this class in a
+ // special class loader which may be unable to load those classes.
+ private static final String TEST_CASE_CLASS_NAME =
"org.apache.commons.jxpath.util.ClassLoaderUtilTest";
+ private static final String EXAMPLE_CLASS_NAME =
"org.apache.commons.jxpath.util.ClassLoadingExampleClass";
+
+ private ClassLoader orginalContextClassLoader;
+
+ /**
+ * Setup for the tests.
+ */
+ public void setUp() {
+ this.orginalContextClassLoader =
Thread.currentThread().getContextClassLoader();
+ }
+
+ /**
+ * Cleanup for the tests.
+ */
+ public void tearDown() {
+
Thread.currentThread().setContextClassLoader(this.orginalContextClassLoader);
+ }
+
+ /**
+ * Tests that JXPath cannot dynamically load a class, which is not visible to
+ * its class loader, when the context class loader is null.
+ */
+ public void testClassLoadFailWithoutContextClassLoader() {
+ Thread.currentThread().setContextClassLoader(null);
+ ClassLoader cl = new TestClassLoader(getClass().getClassLoader());
+ executeTestMethodUnderClassLoader(cl,
"callExampleMessageMethodAndAssertClassNotFoundJXPathException");
+ }
+
+ /**
+ * Tests that JXPath can dynamically load a class, which is not visible to
+ * its class loader, when the context class loader is set and can load the
+ * class.
+ */
+ public void testClassLoadSuccessWithContextClassLoader() {
+ Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
+ ClassLoader cl = new TestClassLoader(getClass().getClassLoader());
+ executeTestMethodUnderClassLoader(cl,
"callExampleMessageMethodAndAssertSuccess");
+ }
+
+ /**
+ * Tests that JXPath will use its class loader to dynamically load a
+ * requested class when the context class loader is set but unable to load
+ * the class.
+ */
+ public void testCurrentClassLoaderFallback() {
+ ClassLoader cl = new TestClassLoader(getClass().getClassLoader());
+ Thread.currentThread().setContextClassLoader(cl);
+ callExampleMessageMethodAndAssertSuccess();
+ }
+
+ /**
+ * Tests that JXPath can dynamically load a class, which is visible to
+ * its class loader, when there is no context class loader set.
+ */
+ public void testClassLoadSuccessWithoutContextClassLoader() {
+ Thread.currentThread().setContextClassLoader(null);
+ callExampleMessageMethodAndAssertSuccess();
+ }
+
+ /**
+ * Performs a basic query that requires a class be loaded dynamically by
+ * JXPath and asserts the dynamic class load fails.
+ */
+ public static void
callExampleMessageMethodAndAssertClassNotFoundJXPathException() {
+ JXPathContext context = JXPathContext.newContext(new Object());
+ try {
+ context.selectSingleNode(EXAMPLE_CLASS_NAME+".getMessage()");
+ fail("We should not be able to load "+EXAMPLE_CLASS_NAME+".");
+ } catch( Exception e ) {
+ assertTrue( e instanceof JXPathException );
+ }
+ }
+
+ /**
+ * Performs a basic query that requires a class be loaded dynamically by
+ * JXPath and asserts the dynamic class load succeeds.
+ */
+ public static void callExampleMessageMethodAndAssertSuccess() {
+ JXPathContext context = JXPathContext.newContext(new Object());
+ Object value;
+ try {
+ value = context.selectSingleNode(EXAMPLE_CLASS_NAME+".getMessage()");
+ assertEquals("an example class", value);
+ } catch( Exception e ) {
+ fail(e.getMessage());
+ }
+ }
+
+ /**
+ * Loads this class through the given class loader and then invokes the
+ * indicated no argument static method of the class.
+ *
+ * @param cl the class loader under which to invoke the method.
+ * @param methodName the name of the static no argument method on this class
+ * to invoke.
+ */
+ private void executeTestMethodUnderClassLoader(ClassLoader cl, String
methodName) {
+ Class testClass = null;
+ try {
+ testClass = cl.loadClass(TEST_CASE_CLASS_NAME);
+ } catch (ClassNotFoundException e) {
+ fail(e.getMessage());
+ }
+ Method testMethod = null;
+ try {
+ testMethod = testClass.getMethod(methodName, null);
+ } catch (SecurityException e) {
+ fail(e.getMessage());
+ } catch (NoSuchMethodException e) {
+ fail(e.getMessage());
+ }
+
+ try {
+ testMethod.invoke(null, null);
+ } catch (IllegalArgumentException e) {
+ fail(e.getMessage());
+ } catch (IllegalAccessException e) {
+ fail(e.getMessage());
+ } catch (InvocationTargetException e) {
+ if( e.getCause() instanceof RuntimeException ) {
+ // Allow the runtime exception to propagate up.
+ throw (RuntimeException) e.getCause();
+ }
+ }
+ }
+
+ /**
+ * A simple class loader which delegates all class loading to its parent
+ * with two exceptions. First, attempts to load the class
+ * <code>org.apache.commons.jxpath.util.ClassLoaderUtilTest</code> will
+ * always result in a ClassNotFoundException. Second, loading the class
+ * <code>org.apache.commons.jxpath.util.ClassLoadingExampleClass</code> will
+ * result in the class being loaded by this class loader, regardless of
+ * whether the parent can/has loaded it.
+ *
+ */
+ private static class TestClassLoader extends ClassLoader {
+ private Class testCaseClass = null;
+
+ public TestClassLoader(ClassLoader classLoader) {
+ super(classLoader);
+ }
+
+ public synchronized Class loadClass(String name, boolean resolved) throws
ClassNotFoundException {
+ if( EXAMPLE_CLASS_NAME.equals(name) ) {
+ throw new ClassNotFoundException();
+ }
+ else if( TEST_CASE_CLASS_NAME.equals(name) ) {
+ if( testCaseClass == null ) {
+ URL clazzUrl =
this.getParent().getResource("org/apache/commons/jxpath/util/ClassLoaderUtilTest.class");
+
+ ByteArrayOutputStream out = new ByteArrayOutputStream();
+ InputStream in = null;
+ try {
+ in = clazzUrl.openStream();
+ byte[] buffer = new byte[2048];
+ for( int read = in.read(buffer); read > -1; read = in.read(buffer)
) {
+ out.write(buffer, 0, read);
+ }
+ } catch( IOException e ) {
+ throw new ClassNotFoundException("Could not read class from
resource "+clazzUrl+".", e);
+ } finally {
+ try { in.close(); } catch( Exception e ) { }
+ try { out.close(); } catch( Exception e ) { }
+ }
+
+ byte[] clazzBytes = out.toByteArray();
+ this.testCaseClass = this.defineClass(TEST_CASE_CLASS_NAME,
clazzBytes, 0, clazzBytes.length);
+ }
+ return this.testCaseClass;
+ }
+ return this.getParent().loadClass(name);
+ }
+ }
+}
Propchange:
commons/proper/jxpath/trunk/src/test/org/apache/commons/jxpath/util/ClassLoaderUtilTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Added:
commons/proper/jxpath/trunk/src/test/org/apache/commons/jxpath/util/ClassLoadingExampleClass.java
URL:
http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/test/org/apache/commons/jxpath/util/ClassLoadingExampleClass.java?rev=916559&view=auto
==============================================================================
---
commons/proper/jxpath/trunk/src/test/org/apache/commons/jxpath/util/ClassLoadingExampleClass.java
(added)
+++
commons/proper/jxpath/trunk/src/test/org/apache/commons/jxpath/util/ClassLoadingExampleClass.java
Fri Feb 26 03:55:46 2010
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.jxpath.util;
+
+/**
+ * Test class for <code>org.apache.commons.jxpath.util.ClassLoaderUtilTest
+ * </code> test case.
+ *
+ * @author John Trimble
+ */
+public class ClassLoadingExampleClass {
+ public static String getMessage() { return "an example class"; }
+}
Propchange:
commons/proper/jxpath/trunk/src/test/org/apache/commons/jxpath/util/ClassLoadingExampleClass.java
------------------------------------------------------------------------------
svn:eol-style = native