[ 
https://issues.apache.org/jira/browse/DERBY-2548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12862629#action_12862629
 ] 

Knut Anders Hatlen commented on DERBY-2548:
-------------------------------------------

I don't think this NPE is supposed to be returned to the application. 
ClientBaseDataSource calls EncryptionManager's constructor just to check if it 
fails, and expects that it fails on some platforms. Since the NPE is thrown by 
the error handler in EncryptionManager, adding a null check to prevent the NPE 
will only have the effect that an am.SqlException is thrown instead, and that 
exception will also be (intentionally) swallowed by ClientBaseDataSource. The 
NPE is only thrown when the constructor is called this way, and agent is null 
because ClientBaseDataSource does not have an Agent object to use in a static 
context.

Since this issue doesn't cause any user-visible problems and there hasn't been 
any interest in fixing it since it was logged three years ago, I propose we 
close it as "Won't Fix".

> NullPointerException through client/am/EncryptionManager
> --------------------------------------------------------
>
>                 Key: DERBY-2548
>                 URL: https://issues.apache.org/jira/browse/DERBY-2548
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Client
>    Affects Versions: 10.3.1.4
>            Reporter: Myrna van Lunteren
>            Priority: Trivial
>
> Encountered a NullPointerException that doesn't make it to the enduser / 
> application while debugging test jdbcapi/DataSourceTest in one of my eclipse 
> workspaces:
> org/apache/derby/client/am/EncryptionManager; constructor:
>        public EncryptionManager(Agent agent) :
>                    throw new SqlException(agent_.logWriter_, 
>   agent_ was null....

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to