Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 326534

Summary: [library] Gratuitous network traffic to not-initialize standard libary
Product: [Modeling] OCL Reporter: Ed Willink <ed>
Component: CoreAssignee: OCL Inbox <mdt-ocl-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.0.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

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.