}
}
private void doDeleteDefectSymbols(HttpServletRequest request, String pathToSymbols, ConstructionDefect constructionDefect) throws FileNotFoundException, IOException{
ObjectInputStream in = new ObjectInputStream(new FileInputStream(FileHelper.getCurrentPath(request)+pathToSymbols));
ObjectPicture objectPicture=new ObjectPicture();
try {
objectPicture = (ObjectPicture) in.readObject();
if (objectPicture != null) {
List list=objectPicture.getObjectList();
for (int l=0; l<list.size(); l++){
if (list.get(l) instanceof Symbols){
Symbols symbols=(Symbols)list.get(l);
if (symbols.getType().equals("defect") && symbols.getDefect().getConstructionDefectId()!=null && symbols.getDefect().getConstructionDefectId().equals(constructionDefect.getConstructionDefectId())){
objectPicture.deleteObject(symbols);
}
}
}
}
} catch (ClassNotFoundException e) {