[
https://issues.apache.org/jira/browse/DIRAPI-348?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Emmanuel Lécharny resolved DIRAPI-348.
--------------------------------------
Fix Version/s: 2.1.1
(was: 3.0.0)
Resolution: Fixed
We now check that the Control factory returns a Null value, and don't generate
anymore a NPE, but instead create an {{OpaqueControl}} instance containing the
{{byte[]}}, up to the user to deal with the unknown control:
{code}
ControlFactory<?> factory = container.getControlFactory();
if ( factory == null )
{
// We don't know about this control, so it's an opaque control
( ( OpaqueControl ) control ).setEncodedValue( value.getData()
);
}
{code}
> NPE when Api decodes bind response from OpenDJ server 6.0
> ---------------------------------------------------------
>
> Key: DIRAPI-348
> URL: https://issues.apache.org/jira/browse/DIRAPI-348
> Project: Directory Client API
> Issue Type: Bug
> Affects Versions: 2.0.0.AM3
> Reporter: Jan Zelmer
> Priority: Minor
> Fix For: 2.1.1
>
> Attachments: ApacheLdapConnectionPool.java,
> PasswordExpiredResponse.java, PasswordExpiredResponseFactory.java,
> PasswordExpiredResponseImpl.java, stacktrace-illegal-pool.txt, stacktrace.txt
>
>
> User can use our application to reset the password, even if they do not know
> their old ones.
> In the first step, the application resets the password and uses the temporary
> password for the bind request with the intention to change the password.
> During the decoding of the response, there is a control sent back, for which
> there is no factory defined, and a NullPointerException is thrown.
> This is the control in question:
> controlType: 2.16.840.1.113730.3.4.4, controlValue: an octet string: "0",
> criticality: false
>
> Attached is the stacktrace, and implementation ideas for a new control
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]