Created an attachment (id=25627)
source code patch
KeyResolver.registerAtStart() adds a String to KeyResolver._resolverVector.
In ResolverIterator.next(), we expect the items in _resolverVector to be KeyResolver instances and this causes a ClassCastException.
To reproduce, run this code:
KeyResolverSpi resolver = (KeyResolverSpi)KeyResolver.iterator().next();
The solution is to call new KeyResolver(className) just like KeyResolver.register().
Unfortunately, we cannot add the throws clauses. For backwards compatibility, we return an unchecked RuntimeException instead. We chose IllegalArgumentException.
We also modify ResolverIterator.remove() to throw an UnsupportedOperationException.
I did not add a junit for this bug because there is no way to remove a KeyResolver once it is registered. This would affect the subsequent tests.
|Field||Original Value||New Value|
|Affects Version/s||unspecified [ 12315949 ]|
|Component/s||Java [ 12314103 ]|
|Component/s||Encryption [ 12314099 ]|
|Status||Resolved [ 5 ]||Closed [ 6 ]|
|Workflow||jira [ 12539407 ]||Default workflow, editable Closed status [ 12565664 ]|
|Workflow||Default workflow, editable Closed status [ 12565664 ]||jira [ 12586652 ]|