[ https://issues.apache.org/jira/browse/JDO-621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12732681#action_12732681 ]
Craig Russell commented on JDO-621: ----------------------------------- The oddity is this: /** * Add class(es) to the items to be enhanced. */ JDOEnhancer addClasses(String... classNames); /** * Add metadata file(s) to the items to be enhanced. */ JDOEnhancer addFiles(String... metadataFiles); /** * Add a jar file to the items to be enhanced. */ JDOEnhancer addJar(String jarFileName); The signatures for addFiles and addClasses take a String... but the addJar takes a String. Why are jar files treated differently? My suggestion is to remove addJar and addClasses and use the addFiles for any of the four types of files: .jar, .class, .jdo, or directories. Similarly, if multiple persistence units are allowed, shouldn't we have addPersistenceUnits(String... pus) instead. And as long as we're talking about serious changes, how about changing the signatures to use Iterable<String> as the parameter type instead of String or String...? The main program is using an ArrayList<String> for its holder and the implementation side is clearly going to iterate anything that is passed. > Add javax.jdo.JDOEnhancerMain to call the enhancer via standard API > ------------------------------------------------------------------- > > Key: JDO-621 > URL: https://issues.apache.org/jira/browse/JDO-621 > Project: JDO > Issue Type: New Feature > Components: api2 > Affects Versions: JDO 2 maintenance release 2 > Reporter: Craig Russell > Assignee: Craig Russell > Fix For: JDO 2 maintenance release 3 > > Attachments: jdo-621.patch > > > The proposed new class will use the standard enhancer API to enhance classes. > The command line parameters would be similar to the original proposal of > JDO-591, with changes as needed to use the new class in the TCK. > java -cp classpath {enhancer-class} [options] [jdo-files] [class-files] > where options can be > -persistenceUnit persistence-unit-name : Name of a "persistence-unit" > to enhance the classes for > -d target-dir-name : Write the enhanced classes to the specified > directory > -checkonly : Just check the classes for enhancement status > -v : verbose output -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.