File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
cobol-parser/src/main/scala/za/co/absa/cobrix/cobol/parser/decoders Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -86,8 +86,7 @@ object BinaryNumberDecoders {
8686 if (bytes.length < 4 ) {
8787 return null
8888 }
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 )
9190 }
9291
9392 def decodeBinaryUnsignedIntLittleEndian (bytes : Array [Byte ]): Integer = {
@@ -102,8 +101,7 @@ object BinaryNumberDecoders {
102101 if (bytes.length < 4 ) {
103102 return null
104103 }
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 )
107105 }
108106
109107 def decodeBinarySignedLongBigEndian (bytes : Array [Byte ]): java.lang.Long = {
You can’t perform that action at this time.
0 commit comments