You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Tim Ellison (JIRA)" <ji...@apache.org> on 2007/01/03 14:45:27 UTC
[jira] Resolved: (HARMONY-547) [classlib][jndi] dead code in
javax.naming.spi.DirectoryManager
[ https://issues.apache.org/jira/browse/HARMONY-547?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tim Ellison resolved HARMONY-547.
---------------------------------
Resolution: Fixed
Thanks Vasily.
Patch applied to JNDI module at repo revision r492148.
Please check that the patch was applied as you expected.
> [classlib][jndi] dead code in javax.naming.spi.DirectoryManager
> ---------------------------------------------------------------
>
> Key: HARMONY-547
> URL: https://issues.apache.org/jira/browse/HARMONY-547
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Mikhail Loenko
> Assigned To: Tim Ellison
> Attachments: Harmony-547.patch
>
>
> There are two dead blocks in DirectoryManager:
> Context nextContext = null;
> try {
> nextContext = NamingManager.getContinuationContext(cpe);
> } catch (CannotProceedException e) {
> // tolerate CannotProceedException here
> }
>
> // if it is a DirContext
> if (nextContext instanceof DirContext) {
> // return as DirContext
> return (DirContext) nextContext;
> } else if (nextContext instanceof Context) { <<<<<<<<<< always true
> // in case it's Context but not DirContext, wrap it as DirContext and return
> return new Context2DirContextWrapper(nextContext, cpe);
> } else { <<<<<<<<<<<<<< dead block
> // return a dummy DirContext, even if no context is obtained
> return new Context2DirContextWrapper(null, cpe);
> }
> and
> if (ctx instanceof Context) { <<<<<<<<< always true
> return ctx;
> }
> cpe.fillInStackTrace(); <<<<<<<<<<<<<<< dead block
> throw cpe;
> I'm not sure how to fix it. Seems like special care for null should be done
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira