mirror of https://github.com/apache/activemq.git
ensure writer isn't null in removeDataFile()
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@504007 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
aa18c5d6fc
commit
fb3f71d895
|
@ -294,7 +294,9 @@ public final class DataManagerImpl implements DataManager {
|
|||
|
||||
private void removeDataFile(DataFile dataFile) throws IOException{
|
||||
fileMap.remove(dataFile.getNumber());
|
||||
writer.force(dataFile);
|
||||
if(writer!=null){
|
||||
writer.force(dataFile);
|
||||
}
|
||||
boolean result=dataFile.delete();
|
||||
log.debug("discarding data file "+dataFile+(result?"successful ":"failed"));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue