mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-01-31 19:59:17 +01:00
improve changeset api
This commit is contained in:
@@ -42,6 +42,7 @@ import sonia.scm.util.Util;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@@ -262,6 +263,11 @@ public class Changeset implements Validateable, Cloneable, Serializable
|
||||
*/
|
||||
public List<String> getBranches()
|
||||
{
|
||||
if (branches == null)
|
||||
{
|
||||
branches = new ArrayList<String>();
|
||||
}
|
||||
|
||||
return branches;
|
||||
}
|
||||
|
||||
@@ -306,6 +312,11 @@ public class Changeset implements Validateable, Cloneable, Serializable
|
||||
*/
|
||||
public Modifications getModifications()
|
||||
{
|
||||
if (modifications == null)
|
||||
{
|
||||
modifications = new Modifications();
|
||||
}
|
||||
|
||||
return modifications;
|
||||
}
|
||||
|
||||
@@ -317,6 +328,11 @@ public class Changeset implements Validateable, Cloneable, Serializable
|
||||
*/
|
||||
public List<String> getTags()
|
||||
{
|
||||
if (tags == null)
|
||||
{
|
||||
tags = new ArrayList<String>();
|
||||
}
|
||||
|
||||
return tags;
|
||||
}
|
||||
|
||||
|
||||
@@ -39,10 +39,11 @@ import sonia.scm.util.Util;
|
||||
|
||||
//~--- JDK imports ------------------------------------------------------------
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlElementWrapper;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
@@ -199,6 +200,11 @@ public class Modifications
|
||||
*/
|
||||
public List<String> getAdded()
|
||||
{
|
||||
if (added == null)
|
||||
{
|
||||
added = new ArrayList<String>();
|
||||
}
|
||||
|
||||
return added;
|
||||
}
|
||||
|
||||
@@ -210,6 +216,11 @@ public class Modifications
|
||||
*/
|
||||
public List<String> getModified()
|
||||
{
|
||||
if (modified == null)
|
||||
{
|
||||
modified = new ArrayList<String>();
|
||||
}
|
||||
|
||||
return modified;
|
||||
}
|
||||
|
||||
@@ -221,6 +232,11 @@ public class Modifications
|
||||
*/
|
||||
public List<String> getRemoved()
|
||||
{
|
||||
if (removed == null)
|
||||
{
|
||||
removed = new ArrayList<String>();
|
||||
}
|
||||
|
||||
return removed;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user