You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Tommaso Teofili (JIRA)" <ji...@apache.org> on 2014/11/10 13:21:33 UTC

[jira] [Commented] (SLING-4145) OSGi event class should not be extended

    [ https://issues.apache.org/jira/browse/SLING-4145?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14204701#comment-14204701 ] 

Tommaso Teofili commented on SLING-4145:
----------------------------------------

thanks Carsten, I think you're right that we can avoid providing such an Event subclass.

> OSGi event class should not be extended
> ---------------------------------------
>
>                 Key: SLING-4145
>                 URL: https://issues.apache.org/jira/browse/SLING-4145
>             Project: Sling
>          Issue Type: Bug
>          Components: Distribution
>            Reporter: Carsten Ziegeler
>            Assignee: Tommaso Teofili
>             Fix For: Content Distribution 0.1.0
>
>
> http://svn.apache.org/repos/asf/sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/event/DistributionEvent.java
> extends the OSGi event class which is a dangerous thing as handlers can't assume to get such an instance, they might simply get an OSGi event object.
> As the whole point seems to be to create the topic out of the type, why not make an utility method out of it or add is as a paramter of the enumeration, so DistributionEventType.PACKAGE_CREATION.getEventTopic() returns the value.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)