You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2019/05/30 16:54:00 UTC

[jira] [Updated] (NETBEANS-2616) remove usage of getURL() as it's deprecated

     [ https://issues.apache.org/jira/browse/NETBEANS-2616?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

ASF GitHub Bot updated NETBEANS-2616:
-------------------------------------
    Labels: pull-request-available  (was: )

> remove usage of getURL() as it's deprecated
> -------------------------------------------
>
>                 Key: NETBEANS-2616
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-2616
>             Project: NetBeans
>          Issue Type: Improvement
>            Reporter: Brad Walker
>            Priority: Major
>              Labels: pull-request-available
>
> I've started trying to help the NetBeans community by making some improvements that reduce build cruft.
> In particular, we are using getURL() and it's deprecated. Over ~ 160 deprecated messages are flagged as a result of it's usage..
> {quote}   [repeat] /home/bwalker/netbeans-11.0/enterprise/websvc.core/src/org/netbeans/modules/websvc/core/jaxws/saas/RestResourceGenerator.java:130: warning: [deprecation] getURL() in FileObject has been deprecated
>    [repeat]                     WsdlModeler wsdlModeler = WsdlModelerFactory.getDefault().getWsdlModeler(localWsdl.getURL());
>    [repeat] 
> {quote}
> In looking at getURL() in FileObject.java it says to use toURL(). So that's what I did..
> Once I made this change, I also had to cleanup a bunch of try-catch errors..
> {quote}   [repeat] /home/bwalker/netbeans-11.0/enterprise/websvc.core/src/org/netbeans/modules/websvc/core/jaxws/nodes/JaxWsClientNode.java:451: error: exception FileStateInvalidException is never thrown in body of corresponding try statement
>    [repeat]             } catch (FileStateInvalidException ex) {
>    [repeat]               ^
>    [repeat] /home/bwalker/netbeans-11.0/enterprise/websvc.core/src/org/netbeans/modules/websvc/core/jaxws/nodes/JaxWsClientNode.java:495: error: exception FileStateInvalidException is never thrown in body of corresponding try statement
>    [repeat]                 } catch (FileStateInvalidException ex) {
>    [repeat]
> {quote}
> This is becuase getURL() throws FileStateInvalidException exception but toURL() does not.
>  
>  
>  
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists