On Jun 1, 2010, at 10:29 PM, Shawn Jiang wrote: > Hi dev, > > Can anyone help look at the patch ? It's a blocker for geronimo 2.2.1 > release. Thanks in advance ! > > ---------- Forwarded message ---------- > From: Shawn Jiang (JIRA) <[email protected]> > Date: Tue, Jun 1, 2010 at 5:28 PM > Subject: [jira] Updated: (OPENEJB-1287) java.lang.NullPointerException: > null: null at > org.apache.openejb.assembler.classic.Assembler.createApplication > To: [email protected] > > > > [ > https://issues.apache.org/jira/browse/OPENEJB-1287?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel] > > Shawn Jiang updated OPENEJB-1287: > --------------------------------- > > Attachment: OPENEJB-1287.patch > > I can see following code > > if (accessTimeout.getUnit() == null) > accessTimeout.setUnit(TimeUnit.MILLISECONDS); > > in StatelessInstanceManager. Why not to make null unit fall back to > MILLISECONDS by default in Duration ?
Hi Shawn! The hard part about setting the default in the Duration class itself is that some usages of it default to different time units. The StatefulTimeout defaults to MINUTES for example. Looks like we missed setting the default for IdleTimeout, MaxAge and PollInterval. I went ahead and added that for all of them and checked it in. Thanks for the reminder! -David
