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

Bug 319101

Summary: OrderedServiceHooksExecuter not passing extension order correctly
Product: [RT] Riena Reporter: Patrick He <platinas.hy>
Component: communicationAssignee: Nobody - feel free to take it <nobody>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: christian.campo, nobody
Version: unspecified   
Target Milestone: 3.0.0.M2   
Hardware: All   
OS: All   
Whiteboard:

Description Patrick He CLA 2010-07-07 06:40:06 EDT
Build Identifier: 20100617-1415

in OrderedServiceHooksExecuter, update() method, where the code is:
Orderer<IServiceHook> orderer = new Orderer<IServiceHook>();
		for (IServiceHookExtension extension : serviceHookExtensions) {
			orderer.add(extension.getServiceHook(), extension.getName(), extension.getPostHooks(), extension
					.getPostHooks());
		}

The getPostHooks() method is called twice but getPreHooks() is never called.

Not sure if there is any unit tests around this service ordering...

Reproducible: Always
Comment 1 Nobody - feel free to take it CLA 2010-07-15 09:21:00 EDT
Hello Patrick,
here we have to deal with even 2 bugs. 

1)What you describe: The construction of the Ordered-Object is not done right as the list of postHooks is used 2 times. preHooks just get igonred. 

2)I had a look at the implementation of afterCall. The delegation was wrong,too. I fixed it to delegate to sHook.afterCall(context);

Furthermore I added a the test OrderedCallHooksExecutorTest. Have a look at it if you like.