| Summary: | MultiStatus matches does not include children statuses | ||
|---|---|---|---|
| Product: | [Eclipse Project] Equinox | Reporter: | Malgorzata Janczarska <malgorzata.tomczyk> |
| Component: | Components | Assignee: | equinox.components-inbox <equinox.components-inbox> |
| Status: | RESOLVED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | john.arthorne, pwebster, remy.suen, tjwatson |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
| Bug Depends on: | |||
| Bug Blocks: | 363074 | ||
|
Description
Malgorzata Janczarska
CC'ing John for his opinion on this behavior change request. It may have made more sense to have the severity of a MultiStatus be an or'ing of all of its children statuses. Unfortunately we cannot do that since the javadoc of org.eclipse.core.runtime.IStatus.getSeverity() clearly states that only one of the status type bits is set (e.g OK, INFO, WARNING, ERROR or CANCEL) I don't think it is safe to change this. Currently the severity of a MultiStatus is the max of the severity of its children. Which means a test like MultiStatus.matches(IStatus.WARNING | IStatus.INFO) implies that no errors occurred. This is a pretty reasonable test for a client do to and I have seen this kind of code in various places. They would be broken if a MultiStatus containing an ERROR and an INFO now returns true for matches(IStatus.INFO) where it didn't before. (In reply to comment #1) > CC'ing John for his opinion on this behavior change request. It may have made > more sense to have the severity of a MultiStatus be an or'ing of all of its > children statuses. Unfortunately we cannot do that since the javadoc of > org.eclipse.core.runtime.IStatus.getSeverity() clearly states that only one of > the status type bits is set (e.g OK, INFO, WARNING, ERROR or CANCEL) Thanks John, I agree this is not a safe change. |