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:23:34 UTC

[jira] [Comment Edited] (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=14204704#comment-14204704 ] 

Tommaso Teofili edited comment on SLING-4145 at 11/10/14 12:23 PM:
-------------------------------------------------------------------

fixed as per Carsten's suggestion adding _DistributionEventType#getTopic_ and using "plain" _Events_ in r1637825.


was (Author: teofili):
fixed as per Carsten's suggestion adding _DistributionEventType#getTopic_ and using "plain" _Events_.

> 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)