castor
  1. castor
  2. CASTOR-2294

Remove useless import statements

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.1.2
    • Fix Version/s: 1.3 rc1
    • Component/s: XML code generator
    • Labels:
      None
    • Environment:
      Operating System: All
      Platform: All
    • Bugzilla Id:
      1340
    • Number of attachments :
      2

      Description

      On generated classes by sourceGen using the 'type' method, some (apparently)
      useless import statements are included since almost every used class is fully
      qualified.

      The useless imports are:
      + on XYZ.java:

      • import java.io.IOException;
      • import java.io.Reader;
      • import java.io.Serializable;
      • import java.io.Writer;
      • import java.util.Date;
      • import org.exolab.castor.xml.MarshalException;
      • import org.exolab.castor.xml.ValidationException;
      • import org.xml.sax.ContentHandler;
        + on XYZDescriptor.java:
      • import org.exolab.castor.mapping.AccessMode;
      • import org.exolab.castor.xml.TypeValidator;
      • import org.exolab.castor.xml.XMLFieldDescriptor;

      Castor-XML could either avoid fully qualifying the classes used on the generated
      source (may it's not possible if it's using reflection compulsively but would
      certainly improve readibility of reverse engineered UML diagrams...), or stop
      declaring the useless imports.

      Anyway, it would be very nice to get rid of the warning messages of the Eclipse IDE.

      1. PABL.xsd
        1 kB
        John Gollan
      2. PARequestTypes.xsd
        8 kB
        John Gollan

        Issue Links

          Activity

            People

            • Assignee:
              Werner Guttmann
              Reporter:
              John Gollan
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1 hour
                1h
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour
                1h