Removed JDK 1.4 dependent code.
PR# 32538. git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141513 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ab2028cdfc
commit
6e57f9a1ba
|
@ -20,7 +20,7 @@ package org.apache.commons.math.linear;
|
|||
* Thrown when a system attempts an operation on a matrix, and
|
||||
* that matrix does not satisfy the preconditions for the
|
||||
* aforementioned operation.
|
||||
* @version $Revision: 1.7 $ $Date: 2004/07/11 18:43:44 $
|
||||
* @version $Revision: 1.8 $ $Date: 2004/12/06 05:49:44 $
|
||||
*/
|
||||
public class InvalidMatrixException extends RuntimeException {
|
||||
|
||||
|
@ -31,7 +31,7 @@ public class InvalidMatrixException extends RuntimeException {
|
|||
* Default constructor.
|
||||
*/
|
||||
public InvalidMatrixException() {
|
||||
this(null, null);
|
||||
this(null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -39,23 +39,7 @@ public class InvalidMatrixException extends RuntimeException {
|
|||
* @param message descriptive error message.
|
||||
*/
|
||||
public InvalidMatrixException(String message) {
|
||||
this(message, null);
|
||||
super(message);
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct an exception with the given message and root cause.
|
||||
* @param message descriptive error message.
|
||||
* @param cause root cause.
|
||||
*/
|
||||
public InvalidMatrixException(String message, Throwable cause) {
|
||||
super(message, cause);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an exception with a given root cause.
|
||||
* @param throwable caught exception causing this problem
|
||||
*/
|
||||
public InvalidMatrixException(Throwable throwable) {
|
||||
this(null, throwable);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ package org.apache.commons.math.linear;
|
|||
/**
|
||||
* Thrown when an operation addresses a matrix coordinate (row,col)
|
||||
* which is outside of the dimensions of a matrix.
|
||||
* @version $Revision: 1.7 $ $Date: 2004/07/11 18:43:44 $
|
||||
* @version $Revision: 1.8 $ $Date: 2004/12/06 05:49:44 $
|
||||
*/
|
||||
public class MatrixIndexException extends RuntimeException {
|
||||
|
||||
|
@ -30,31 +30,15 @@ public class MatrixIndexException extends RuntimeException {
|
|||
* Default constructor.
|
||||
*/
|
||||
public MatrixIndexException() {
|
||||
this(null, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct an exception with the given message.
|
||||
* @param message descriptive error message.
|
||||
*/
|
||||
public MatrixIndexException(String message) {
|
||||
this(message, null);
|
||||
this(null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct an exception with the given message and root cause.
|
||||
* @param message descriptive error message.
|
||||
* @param cause root cause.
|
||||
*/
|
||||
public MatrixIndexException(String message, Throwable cause) {
|
||||
super(message, cause);
|
||||
public MatrixIndexException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an exception with a given root cause.
|
||||
* @param throwable caught exception causing this problem
|
||||
*/
|
||||
public MatrixIndexException(Throwable throwable) {
|
||||
this(null, throwable);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ package org.apache.commons.math.linear;
|
|||
import junit.framework.TestCase;
|
||||
|
||||
/**
|
||||
* @version $Revision: 1.1 $ $Date: 2004/04/27 16:51:52 $
|
||||
* @version $Revision: 1.2 $ $Date: 2004/12/06 05:49:44 $
|
||||
*/
|
||||
public class InvalidMatrixExceptionTest extends TestCase {
|
||||
/**
|
||||
|
@ -27,7 +27,6 @@ public class InvalidMatrixExceptionTest extends TestCase {
|
|||
*/
|
||||
public void testConstructor(){
|
||||
InvalidMatrixException ex = new InvalidMatrixException();
|
||||
assertNull(ex.getCause());
|
||||
assertNull(ex.getMessage());
|
||||
}
|
||||
|
||||
|
@ -37,29 +36,6 @@ public class InvalidMatrixExceptionTest extends TestCase {
|
|||
public void testConstructorMessage(){
|
||||
String msg = "message";
|
||||
InvalidMatrixException ex = new InvalidMatrixException(msg);
|
||||
assertNull(ex.getCause());
|
||||
assertEquals(msg, ex.getMessage());
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public void testConstructorMessageCause(){
|
||||
String outMsg = "outer message";
|
||||
String inMsg = "inner message";
|
||||
Exception cause = new Exception(inMsg);
|
||||
InvalidMatrixException ex = new InvalidMatrixException(outMsg, cause);
|
||||
assertEquals(outMsg, ex.getMessage());
|
||||
assertEquals(cause, ex.getCause());
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public void testConstructorCause(){
|
||||
String inMsg = "inner message";
|
||||
Exception cause = new Exception(inMsg);
|
||||
InvalidMatrixException ex = new InvalidMatrixException(cause);
|
||||
assertEquals(cause, ex.getCause());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ package org.apache.commons.math.linear;
|
|||
import junit.framework.TestCase;
|
||||
|
||||
/**
|
||||
* @version $Revision: 1.1 $ $Date: 2004/04/27 16:51:52 $
|
||||
* @version $Revision: 1.2 $ $Date: 2004/12/06 05:49:44 $
|
||||
*/
|
||||
public class MatrixIndexExceptionTest extends TestCase {
|
||||
/**
|
||||
|
@ -27,7 +27,6 @@ public class MatrixIndexExceptionTest extends TestCase {
|
|||
*/
|
||||
public void testConstructor(){
|
||||
MatrixIndexException ex = new MatrixIndexException();
|
||||
assertNull(ex.getCause());
|
||||
assertNull(ex.getMessage());
|
||||
}
|
||||
|
||||
|
@ -37,29 +36,6 @@ public class MatrixIndexExceptionTest extends TestCase {
|
|||
public void testConstructorMessage(){
|
||||
String msg = "message";
|
||||
MatrixIndexException ex = new MatrixIndexException(msg);
|
||||
assertNull(ex.getCause());
|
||||
assertEquals(msg, ex.getMessage());
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public void testConstructorMessageCause(){
|
||||
String outMsg = "outer message";
|
||||
String inMsg = "inner message";
|
||||
Exception cause = new Exception(inMsg);
|
||||
MatrixIndexException ex = new MatrixIndexException(outMsg, cause);
|
||||
assertEquals(outMsg, ex.getMessage());
|
||||
assertEquals(cause, ex.getCause());
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public void testConstructorCause(){
|
||||
String inMsg = "inner message";
|
||||
Exception cause = new Exception(inMsg);
|
||||
MatrixIndexException ex = new MatrixIndexException(cause);
|
||||
assertEquals(cause, ex.getCause());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,10 +16,10 @@
|
|||
|
||||
package org.apache.commons.math.stat.data;
|
||||
|
||||
import java.beans.Expression;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.lang.reflect.Method;
|
||||
import java.net.URL;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
|
@ -32,7 +32,7 @@ import org.apache.commons.math.stat.descriptive.SummaryStatistics;
|
|||
import junit.framework.TestCase;
|
||||
|
||||
/**
|
||||
* @version $Revision: 1.7 $ $Date: 2004/10/08 05:08:19 $
|
||||
* @version $Revision: 1.8 $ $Date: 2004/12/06 05:49:44 $
|
||||
*/
|
||||
public abstract class CertifiedDataAbstractTest extends TestCase {
|
||||
|
||||
|
@ -134,9 +134,8 @@ public abstract class CertifiedDataAbstractTest extends TestCase {
|
|||
|
||||
protected Object getProperty(Object bean, String name) throws Exception{
|
||||
// Get the value of prop
|
||||
String prop = "get" + name.substring(0,1).toUpperCase() + name.substring(1);
|
||||
Expression expr = new Expression(bean, prop, new Object[0]);
|
||||
expr.execute();
|
||||
return expr.getValue();
|
||||
String prop = "get" + name.substring(0,1).toUpperCase() + name.substring(1);
|
||||
Method meth = bean.getClass().getMethod(prop, new Class[0]);
|
||||
return meth.invoke(bean, new Object[0]);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue