Skip to content
Permalink
Browse files
Ensure zero suid for java.lang.Enum
  • Loading branch information
ngmr committed May 25, 2015
1 parent 40c437d commit 4f2a5a5223c86e6829641df7f88cf700b5de63b0
Showing 1 changed file with 4 additions and 0 deletions.
@@ -74,6 +74,8 @@
public class ValueDescriptor extends TypeDescriptor {
static final Logger logger = Logger.getLogger(ValueDescriptor.class.getName());

private boolean _is_enum;

private boolean _is_externalizable;

private boolean _is_serializable;
@@ -144,6 +146,7 @@ public String getCustomRepositoryID() {
}

long getSerialVersionUID() {
if (_is_enum) return 0L;
if (_serial_version_uid_field != null) {

try {
@@ -174,6 +177,7 @@ private void init0() {
final Class<?> type = getJavaClass();
final Class<?> superClass = type.getSuperclass();

_is_enum = Enum.class.isAssignableFrom(type);
_is_rmi_stub = RMIStub.class.isAssignableFrom(type);
_is_externalizable = Externalizable.class.isAssignableFrom(type);
_is_serializable = Serializable.class.isAssignableFrom(type);

0 comments on commit 4f2a5a5

Please sign in to comment.