mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-26 19:06:24 +07:00
correctly fixed not-null instrumentation for enums (IDEA-56943)
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
* Copyright 2000-2010 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public enum EnumConstructorSecondParam {
|
||||
Value("1", "2");
|
||||
|
||||
EnumConstructorSecondParam(String s1, @NotNull String s2) {
|
||||
}
|
||||
}
|
||||
+6
@@ -63,6 +63,12 @@ public class NotNullVerifyingInstrumenterTest extends UsefulTestCase {
|
||||
assertNotNull(field);
|
||||
}
|
||||
|
||||
public void testEnumConstructorSecondParam() throws Exception {
|
||||
Class testClass = prepareTest();
|
||||
Object field = testClass.getField("Value");
|
||||
assertNotNull(field);
|
||||
}
|
||||
|
||||
private static void verifyCallThrowsException(final String expectedError, final Object instance, final Method method, final Object... args) throws IllegalAccessException {
|
||||
String exceptionText = null;
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user