From f279b245d78add30cfbd58759adb59ed5ea518e7 Mon Sep 17 00:00:00 2001 From: henry Date: Tue, 13 Feb 2024 08:59:15 +0000 Subject: [PATCH] switch unmodifiable collection filtering off by defualt --- .../defensive/ReturnUnmodifiableCollectionFactory.java | 4 ++-- .../ReturnUnmodifiableCollectionFactoryTest.java | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pitest-entry/src/main/java/org/pitest/mutationtest/build/intercept/defensive/ReturnUnmodifiableCollectionFactory.java b/pitest-entry/src/main/java/org/pitest/mutationtest/build/intercept/defensive/ReturnUnmodifiableCollectionFactory.java index 0543537d4..f00ff40d5 100644 --- a/pitest-entry/src/main/java/org/pitest/mutationtest/build/intercept/defensive/ReturnUnmodifiableCollectionFactory.java +++ b/pitest-entry/src/main/java/org/pitest/mutationtest/build/intercept/defensive/ReturnUnmodifiableCollectionFactory.java @@ -13,8 +13,8 @@ public MutationInterceptor createInterceptor(InterceptorParameters params) { @Override public Feature provides() { - return Feature.named("DEFENSIVERETURN") - .withOnByDefault(true) + return Feature.named("funmodifiablecollection") + .withOnByDefault(false) .withDescription(description()); } diff --git a/pitest-entry/src/test/java/org/pitest/mutationtest/build/intercept/defensive/ReturnUnmodifiableCollectionFactoryTest.java b/pitest-entry/src/test/java/org/pitest/mutationtest/build/intercept/defensive/ReturnUnmodifiableCollectionFactoryTest.java index b53d1086e..c1a23ae57 100644 --- a/pitest-entry/src/test/java/org/pitest/mutationtest/build/intercept/defensive/ReturnUnmodifiableCollectionFactoryTest.java +++ b/pitest-entry/src/test/java/org/pitest/mutationtest/build/intercept/defensive/ReturnUnmodifiableCollectionFactoryTest.java @@ -30,15 +30,15 @@ public void isOnChain() { } @Test - public void isOnByDefault() { + public void isOffByDefault() { FactoryVerifier.confirmFactory(underTest) - .isOnByDefault(); + .isOffByDefault(); } @Test - public void featureIsCalledLombok() { + public void featureIsCalledUnmodifiableCollection() { FactoryVerifier.confirmFactory(underTest) - .featureName().isEqualTo("defensivereturn"); + .featureName().isEqualTo("funmodifiablecollection"); } @Test