Heh... ironically, a minute or so after I replied, that thought occurred to me, but I got pulled away and didn't get a chance to go back and look. You are of course right.
I suppose the simplest answer is just make copy() non-static. Otherwise, assuming MyDownloadAction is the extended version of DownloadAction, it's: byte[] buffer = new byte[new MyDownloadAction().getBufferSize()]; ... but that strikes me as ugly. -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Thu, January 6, 2005 11:41 am, Lane, Brad said: > You can't use getBufferSize() in the copy() method because copy() is > static > and getBufferSize() is not. > > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Thursday, January 06, 2005 9:17 AM > To: [email protected] > Subject: RE: Bug in DownloadAction? > > I agree. Line 138 should read: > > byte[] buffer = new byte[getBufferSize()]; > > (Actually, that looks a bit bizarre... can you use a method call to > specify > an array size? Yes, I just tried a test app, seems you can.) > > -- > Frank W. Zammetti > Founder and Chief Software Architect > Omnytex Technologies > http://www.omnytex.com > > On Thu, January 6, 2005 9:27 am, Lane, Brad said: >> Can someone else please verify this? I don't want to file a bug >> without it. >> >> -----Original Message----- >> From: Lane, Brad [mailto:[EMAIL PROTECTED] >> Sent: Wednesday, January 05, 2005 3:32 PM >> To: ([email protected]) >> Subject: Bug in DownloadAction? >> >> I believe there's a bug in org.apache.struts.actions.DownloadAction. >> Overriding getBufferSize() doesn't have any effect since the byte >> array is created with the static field DEFAULT_BUFFER_SIZE. >> >> >> Thanks, >> Brad >> >> Brad Lane >> Software Developer >> Pearson Educational Measurement >> eMeasurement(tm) Services >> http://www.pearsonedmeasurement.com/emeasurement/ >> Ph: (641) 844-0316 >> Fx: (641) 754-6580 >> >> >> ********************************************************************** >> ****** This email may contain confidential material. >> If you were not an intended recipient, Please notify the sender and >> delete all copies. >> We may monitor email to and from our network. >> ********************************************************************** >> ****** >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] For >> additional commands, e-mail: [EMAIL PROTECTED] >> >> ********************************************************************** >> ****** This email may contain confidential material. >> If you were not an intended recipient, Please notify the sender and >> delete all copies. >> We may monitor email to and from our network. >> ********************************************************************** >> ****** >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] For >> additional commands, e-mail: [EMAIL PROTECTED] >> >> > > > **************************************************************************** > This email may contain confidential material. > If you were not an intended recipient, > Please notify the sender and delete all copies. > We may monitor email to and from our network. > **************************************************************************** > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
