-
Notifications
You must be signed in to change notification settings - Fork 49
[MDEP-651] Warn on duplicate archive entries #128
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
Merged
rfscholte
merged 7 commits into
codehaus-plexus:master
from
mthmulders:MDEP-651-warn-on-duplicate-archive-entries
Oct 12, 2020
Merged
Changes from 5 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
52a9a1f
[MDEP-651] Warn on duplicate archive entries
mthmulders 9b09808
[MDEP-651] Warn on casing conflicts between archive entries and files…
mthmulders e2f6f4c
[MDEP-651] Tweaks in warning message
mthmulders e5a465c
[MDEP-651] Restore check on timestamps
mthmulders 6b03a0e
[MDEP-651] Add specification table
mthmulders b6f5499
[MDEP-651] Rename variables
mthmulders cf7c6d0
[MDEP-651] Optimise for situations where there is no conflict, and fi…
mthmulders File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
99 changes: 99 additions & 0 deletions
99
src/test/java/org/codehaus/plexus/archiver/CapturingLog.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
package org.codehaus.plexus.archiver; | ||
|
||
import org.codehaus.plexus.logging.AbstractLogger; | ||
import org.codehaus.plexus.logging.Logger; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
public class CapturingLog extends AbstractLogger | ||
{ | ||
public CapturingLog( int threshold, String name ) | ||
{ | ||
super( threshold, name ); | ||
} | ||
|
||
static class Message { | ||
public final String message; | ||
public final Throwable throwable; | ||
|
||
public Message( String message, Throwable throwable ) | ||
{ | ||
this.message = message; | ||
this.throwable = throwable; | ||
} | ||
|
||
@Override | ||
public String toString() | ||
{ | ||
return "Message{" + "message='" + message + '\'' + ", throwable=" + throwable + '}'; | ||
} | ||
} | ||
|
||
private final List<Message> debugs = new ArrayList<>(); | ||
@Override | ||
public void debug( String s, Throwable throwable ) | ||
{ | ||
debugs.add( new Message( s, throwable ) ); | ||
} | ||
|
||
public List<Message> getDebugs() | ||
{ | ||
return debugs; | ||
} | ||
|
||
|
||
private final List<Message> infos = new ArrayList<>(); | ||
@Override | ||
public void info( String s, Throwable throwable ) | ||
{ | ||
infos.add( new Message( s, throwable ) ); | ||
} | ||
|
||
public List<Message> getInfos() | ||
{ | ||
return infos; | ||
} | ||
|
||
private final List<Message> warns = new ArrayList<>(); | ||
@Override | ||
public void warn( String s, Throwable throwable ) | ||
{ | ||
warns.add( new Message( s, throwable ) ); | ||
} | ||
|
||
public List<Message> getWarns() | ||
{ | ||
return warns; | ||
} | ||
|
||
private final List<Message> errors = new ArrayList<>(); | ||
@Override | ||
public void error( String s, Throwable throwable ) | ||
{ | ||
errors.add( new Message( s, throwable ) ); | ||
} | ||
|
||
public List<Message> getErors() | ||
{ | ||
return errors; | ||
} | ||
|
||
private final List<Message> fatals = new ArrayList<>(); | ||
@Override | ||
public void fatalError( String s, Throwable throwable ) | ||
{ | ||
fatals.add( new Message( s, throwable ) ); | ||
} | ||
|
||
public List<Message> getFatals() | ||
{ | ||
return fatals; | ||
} | ||
|
||
@Override | ||
public Logger getChildLogger( String s ) | ||
{ | ||
return null; | ||
} | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.