mirror of
https://github.com/corda/corda.git
synced 2025-06-12 20:28:18 +00:00
Implemented proper enum toString() behavior and an enum test. it should
work, but it fails with the current build.
This commit is contained in:
@ -35,4 +35,8 @@ public abstract class Enum<E extends Enum<E>> {
|
||||
public int ordinal() {
|
||||
return ordinal;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return name;
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,7 @@ package java.lang;
|
||||
|
||||
public class Object {
|
||||
protected Object clone() throws CloneNotSupportedException {
|
||||
if (this instanceof Cloneable) {
|
||||
if ((this instanceof Cloneable) || getClass().isArray()) {
|
||||
return clone(this);
|
||||
} else {
|
||||
throw new CloneNotSupportedException(getClass().getName());
|
||||
|
Reference in New Issue
Block a user