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

DS-3435 possible nullpointerexception at AccessStepUtil$populateEmbar… #1600

Merged
merged 1 commit into from Jan 10, 2017
Merged
Show file tree
Hide file tree
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
Expand Up @@ -218,17 +218,17 @@ public void setEPerson(EPerson eperson)
}

/**
* gets ID for Group referred to by this policy
* gets the Group referred to by this policy
*
* @return groupID, or null if no group set
* @return group, or null if no group set
*/
public Group getGroup()
{
return epersonGroup;
}

/**
* sets ID for Group referred to by this policy
* sets the Group referred to by this policy
* @param epersonGroup Group
*/
public void setGroup(Group epersonGroup)
Expand Down
Expand Up @@ -201,7 +201,7 @@ public void addEmbargoDateDisplayOnly(final DSpaceObject dso, final List list) t

private void populateEmbargoDetail(final DSpaceObject dso, final Text text) throws SQLException, WingException {
for (final ResourcePolicy readPolicy : authorizeService.getPoliciesActionFilter(context, dso, Constants.READ)) {
if (Group.ANONYMOUS.equals(readPolicy.getGroup().getName()) && readPolicy.getStartDate() != null) {
if (readPolicy.getGroup() != null && Group.ANONYMOUS.equals(readPolicy.getGroup().getName()) && readPolicy.getStartDate() != null) {
final String dateString = DateFormatUtils.format(readPolicy.getStartDate(), "yyyy-MM-dd");
text.setValue(dateString);
globalReason = readPolicy.getRpDescription();
Expand Down