Skip to content

Commit

Permalink
Merge pull request #861 from uhafner/CT_CONSTRUCTOR_THROW
Browse files Browse the repository at this point in the history
Exclude CT_CONSTRUCTOR_THROW SpotBugs warning
  • Loading branch information
uhafner committed Nov 25, 2023
2 parents 6781650 + 19acbbf commit a9d4f50
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion etc/spotbugs-exclusion-filter.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<Class name="~.*(Test|Benchmark).*" />
</Match>
<Match>
<Bug pattern="DESERIALIZATION_GADGET, FORMAT_STRING_MANIPULATION, PATH_TRAVERSAL_IN, WEAK_FILENAMEUTILS, RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE, EI_EXPOSE_REP, EI_EXPOSE_REP2"/>
<Bug pattern="DESERIALIZATION_GADGET, FORMAT_STRING_MANIPULATION, PATH_TRAVERSAL_IN, WEAK_FILENAMEUTILS, RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE, EI_EXPOSE_REP, EI_EXPOSE_REP2, CT_CONSTRUCTOR_THROW"/>
</Match>
<Match>
<Bug code="THROWS"/>
Expand Down
4 changes: 1 addition & 3 deletions src/main/java/edu/hm/hafner/util/ResourceExtractor.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;

/**
* A proxy for resources. Extracts a given collection of files from the classpath and copies them to a target path.
*
Expand All @@ -44,7 +42,7 @@ public ResourceExtractor(final Class<?> targetClass) {
this(targetClass, targetClass.getProtectionDomain());
}

@VisibleForTesting @SuppressFBWarnings("CT_CONSTRUCTOR_THROW")
@VisibleForTesting
ResourceExtractor(final Class<?> targetClass, final ProtectionDomain protectionDomain) {
CodeSource codeSource = protectionDomain.getCodeSource();
if (codeSource == null) {
Expand Down

0 comments on commit a9d4f50

Please sign in to comment.