[jboss-jira] [JBoss JIRA] Commented: (JBBOOT-23) URLClassLoader.close()

Andrew Lee Rubinger (JIRA) jira-events at lists.jboss.org
Thu Apr 2 15:51:22 EDT 2009


    [ https://jira.jboss.org/jira/browse/JBBOOT-23?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12460352#action_12460352 ] 

Andrew Lee Rubinger commented on JBBOOT-23:
-------------------------------------------

More appropriate is a test if assignable to Closeable, then invoke close.

> URLClassLoader.close()
> ----------------------
>
>                 Key: JBBOOT-23
>                 URL: https://jira.jboss.org/jira/browse/JBBOOT-23
>             Project: JBoss Bootstrap
>          Issue Type: Feature Request
>          Components: impl-mc
>    Affects Versions: 1.0.0-Beta-2
>            Reporter: Jesper Pedersen
>            Assignee: Andrew Lee Rubinger
>            Priority: Minor
>
> The URLClassLoader in JDK7 contain a close() method that should be called.
> This should be done through reflection as JBBOOT should support JDK5 and JDK6 also.
>         // JDK7
>          try
>          {
>             Method method = URLClassLoader.class.getDeclaredMethod("close");
>             method.invoke(classLoader);
>          }
>          catch (NoSuchMethodException nsme)
>          {
>             // Ok
>          }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list