Normalize array type declarations
This commit is contained in:
@@ -72,7 +72,7 @@ public class Jdk14Logger implements Log, Serializable {
|
|||||||
if (logger.isLoggable(level)) {
|
if (logger.isLoggable(level)) {
|
||||||
// Hack (?) to get the stack trace.
|
// Hack (?) to get the stack trace.
|
||||||
final Throwable dummyException = new Throwable();
|
final Throwable dummyException = new Throwable();
|
||||||
final StackTraceElement locations[] = dummyException.getStackTrace();
|
final StackTraceElement[] locations = dummyException.getStackTrace();
|
||||||
// LOGGING-132: use the provided logger name instead of the class name
|
// LOGGING-132: use the provided logger name instead of the class name
|
||||||
final String cname = name;
|
final String cname = name;
|
||||||
String method = "unknown";
|
String method = "unknown";
|
||||||
|
|||||||
@@ -209,7 +209,7 @@ public class LogFactoryImpl extends LogFactory {
|
|||||||
/**
|
/**
|
||||||
* The signature of the Constructor to be used.
|
* The signature of the Constructor to be used.
|
||||||
*/
|
*/
|
||||||
protected Class logConstructorSignature[] = { java.lang.String.class };
|
protected Class[] logConstructorSignature = { java.lang.String.class };
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The one-argument {@code setLogFactory} method of the selected
|
* The one-argument {@code setLogFactory} method of the selected
|
||||||
@@ -220,7 +220,7 @@ public class LogFactoryImpl extends LogFactory {
|
|||||||
/**
|
/**
|
||||||
* The signature of the {@code setLogFactory} method to be used.
|
* The signature of the {@code setLogFactory} method to be used.
|
||||||
*/
|
*/
|
||||||
protected Class logMethodSignature[] = { LogFactory.class };
|
protected Class[] logMethodSignature = { LogFactory.class };
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* See getBaseClassLoader and initConfiguration.
|
* See getBaseClassLoader and initConfiguration.
|
||||||
@@ -555,12 +555,12 @@ public class LogFactoryImpl extends LogFactory {
|
|||||||
instance = discoverLogImplementation(name);
|
instance = discoverLogImplementation(name);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
final Object params[] = { name };
|
final Object[] params = { name };
|
||||||
instance = (Log) logConstructor.newInstance(params);
|
instance = (Log) logConstructor.newInstance(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (logMethod != null) {
|
if (logMethod != null) {
|
||||||
final Object params[] = { this };
|
final Object[] params = { this };
|
||||||
logMethod.invoke(instance, params);
|
logMethod.invoke(instance, params);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1335,7 +1335,7 @@ public class LogFactoryImpl extends LogFactory {
|
|||||||
|
|
||||||
boolean implementsLog = false;
|
boolean implementsLog = false;
|
||||||
final String logInterfaceName = Log.class.getName();
|
final String logInterfaceName = Log.class.getName();
|
||||||
final Class interfaces[] = badClass.getInterfaces();
|
final Class[] interfaces = badClass.getInterfaces();
|
||||||
for (final Class element : interfaces) {
|
for (final Class element : interfaces) {
|
||||||
if (logInterfaceName.equals(element.getName())) {
|
if (logInterfaceName.equals(element.getName())) {
|
||||||
implementsLog = true;
|
implementsLog = true;
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ import junit.framework.TestCase;
|
|||||||
*/
|
*/
|
||||||
public class LoadTestCase extends TestCase{
|
public class LoadTestCase extends TestCase{
|
||||||
//TODO: need some way to add service provider packages
|
//TODO: need some way to add service provider packages
|
||||||
static private String LOG_PCKG[] = {"org.apache.commons.logging",
|
static private String[] LOG_PCKG = {"org.apache.commons.logging",
|
||||||
"org.apache.commons.logging.impl"};
|
"org.apache.commons.logging.impl"};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -61,7 +61,7 @@ public class LoadTestCase extends TestCase{
|
|||||||
out.write(is.read());
|
out.write(is.read());
|
||||||
}
|
}
|
||||||
|
|
||||||
final byte data[] = out.toByteArray();
|
final byte[] data = out.toByteArray();
|
||||||
|
|
||||||
result = super.defineClass(name, data, 0, data.length);
|
result = super.defineClass(name, data, 0, data.length);
|
||||||
classes.put(name, result);
|
classes.put(name, result);
|
||||||
|
|||||||
@@ -88,14 +88,14 @@ public class CustomConfigTestCase extends DefaultConfigTestCase {
|
|||||||
/**
|
/**
|
||||||
* <p>The message levels that should have been logged.</p>
|
* <p>The message levels that should have been logged.</p>
|
||||||
*/
|
*/
|
||||||
protected Level testLevels[] =
|
protected Level[] testLevels =
|
||||||
{ Level.FINE, Level.INFO, Level.WARNING, Level.SEVERE, Level.SEVERE };
|
{ Level.FINE, Level.INFO, Level.WARNING, Level.SEVERE, Level.SEVERE };
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>The message strings that should have been logged.</p>
|
* <p>The message strings that should have been logged.</p>
|
||||||
*/
|
*/
|
||||||
protected String testMessages[] =
|
protected String[] testMessages =
|
||||||
{ "debug", "info", "warn", "error", "fatal" };
|
{ "debug", "info", "warn", "error", "fatal" };
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ public class DefaultConfigTestCase extends TestCase {
|
|||||||
"org.apache.commons.logging.impl.LogFactoryImpl",
|
"org.apache.commons.logging.impl.LogFactoryImpl",
|
||||||
factory.getClass().getName());
|
factory.getClass().getName());
|
||||||
|
|
||||||
final String names[] = factory.getAttributeNames();
|
final String[] names = factory.getAttributeNames();
|
||||||
assertNotNull("Names exists", names);
|
assertNotNull("Names exists", names);
|
||||||
assertEquals("Names empty", 0, names.length);
|
assertEquals("Names empty", 0, names.length);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ public abstract class StandardTests extends TestCase {
|
|||||||
"org.apache.commons.logging.impl.LogFactoryImpl",
|
"org.apache.commons.logging.impl.LogFactoryImpl",
|
||||||
factory.getClass().getName());
|
factory.getClass().getName());
|
||||||
|
|
||||||
final String names[] = factory.getAttributeNames();
|
final String[] names = factory.getAttributeNames();
|
||||||
assertNotNull("Names exists", names);
|
assertNotNull("Names exists", names);
|
||||||
assertEquals("Names empty", 0, names.length);
|
assertEquals("Names empty", 0, names.length);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ public class StandardTestCase extends AbstractLogTest {
|
|||||||
"org.apache.commons.logging.impl.LogFactoryImpl",
|
"org.apache.commons.logging.impl.LogFactoryImpl",
|
||||||
factory.getClass().getName());
|
factory.getClass().getName());
|
||||||
|
|
||||||
final String names[] = factory.getAttributeNames();
|
final String[] names = factory.getAttributeNames();
|
||||||
assertNotNull("Names exists", names);
|
assertNotNull("Names exists", names);
|
||||||
assertEquals("Names empty", 0, names.length);
|
assertEquals("Names empty", 0, names.length);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,14 +46,14 @@ public class CustomConfigTestCase extends DefaultConfigTestCase {
|
|||||||
* <p>The message levels that should have been logged.</p>
|
* <p>The message levels that should have been logged.</p>
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
protected Level testLevels[] =
|
protected Level[] testLevels =
|
||||||
{ Level.FINE, Level.INFO, Level.WARNING, Level.SEVERE, Level.SEVERE };
|
{ Level.FINE, Level.INFO, Level.WARNING, Level.SEVERE, Level.SEVERE };
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>The message strings that should have been logged.</p>
|
* <p>The message strings that should have been logged.</p>
|
||||||
*/
|
*/
|
||||||
protected String testMessages[] =
|
protected String[] testMessages =
|
||||||
{ "debug", "info", "warn", "error", "fatal" };
|
{ "debug", "info", "warn", "error", "fatal" };
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ public class DefaultConfigTestCase extends TestCase {
|
|||||||
"org.apache.commons.logging.impl.LogFactoryImpl",
|
"org.apache.commons.logging.impl.LogFactoryImpl",
|
||||||
factory.getClass().getName());
|
factory.getClass().getName());
|
||||||
|
|
||||||
final String names[] = factory.getAttributeNames();
|
final String[] names = factory.getAttributeNames();
|
||||||
assertNotNull("Names exists", names);
|
assertNotNull("Names exists", names);
|
||||||
assertEquals("Names empty", 0, names.length);
|
assertEquals("Names empty", 0, names.length);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user