You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by iweiss <gi...@git.apache.org> on 2016/06/07 15:39:32 UTC

[GitHub] activemq-artemis pull request #569: [ARTEMIS-558] java.util.MissingFormatArg...

GitHub user iweiss opened a pull request:

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

    [ARTEMIS-558] java.util.MissingFormatArgumentException: Format specifier '%s' during backup activation

    

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

    $ git pull https://github.com/iweiss/activemq-artemis ARTEMIS-558

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

    https://github.com/apache/activemq-artemis/pull/569.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 #569
    
----
commit 1c687222cf5ff107cf4b35c2eaf99d15f9f6f965
Author: Ingo Weiss <in...@redhat.com>
Date:   2016-06-07T15:37:56Z

    [ARTEMIS-558] java.util.MissingFormatArgumentException: Format specifier '%s' during backup activation

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] activemq-artemis pull request #569: [ARTEMIS-558] java.util.MissingFormatArg...

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/569#discussion_r66097241
  
    --- Diff: artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PageSubscriptionImpl.java ---
    @@ -576,23 +576,30 @@ public void lateDeliveryRollback(PagePosition position) {
     
        @Override
        public boolean isComplete(long page) {
    -      logger.tracef("%s isComplete %d", this, page);
    +      if (empty && consumedPages.isEmpty()) {
    +         logger.tracef("%s isComplete %d", this, page);
    +      }
    +
           synchronized (consumedPages) {
              if (empty && consumedPages.isEmpty()) {
                 if (logger.isTraceEnabled()) {
    -               logger.tracef("isComplete(%d)::Subscription %s has empty=%s, consumedPages.isEmpty=%s", (Object)page, this, consumedPages.isEmpty());
    +               logger.tracef("isComplete(%d)::Subscription %s has empty=%s, consumedPages.isEmpty=%s", page, this, empty, consumedPages.isEmpty());
                 }
                 return true;
              }
     
              PageCursorInfo info = consumedPages.get(page);
     
              if (info == null && empty) {
    -            logger.tracef("isComplete(%d)::::Couldn't find info and it is empty", page);
    +            if (empty && consumedPages.isEmpty()) {
    --- End diff --
    
    this doesn't look right to me? why not just to log it?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] activemq-artemis pull request #569: [ARTEMIS-558] java.util.MissingFormatArg...

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

    https://github.com/apache/activemq-artemis/pull/569#discussion_r66101660
  
    --- Diff: artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PageSubscriptionImpl.java ---
    @@ -576,23 +576,30 @@ public void lateDeliveryRollback(PagePosition position) {
     
        @Override
        public boolean isComplete(long page) {
    -      logger.tracef("%s isComplete %d", this, page);
    +      if (empty && consumedPages.isEmpty()) {
    +         logger.tracef("%s isComplete %d", this, page);
    +      }
    +
           synchronized (consumedPages) {
              if (empty && consumedPages.isEmpty()) {
                 if (logger.isTraceEnabled()) {
    -               logger.tracef("isComplete(%d)::Subscription %s has empty=%s, consumedPages.isEmpty=%s", (Object)page, this, consumedPages.isEmpty());
    +               logger.tracef("isComplete(%d)::Subscription %s has empty=%s, consumedPages.isEmpty=%s", page, this, empty, consumedPages.isEmpty());
                 }
                 return true;
              }
     
              PageCursorInfo info = consumedPages.get(page);
     
              if (info == null && empty) {
    -            logger.tracef("isComplete(%d)::::Couldn't find info and it is empty", page);
    +            if (empty && consumedPages.isEmpty()) {
    +               logger.tracef("isComplete(%d)::::Couldn't find info and it is empty", page);
    +            }
                 return true;
              }
              else {
    -            logger.tracef("isComplete(%d)::calling is %s", (Object)page, this, consumedPages.isEmpty());
    +            if (empty && consumedPages.isEmpty()) {
    --- End diff --
    
    I'm thinking about being homogenous. Makes sense? It doesn't make sense code-wise I guess but my train of thought is having things look the same.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] activemq-artemis pull request #569: [ARTEMIS-558] java.util.MissingFormatArg...

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/569#discussion_r66097282
  
    --- Diff: artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PageSubscriptionImpl.java ---
    @@ -576,23 +576,30 @@ public void lateDeliveryRollback(PagePosition position) {
     
        @Override
        public boolean isComplete(long page) {
    -      logger.tracef("%s isComplete %d", this, page);
    +      if (empty && consumedPages.isEmpty()) {
    +         logger.tracef("%s isComplete %d", this, page);
    +      }
    +
           synchronized (consumedPages) {
              if (empty && consumedPages.isEmpty()) {
                 if (logger.isTraceEnabled()) {
    -               logger.tracef("isComplete(%d)::Subscription %s has empty=%s, consumedPages.isEmpty=%s", (Object)page, this, consumedPages.isEmpty());
    +               logger.tracef("isComplete(%d)::Subscription %s has empty=%s, consumedPages.isEmpty=%s", page, this, empty, consumedPages.isEmpty());
                 }
                 return true;
              }
     
              PageCursorInfo info = consumedPages.get(page);
     
              if (info == null && empty) {
    -            logger.tracef("isComplete(%d)::::Couldn't find info and it is empty", page);
    +            if (empty && consumedPages.isEmpty()) {
    +               logger.tracef("isComplete(%d)::::Couldn't find info and it is empty", page);
    +            }
                 return true;
              }
              else {
    -            logger.tracef("isComplete(%d)::calling is %s", (Object)page, this, consumedPages.isEmpty());
    +            if (empty && consumedPages.isEmpty()) {
    --- End diff --
    
    it doesn't look right to me...


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] activemq-artemis pull request #569: [ARTEMIS-558] java.util.MissingFormatArg...

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

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


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] activemq-artemis pull request #569: [ARTEMIS-558] java.util.MissingFormatArg...

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/569#discussion_r66151921
  
    --- Diff: artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PageSubscriptionImpl.java ---
    @@ -576,23 +576,30 @@ public void lateDeliveryRollback(PagePosition position) {
     
        @Override
        public boolean isComplete(long page) {
    -      logger.tracef("%s isComplete %d", this, page);
    +      if (empty && consumedPages.isEmpty()) {
    +         logger.tracef("%s isComplete %d", this, page);
    +      }
    +
           synchronized (consumedPages) {
              if (empty && consumedPages.isEmpty()) {
                 if (logger.isTraceEnabled()) {
    -               logger.tracef("isComplete(%d)::Subscription %s has empty=%s, consumedPages.isEmpty=%s", (Object)page, this, consumedPages.isEmpty());
    +               logger.tracef("isComplete(%d)::Subscription %s has empty=%s, consumedPages.isEmpty=%s", page, this, empty, consumedPages.isEmpty());
                 }
                 return true;
              }
     
              PageCursorInfo info = consumedPages.get(page);
     
              if (info == null && empty) {
    -            logger.tracef("isComplete(%d)::::Couldn't find info and it is empty", page);
    +            if (empty && consumedPages.isEmpty()) {
    +               logger.tracef("isComplete(%d)::::Couldn't find info and it is empty", page);
    +            }
                 return true;
              }
              else {
    -            logger.tracef("isComplete(%d)::calling is %s", (Object)page, this, consumedPages.isEmpty());
    +            if (empty && consumedPages.isEmpty()) {
    --- End diff --
    
    I don't understand what you meant by being homogenous.. I don't see any other if (empty && consumedPages.isEmpty()) on any other loggers...
    
    
    It seems that you meant if (logger.istTraceEnabled())?
    
    
    which I have been replacing by simple calls to tracef alone since that wouldn't make any big conversions.. and it's fairly cheap.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] activemq-artemis pull request #569: [ARTEMIS-558] java.util.MissingFormatArg...

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/569#discussion_r66109312
  
    --- Diff: artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PageSubscriptionImpl.java ---
    @@ -576,23 +576,30 @@ public void lateDeliveryRollback(PagePosition position) {
     
        @Override
        public boolean isComplete(long page) {
    -      logger.tracef("%s isComplete %d", this, page);
    +      if (empty && consumedPages.isEmpty()) {
    +         logger.tracef("%s isComplete %d", this, page);
    +      }
    +
           synchronized (consumedPages) {
              if (empty && consumedPages.isEmpty()) {
                 if (logger.isTraceEnabled()) {
    -               logger.tracef("isComplete(%d)::Subscription %s has empty=%s, consumedPages.isEmpty=%s", (Object)page, this, consumedPages.isEmpty());
    +               logger.tracef("isComplete(%d)::Subscription %s has empty=%s, consumedPages.isEmpty=%s", page, this, empty, consumedPages.isEmpty());
                 }
                 return true;
              }
     
              PageCursorInfo info = consumedPages.get(page);
     
              if (info == null && empty) {
    -            logger.tracef("isComplete(%d)::::Couldn't find info and it is empty", page);
    +            if (empty && consumedPages.isEmpty()) {
    +               logger.tracef("isComplete(%d)::::Couldn't find info and it is empty", page);
    +            }
                 return true;
              }
              else {
    -            logger.tracef("isComplete(%d)::calling is %s", (Object)page, this, consumedPages.isEmpty());
    +            if (empty && consumedPages.isEmpty()) {
    --- End diff --
    
    The intention of this log was to log the else... and look (trace) the result of isEmpty, etc
    I would just remove the if


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---