Join thousands of Atlassian users for an unforgettable week of knowledge sharing, product training, networking, and fun. Atlassian Summit is Oct 10 - 13 in San Jose, CA – Register soon before tickets sell out.
Maintenance Notice: answers.atlassian.com will undergo maintenance on 24 Sep 2016, from 22:00 - 07:00 UTC. During this maintenance window, the service may be intermittently unavailable. See our status page for details.

From the JavaDoc:

* Returns true if the plugin resource has been modified. The implementing class is responsible for
* setting any appropriate response codes or headers on the response.
* If the resource has been modified, the resource shouldn't be served.
boolean isResourceModified(HttpServletRequest request, HttpServletResponse response);
What?? If resource has been modified, it should not be served? Isn't the logic normally the opposite?
Let's take a look at an implementation in AbstractDownloadableResource. Here's the JavaDoc:
* Checks any "If-Modified-Since" header from the request against the
* plugin's loading time, since plugins can't be modified after they've been
* loaded this is a good way to determine if a plugin resource has been
* modified or not. If this method returns true, don't do any more
* processing on the request -- the response code has already been set to
* "304 Not Modified" for you, and you don't need to serve the file.
So the method "isResourceModified()" returns true when it sets HTTP 304 response, "Not Modified".
Am I missing something? Shouldn't it be named isResourceNotModified() instead?
And if not, since this is an interface method, I guess it is too late to rename it - but probably someone should clear this up in the JavaDoc.
  1. Igor Sereda [ALM Works]

    sorry about condensed text, I'm tired of fighting with the formatting controls here...

CommentAdd your comment...