-
Enhancement
-
Resolution: Unresolved
-
P4
-
8, 9
-
None
package com.example;
/**
* An enumeration of characters.
*/
public enum Character {
RICK {
/**
* Returns {@code true} as Rick is a great scientist!
*
* @return {@code true}
*/
@Override
public boolean isScientist() { return true; }
},
MORTY {
/**
* Returns {@code false} as Morty is not a scientist.
*
* @return {@code false}
*/
@Override
public boolean isScientist() { return false; }
};
/**
* Tells whether the person is a scientist.
*
* @return {@code true} is the person is a scientist, {@code false}
* otherwise
*/
public abstract boolean isScientist();
}
/**
* An enumeration of characters.
*/
public enum Character {
RICK {
/**
* Returns {@code true} as Rick is a great scientist!
*
* @return {@code true}
*/
@Override
public boolean isScientist() { return true; }
},
MORTY {
/**
* Returns {@code false} as Morty is not a scientist.
*
* @return {@code false}
*/
@Override
public boolean isScientist() { return false; }
};
/**
* Tells whether the person is a scientist.
*
* @return {@code true} is the person is a scientist, {@code false}
* otherwise
*/
public abstract boolean isScientist();
}
- relates to
-
JDK-8312415 Expand -Xlint:serial checks to enum constants with specialized class bodies
-
- Resolved
-
-
JDK-8312418 Add Elements.getEnumConstantBody
-
- Resolved
-