jaxb
  1. jaxb
  2. JAXB-384

Generated code produced by wsimport issues compilation warnings

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.1.3
    • Fix Version/s: not determined
    • Component/s: xjc
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      384

      Description

      Hi,
      I am using wsimport (version 2.1.1) an thus xjc to generate client side classes
      and I get warnings in generated files.
      I use a customization file that contains the following line:
      <globalBindings generateValueClass="false">

      Using this option, I get interfaces generated and implementations.
      Here is a summary of warnings I get:

      In class ObjectFactory
      private final static Void _useJAXBProperties = null;
      The field ObjectFactory._useJAXBProperties is never read locally

      return new JAXBElement<GetList>(_GetList_QNAME, ((Class) GetListImpl.class),
      null, ((GetListImpl) value));
      Class is a raw type. References to generic type Class<T> should be parameterized
      Type safety: The expression of type Class needs unchecked conversion to conform
      to Class<GetList>

      In class JAXBContextFactory:
      return JAXBContext.newInstance(r,properties);
      Type safety: The expression of type Map needs unchecked conversion to conform
      to Map<String,?>

      Class[] r = new Class[classes.length];
      Class is a raw type. References to generic type Class<T> should be parameterized

      I get a total of 22 warnings, having an important number of warnings in code
      may confuse programmers and make them unaware of other important warnings.
      Moreover we use static code analysis tools (developed by our test and code
      quality department) that will depreciate code.

      Please see details at http://forums.java.net/jive/thread.jspa?
      threadID=28194&tstart=30

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            jaxb-issues
            Reporter:
            francklucas
          • Votes:
            2 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: