build issues due to commons-io 2.19.0

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925059 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
PJ Fanning 2025-04-12 18:56:26 +00:00
parent eaff2ac8ce
commit 5c82a0890c
4 changed files with 5 additions and 25 deletions

View File

@ -1037,11 +1037,7 @@ public final class EscherAggregate extends AbstractEscherHolderRecord {
final UnsynchronizedByteArrayOutputStream buffer = UnsynchronizedByteArrayOutputStream.builder().get();
void addBytes(byte[] data) {
try {
buffer.write(data);
} catch (IOException e) {
throw new IllegalStateException("Couldn't get data from drawing/continue records", e);
}
buffer.write(data);
}
@Override

View File

@ -118,11 +118,7 @@ class TestDrawingAggregate {
UnsynchronizedByteArrayOutputStream out = UnsynchronizedByteArrayOutputStream.builder().get();
for (RecordBase rb : aggRecords) {
Record r = (org.apache.poi.hssf.record.Record) rb;
try {
out.write(r.serialize());
} catch (IOException e) {
throw new RuntimeException(e);
}
out.write(r.serialize());
}
return out.toByteArray();
}
@ -263,11 +259,7 @@ class TestDrawingAggregate {
UnsynchronizedByteArrayOutputStream out = UnsynchronizedByteArrayOutputStream.builder().get();
for (RecordBase rb : records) {
Record r = (org.apache.poi.hssf.record.Record) rb;
try {
out.write(r.serialize());
} catch (IOException e) {
throw new RuntimeException(e);
}
out.write(r.serialize());
}
return out.toByteArray();
}

View File

@ -42,11 +42,7 @@ class TestEscherRecordFactory {
UnsynchronizedByteArrayOutputStream out = UnsynchronizedByteArrayOutputStream.builder().get();
for (RecordBase rb : records) {
Record r = (org.apache.poi.hssf.record.Record) rb;
try {
out.write(r.serialize());
} catch (IOException e) {
throw new RuntimeException(e);
}
out.write(r.serialize());
}
return out.toByteArray();
}

View File

@ -211,11 +211,7 @@ final class TestRecordFactory {
};
UnsynchronizedByteArrayOutputStream baos = UnsynchronizedByteArrayOutputStream.builder().get();
for (org.apache.poi.hssf.record.Record rec : recs) {
try {
baos.write(rec.serialize());
} catch (IOException e) {
throw new RuntimeException(e);
}
baos.write(rec.serialize());
}
//simulate the bad padding at the end of the workbook stream in attachment 23483 of bug 46987
baos.write(0x00);