Attempt to get around a JDK Linux bug
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137559 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9114dac200
commit
e356710ae4
|
@ -61,19 +61,24 @@ import java.util.Map;
|
||||||
* Operator enumeration.
|
* Operator enumeration.
|
||||||
*
|
*
|
||||||
* @author Stephen Colebourne
|
* @author Stephen Colebourne
|
||||||
* @version $Id: OperationEnum.java,v 1.2 2003/05/22 22:00:06 scolebourne Exp $
|
* @version $Id: OperationEnum.java,v 1.3 2003/08/02 18:38:36 scolebourne Exp $
|
||||||
*/
|
*/
|
||||||
public abstract class OperationEnum extends Enum {
|
public abstract class OperationEnum extends Enum {
|
||||||
public static final OperationEnum PLUS = new OperationEnum("Plus") {
|
public static final OperationEnum PLUS;
|
||||||
public int eval(int a, int b) {
|
public static final OperationEnum MINUS;
|
||||||
return (a + b);
|
static {
|
||||||
}
|
// Get around JDK Linux bug
|
||||||
};
|
PLUS = new OperationEnum("Plus") {
|
||||||
public static final OperationEnum MINUS = new OperationEnum("Minus") {
|
public int eval(int a, int b) {
|
||||||
public int eval(int a, int b) {
|
return (a + b);
|
||||||
return (a - b);
|
}
|
||||||
}
|
};
|
||||||
};
|
MINUS = new OperationEnum("Minus") {
|
||||||
|
public int eval(int a, int b) {
|
||||||
|
return (a - b);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
private OperationEnum(String name) {
|
private OperationEnum(String name) {
|
||||||
super(name);
|
super(name);
|
||||||
|
|
Loading…
Reference in New Issue