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

chengzhang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
     new eda71bbe6d8 Fix sonar issues of PostgreSQLByteConverter (#25713)
eda71bbe6d8 is described below

commit eda71bbe6d839f62e6f6d0324564fb2ebecda985
Author: Liang Zhang <[email protected]>
AuthorDate: Tue May 16 23:23:14 2023 +0800

    Fix sonar issues of PostgreSQLByteConverter (#25713)
---
 .../command/query/extended/bind/protocol/PostgreSQLByteConverter.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/db-protocol/postgresql/src/main/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLByteConverter.java
 
b/db-protocol/postgresql/src/main/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLByteConverter.java
index d94089a73ac..b842d4cf4f5 100644
--- 
a/db-protocol/postgresql/src/main/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLByteConverter.java
+++ 
b/db-protocol/postgresql/src/main/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLByteConverter.java
@@ -364,7 +364,7 @@ public final class PostgreSQLByteConverter {
     }
     
     private static short readShort2(final byte[] bytes, final int index) {
-        return (short) (((bytes[index] & 255) << 8) + ((bytes[index + 1] & 
255)));
+        return (short) (((bytes[index] & 255) << 8) + (bytes[index + 1] & 
255));
     }
     
     /**

Reply via email to