Skip to content

Commit

Permalink
Fixing squid:S1161 - "@OverRide" annotation should be used on any met…
Browse files Browse the repository at this point in the history
…hod overriding.
  • Loading branch information
Faisal Hameed committed Jun 21, 2016
1 parent 0bcad27 commit cd1fd52
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 0 deletions.
Expand Up @@ -30,6 +30,7 @@ protected RequestBuilder controller(String controllerName){
return new RequestBuilder(controllerName, session(), true);
}

@Override
protected void setTemplateLocation(String templateLocation){
Configuration.getTemplateManager().setTemplateLocation(templateLocation);
}
Expand Down
Expand Up @@ -50,34 +50,42 @@ public List<FormItem> getFormItems() {
// Below are Servlet 3 methods
//Note that the @Override annotations are removed for backwards compatibility

@Override
public Collection<Part> getParts() throws IOException, ServletException {
return null;
}

@Override
public Part getPart(String s) throws IOException, ServletException {
return null;
}

@Override
public AsyncContext startAsync() throws IllegalStateException {
return null;
}

@Override
public AsyncContext startAsync(ServletRequest servletRequest, ServletResponse servletResponse) throws IllegalStateException {
return null;
}

@Override
public boolean isAsyncStarted() {
return false;
}

@Override
public boolean isAsyncSupported() {
return false;
}

@Override
public AsyncContext getAsyncContext() {
return null;
}

@Override
public DispatcherType getDispatcherType() {
return null;
}
Expand Down
Expand Up @@ -55,6 +55,7 @@ public final void afterTest(){
* @param templateLocation location of your templates relative to the directory
* where test is executed, usually a root of your Maven module
*/
@Override
public void setTemplateLocation(String templateLocation){
manager.setTemplateLocation(templateLocation);
}
Expand All @@ -64,6 +65,7 @@ public void setTemplateLocation(String templateLocation){
*
* @param injector injector to source dependencies form.
*/
@Override
protected void setInjector(Injector injector){
Context.getControllerRegistry().setInjector(injector);
}
Expand All @@ -74,6 +76,7 @@ protected void setInjector(Injector injector){
* @param name name of tag as used in a template.
* @param tag tag instance
*/
@Override
protected void registerTag(String name, FreeMarkerTag tag) {
manager.registerTag(name, tag);
Injector injector = Context.getControllerRegistry().getInjector();
Expand Down
Expand Up @@ -38,6 +38,7 @@ public abstract class AppController extends HttpSupport {
* @param name name of a value.
* @param value value.
*/
@Override
protected void assign(String name, Object value) {
KeyWords.check(name);
Context.getValues().put(name, value);
Expand All @@ -49,6 +50,7 @@ protected void assign(String name, Object value) {
* @param name name of object to be passed to view
* @param value object to be passed to view
*/
@Override
protected void view(String name, Object value) {
assign(name, value);
}
Expand Down Expand Up @@ -96,6 +98,7 @@ protected String servletPath() {
return Context.getHttpRequest().getServletPath();
}

@Override
protected String queryString() {
return Context.getHttpRequest().getQueryString();
}
Expand Down
Expand Up @@ -44,6 +44,7 @@ protected void registerTag(String name, FreeMarkerTag tag){
*
* @param context app context instance
*/
@Override
public abstract void init(AppContext context);

/**
Expand Down
Expand Up @@ -39,6 +39,7 @@ class DynamicClassLoader extends ClassLoader {
this.baseDir = baseDir;
}

@Override
public Class<?> loadClass(String name) throws ClassNotFoundException {

try{
Expand Down
Expand Up @@ -52,6 +52,7 @@ public void logAtLevel(Level level) {
this.level = level;
}

@Override
public final void before() {
log(getMessage() + ", session: " + session().id());
}
Expand Down
Expand Up @@ -54,6 +54,7 @@ public HeadersLogFilter() {
super();
}

@Override
protected String getMessage() {
return "Request headers: " + format(headers());
}
Expand Down
Expand Up @@ -47,6 +47,7 @@ public RequestPropertiesLogFilter() {
super();
}

@Override
protected String getMessage() {
Map m = map("request_url", url(),
"context_path", context(),
Expand Down
Expand Up @@ -70,10 +70,12 @@ public FreeMarkerTemplateManager() {
}
}

@Override
public void merge(Map values, String template, Writer writer) {
merge(values, template, defaultLayout, null, writer);
}

@Override
public void merge(Map input, String template, String layout, String format, Writer writer) {

try {
Expand Down Expand Up @@ -133,6 +135,7 @@ private String errorMessage(String layout, String template){

}

@Override
public void setServletContext(ServletContext ctx) {
if(location == null)
config.setServletContextForTemplateLoading(ctx, "WEB-INF/views/");
Expand All @@ -154,6 +157,7 @@ public void setDefaultLayout(String layoutPath) {



@Override
public void setTemplateLocation(String templateLocation) {
location = templateLocation;

Expand Down
Expand Up @@ -47,6 +47,7 @@ public void attribute(String name, String value) {

}

@Override
public String toString() {
StringWriter sw = new StringWriter();
write(sw);
Expand Down

0 comments on commit cd1fd52

Please sign in to comment.