uDig/udig-platform — pull request #132 by fgdrf (2012-08-29 20:21:06+00:00)
Title: Fix for threading Issues for UDIG-1930 and UDIG-1931

Hello everybody,

In an application where Layers got added from different bundles and threads the behavior of BlackboardImpl in Combination with RenderContextImpl was odd.

from Different Threads the RenderContextImpl requested a LabelPainter (via getLabelPainter) and asked the Map Blackboard to get one. If it returns null a new UDIGLabelCache has been created and was added to the Blackboard of the Map.

And here it different threads got null and registered a new instance. At the end of all everything seems ok but the internal store of the blackboard entries was broken.

In result, it was impossible to export map images via ("Right mouse" on Map / in Layers View -> export -> export Map to Image). ApplicationGIS.drawMap() failed with an IllegalArgumentException from EMF ("no null constraint violated") trying to copy the EObject of the current Map:

> final Map map = (Map) EcoreUtil.copy((EObject) params.toDraw);

This pull request includes fixes for

* https://jira.codehaus.org/browse/UDIG-1930 and
* https://jira.codehaus.org/browse/UDIG-1931

Thanks