Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 326534 - [library] Gratuitous network traffic to not-initialize standard libary
Summary: [library] Gratuitous network traffic to not-initialize standard libary
Status: CLOSED FIXED
Alias: None
Product: OCL
Classification: Modeling
Component: Core (show other bugs)
Version: 3.0.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: OCL Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-29 09:32 EDT by Ed Willink CLA
Modified: 2012-05-29 13:23 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Willink CLA 2010-09-29 09:32:44 EDT
Ecore's OCLStandardLibraryImpl.init() issues a getResource(..., true) for the OCLstdlib URI which is an 'http:...' and for which a WWW existence would be very surprising.

Therefore as commented, the normal case is for an UnknownHostException or NoSuchFileException to be thrown so that the hard coded library is activated.

Surely, it is sufficient to do getResource(..., false) to see if the user has registered an OCLstdlib in the global package registry? Heaven help a user who does so and doesn't fully empathize all the consistency constraints.

In the unlikely event that a resource is found it can then be loaded and exception handling only invoked if that resource loading has problems.
Comment 1 Ed Willink CLA 2011-02-01 02:07:52 EST
The new library has a pre-compiled auto-generated Java implementation. The use of an http access will only occur if the user specifies their own Standard Library for remnote loading.
Comment 2 Ed Willink CLA 2012-05-29 13:23:34 EDT
Closing all bugs resolved in Indigo.