Make sure non-existant indices are ignored.
authorJan Lahoda <jlahoda@netbeans.org>
Mon, 26 Sep 2011 18:08:34 +0200
changeset 69459f50e037ca0
parent 693 2f0e6e47d255
child 695 420e434549db
Make sure non-existant indices are ignored.
remoting/server/web/nbindex.web.api/src/org/netbeans/modules/jackpot30/backend/usages/api/DownloadableIndex.java
     1.1 --- a/remoting/server/web/nbindex.web.api/src/org/netbeans/modules/jackpot30/backend/usages/api/DownloadableIndex.java	Mon Sep 26 17:33:33 2011 +0200
     1.2 +++ b/remoting/server/web/nbindex.web.api/src/org/netbeans/modules/jackpot30/backend/usages/api/DownloadableIndex.java	Mon Sep 26 18:08:34 2011 +0200
     1.3 @@ -61,7 +61,7 @@
     1.4          CategoryStorage category = CategoryStorage.forId(segment);
     1.5          final File idx = category.getSegment(root);
     1.6  
     1.7 -        if (idx == null) return Response.status(Response.Status.NOT_FOUND).build();
     1.8 +        if (idx == null || !idx.canRead()) return Response.status(Response.Status.NOT_FOUND).build();
     1.9          
    1.10          return Response.ok().entity(new StreamingOutput() {
    1.11              @Override public void write(OutputStream output) throws IOException, WebApplicationException {