Skip to content

Commit

Permalink
[4269] Go back to older isActive method names..
Browse files Browse the repository at this point in the history
to avoid API breakage.

 #4269
  • Loading branch information
Samuel Cox committed Jul 30, 2024
1 parent b87ed02 commit 288f3ef
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public List<Profile> activeProfiles(final Iterable<String> userSpecifiedProfiles

final List<Profile> explicitActiveProfiles =
profiles.getProfiles().stream()
.filter(p -> p.isActivated(userSpecifiedProfiles))
.filter(p -> p.isActive(userSpecifiedProfiles))
.collect(Collectors.toList());

// activeByDefault profiles should be active even if they don't exist
Expand Down Expand Up @@ -345,15 +345,15 @@ public static class Profile {
RawRepositories repositories;

@SuppressWarnings("unused")
public boolean isActivated(String... activeProfiles) {
return isActivated(Arrays.asList(activeProfiles));
public boolean isActive(String... activeProfiles) {
return isActive(Arrays.asList(activeProfiles));
}

/**
* Returns true if this profile was activated either by the supplied active profiles
* or by activation property, <i>but not solely by activeByDefault</i>.
*/
boolean isActivated(Iterable<String> activeProfiles) {
boolean isActive(Iterable<String> activeProfiles) {
if (getId() != null) {
for (String activeProfile : activeProfiles) {
if (activeProfile.trim().equals(getId())) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public List<MavenRepository> getEffectiveRepositories() {
public List<Profile> activeProfiles(final Iterable<String> userSpecifiedProfiles) {
final List<Profile> explicitActiveProfiles =
getProfiles().stream()
.filter(p -> p.isActivated(userSpecifiedProfiles))
.filter(p -> p.isActive(userSpecifiedProfiles))
.collect(Collectors.toList());

// activeByDefault profiles should be active even if they don't exist
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public class Profile {
* Returns true if this profile was activated either by the supplied active profiles
* or by activation property, <i>but not solely by activeByDefault</i>.
*/
public boolean isActivated(Iterable<String> activeProfiles) {
public boolean isActive(Iterable<String> activeProfiles) {
if (getId() != null) {
for (String activeProfile : activeProfiles) {
if (activeProfile.trim().equals(getId())) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public class ProfileActivation {
* Determines the supplied profile `id` should be considered active
* given the other parameters.
*
* @deprecated use {@link Profile#isActivated(Iterable)}
* @deprecated use {@link Profile#isActive(Iterable)}
*/
@Deprecated
public static boolean isActive(@Nullable String id, Iterable<String> activeProfiles,
Expand Down

0 comments on commit 288f3ef

Please sign in to comment.