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

        Hide
        Craig L Russell added a comment -

        Please review this patch.

        Show
        Craig L Russell added a comment - Please review this patch.
        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();
        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.
        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.
        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.

          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