You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by franz1981 <gi...@git.apache.org> on 2018/04/25 13:31:09 UTC

[GitHub] activemq-artemis pull request #2044: ARTEMIS-1829 Remove deprecated plugin's...

GitHub user franz1981 opened a pull request:

    https://github.com/apache/activemq-artemis/pull/2044

    ARTEMIS-1829 Remove deprecated plugin's messageExpired implementations

    NotificationActiveMQServerPlugin and LoggingActiveMQServerPlugin are
    implementing the deprecated version of
    ActiveMQServerPlugin::messageExpired that is not called by the
    new version of the method or any other part of the code

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/franz1981/activemq-artemis ARTEMIS-1829

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/activemq-artemis/pull/2044.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2044
    
----
commit e4c28547b043b4e5aba90a326f8cc63036c61cff
Author: Francesco Nigro <ni...@...>
Date:   2018-04-25T13:28:22Z

    ARTEMIS-1829 Remove deprecated plugin's messageExpired implementations
    
    NotificationActiveMQServerPlugin and LoggingActiveMQServerPlugin are
    implementing the deprecated version of
    ActiveMQServerPlugin::messageExpired that is not called by the
    new version of the method or any other part of the code

----


---

[GitHub] activemq-artemis issue #2044: ARTEMIS-1829 Remove deprecated plugin's messag...

Posted by clebertsuconic <gi...@git.apache.org>.
Github user clebertsuconic commented on the issue:

    https://github.com/apache/activemq-artemis/pull/2044
  
    I see...
    
    Can I ask  you a favor... if a test for your change doesn't make sense, can you explicitly add a comment to your commit message saying "a test is not needed"?
    
    I'm being through the commit list and always looking when tests are needed now.. if a test doesn't make sense on this one.. please add a comment so it's registered for when we go through this in the future.


---

[GitHub] activemq-artemis issue #2044: ARTEMIS-1829 Remove deprecated plugin's messag...

Posted by cshannon <gi...@git.apache.org>.
Github user cshannon commented on the issue:

    https://github.com/apache/activemq-artemis/pull/2044
  
    @franz1981 - You should probably also update the tests as well.  The MethodCalledVerifier class implements ActiveMQServerPlugin in the integration tests project and should probably have its messageExpired method signature updated as well although it should still work as is with your change.


---

[GitHub] activemq-artemis pull request #2044: ARTEMIS-1829 Remove deprecated plugin's...

Posted by clebertsuconic <gi...@git.apache.org>.
Github user clebertsuconic commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/2044#discussion_r184067483
  
    --- Diff: artemis-server/src/main/java/org/apache/activemq/artemis/core/server/plugin/ActiveMQServerPlugin.java ---
    @@ -566,7 +566,7 @@ default void messageExpired(MessageReference message, SimpleString messageExpiry
         * @throws ActiveMQException
         */
        default void messageExpired(MessageReference message, SimpleString messageExpiryAddress, ServerConsumer consumer) throws ActiveMQException {
    -
    --- End diff --
    
    these were part of a release... i wouldn't remove them... besides they don't bother anything.


---

[GitHub] activemq-artemis issue #2044: ARTEMIS-1829 Remove deprecated plugin's messag...

Posted by clebertsuconic <gi...@git.apache.org>.
Github user clebertsuconic commented on the issue:

    https://github.com/apache/activemq-artemis/pull/2044
  
    you would need a major release to remove these.


---

[GitHub] activemq-artemis pull request #2044: ARTEMIS-1829 Remove deprecated plugin's...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/activemq-artemis/pull/2044


---

[GitHub] activemq-artemis pull request #2044: ARTEMIS-1829 Remove deprecated plugin's...

Posted by franz1981 <gi...@git.apache.org>.
Github user franz1981 commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/2044#discussion_r184068630
  
    --- Diff: artemis-server/src/main/java/org/apache/activemq/artemis/core/server/plugin/ActiveMQServerPlugin.java ---
    @@ -566,7 +566,7 @@ default void messageExpired(MessageReference message, SimpleString messageExpiry
         * @throws ActiveMQException
         */
        default void messageExpired(MessageReference message, SimpleString messageExpiryAddress, ServerConsumer consumer) throws ActiveMQException {
    -
    --- End diff --
    
    I'm calling the deprecated implementation here, I can't say why github show it as a deletion :open_mouth: 


---

[GitHub] activemq-artemis issue #2044: ARTEMIS-1829 Remove deprecated plugin's messag...

Posted by franz1981 <gi...@git.apache.org>.
Github user franz1981 commented on the issue:

    https://github.com/apache/activemq-artemis/pull/2044
  
    @cshannon  Good point! I've checked it and seems that it already implements just the new version of the method...it is correct?


---

[GitHub] activemq-artemis issue #2044: ARTEMIS-1829 Remove deprecated plugin's messag...

Posted by franz1981 <gi...@git.apache.org>.
Github user franz1981 commented on the issue:

    https://github.com/apache/activemq-artemis/pull/2044
  
    @clebertsuconic It is fixing a test about message expiring indeed :)


---

[GitHub] activemq-artemis issue #2044: ARTEMIS-1829 Remove deprecated plugin's messag...

Posted by franz1981 <gi...@git.apache.org>.
Github user franz1981 commented on the issue:

    https://github.com/apache/activemq-artemis/pull/2044
  
    @cshannon wdyt? I will need your opinion because I don't know how you've chosen to deal with deprecated notifications :smile: 


---

[GitHub] activemq-artemis issue #2044: ARTEMIS-1829 Remove deprecated plugin's messag...

Posted by cshannon <gi...@git.apache.org>.
Github user cshannon commented on the issue:

    https://github.com/apache/activemq-artemis/pull/2044
  
    Ah yep you are right so there is no change needed.


---

[GitHub] activemq-artemis issue #2044: ARTEMIS-1829 Remove deprecated plugin's messag...

Posted by cshannon <gi...@git.apache.org>.
Github user cshannon commented on the issue:

    https://github.com/apache/activemq-artemis/pull/2044
  
    Oops, yeah this is the correct fix.  The new default method would call off to the old one as it's default if nothing overrides it to stay backwards compatible.  And then with Artemis 3.0.0 we can remove all the deprecated default methods altogether.


---

[GitHub] activemq-artemis issue #2044: ARTEMIS-1829 Remove deprecated plugin's messag...

Posted by clebertsuconic <gi...@git.apache.org>.
Github user clebertsuconic commented on the issue:

    https://github.com/apache/activemq-artemis/pull/2044
  
    this may be fixing a test actually


---

[GitHub] activemq-artemis pull request #2044: ARTEMIS-1829 Remove deprecated plugin's...

Posted by franz1981 <gi...@git.apache.org>.
Github user franz1981 commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/2044#discussion_r184069060
  
    --- Diff: artemis-server/src/main/java/org/apache/activemq/artemis/core/server/plugin/impl/LoggingActiveMQServerPlugin.java ---
    @@ -595,15 +595,10 @@ public void afterDeliver(ServerConsumer consumer, MessageReference reference) th
           }
        }
     
    -   /**
    -    * A message has been expired
    -    *
    -    * @param message              The expired message
    -    * @param messageExpiryAddress The message expiry address if exists
    -    * @throws ActiveMQException
    -    */
        @Override
    -   public void messageExpired(MessageReference message, SimpleString messageExpiryAddress) throws ActiveMQException {
    --- End diff --
    
    @clebertsuconic That's just a plugin implementation and I have removed a (deprecated) method implementation that it wasn't already called into the broker code, using the right API that is called instead, makes sense?


---

[GitHub] activemq-artemis issue #2044: ARTEMIS-1829 Remove deprecated plugin's messag...

Posted by franz1981 <gi...@git.apache.org>.
Github user franz1981 commented on the issue:

    https://github.com/apache/activemq-artemis/pull/2044
  
    @cshannon Thanks to have taken a look!! :+1: 


---