|
Lines 12-17
Link Here
|
| 12 |
|
12 |
|
| 13 |
import java.io.DataInputStream; |
13 |
import java.io.DataInputStream; |
| 14 |
import java.io.DataOutputStream; |
14 |
import java.io.DataOutputStream; |
|
|
15 |
import java.io.EOFException; |
| 15 |
import java.io.File; |
16 |
import java.io.File; |
| 16 |
import java.io.FileInputStream; |
17 |
import java.io.FileInputStream; |
| 17 |
import java.io.FileOutputStream; |
18 |
import java.io.FileOutputStream; |
|
Lines 155-160
Link Here
|
| 155 |
} |
156 |
} |
| 156 |
} |
157 |
} |
| 157 |
} |
158 |
} |
|
|
159 |
catch (EOFException e){ |
| 160 |
Tracing.log("Unable to read the dependency index file because of EOF exception"); |
| 161 |
} |
| 158 |
catch (IOException e){ |
162 |
catch (IOException e){ |
| 159 |
error = true; |
163 |
error = true; |
| 160 |
ValidationPlugin.getPlugin().handleException(e); |
164 |
ValidationPlugin.getPlugin().handleException(e); |
|
Lines 246-255
Link Here
|
| 246 |
public synchronized void saving(ISaveContext context) throws CoreException { |
250 |
public synchronized void saving(ISaveContext context) throws CoreException { |
| 247 |
if (!_dirty)return; |
251 |
if (!_dirty)return; |
| 248 |
_dirty = false; |
252 |
_dirty = false; |
| 249 |
|
253 |
boolean error = false; |
| 250 |
DataOutputStream out = null; |
254 |
DataOutputStream out = null; |
|
|
255 |
File f = null; |
| 251 |
try { |
256 |
try { |
| 252 |
File f = getIndexLocation(); |
257 |
f = getIndexLocation(); |
| 253 |
out = new DataOutputStream(new FileOutputStream(f)); |
258 |
out = new DataOutputStream(new FileOutputStream(f)); |
| 254 |
out.writeInt(CurrentVersion); |
259 |
out.writeInt(CurrentVersion); |
| 255 |
Map<String, Set<DependsResolved>> map = compress(_dependsOn); |
260 |
Map<String, Set<DependsResolved>> map = compress(_dependsOn); |
|
Lines 268-277
Link Here
|
| 268 |
} |
273 |
} |
| 269 |
} |
274 |
} |
| 270 |
catch (IOException e){ |
275 |
catch (IOException e){ |
|
|
276 |
error = true; |
| 271 |
ValidationPlugin.getPlugin().handleException(e); |
277 |
ValidationPlugin.getPlugin().handleException(e); |
| 272 |
} |
278 |
} |
| 273 |
finally { |
279 |
finally { |
| 274 |
Misc.close(out); |
280 |
Misc.close(out); |
|
|
281 |
if (error)f.delete(); |
| 275 |
} |
282 |
} |
| 276 |
} |
283 |
} |
| 277 |
|
284 |
|