Mercurial > hg > digilib-old
comparison servlet/src/digilib/io/DocuDirCache.java @ 99:226624784fe3
Small bug lead to null pointer exception when directory doesn't exist.
| author | robcast |
|---|---|
| date | Mon, 05 May 2003 22:16:21 +0200 |
| parents | a398fc09ba71 |
| children | 55bc0e928ac5 |
comparison
equal
deleted
inserted
replaced
| 97:041340d1b00e | 99:226624784fe3 |
|---|---|
| 113 } else { | 113 } else { |
| 114 // invalid path | 114 // invalid path |
| 115 return null; | 115 return null; |
| 116 } | 116 } |
| 117 } else { | 117 } else { |
| 118 // not a real cache miss then | 118 // then it was not a real cache miss |
| 119 misses--; | 119 misses--; |
| 120 } | 120 } |
| 121 // get the file's index | 121 // get the file's index |
| 122 n = dd.indexOf(f.getName()); | 122 n = dd.indexOf(f.getName()); |
| 123 } else { | |
| 124 // it's not even a file :-( | |
| 125 return null; | |
| 123 } | 126 } |
| 124 } | 127 } |
| 125 } else { | 128 } else { |
| 126 // cache hit | 129 // cache hit |
| 127 hits++; | 130 hits++; |
| 175 } | 178 } |
| 176 } else { | 179 } else { |
| 177 // not a real cache miss then | 180 // not a real cache miss then |
| 178 misses--; | 181 misses--; |
| 179 } | 182 } |
| 183 } else { | |
| 184 // it's not even a file :-( | |
| 185 return null; | |
| 180 } | 186 } |
| 181 } | 187 } |
| 182 } else { | 188 } else { |
| 183 // cache hit | 189 // cache hit |
| 184 hits++; | 190 hits++; |
