You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2024/01/15 15:02:49 UTC

(commons-codec) branch master updated: Use |=

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

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-codec.git


The following commit(s) were added to refs/heads/master by this push:
     new da4ab168 Use |=
da4ab168 is described below

commit da4ab168f9f9629036bea67c0d18b34b59ff84fc
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Mon Jan 15 10:02:45 2024 -0500

    Use |=
---
 src/main/java/org/apache/commons/codec/binary/Hex.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/commons/codec/binary/Hex.java b/src/main/java/org/apache/commons/codec/binary/Hex.java
index 1a859d6c..6dfc28ee 100644
--- a/src/main/java/org/apache/commons/codec/binary/Hex.java
+++ b/src/main/java/org/apache/commons/codec/binary/Hex.java
@@ -106,7 +106,7 @@ public class Hex implements BinaryEncoder, BinaryDecoder {
         for (int i = outOffset, j = 0; j < len; i++) {
             int f = toDigit(data[j], j) << 4;
             j++;
-            f = f | toDigit(data[j], j);
+            f |= toDigit(data[j], j);
             j++;
             out[i] = (byte) (f & 0xFF);
         }