Uploaded image for project: 'Cayenne'
  1. Cayenne
  2. CAY-1622

Generated classes shouldn't produce serialVersionUID compiler warning (ROP super only)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Reopened
    • Minor
    • Resolution: Unresolved
    • 3.0
    • None
    • Core Library
    • None

    Description

      It is probably a good idea for Cayenne not to produce any compiler warnings, but auto-generated entity classes always have the "The serializable class _Foo does not declare a static final serialVersionUID field of type long" compiler warning.

      The @SuppressWarnings("serial") annotation will get rid of the warnings, but of course it is not recommended to manually update the generated classes.

      Users could configure the IDE to ignore these warnings (yuk), but then other team members will still see them.

      Another option is to for users to set up a custom velocity template to include this annotation.

      But the best solution would be for Cayenne to either automatically generate either the serialVersionUID itself or the @SuppressWarnings("serial") annotation that suppresses the compiler warning.

      Attachments

        1. serial-version-uid.patch
          6 kB
          Dzmitry Kazimirchyk

        Issue Links

          Activity

            People

              Unassigned Unassigned
              bobharner Bob Harner
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: