Skip to content

Commit 2e4100e

Browse files
committed
Add validation on null DemographicsProvider names
1 parent e801fe4 commit 2e4100e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

laboratory/src/org/labkey/laboratory/LaboratoryServiceImpl.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -696,6 +696,11 @@ public List<DemographicsProvider> getDemographicsProviders(final Container c, fi
696696
@Override
697697
public @Nullable DemographicsProvider getDemographicsProviderByName(Container c, User u, String name)
698698
{
699+
if (name == null)
700+
{
701+
throw new IllegalArgumentException("The DemographicsProvider name cannot be null");
702+
}
703+
699704
for (DemographicsProvider d : getDemographicsProviders(c, u))
700705
{
701706
if (name.equals(d.getLabel()))

0 commit comments

Comments
 (0)