File tree 1 file changed +2
-4
lines changed
cobol-parser/src/main/scala/za/co/absa/cobrix/cobol/parser/decoders
1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -86,8 +86,7 @@ object BinaryNumberDecoders {
86
86
if (bytes.length < 4 ) {
87
87
return null
88
88
}
89
- val v : Long = ((bytes(0 ) & 255L ) << 24L ) | ((bytes(1 ) & 255L ) << 16L ) | ((bytes(2 ) & 255L ) << 8L ) | (bytes(3 ) & 255L )
90
- if (v< 0 ) null else v
89
+ ((bytes(0 ) & 255L ) << 24L ) | ((bytes(1 ) & 255L ) << 16L ) | ((bytes(2 ) & 255L ) << 8L ) | (bytes(3 ) & 255L )
91
90
}
92
91
93
92
def decodeBinaryUnsignedIntLittleEndian (bytes : Array [Byte ]): Integer = {
@@ -102,8 +101,7 @@ object BinaryNumberDecoders {
102
101
if (bytes.length < 4 ) {
103
102
return null
104
103
}
105
- val v : Long = ((bytes(3 ) & 255L ) << 24L ) | ((bytes(2 ) & 255L ) << 16L ) | ((bytes(1 ) & 255L ) << 8L ) | (bytes(0 ) & 255L )
106
- if (v< 0 ) null else v
104
+ ((bytes(3 ) & 255L ) << 24L ) | ((bytes(2 ) & 255L ) << 16L ) | ((bytes(1 ) & 255L ) << 8L ) | (bytes(0 ) & 255L )
107
105
}
108
106
109
107
def decodeBinarySignedLongBigEndian (bytes : Array [Byte ]): java.lang.Long = {
You can’t perform that action at this time.
0 commit comments