JDO
  1. JDO
  2. JDO-444

Add public constructor for JDOHelper

    Details

      Description

      In Chapter 8, add after class JDOHelper {public JDOHelper(); For some usage patterns, an instance of JDOHelper on which to invoke methods is preferable to the use of static methods. For this purpose, a public constructor is provided.

      1. JDOHelper-patch.txt
        4 kB
        Craig L Russell

        Activity

        Michelle Caisse created issue -
        Hide
        Craig L Russell added a comment -

        Please review this patch.

        Show
        Craig L Russell added a comment - Please review this patch.
        Craig L Russell made changes -
        Field Original Value New Value
        Attachment JDOHelper-constructor.patch [ 12346827 ]
        Craig L Russell made changes -
        Fix Version/s JDO 2 maintenance release 1 [ 12310923 ]
        Hide
        Craig L Russell added a comment -

        Here is the spec update for review.

        package javax.jdo;
        class JDOHelper {
        /* Some applications might prefer to use an instance

        • method instead of static methods.
          */
          public JDOHelper();
        Show
        Craig L Russell added a comment - Here is the spec update for review. package javax.jdo; class JDOHelper { /* Some applications might prefer to use an instance method instead of static methods. */ public JDOHelper();
        Craig L Russell made changes -
        Component/s specification [ 12311332 ]
        Hide
        Craig L Russell added a comment -

        Add to the specification text:

        The instance returned by the constructor is thread safe. It can be used from any number of threads without concern for synchronization.

        Show
        Craig L Russell added a comment - Add to the specification text: The instance returned by the constructor is thread safe. It can be used from any number of threads without concern for synchronization.
        Hide
        Michael Bouschen added a comment -

        The patch and the spec updates look good. Just one comment: above you added the javadoc for the spec update. I propose to use the same javadoc in the implementation in api2 and api2-legacy.

        Show
        Michael Bouschen added a comment - The patch and the spec updates look good. Just one comment: above you added the javadoc for the spec update. I propose to use the same javadoc in the implementation in api2 and api2-legacy.
        Hide
        Craig L Russell added a comment -

        Please review this patch. I've incorporated the getInstance change and added Javadoc.

        Show
        Craig L Russell added a comment - Please review this patch. I've incorporated the getInstance change and added Javadoc.
        Craig L Russell made changes -
        Attachment JDOHelper.diff [ 12347453 ]
        Craig L Russell made changes -
        Attachment JDOHelper-constructor.patch [ 12346827 ]
        Hide
        Michael Bouschen added a comment -

        The patch JDOHelper.diff looks good!

        Just one comment: how about adding a comment to the test methods testConstructor and testGetInstance saying that the purpose of the test is calling the JDOHelper methods on the instance and making sure they do not throw an exception.

        Show
        Michael Bouschen added a comment - The patch JDOHelper.diff looks good! Just one comment: how about adding a comment to the test methods testConstructor and testGetInstance saying that the purpose of the test is calling the JDOHelper methods on the instance and making sure they do not throw an exception.
        Hide
        Craig L Russell added a comment -

        Thanks for the review.

        I've added javadoc and @since 2.1 to the two classes. I think it's done.

        Show
        Craig L Russell added a comment - Thanks for the review. I've added javadoc and @since 2.1 to the two classes. I think it's done.
        Craig L Russell made changes -
        Attachment JDOHelper-patch.txt [ 12347512 ]
        Craig L Russell made changes -
        Attachment JDOHelper.diff [ 12347453 ]
        Hide
        Michael Bouschen added a comment -

        Looks good!

        Show
        Michael Bouschen added a comment - Looks good!
        Hide
        Craig L Russell added a comment -

        svn commit -m "JDO-444 Added public constructor and getInstance method to JDOHelper" api20/src/java/javax/jdo/JDOHelper.java
        Sending api20/src/java/javax/jdo/JDOHelper.java
        Transmitting file data .
        Committed revision 509807.

        Show
        Craig L Russell added a comment - svn commit -m " JDO-444 Added public constructor and getInstance method to JDOHelper" api20/src/java/javax/jdo/JDOHelper.java Sending api20/src/java/javax/jdo/JDOHelper.java Transmitting file data . Committed revision 509807.
        Craig L Russell made changes -
        Resolution Fixed [ 1 ]
        Status Open [ 1 ] Resolved [ 5 ]
        Andy Jefferson made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        74d 3h 1 Craig L Russell 20/Feb/07 23:33
        Resolved Resolved Closed Closed
        1209d 11h 36m 1 Andy Jefferson 14/Jun/10 12:09

          People

          • Assignee:
            Craig L Russell
            Reporter:
            Michelle Caisse
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development