Uploaded image for project: 'James Server'
  1. James Server
  2. JAMES-1561

[PATCH] JPA Entities need public constructors

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Trunk, 3.0.0-beta5
    • Fix Version/s: Trunk, 3.0.0-beta5
    • Component/s: James Core
    • Labels:
    • Environment:
      Eclipse LUNA
      Java version: 1.6.0_45, vendor: Sun Microsystems Inc.

      Description

      The JPA standard restricts JPA Entities to have a public or protected constructor, not a private one.
      See: http://docs.oracle.com/javaee/6/tutorial/doc/bnbqa.html

      The JPA entities JPADomain and JPARecipientRewrite have private constructors. Depending of the implementation of the JPA provider, this could lead to runtime errors.
      Using protected instead of private constructors should not be a problem, cause they are not used.

      I will attach a patch.

        Attachments

        1. jpa_public_constructor.patch
          2 kB
          Bernd Waibel

          Activity

            People

            • Assignee:
              eric@apache.org Eric Charles
              Reporter:
              bwaibel Bernd Waibel
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 10m
                10m
                Remaining:
                Remaining Estimate - 10m
                10m
                Logged:
                Time Spent - Not Specified
                Not Specified