Andrew Gibb created CXF-9060:
--------------------------------
Summary: WSDL2Java Service generation results in 'unused import'
warnings
Key: CXF-9060
URL: https://issues.apache.org/jira/browse/CXF-9060
Project: CXF
Issue Type: Bug
Affects Versions: 4.0.5
Reporter: Andrew Gibb
After the fix for CXF-9011 there are now "unused import" warnings for
{{java.net.URI}} in some generated Services. This is because the
{{URI.create(...).toUrl()}} is only used in some scenarios.
There is already a conditional check in the {{service.vm}} template around the
import for {{java.net.MalformedURLException}} which is used in the same
scenario when creating the URL so I believe the import for {{java.net.URI}}
belongs in there as well.
I have tested the conditional import and will submit a pull request
--
This message was sent by Atlassian Jira
(v8.20.10#820010)