Skip to content
Snippets Groups Projects
Commit cf155de7 authored by Raphael GIRARDOT's avatar Raphael GIRARDOT
Browse files

Prefer using constants to new strings

parent 80df3f70
No related branches found
No related tags found
No related merge requests found
......@@ -36,6 +36,8 @@ import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import fr.soleil.lib.project.ObjectUtils;
/**
* <p/>
* <B>Description :</B><BR>
......@@ -59,12 +61,12 @@ import java.util.List;
* @see fr.soleil.archiving.snap.api.tools.SnapAttributeHeavy
*/
public class SnapContext {
private String author_name = "";
private String name = "";
private String author_name = ObjectUtils.EMPTY_STRING;
private String name = ObjectUtils.EMPTY_STRING;
private int id = 0;
private Date creation_date;
private String reason = "";
private String description = "";
private String reason = ObjectUtils.EMPTY_STRING;
private String description = ObjectUtils.EMPTY_STRING;
private List<SnapAttributeLight> attributeList = new ArrayList<SnapAttributeLight>();
/**
......@@ -350,7 +352,7 @@ public class SnapContext {
@Override
public String toString() {
String snapString = new String("");
String snapString = new String(ObjectUtils.EMPTY_STRING);
snapString = "Context" + "\r\n" + "Id : \t" + id + "\r\n" + "Author name : \t" + author_name + "\r\n"
+ "Context name : \t" + name + "\r\n" + "Creation date : \t" + creation_date + "\r\n" + "Reason : \t"
+ reason + "\r\n" + "Description : \t" + description + "\r\n" + "Attribute(s) : " + "\r\n";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment