1
0

Fix javadoc and fix java1.5 compile warnings.

git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@177071 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Simon Kitching
2005-05-23 01:04:54 +00:00
parent a408e51f46
commit 75c8135c03
3 changed files with 11 additions and 7 deletions

View File

@@ -729,11 +729,13 @@ public abstract class LogFactory {
try {
// Are we running on a JDK 1.2 or later system?
Method method = Thread.class.getMethod("getContextClassLoader", null);
Method method = Thread.class.getMethod("getContextClassLoader",
(Class[]) null);
// Get the thread context class loader (if there is one)
try {
classLoader = (ClassLoader)method.invoke(Thread.currentThread(), null);
classLoader = (ClassLoader)method.invoke(Thread.currentThread(),
(Object[]) null);
} catch (IllegalAccessException e) {
throw new LogConfigurationException
("Unexpected IllegalAccessException", e);
@@ -915,7 +917,7 @@ public abstract class LogFactory {
* @param factoryClass
* @param classLoader
*
* @returns either a LogFactory object or a LogConfigurationException object.
* @return either a LogFactory object or a LogConfigurationException object.
*/
protected static Object createFactory(String factoryClass, ClassLoader classLoader) {
@@ -1215,7 +1217,7 @@ public abstract class LogFactory {
* the specified object's class has overidden the toString method.
*
* @param o may be null.
* @return
* @return a string of form classname@hashcode, or "null" if param o is null.
*/
public static String objectId(Object o) {
if (o == null) {

View File

@@ -660,7 +660,7 @@ public class LogFactoryImpl extends LogFactory {
loadClass("java.util.logging.Logger");
loadClass("org.apache.commons.logging.impl.Jdk14Logger");
Class throwable = loadClass("java.lang.Throwable");
if (throwable.getDeclaredMethod("getStackTrace", null) == null) {
if (throwable.getDeclaredMethod("getStackTrace", (Class[]) null) == null) {
return (false);
}
logDiagnostic("Found Jdk14.");

View File

@@ -586,11 +586,13 @@ public class SimpleLog implements Log, Serializable {
if (classLoader == null) {
try {
// Are we running on a JDK 1.2 or later system?
Method method = Thread.class.getMethod("getContextClassLoader", null);
Method method = Thread.class.getMethod("getContextClassLoader",
(Class[]) null);
// Get the thread context class loader (if there is one)
try {
classLoader = (ClassLoader)method.invoke(Thread.currentThread(), null);
classLoader = (ClassLoader)method.invoke(Thread.currentThread(),
(Class[]) null);
} catch (IllegalAccessException e) {
; // ignore
} catch (InvocationTargetException e) {