In this case I think this should be reported as an error in ExcelImporter.
But this warning happens in a java action I wrote as well. It reads a file but not completely. I solved it by reading all bytes, see the code below.
Instead of simply closing the InputStream call the function drainAndClose.
public void drainAndClose(InputStream is) {
boolean done = false;
while (!done) {
try {
is.skip(is.available()); // Skip as many bytes as available
int nextByte = is.read(); // Try to read one byte further
if (nextByte < 0) { // End of file reached
done = true;
}
} catch (IOException e) {
done = true;
}
}
try {
is.close();
} catch (IOException e) {
}
}
public void drainAndClose(InputStream is) {
boolean done = false;
while (!done) {
try {
is.skip(is.available()); // Skip as many bytes as available
int nextByte = is.read(); // Try to read one byte further
if (nextByte < 0) { // End of file reached
done = true;
}
} catch (IOException e) {
done = true;
}
}
try {
is.close();
} catch (IOException e) {
}
}
Code Axel Brink provided but formatted