Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix KNOWAGE-8103 #884

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions knowagedao/src/main/java/it/eng/spagobi/utilities/JSError.java
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
package it.eng.spagobi.utilities;

import it.eng.spagobi.commons.utilities.messages.MessageBuilderFactory;

import java.text.MessageFormat;
import java.util.Locale;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import it.eng.spagobi.commons.utilities.messages.MessageBuilderFactory;

public class JSError {
private static final String MESSAGE = "message";
private final JSONObject jsError = new JSONObject();

private static enum MSG_TYPE {
private enum MSG_TYPE {
errors, warnings
};
}

public JSError() {
}
Expand Down Expand Up @@ -79,7 +79,7 @@ public String toString() {
private static String getMessage(String key, String... args) {
String msg = MessageBuilderFactory.getMessageBuilder().getMessage(key);
if (args.length > 0) {
msg = MessageFormat.format(msg, args);
msg = String.format(Locale.getDefault(), msg, (Object[]) args);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why using java.util.Locale.getDefault() ?
In my opinion this is a false positive, since msg is not really depending on user inputs

}
return msg;
}
Expand Down
Loading