JDK-8167441 : j.i.ObjectInputFilter.Status enum values order
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.io:serialization
  • Affected Version: 9
  • Priority: P2
  • Status: Resolved
  • Resolution: Duplicate
  • Submitted: 2016-10-10
  • Updated: 2016-10-26
  • Resolved: 2016-10-26
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9
9Resolved
Related Reports
Blocks :  
Duplicate :  
Relates :  
Description
Order of enum values according to the spec:
ALLOWED, REJECTED, UNDECIDED

Order of enum values that returned by values():
UNDECIDED, ALLOWED, REJECTED

Seems this is a specification problem for all enums, because their values are in alphabetic order in the API spec.

JCK checks the order of enums according to the following assertion of method values():
"Returns an array containing the constants of this enum type, in the order they are declared."

The declared order should be reflected in API spec.
Comments
I propose to close this issue as duplicate of 8167967 since for JCK test updates we have an additional issue (JCK-7307412)
26-10-2016

It might be sufficient to cross-check that the array of Status instances returned from Status.values() method have the corresponding ordinal values as the index in the array.
13-10-2016

Actually, javadoc does not provide them in declaration order. Declaration order refers to the order of the declarations in the *source* .java file. Javadoc sorts them alphabetically.
13-10-2016

Here is the spec: http://download.java.net/java/jdk9/docs/api/java/io/ObjectInputFilter.Status.html which specifies the following declaration order: Enum Constant ALLOWED REJECTED UNDECIDED
13-10-2016