Commit 0a66b4e
committed
Fix biojava#933 URLConnection to invalid HTTP URL is not detected as failure
When the httpConnection is invalid, the application does not detect it,
and it saves an empty (precisely a 20 bytes) file.
This fix detects when the connection is invalid or the file has no
contents.
Related to biojava#7031 parent 7b76f8f commit 0a66b4e
1 file changed
Lines changed: 5 additions & 1 deletion
File tree
- biojava-structure/src/main/java/org/biojava/nbio/structure/chem
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
| |||
320 | 319 | | |
321 | 320 | | |
322 | 321 | | |
| 322 | + | |
323 | 323 | | |
324 | 324 | | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
325 | 329 | | |
326 | 330 | | |
327 | 331 | | |
| |||
0 commit comments