it was fixed in the old repo (jakarta)
perhaps the fix was lost while moving to the new repo?
Changelogs:
old repo
http://svn.apache.org/viewvc/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/form/Upload.java?view=log&pathrev=369066
new repo, 4.0 branch
http://svn.apache.org/viewvc/tapestry/tapestry4/branches/4.0/framework/src/java/org/apache/tapestry/form/Upload.java?view=log
new repo trunk
http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/form/Upload.java
Peter Beshai wrote:
I have a script that disables an Upload component if text is entered
into a TextField component. However, upon submitting after having
disabled the Upload component, I get a Null Pointer Exception. This
problem is identical to one previously noted on the mailing list::::
-------------------------------------------------------------------------------------------------------
In the process of migrating to Tapestry 4 (final), the Upload component
failed with a null pointer exception at line 84 in Upload.java. Top few
lines of the exception stack trace are:
---------------------------
Stack Trace:
org.apache.tapestry.form.Upload.rewindFormComponent(Upload.java:84)
org.apache.tapestry.form.AbstractFormComponent.renderComponent(AbstractFormComponent.java:115)
org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:617)
org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:434)
.....
-----------------------------
I looked through JIRA; I could not locate a report on this specific
error. Anyway, I looked at the source and noticed that the error is
caused by the "file" variable being null when no file is being uploaded.
------------------------------------
IUploadFile file = getDecoder().getFileUpload(getName());
if (HiveMind.isBlank(file.getFileName())) //exception if "file" is null
{
file = null;
}
------------------------
I added a test to check for "file" being null
if (file! = null && HiveMind.isBlank(file.getFileName()))
and the exception went away.
Regards
Sohail Aslam
sohail.aslam AT google mail dot calm
--------------------------------------------------------------------------------------
It seems that this fix was made ::
http://svn.apache.org/viewvc?view=rev&revision=369066
But when I check the latest revision ::
http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/form/Upload.java?view=markup
the fix is no longer there.
_________________________________________________________________
Achetez ce que vous voulez, quand vous voulez sur Sympatico / MSN
Magasiner
http://magasiner.sympatico.msn.ca/content/shp/?ctId=101,ptnrid=176,ptnrdata=081805
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / J2EE Consulting
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]