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-3914: Fix community defiliation #2178

Merged
merged 2 commits into from
Dec 7, 2018
Merged

Conversation

AlexanderS
Copy link
Contributor

This is an alternative for #2063 without changing the CommunityService.removeSubcommunity() method.

This fixes in issue in the defiliate method of the community filiator. The
child and parent relations should be managed using the provided methods of the
Community.

This changes the visibility of Community.removeSubCommunity() to public, but
Community.removeParentCommunity() was public before already. So this should
not be a problem.

The second commit is just a bit cleanup of manual loops.

Alexander Sulfrian added 2 commits August 21, 2018 18:16
This fixes in issue in the defiliate method of the community filiator. The
child and parent relations should be managed using the provided methods of the
Community.

This changes the visibility of Community.removeSubCommunity() to public, but
Community.removeParentCommunity() was public before already.
This removes the loops for checking if a community is contained in a list of
communities. Community.equals() does the same check, so we simply can use
contains().
Copy link
Member

@pnbecker pnbecker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 looks good to me. Not tested (yet).

@terrywbrady terrywbrady self-assigned this Dec 7, 2018
@terrywbrady terrywbrady added the port to main This PR needs to be ported to `main` branch for the next major release label Dec 7, 2018
@terrywbrady terrywbrady removed their assignment Dec 7, 2018
@terrywbrady terrywbrady self-requested a review December 7, 2018 01:10
Copy link
Contributor

@terrywbrady terrywbrady left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and confirmed the fix.

@terrywbrady terrywbrady merged commit 9c16711 into DSpace:dspace-6_x Dec 7, 2018
@terrywbrady
Copy link
Contributor

@AlexanderS , thanks for the fix. Could you port this to master?

@AlexanderS
Copy link
Contributor Author

@terrywbrady Sure, see #2284.

@tdonohue tdonohue added this to the 6.4 milestone Dec 7, 2018
@tdonohue tdonohue removed the port to main This PR needs to be ported to `main` branch for the next major release label Jul 17, 2019
@mauriciorbrito
Copy link

Hello everyone.

I modified the files CommunityFiliator.java and Community.java inmy dspace 6.3, then compiled with "mvn -U clean package" and "ant update" but the command ./dspace community-filiator -r -p [] -c [] still shows the message:
"Exception: null
java.lang.UnsupportedOperationException
at java.util.AbstractList.remove(AbstractList.java:161)
[...]"

Please could you help me?

Kind regards,
Mauricio

maurodbri@gmail.com
mauricio.brito@ucuenca.edu.ec

juliapim pushed a commit to juliapim/DSpace-1 that referenced this pull request Dec 9, 2020
 DS-3914: Fix community defiliation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug interface: command-line DSpace CLI (command-line interface)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants