FULL PRODUCT VERSION :
java version "1.8.0_152"
Java(TM) SE Runtime Environment (build 1.8.0_152-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.152-b16, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 6.3.9600]
A DESCRIPTION OF THE PROBLEM :
StAX XMLEventReader, XMLEventWriter, XMLStreamReader, XMLStreamWriter API close() method does not close uderlying resources.
This close() method should be propagated as in other java.io.* buffers!
REGRESSION. Last worked in version 6u45
ADDITIONAL REGRESSION INFORMATION:
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
xWriter = outputFactory.createXMLEventWriter(new BufferedOutputStream(new FileOutputStream(outputFile)), "UTF-8");
// use the writer normally
EXPECTED VERSUS ACTUAL BEHAVIOR :
File can be deleted!
File are not deleted!
ERROR MESSAGES/STACK TRACES THAT OCCUR :
Exception will be thrown indicating that file cannot be moved or deleted as it's locked.
This bug can be reproduced always.