[
https://issues.jboss.org/browse/SHRINKWRAP-389?page=com.atlassian.jira.pl...
]
Andrew Rubinger commented on SHRINKWRAP-389:
--------------------------------------------
I'll also ask for potentially two solutions:
1) Given a clean slate, how would you implement ShrinkWrap to handle overwrites? Allow?
Separate method? Config? Hybird of both? This should be the basis for a possible SW 2.0
when we go to spec.
2) What would you do that *is* backwards-compatible in terms of API?
Allow ShrinkWrap to overwrite existing ArchivePaths
---------------------------------------------------
Key: SHRINKWRAP-389
URL:
https://issues.jboss.org/browse/SHRINKWRAP-389
Project: ShrinkWrap
Issue Type: Feature Request
Reporter: Andrew Rubinger
Assignee: Michal Matloka
Labels: starter
SHRINKWRAP-329 created a fail-fast (as opposed to silent no-op) approach to encountering
the following case:
{code} // 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;
}{code}
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.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira