FINERACT-2036: Fix code quality
This commit is contained in:
committed by
Aleksandar Vidakovic
parent
314929e692
commit
478fb55b0f
@@ -73,8 +73,8 @@ class EmailService {
|
||||
if(params.bcc) {
|
||||
msg.setRecipients(Message.RecipientType.BCC, InternetAddress.parse(params.bcc))
|
||||
}
|
||||
msg.setSubject(params.subject)
|
||||
msg.setText(params.message);
|
||||
msg.setSubject(params.subject, "UTF-8")
|
||||
msg.setText(params.message, "UTF-8");
|
||||
|
||||
Transport.send(msg);
|
||||
|
||||
|
||||
@@ -27,6 +27,8 @@ import org.apache.fineract.gradle.FineractPluginExtension
|
||||
import org.slf4j.Logger
|
||||
import org.slf4j.LoggerFactory
|
||||
|
||||
import java.nio.charset.Charset
|
||||
|
||||
class TemplateService {
|
||||
private static final Logger log = LoggerFactory.getLogger(TemplateService.class)
|
||||
|
||||
@@ -35,7 +37,7 @@ class TemplateService {
|
||||
TemplateService(FineractPluginExtension.FineractPluginConfigTemplate config) {
|
||||
def dir = new File(config.templateDir);
|
||||
|
||||
this.config = new Configuration(Configuration.VERSION_2_3_31);
|
||||
this.config = new Configuration(Configuration.VERSION_2_3_32);
|
||||
this.config.setDirectoryForTemplateLoading(dir)
|
||||
this.config.setDefaultEncoding("UTF-8");
|
||||
this.config.setLogTemplateExceptions(false);
|
||||
@@ -58,7 +60,7 @@ class TemplateService {
|
||||
Template template = null;
|
||||
|
||||
if(params.templateFile) {
|
||||
template = new Template("template", new FileReader(new File(params.templateFile)), this.config)
|
||||
template = new Template("template", new FileReader(new File(params.templateFile), Charset.forName("UTF-8")), this.config)
|
||||
}
|
||||
if(params.template) {
|
||||
template = new Template("template", new StringReader(params.template), this.config)
|
||||
@@ -69,7 +71,7 @@ class TemplateService {
|
||||
def output = new File(params.outputFile)
|
||||
output.createNewFile()
|
||||
|
||||
template.process(data, new FileWriter(output, false))
|
||||
template.process(data, new FileWriter(output, Charset.forName("UTF-8"), false))
|
||||
} else {
|
||||
def output = new StringWriter()
|
||||
|
||||
|
||||
@@ -36,4 +36,4 @@ ${project['fineract.config.name']}
|
||||
|
||||
|
||||
|
||||
🎉 Powered by Fineract Release Plugin 🎊
|
||||
🎉 Powered by Fineract Release Plugin 🎊
|
||||
|
||||
@@ -18,4 +18,4 @@
|
||||
under the License.
|
||||
|
||||
-->
|
||||
[FINERACT] [PROPOSAL] 📦 New release ${project['fineract.release.version']}
|
||||
[FINERACT] [PROPOSAL] 📦 New release ${project['fineract.release.version']}
|
||||
|
||||
@@ -18,4 +18,4 @@
|
||||
under the License.
|
||||
|
||||
-->
|
||||
[FINERACT] [ANNOUNCE] 🔀 ${project['fineract.release.version']} release branch
|
||||
[FINERACT] [ANNOUNCE] 🔀 ${project['fineract.release.version']} release branch
|
||||
|
||||
@@ -18,4 +18,4 @@
|
||||
under the License.
|
||||
|
||||
-->
|
||||
[FINERACT] [VOTE] 🗳️ ${project['fineract.release.version']} for release
|
||||
[FINERACT] [VOTE] 🗳️ ${project['fineract.release.version']} for release
|
||||
|
||||
@@ -18,4 +18,4 @@
|
||||
under the License.
|
||||
|
||||
-->
|
||||
[FINERACT] [VOTE] [RESULT] 🧾️ ${project['fineract.release.version']} for release
|
||||
[FINERACT] [VOTE] [RESULT] 🧾️ ${project['fineract.release.version']} for release
|
||||
|
||||
@@ -40,4 +40,4 @@ https://issues.apache.org/jira/secure/ReleaseNote.jspa?version=${project['finera
|
||||
For more information on Apache Fineract please visit
|
||||
project home page: https://fineract.apache.org
|
||||
|
||||
The Apache Fineract Team
|
||||
The Apache Fineract Team
|
||||
|
||||
@@ -18,4 +18,4 @@
|
||||
under the License.
|
||||
|
||||
-->
|
||||
[ANNOUNCE] Apache Fineract ${project['fineract.release.version']} Release
|
||||
[ANNOUNCE] Apache Fineract ${project['fineract.release.version']} Release
|
||||
|
||||
@@ -18,4 +18,4 @@
|
||||
under the License.
|
||||
|
||||
-->
|
||||
Fineract ${project['fineract.release.version']} release
|
||||
Fineract ${project['fineract.release.version']} release
|
||||
|
||||
Reference in New Issue
Block a user