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

#5296 Handle Missing Resource Exception #5301

Merged
merged 1 commit into from
Nov 9, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import java.io.Serializable;
import java.util.Collection;
import java.util.Comparator;
import java.util.MissingResourceException;
import java.util.Objects;
import java.util.Set;
import javax.persistence.Column;
Expand Down Expand Up @@ -118,47 +119,48 @@ public void setId(Long id) {
this.id = id;
}

public String getName() {
if (alias != null )
{
String key = "role." + alias.toLowerCase() +".name";
String _name = BundleUtil.getStringFromPropertyFile(key,"BuiltInRoles" );
if(_name == null)
{
return name;
}
else
{
return _name;
}
}
else {
return name;
}
}
public String getName() {
if (alias != null) {
try {
String key = "role." + alias.toLowerCase() + ".name";
String _name = BundleUtil.getStringFromPropertyFile(key, "BuiltInRoles");
if (_name == null) {
return name;
} else {
return _name;
}
} catch (MissingResourceException mre) {
return name;
}

} else {
return name;
}
}

public void setName(String name) {
this.name = name;
}

public String getDescription() {
if (alias != null )
{
String key = "role." + alias.toLowerCase() +".description";
String _description = BundleUtil.getStringFromPropertyFile(key,"BuiltInRoles" );
if(_description == null)
{
return description;
}
else
{
return _description;
}
}
else {
return description;
}
}
public String getDescription() {
if (alias != null) {
String key = "role." + alias.toLowerCase() + ".description";
try {
String _description = BundleUtil.getStringFromPropertyFile(key, "BuiltInRoles");
if (_description == null) {
return description;
} else {
return _description;
}

} catch (MissingResourceException mre) {
return description;
}

} else {
return description;
}
}

public void setDescription(String description) {
this.description = description;
Expand Down