Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 146181 Details for
Bug 288241
[Upload] NPE if Upload widget is disposed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Patch
clipboard.txt (text/plain), 2.12 KB, created by
Stefan Röck
on 2009-09-01 09:00:58 EDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Stefan Röck
Created:
2009-09-01 09:00:58 EDT
Size:
2.12 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.rwt.widgets.upload >Index: src/org/eclipse/rwt/widgets/Upload.java >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/sandbox/org.eclipse.rwt.widgets.upload/src/org/eclipse/rwt/widgets/Upload.java,v >retrieving revision 1.12 >diff -u -r1.12 Upload.java >--- src/org/eclipse/rwt/widgets/Upload.java 29 Jun 2009 17:03:34 -0000 1.12 >+++ src/org/eclipse/rwt/widgets/Upload.java 1 Sep 2009 13:00:30 -0000 >@@ -230,9 +230,10 @@ > * selected a file, yet. Otherwise, a upload is triggered on the Browser side. > * This method returns, if the upload has finished. > */ >- public void performUpload() { >+ public boolean performUpload() { > checkWidget(); > >+ boolean uploadPerformed = false; > // Always check if user selected a file because otherwise the UploadWidget itself doesn't trigger a POST and therefore, the > // subsequent loop never terminates. > if (getPath() != null && !"".equals( getPath() )) { >@@ -251,6 +252,7 @@ > getDisplay().sleep(); > } > } >+ uploadPerformed = !uploadInProgresses[ 0 ]; > } finally { > uploadInProgresses[ 0 ] = false; > performUpload = false; >@@ -259,6 +261,7 @@ > } > > } >+ return uploadPerformed; > } > > public Object getAdapter( final Class adapter ) { >@@ -494,10 +497,16 @@ > /** > * After uploading has finished this method returns the uploaded file > * and all available meta data, as file name, content type, etc. >+ * @throws SWTException SWT.ERROR_WIDGET_DISPOSED if widget is disposed. > */ > public UploadItem getUploadItem() { > checkWidget(); > >+ // TODO: [sr] remove if implemented in Widget#checkWidget() >+ if (isDisposed()) { >+ SWT.error( SWT.ERROR_WIDGET_DISPOSED ); >+ } >+ > final FileUploadStorage storage = FileUploadStorage.getInstance(); > final FileUploadStorageItem uploadedFile = storage.getUploadStorageItem( getWidgetId() ); > final UploadItem uploadItem = new UploadItem( uploadedFile.getFileInputStream(),
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 288241
:
146179
| 146181