Issue Details (XML | Word | Printable)

Key: JDO-444
Type: New Feature New Feature
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Craig Russell
Reporter: Michelle Caisse
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
JDO

Add public constructor for JDOHelper

Created: 08/Dec/06 08:32 PM   Updated: 20/Feb/07 11:33 PM
Return to search
Component/s: api2, api2-legacy, specification
Affects Version/s: None
Fix Version/s: JDO 2 maintenance release 1

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works JDOHelper-patch.txt 2006-12-19 07:21 PM Craig Russell 4 kB

Resolution Date: 20/Feb/07 11:33 PM


 Description  « Hide
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.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Craig Russell added a comment - 09/Dec/06 03:43 AM
Please review this patch.

Craig Russell added a comment - 09/Dec/06 11:58 PM
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 Russell added a comment - 11/Dec/06 05:39 PM
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.

Michael Bouschen added a comment - 11/Dec/06 06:30 PM
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.

Craig Russell added a comment - 19/Dec/06 12:44 AM
Please review this patch. I've incorporated the getInstance change and added Javadoc.

Michael Bouschen added a comment - 19/Dec/06 06:19 PM
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.

Craig Russell added a comment - 19/Dec/06 07:21 PM
Thanks for the review.

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

Michael Bouschen added a comment - 19/Dec/06 08:09 PM
Looks good!

Craig Russell added a comment - 20/Feb/07 11:33 PM
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.