Uploaded image for project: 'ShrinkWrap'
  1. ShrinkWrap
  2. SHRINKWRAP-389

Allow ShrinkWrap to overwrite existing ArchivePaths

    XMLWordPrintable

Details

    • Feature Request
    • Resolution: Done
    • Blocker
    • 1.1.1-alpha-1
    • None
    • None
    • None

    Description

      SHRINKWRAP-329 created a fail-fast (as opposed to silent no-op) approach to encountering the following case:

              // Create the new archive
              final Archive<?> archive = createNewArchive();
      
              // Put in an asset
              final ArchivePath path = ArchivePaths.create("testPath");
              archive.add(EmptyAsset.INSTANCE, path);
      
              // Now try again with a new asset, and this should fail
              try {
                  archive.add(new StringAsset("failContent"), path);
              } catch (final IllegalOverwriteException ioe) {
                  // Good
                  return;
              }

      We need a feature now to disable this, effectively a boolean flag for each of the archive "add" methods to allow overwriting. Will encompass API changes.

      Attachments

        Activity

          People

            arubinge@redhat.com Andrew Rubinger (Inactive)
            arubinge@redhat.com Andrew Rubinger (Inactive)
            Votes:
            2 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: