-
Enhancement
-
Resolution: Unresolved
-
P4
-
None
-
None
-
Fix Understood
Some cleanup and various improvements could be made to sun.security.x509.AlgorithmId:
- serialization does not work if any optional parameters are specified, since the fields holding the parameters are not serializable. We could try to fix this, but it may be easier to simply stop implementing Serializable. This is an internal class, and the serialization doesn't seem to be necessary or used anywhere in the JDK.
- parameters can be specified as DER-encoded parameters or AlgorithmParameters. This dichotomy causes the code to be more complex than necessary as it needs to check which type the parameters are and convert one to another depending on what methods are called. I think it might be simpler to treat this as a DER class and decouple the AlgorithmParameters part, possibly into another class.
- various other miscellaneous issues, ex: there is a block of commented out code which can probably be deleted. A good scrubbing of the code would be useful.
- serialization does not work if any optional parameters are specified, since the fields holding the parameters are not serializable. We could try to fix this, but it may be easier to simply stop implementing Serializable. This is an internal class, and the serialization doesn't seem to be necessary or used anywhere in the JDK.
- parameters can be specified as DER-encoded parameters or AlgorithmParameters. This dichotomy causes the code to be more complex than necessary as it needs to check which type the parameters are and convert one to another depending on what methods are called. I think it might be simpler to treat this as a DER class and decouple the AlgorithmParameters part, possibly into another class.
- various other miscellaneous issues, ex: there is a block of commented out code which can probably be deleted. A good scrubbing of the code would be useful.
- relates to
-
JDK-8368142 No need to embed an AlgorithmParameters in AlgorithmId
-
- Open
-