You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ta...@apache.org on 2021/06/22 21:33:40 UTC

[qpid-protonj2] branch main updated (f770d75 -> 10183a1)

This is an automated email from the ASF dual-hosted git repository.

tabish pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/qpid-protonj2.git.


    from f770d75  PROTON-2398 Fix a couple API typos and add some missing final modifiers
     new ec7c8d5  PROTON-2398 Add missing final modifiers on field constants
     new 10183a1  PROTON-2398 Fix a minor copy issue in Header and add test coverage

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../java/org/apache/qpid/protonj2/types/messaging/Header.java | 11 ++++++-----
 .../org/apache/qpid/protonj2/types/messaging/HeaderTest.java  |  4 ++++
 2 files changed, 10 insertions(+), 5 deletions(-)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[qpid-protonj2] 01/02: PROTON-2398 Add missing final modifiers on field constants

Posted by ta...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

tabish pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/qpid-protonj2.git

commit ec7c8d5ca9dccf44d619f98ddd1efc077ea37e48
Author: Timothy Bish <ta...@gmail.com>
AuthorDate: Tue Jun 22 16:34:46 2021 -0400

    PROTON-2398 Add missing final modifiers on field constants
---
 .../java/org/apache/qpid/protonj2/types/messaging/Header.java  | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/protonj2/src/main/java/org/apache/qpid/protonj2/types/messaging/Header.java b/protonj2/src/main/java/org/apache/qpid/protonj2/types/messaging/Header.java
index a83f481..dd73006 100644
--- a/protonj2/src/main/java/org/apache/qpid/protonj2/types/messaging/Header.java
+++ b/protonj2/src/main/java/org/apache/qpid/protonj2/types/messaging/Header.java
@@ -33,11 +33,11 @@ public final class Header implements Section<Header> {
 
     private static final long UINT_MAX = 0xFFFFFFFFL;
 
-    private static int DURABLE = 1;
-    private static int PRIORITY = 2;
-    private static int TIME_TO_LIVE = 4;
-    private static int FIRST_ACQUIRER = 8;
-    private static int DELIVERY_COUNT = 16;
+    private static final int DURABLE = 1;
+    private static final int PRIORITY = 2;
+    private static final int TIME_TO_LIVE = 4;
+    private static final int FIRST_ACQUIRER = 8;
+    private static final int DELIVERY_COUNT = 16;
 
     private int modified = 0;
 

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[qpid-protonj2] 02/02: PROTON-2398 Fix a minor copy issue in Header and add test coverage

Posted by ta...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

tabish pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/qpid-protonj2.git

commit 10183a1820a3e979b0dc1f38f7f3039696b579a4
Author: Timothy Bish <ta...@gmail.com>
AuthorDate: Tue Jun 22 17:33:18 2021 -0400

    PROTON-2398 Fix a minor copy issue in Header and add test coverage
---
 .../main/java/org/apache/qpid/protonj2/types/messaging/Header.java    | 1 +
 .../java/org/apache/qpid/protonj2/types/messaging/HeaderTest.java     | 4 ++++
 2 files changed, 5 insertions(+)

diff --git a/protonj2/src/main/java/org/apache/qpid/protonj2/types/messaging/Header.java b/protonj2/src/main/java/org/apache/qpid/protonj2/types/messaging/Header.java
index dd73006..8ed76a5 100644
--- a/protonj2/src/main/java/org/apache/qpid/protonj2/types/messaging/Header.java
+++ b/protonj2/src/main/java/org/apache/qpid/protonj2/types/messaging/Header.java
@@ -56,6 +56,7 @@ public final class Header implements Section<Header> {
         this.timeToLive = other.timeToLive;
         this.firstAcquirer = other.firstAcquirer;
         this.deliveryCount = other.deliveryCount;
+        this.modified = other.modified;
     }
 
     public Header copy() {
diff --git a/protonj2/src/test/java/org/apache/qpid/protonj2/types/messaging/HeaderTest.java b/protonj2/src/test/java/org/apache/qpid/protonj2/types/messaging/HeaderTest.java
index 9bc15e9..7c4453b 100644
--- a/protonj2/src/test/java/org/apache/qpid/protonj2/types/messaging/HeaderTest.java
+++ b/protonj2/src/test/java/org/apache/qpid/protonj2/types/messaging/HeaderTest.java
@@ -81,6 +81,8 @@ public class HeaderTest {
         header.setFirstAcquirer(!Header.DEFAULT_FIRST_ACQUIRER);
         header.setDeliveryCount(Header.DEFAULT_DELIVERY_COUNT + 5);
 
+        assertFalse(header.isEmpty());
+
         Header copy = header.copy();
 
         assertEquals(!Header.DEFAULT_DURABILITY, copy.isDurable());
@@ -88,6 +90,8 @@ public class HeaderTest {
         assertEquals(Header.DEFAULT_TIME_TO_LIVE - 10, copy.getTimeToLive());
         assertEquals(!Header.DEFAULT_FIRST_ACQUIRER, copy.isFirstAcquirer());
         assertEquals(Header.DEFAULT_DELIVERY_COUNT + 5, copy.getDeliveryCount());
+
+        assertFalse(header.isEmpty());
     }
 
     @Test

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org