fix style errors

(cherry picked from commit 74605f159a)
This commit is contained in:
Paulo Graça
2023-10-19 11:42:58 +01:00
committed by github-actions[bot]
parent 55eba18a47
commit 09d5f6fcc9
2 changed files with 3 additions and 2 deletions

View File

@@ -278,7 +278,7 @@ public class BitstreamServiceImpl extends DSpaceObjectServiceImpl<Bitstream> imp
for (Bundle bundle : bundles) { for (Bundle bundle : bundles) {
authorizeService.authorizeAction(context, bundle, Constants.REMOVE); authorizeService.authorizeAction(context, bundle, Constants.REMOVE);
//We also need to remove the bitstream id when it's set as bundle's primary bitstream //We also need to remove the bitstream id when it's set as bundle's primary bitstream
if(bitstream.equals(bundle.getPrimaryBitstream())) { if (bitstream.equals(bundle.getPrimaryBitstream())) {
bundle.unsetPrimaryBitstreamID(); bundle.unsetPrimaryBitstreamID();
} }
bundle.removeBitstream(bitstream); bundle.removeBitstream(bitstream);

View File

@@ -517,7 +517,8 @@ public class BundleTest extends AbstractDSpaceObjectTest {
* Test removeBitstream method and also the unsetPrimaryBitstreamID method, of class Bundle. * Test removeBitstream method and also the unsetPrimaryBitstreamID method, of class Bundle.
*/ */
@Test @Test
public void testRemoveBitstreamAuthAndUnsetPrimaryBitstreamID() throws IOException, SQLException, AuthorizeException { public void testRemoveBitstreamAuthAndUnsetPrimaryBitstreamID()
throws IOException, SQLException, AuthorizeException {
// Allow Item WRITE permissions // Allow Item WRITE permissions
doNothing().when(authorizeServiceSpy).authorizeAction(context, item, Constants.WRITE); doNothing().when(authorizeServiceSpy).authorizeAction(context, item, Constants.WRITE);
// Allow Bundle ADD permissions // Allow Bundle ADD permissions