Skip to content

Commit

Permalink
Fix #6868 Fix copy constructors
Browse files Browse the repository at this point in the history
update from review

Signed-off-by: Greg Wilkins <gregw@webtide.com>
  • Loading branch information
gregw committed Sep 20, 2021
1 parent ea801ad commit 4fe2cd6
Showing 1 changed file with 4 additions and 9 deletions.
Expand Up @@ -496,16 +496,11 @@ public ClassMatcher()
{
}

public ClassMatcher(ClassMatcher matcher)
@SuppressWarnings("CopyConstructorMissesField")
public ClassMatcher(ClassMatcher patterns)
{
if (matcher != null)
{
_entries.putAll(matcher._entries);
_patterns.include(matcher._patterns.getIncluded().toArray(new Entry[0]));
_patterns.exclude(matcher._patterns.getExcluded().toArray(new Entry[0]));
_locations.include(matcher._locations.getIncluded().toArray(new Entry[0]));
_locations.exclude(matcher._locations.getExcluded().toArray(new Entry[0]));
}
if (patterns != null)
setAll(patterns.getPatterns());
}

public ClassMatcher(String... patterns)
Expand Down

0 comments on commit 4fe2cd6

Please sign in to comment.