The reason for this is the "static" prefix, right? If so, I would prefer to stub out a protected method for getResourcePath(String file) or something like that which returned "/" + file for Gitblit GO/WAR/Express and in your Gitblit subclass it returned "/static/" + file.  I'm not a fan of the inputstream parameter passing approach.