Skip to content

Commit

Permalink
Merge pull request #128 from jenkinsci/jason_fix_violation
Browse files Browse the repository at this point in the history
Suppress static analysis violations
  • Loading branch information
rwang-parasoft authored May 8, 2024
2 parents f274509 + 8202a5c commit 671b62b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ public static Node merge(final List<? extends Node> nodes) {

if (haveSameNameAndMetric(nodes)) {
return nodes.stream()
.map(t -> (Node) t)
.map(t -> (Node) t) // parasoft-suppress OPT.UNC-3 "Expected"
.reduce(Node::merge)
.orElseThrow(() -> new NoSuchElementException("No node found"));
}
Expand All @@ -636,7 +636,7 @@ public static Node merge(final List<? extends Node> nodes) {
*/
@SuppressWarnings({"ReferenceEquality", "PMD.CompareObjectsWithEquals"})
public Node merge(final Node other) {
if (other == this) {
if (other == this) { // parasoft-suppress PB.CUB.UEIC-2 "Expected"
return this; // nothing to do
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public static Value valueOf(final String stringRepresentation) {
if (StringUtils.contains(cleanedFormat, METRIC_SEPARATOR)) {
var metric = Metric.valueOf(StringUtils.substringBefore(cleanedFormat, METRIC_SEPARATOR));
var value = StringUtils.substringAfter(cleanedFormat, METRIC_SEPARATOR);
switch (metric) {
switch (metric) { // parasoft-suppress PB.PDS-3 "Expected"
case CONTAINER:
case MODULE:
case PACKAGE:
Expand Down

0 comments on commit 671b62b

Please sign in to comment.