You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by jm...@apache.org on 2018/02/25 03:05:16 UTC
[incubator-plc4x] 03/06: no need for extra brackets
This is an automated email from the ASF dual-hosted git repository.
jmclean pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-plc4x.git
commit d95e2e9bb878246c40b601ac370d3d0ec029b535
Author: Justin Mclean <jm...@apache.org>
AuthorDate: Sun Feb 25 14:03:19 2018 +1100
no need for extra brackets
---
.../org/apache/plc4x/java/ads/netty/util/LittleEndianEncoder.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/util/LittleEndianEncoder.java b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/util/LittleEndianEncoder.java
index 22d2dd1..20c84af 100644
--- a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/util/LittleEndianEncoder.java
+++ b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/util/LittleEndianEncoder.java
@@ -86,7 +86,7 @@ public class LittleEndianEncoder {
// TODO: check how ads expects this data
.map(Float::floatToIntBits)
.map(intValue -> new byte[]{
- (byte) ((intValue & 0x000000ff)),
+ (byte) (intValue & 0x000000ff),
(byte) ((intValue & 0x0000ff00) >> 8),
(byte) ((intValue & 0x00ff0000) >> 16),
(byte) ((intValue & 0xff000000) >> 24),
@@ -96,7 +96,7 @@ public class LittleEndianEncoder {
public static Stream<byte[]> encodeInteger(Stream<Integer> integerStream) {
return integerStream
.map(intValue -> new byte[]{
- (byte) ((intValue & 0x000000ff)),
+ (byte) (intValue & 0x000000ff),
(byte) ((intValue & 0x0000ff00) >> 8),
(byte) ((intValue & 0x00ff0000) >> 16),
(byte) ((intValue & 0xff000000) >> 24),
@@ -112,7 +112,7 @@ public class LittleEndianEncoder {
.map(TimeStamp::javaToWinTime)
.map(BigInteger::longValue)
.map(time -> new byte[]{
- (byte) ((time & 0x00000000_000000ffL)),
+ (byte) (time & 0x00000000_000000ffL),
(byte) ((time & 0x00000000_0000ff00L) >> 8),
(byte) ((time & 0x00000000_00ff0000L) >> 16),
(byte) ((time & 0x00000000_ff000000L) >> 24),
@@ -128,7 +128,7 @@ public class LittleEndianEncoder {
public static Stream<byte[]> encodeShort(Stream<Short> shortStream) {
return shortStream
.map(shortValue -> new byte[]{
- (byte) ((shortValue & 0x00ff)),
+ (byte) (shortValue & 0x00ff),
(byte) ((shortValue & 0xff00) >> 8),
});
}
--
To stop receiving notification emails like this one, please contact
jmclean@apache.org.