Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 313585 - FileReader should check for ECF UserCancelledException and throw an IOException with cause OperationCancelledException
Summary: FileReader should check for ECF UserCancelledException and throw an IOExcepti...
Status: CLOSED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.6 RC2   Edit
Assignee: Pascal Rapicault CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 312005
  Show dependency tree
 
Reported: 2010-05-19 13:28 EDT by David Green CLA
Modified: 2010-05-19 21:15 EDT (History)
2 users (show)

See Also:
pascal: review+


Attachments
patch to wrap UserCancelledException in an OperationCancelledException (946 bytes, patch)
2010-05-19 13:29 EDT, David Green CLA
pascal: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Green CLA 2010-05-19 13:28:26 EDT
org.eclipse.equinox.internal.p2.repository.FileReader provides an InputStream via this method:
org.eclipse.equinox.internal.p2.repository.FileReader.read(...).new InputStream() {...}.checkException()

checkException() should look at the cause and handle UserCancelledException, wrapping it in an OperationCancelledException.  Patch attached.
Comment 1 David Green CLA 2010-05-19 13:29:06 EDT
Created attachment 169158 [details]
patch to wrap UserCancelledException in an OperationCancelledException
Comment 2 Matthew Piggott CLA 2010-05-19 17:26:50 EDT
I've applied the patch, ran the test suite and looked at the callers and I don't see any problems with the changes.
Comment 3 Pascal Rapicault CLA 2010-05-19 17:44:31 EDT
I've reviewed the patch and committed it.
Comment 4 David Green CLA 2010-05-19 21:15:51 EDT
Wow, thanks for the super-fast fix!