Let's put that check in the right place.

This commit is contained in:
Michael Bayne
2007-04-19 21:21:49 +00:00
parent 5e7d5e9df4
commit fce254db55
@@ -140,8 +140,8 @@ public class GenRecordTask extends Task
/** Processes a resolved distributed object class instance. */ /** Processes a resolved distributed object class instance. */
protected void processRecord (File source, Class oclass) protected void processRecord (File source, Class oclass)
{ {
// make sure we extend persistent record and we're not abstract // make sure we extend persistent record
if (!_prclass.isAssignableFrom(oclass) && !Modifier.isAbstract(oclass.getModifiers())) { if (!_prclass.isAssignableFrom(oclass)) {
// System.err.println("Skipping " + oclass.getName() + "..."); // System.err.println("Skipping " + oclass.getName() + "...");
return; return;
} }
@@ -279,8 +279,8 @@ public class GenRecordTask extends Task
// generate our methods section // generate our methods section
StringBuilder msection = new StringBuilder(); StringBuilder msection = new StringBuilder();
// add a getKey() method, if applicable // add a getKey() method, if applicable (and we're not abstract)
if (kflist.size() > 0) { if (!Modifier.isAbstract(oclass.getModifiers()) && kflist.size() > 0) {
// create our velocity context // create our velocity context
VelocityContext ctx = new VelocityContext(); VelocityContext ctx = new VelocityContext();
ctx.put("record", rname); ctx.put("record", rname);