This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | Introduce a method to run an action when a metadata model becomes ready | ||
---|---|---|---|
Product: | javaee | Reporter: | Andrei Badea <abadea> |
Component: | Code | Assignee: | Andrei Badea <abadea> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | CC: | apireviews, pcw |
Priority: | P2 | Keywords: | API, API_REVIEW_FAST |
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | ENHANCEMENT | Exception Reporter: | |
Bug Depends on: | |||
Bug Blocks: | 95534 | ||
Attachments: | Proposed change |
Description
Andrei Badea
2007-05-13 20:28:12 UTC
Created attachment 42348 [details]
Proposed change
Please review. The change is incompatible, but the API hasn't been released yet, all known implementors are in the NetBeans Java EE team and it is extremely unlikely the change would break anyone. I would especially like to get a review of the exception handling of the runReadActionWhenRead() method. Should it immediately rethrow exceptions in the action when executing the action synchronously (as suggested in the diff) or should it throw the exception as an ExecutionException when get() is called on the Future result? The latter is perhaps nicer for clients (doesn't need to check for a runtime exception twice -- for both runReadActionWhenRead() and Future.get()). But then if the client doesn't call Future.get() the exception will be just swallowed. But then again the exception can be swallowed anyway (when the action is run asynchronously and the client doesn't call Future.get()). And I guess the former is needed because unchecked exceptions need to pass through when the action is called synchronously. incompatible changes before release are ok. please make sure your functional contract is tested and continuous build succeeds. If there are no more comments I will commit on Tuesday. Integrated. Checking in j2ee/metadata/apichanges.xml; /cvs/j2ee/metadata/apichanges.xml,v <-- apichanges.xml new revision: 1.2; previous revision: 1.1 done Checking in j2ee/metadata/manifest.mf; /cvs/j2ee/metadata/manifest.mf,v <-- manifest.mf new revision: 1.7; previous revision: 1.6 done Checking in j2ee/metadata/src/org/netbeans/modules/j2ee/metadata/model/api/MetadataModel.java; /cvs/j2ee/metadata/src/org/netbeans/modules/j2ee/metadata/model/api/MetadataModel.java,v <-- MetadataModel.java new revision: 1.3; previous revision: 1.2 done Checking in j2ee/metadata/src/org/netbeans/modules/j2ee/metadata/model/spi/MetadataModelImplementation.java; /cvs/j2ee/metadata/src/org/netbeans/modules/j2ee/metadata/model/spi/MetadataModelImplementation.java,v <-- MetadataModelImplementation.java new revision: 1.3; previous revision: 1.2 done Checking in j2ee/metadata/test/unit/src/org/netbeans/modules/j2ee/metadata/model/api/MetadataModelCompatibilityTest.java; /cvs/j2ee/metadata/test/unit/src/org/netbeans/modules/j2ee/metadata/model/api/MetadataModelCompatibilityTest.java,v <-- MetadataModelCompatibilityTest.java new revision: 1.3; previous revision: 1.2 done Checking in j2ee/metadata/test/unit/src/org/netbeans/modules/j2ee/metadata/model/api/SimpleMetadataModelImpl.java; /cvs/j2ee/metadata/test/unit/src/org/netbeans/modules/j2ee/metadata/model/api/SimpleMetadataModelImpl.java,v <-- SimpleMetadataModelImpl.java new revision: 1.3; previous revision: 1.2 done Checking in j2ee/metadata/test/unit/src/org/netbeans/modules/j2ee/metadata/model/spi/MetadataModelFactoryTest.java; /cvs/j2ee/metadata/test/unit/src/org/netbeans/modules/j2ee/metadata/model/spi/MetadataModelFactoryTest.java,v <-- MetadataModelFactoryTest.java new revision: 1.3; previous revision: 1.2 done |