hi bruno. first off let me say that we really appreciate the patches...
but :) i would like to make a couple of small comments: it would be nice if you used the same formatting settings as us. your patches contain 90% noise which makes them hard to read. try to use simpler names. "normalizeFilename" doesnt really say much. what is normalize mean. and this is the most important one, do not prematurely optimize and know when to optimize. this method is called extremely rarely so the requirement of maintaining the array ordered vs the speed improvement doesnt make sense - too much of a maintenance headache, easy to make a mistake, etc. further, in this particular case, a binary search is slower then a linear search by, i would venture, about 5x. thanks, -igor On Tue, Nov 11, 2008 at 11:03 AM, <[EMAIL PROTECTED]> wrote: > JIRA issue created - *with patch included* > > https://issues.apache.org/jira/browse/WICKET-1930 > > cheers, > Bruno > > On Nov 11, 2008 4:11pm, Igor Vaynberg <[EMAIL PROTECTED]> wrote: >> >> please open a jira issue. >> >> >> >> -igor >> >> >> >> On Tue, Nov 11, 2008 at 1:59 AM, Lauri Piispanen - Conmio Ltd >> >> wrote: >> >> > Hi all, >> >> > >> >> > I seem to be having a small portability glitch with >> >> > FileUpload.writeToTempFile(). Looking at the source code it seems to be >> >> > using item.getFieldName(), which on my page translates to >> >> > "filefields:1:upload". Windows doesn't really like colons, which gives > > me >> >> > the following stacktrace: >> >> > >> >> > ...snip until root cause... >> >> > >> >> > Caused by: java.io.IOException: The parameter is incorrect >> >> > at java.io.WinNTFileSystem.createFileExclusively(Native Method) >> >> > at java.io.File.checkAndCreate(File.java:1704) >> >> > at java.io.File.createTempFile(File.java:1793) >> >> > at java.io.File.createTempFile(File.java:1830) >> >> > at >> >> > > > org.apache.wicket.markup.html.form.upload.FileUpload.writeToTempFile(FileUpload.java:189) >> >> > >> >> > ...snip... >> >> > >> >> > On mac & linux this works just fine. I know that more elegant way would > > be >> >> > using the InputStream, but having a file is much more useful for reading >> >> > image dimensions and file length etc. than juggling things in memory. >> >> > >> >> > Sincerely, >> >> > >> >> > -- >> >> > Lauri Piispanen >> >> > Senior Product Architect >> >> > Conmio Ltd >> >> > >> >> > >> >> > --------------------------------------------------------------------- >> >> > 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] >> >> >> > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]