Skip to content

Commit

Permalink
7417: Fix incorrect identifier in result for biased locking revocatio…
Browse files Browse the repository at this point in the history
…n rule

Reviewed-by: aptmac, hirt
  • Loading branch information
mohno007 authored and thegreystone committed Jan 25, 2022
1 parent f3ca1b1 commit 87be29c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved.
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
Expand Down Expand Up @@ -112,15 +112,15 @@ public final class BiasedLockingRevocationRule implements IRule {
private static final List<TypedPreference<?>> CONFIG_ATTRIBUTES = Arrays.<TypedPreference<?>> asList(WARNING_LIMIT,
MAX_NUMBER_OF_CLASSES_TO_REPORT, FILTERED_CLASSES);

public static final TypedCollectionResult<IMCType> REVOKED_TYPES = new TypedCollectionResult<>("revokedClasses", //$NON-NLS-1$
public static final TypedCollectionResult<IMCType> REVOKED_CLASSES = new TypedCollectionResult<>("revokedClasses", //$NON-NLS-1$
"Revoked Classes", "Revoked Classes.", UnitLookup.CLASS, IMCType.class);
public static final TypedCollectionResult<ClassEntry> REVOCATION_CLASSES = new TypedCollectionResult<>(
"revocationClasses", "Revocation Classes", "Revocation Classes", ClassEntry.CLASS_ENTRY, ClassEntry.class); //$NON-NLS-1$
public static final TypedCollectionResult<String> FILTERED_TYPES = new TypedCollectionResult<>("filteredTypes", //$NON-NLS-1$
"Filtered Types", "Types that were filtered out.", UnitLookup.PLAIN_TEXT, String.class);

private static final Collection<TypedResult<?>> RESULT_ATTRIBUTES = Arrays
.<TypedResult<?>> asList(TypedResult.SCORE, REVOKED_TYPES, REVOCATION_CLASSES, FILTERED_TYPES);
.<TypedResult<?>> asList(TypedResult.SCORE, REVOKED_CLASSES, REVOCATION_CLASSES, FILTERED_TYPES);

private static final Map<String, EventAvailability> REQUIRED_EVENTS = RequiredEventsBuilder.create()
.addEventType(JdkTypeIDs.BIASED_LOCK_CLASS_REVOCATION, EventAvailability.ENABLED).build();
Expand Down Expand Up @@ -191,7 +191,7 @@ private IResult getResult(
}
return ResultBuilder.createFor(this, valueProvider).setSeverity(Severity.get(totalScore))
.setSummary(summary.toString()).setExplanation(explanation.toString())
.addResult(REVOKED_TYPES, revokedTypes).addResult(REVOCATION_CLASSES, filteredRevocationClasses)
.addResult(REVOKED_CLASSES, revokedTypes).addResult(REVOCATION_CLASSES, filteredRevocationClasses)
.addResult(FILTERED_TYPES, filteredTypes).build();
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved.
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
Expand Down Expand Up @@ -74,7 +74,7 @@ BiasedLockingRevocationRule_CONFIG_WARNING_LIMIT_LONG=The number of revocations
BiasedLockingRevocationRule_NAME=Biased Locking Revocation
BiasedLockingRevocationRule_TEXT_OK=No classes were disabled from participating in biased locking
BiasedLockingRevocationRule_TEXT_REVOKED_CLASSES_FOUND=Fully revoked classes found.
BiasedLockingRevocationRule_TEXT_REVOKED_CLASSES_FOUND_LONG=The following classes were disabled from using biased locking: {revokedTypes}
BiasedLockingRevocationRule_TEXT_REVOKED_CLASSES_FOUND_LONG=The following classes were disabled from using biased locking: {revokedClasses}
BiasedLockingRevocationRule_TEXT_REVOKE_LIMIT_CLASSES_FOUND=Instances of classes were revoked more times than the user configured limit.
# {revocationClasses} is the user configured revocation limit
BiasedLockingRevocationRule_TEXT_REVOKE_LIMIT_CLASSES_FOUND_LONG=The following instances of classes were revoked more than the configured limit for this rule (not including disabled classes): {revocationClasses}
Expand Down

0 comments on commit 87be29c

Please sign in to comment.