Skip to content

Commit a519448

Browse files
committed
Take into account Sonar comments
1 parent 81e97c5 commit a519448

1 file changed

Lines changed: 21 additions & 2 deletions

File tree

org.restlet.ext.freemarker/src/main/java/org/restlet/ext/freemarker/TemplateRepresentation.java

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
*/
99
package org.restlet.ext.freemarker;
1010

11+
import static freemarker.template.Configuration.DEFAULT_INCOMPATIBLE_IMPROVEMENTS;
12+
1113
import freemarker.template.Configuration;
1214
import freemarker.template.Template;
1315
import freemarker.template.TemplateException;
@@ -129,7 +131,10 @@ public TemplateRepresentation(
129131
* @param mediaType The representation's media-type.
130132
*/
131133
public TemplateRepresentation(Representation templateRepresentation, MediaType mediaType) {
132-
this(templateRepresentation, new Configuration(), mediaType);
134+
this(
135+
templateRepresentation,
136+
new Configuration(DEFAULT_INCOMPATIBLE_IMPROVEMENTS),
137+
mediaType);
133138
}
134139

135140
/**
@@ -141,7 +146,11 @@ public TemplateRepresentation(Representation templateRepresentation, MediaType m
141146
*/
142147
public TemplateRepresentation(
143148
Representation templateRepresentation, Object dataModel, MediaType mediaType) {
144-
this(templateRepresentation, new Configuration(), dataModel, mediaType);
149+
this(
150+
templateRepresentation,
151+
new Configuration(DEFAULT_INCOMPATIBLE_IMPROVEMENTS),
152+
dataModel,
153+
mediaType);
145154
}
146155

147156
/**
@@ -194,6 +203,11 @@ public TemplateRepresentation(Template template, Object dataModel, MediaType med
194203
this.dataModel = dataModel;
195204
}
196205

206+
@Override
207+
public boolean equals(final Object obj) {
208+
return super.equals(obj);
209+
}
210+
197211
/**
198212
* Returns the template's data model.
199213
*
@@ -212,6 +226,11 @@ public Template getTemplate() {
212226
return template;
213227
}
214228

229+
@Override
230+
public int hashCode() {
231+
return super.hashCode();
232+
}
233+
215234
/**
216235
* Sets the template's data model.
217236
*

0 commit comments

Comments
 (0)