diff --git a/java/java-analysis-impl/src/com/siyeh/ig/testFrameworks/ConstantAssertArgumentInspection.java b/java/java-analysis-impl/src/com/siyeh/ig/testFrameworks/ConstantAssertArgumentInspection.java index 09f5f58643e0..7bf482276d11 100644 --- a/java/java-analysis-impl/src/com/siyeh/ig/testFrameworks/ConstantAssertArgumentInspection.java +++ b/java/java-analysis-impl/src/com/siyeh/ig/testFrameworks/ConstantAssertArgumentInspection.java @@ -1,4 +1,4 @@ -// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +// Copyright 2000-2024 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.siyeh.ig.testFrameworks; import com.intellij.psi.PsiExpression; @@ -15,14 +15,12 @@ import java.util.Set; public final class ConstantAssertArgumentInspection extends BaseInspection { @NonNls - private static final Set ASSERT_METHODS = new HashSet<>(); - - static { - ASSERT_METHODS.add("assertTrue"); - ASSERT_METHODS.add("assertFalse"); - ASSERT_METHODS.add("assertNull"); - ASSERT_METHODS.add("assertNotNull"); - } + private static final Set ASSERT_METHODS = Set.of( + "assertTrue", + "assertFalse", + "assertNull", + "assertNotNull" + ); @Override @NotNull