Skip to content

Commit 512ffef

Browse files
Merge 23.11 to 24.3
2 parents ebe74e8 + 1bdd469 commit 512ffef

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/org/labkey/targetedms/parser/PeptideGroup.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
package org.labkey.targetedms.parser;
1717

18+
import org.apache.commons.lang3.StringUtils;
1819
import org.labkey.api.targetedms.RepresentativeDataState;
1920
import org.labkey.targetedms.query.PeptideGroupManager;
2021

@@ -30,6 +31,8 @@
3031
*/
3132
public class PeptideGroup extends AnnotatedEntity<PeptideGroupAnnotation>
3233
{
34+
private static final int MAX_LENGTH = 1050;
35+
3336
private long _runId;
3437

3538
private String _label;
@@ -64,7 +67,7 @@ public String getLabel()
6467

6568
public void setLabel(String label)
6669
{
67-
_label = label;
70+
_label = StringUtils.truncate(label, MAX_LENGTH);
6871
}
6972

7073
public String getName()
@@ -74,7 +77,7 @@ public String getName()
7477

7578
public void setName(String name)
7679
{
77-
_name = name;
80+
_name = StringUtils.truncate(name, MAX_LENGTH);
7881
}
7982

8083
public String getDescription()
@@ -84,7 +87,7 @@ public String getDescription()
8487

8588
public void setDescription(String description)
8689
{
87-
_description = description;
90+
_description = StringUtils.truncate(description, MAX_LENGTH);
8891
}
8992

9093
public boolean isDecoy()
@@ -153,7 +156,7 @@ public String getAltDescription()
153156

154157
public void setAltDescription(String altDescription)
155158
{
156-
_altDescription = altDescription;
159+
_altDescription = StringUtils.truncate(altDescription, MAX_LENGTH);
157160
}
158161

159162
public Protein addSingleProtein()

0 commit comments

Comments
 (0)