Kaynağa Gözat

[github-348] tidy up number casting

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902803 13f79535-47bb-0310-9956-ffa450edef68
tags/REL_5_2_3
PJ Fanning 1 yıl önce
ebeveyn
işleme
ad6af709b8

+ 2
- 2
poi-ooxml/src/main/java/org/apache/poi/xssf/binary/XSSFBParser.java Dosyayı Görüntüle

@@ -92,7 +92,7 @@ public abstract class XSSFBParser {
b2 &= ~(1<<7); //unset highest bit (if it exists?)
recordId = ((int)b2 << 7)+(int)b1;
} else {
recordId = (int)b1;
recordId = b1;
}

long recordLength = 0;
@@ -102,7 +102,7 @@ public abstract class XSSFBParser {
byte b = is.readByte();
halt = (b >> 7 & 1) == 0; //if highest bit !=1 then continue
b &= ~(1<<7);
recordLength += (int)b << (i*7); //multiply by 128^i
recordLength += (long) (int)b << (i*7); //multiply by 128^i
i++;

}

+ 2
- 2
poi/src/main/java/org/apache/poi/hssf/record/cont/ContinuableRecordInput.java Dosyayı Görüntüle

@@ -101,8 +101,8 @@ public class ContinuableRecordInput implements LittleEndianInput {
((long)b5 << 40) +
((long)b4 << 32) +
((long)b3 << 24) +
(b2 << 16) +
(b1 << 8) +
((long)b2 << 16) +
((long)b1 << 8) +
(b0));
}


+ 2
- 2
poi/src/main/java/org/apache/poi/poifs/crypt/ChunkedCipherInputStream.java Dosyayı Görüntüle

@@ -172,11 +172,11 @@ public abstract class ChunkedCipherInputStream extends LittleEndianInputStream {

private void nextChunk() throws GeneralSecurityException, IOException {
if (chunkSize != -1) {
int index = (int)(pos >> chunkBits);
int index = (int) (pos >> chunkBits);
initCipherForBlock(cipher, index);

if (lastIndex != index) {
long skipN = (index - lastIndex) << chunkBits;
long skipN = ((long) index - lastIndex) << chunkBits;
if (super.skip(skipN) < skipN) {
throw new EOFException("buffer underrun");
}

Loading…
İptal
Kaydet