Skip to content

Commit 0e22a08

Browse files
anusreelakshmi934archana-1924TrevCrawJoseph-BineeshRejoice472
authored
Integrate Lsp4jakarta 0.2.5 integration branch to Main (#1467)
* JavaCursorContextKind IllegalArgumentException workaround deletion Liberty tools (#1366) * Liberty tools changes * Deletion of work-around * Deletion of work-around comments * Keeping only first and last year of changes. --------- Co-authored-by: archanr <[email protected]> * Enable builds to run for lsp4jakarta-0.2.5-integration branch (#1421) * Issue 1401: New diagnostics for PersistenceMapKeyDiagnostics (#1405) * Introducing hasField to check the existence of PsiField * Accessor warning diagnostics for method and field * Add diagnostics for type check * Update copyright * Update PersistenceMapKeyDiagnosticsCollector.java Map FQDN constant * Testcases for following diagnostics: Access specifier diagnostic Method or Field type diagnostic * Testcase input files * Source code formatted * Change variable name to follow Oracle's guidelines * Refactor hasField method * Removed lines * Using StringUtils utility * Change from isEmpty to isNotBlank * Copyright update * Feature/size and not empty annotation diagnostics (#1410) * Introduced validation for size and notEmpty sds * Update messages.properties * size and notEmpty test cases * size and notEmpty test resources * pr comments * Update BeanValidationTest.java * corrected diagnostics grammer * pr comments * pr comments addressed * PR comments * Feature/diagnostic for checked exception condition (#1411) * Added diagnostics error for checked exceptions in throws clause * added custom exception test resources * updated the existing test resources * added new test cases to support the changes * format corrected * format corrected * pr comments * PR comments * Update PostConstructAnnotationTest.java * Issue 1401: QuickFix for ServerEndpoint paths without a leading slash (#1412) * Update Error code and test case * PrefixSlash quickfix draft * Prefix Slash proposal implementation * Copyright * Testcase update for PrefixSlashAnnotationQuickFix * Refactor performUpdate * Copyright Updates * Feature/managed bean diagnostics experience improved (#1414) * Explore whether the user experience can be improved for diagnostics / quick fixes involving @dependent * updated test cases * added test resource to support the new test scenarios * format issue corrected * Update ManagedBeanTest.java * Update ManagedBeanTest.java * Update ManagedBeanTest.java * Update ManagedBeanTest.java * Dependency Injection: Diagnostics for non-static inner class managed bean (#1419) * Diagnostics for non-static inner class managed bean * Quick fix for non-static inner class managed bean * Added test resources to support the non-static inner class managed bean test cases * test cases * Update InnerClassInjectionTest.java * Update InsertModifierToNestedClassQuickFix.java * pr comments fixed * changd needsStaticModifier to needsModifier as the method is implemented for accepting any modifier * Sync changes for Jsonb Property Names Must Be Unique, from lsp4Jakarta (#1420) * Json Utility * Messages and constant updates * Diagnostics for json property unique names * Reformatted source code * Test classes for jsonbUnique testcase * Test cases for jsonb unique diagnostics * Copyright update * Copyright updates * Format source * Nested loop - Refactored * TestCase sync PR for Jakarta issueFix 528 (#1413) * Test update for annotations DecimalMin, DecimalMax, AssertFalse * Update test for annotations Digits, Email, FutureOrPresent, Future * Update test for annotations NegativeOrZero, Negative, Max, Min * Update test for annotations NotBlank, Pattern, Past, PastOrPresent * Update test case for annotation Positive * Copyright update * Conflict resolved * Feature/mutually exclusive ones (#1423) * Added two new quick fixes * new mappings in plugin.xml * Added mutuallyExclusive logic * Update plugin.xml * Update plugin.xml * Update ManagedBeanDiagnosticsCollector.java * Update ManagedBeanDiagnosticsCollector.java * test cases * pr fix * Update ManagedBeanDiagnosticsCollector.java * Update ManagedBeanDiagnosticsCollector.java * Default value for the type annotation attribute should be Object.class (#1381) * Default value for the type annotation attribute should be Object.class * fixed test cases * Revert "JavaCursorContextKind IllegalArgumentException workaround deletion Liberty tools (#1365)" (#1439) This reverts commit f53dc01. Co-authored-by: Sajeer <[email protected]> * Update plugin.xml (#1463) * lsp4JakartaVersion updated to 0.2.5 (#1465) --------- Co-authored-by: Archana Iyer <[email protected]> Co-authored-by: archanr <[email protected]> Co-authored-by: Trevor Crawford <[email protected]> Co-authored-by: Joseph-Bineesh <[email protected]> Co-authored-by: Rejoy J Kulangara <[email protected]> Co-authored-by: Sajeer Zeji <[email protected]> Co-authored-by: Sajeer <[email protected]>
1 parent f1bc140 commit 0e22a08

File tree

49 files changed

+2402
-368
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+2402
-368
lines changed

.github/workflows/build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ on:
4747
push:
4848
branches: '**'
4949
pull_request:
50-
branches: [ main ]
50+
branches: [ main, lsp4jakarta-0.2.5-integration ]
5151

5252
jobs:
5353
fetch_merge_commit_sha_from_lsp4ij_PR:

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ideTargetVersion=2025.2.1
1313
platformBundledPlugins=com.intellij.java, org.jetbrains.idea.maven, com.intellij.gradle, org.jetbrains.plugins.terminal, com.intellij.properties
1414

1515
# Version numbers of dependencies
16-
lsp4JakartaVersion=0.2.3
16+
lsp4JakartaVersion=0.2.5
1717
lsp4mpVersion=0.13.0
1818
lemminxVersion=0.26.1
1919
lclsLemminxVersion=2.4
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/*******************************************************************************
2+
* Copyright (c) 2025 IBM Corporation
3+
*
4+
* This program and the accompanying materials are made available under the
5+
* terms of the Eclipse Public License v. 2.0 which is available at
6+
* http://www.eclipse.org/legal/epl-2.0.
7+
*
8+
* SPDX-License-Identifier: EPL-2.0
9+
*
10+
* Contributors:
11+
* IBM Corporation - initial API and implementation
12+
*******************************************************************************/
13+
14+
package io.openliberty.tools.intellij.lsp4jakarta.lsp4ij;
15+
16+
import com.intellij.openapi.project.Project;
17+
import com.intellij.psi.*;
18+
import com.intellij.psi.search.GlobalSearchScope;
19+
20+
/**
21+
* Utility class for common IntelliJ PSI-based diagnostic logic.
22+
*/
23+
public class DiagnosticsUtils {
24+
25+
/**
26+
* inheritsFrom
27+
* Check if specified superType is present or not in the type hierarchy
28+
*
29+
* @param clazz
30+
* @param fqSuperType
31+
* @return
32+
*/
33+
public static boolean inheritsFrom(PsiClass clazz, String fqSuperType) {
34+
Project project = clazz.getProject();
35+
PsiClass superClass = JavaPsiFacade.getInstance(project)
36+
.findClass(fqSuperType, GlobalSearchScope.allScope(project));
37+
return superClass != null &&
38+
(clazz.isEquivalentTo(superClass) || clazz.isInheritor(superClass, true));
39+
}
40+
}
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
/*******************************************************************************
2+
* Copyright (c) 2025 IBM Corporation and others.
3+
*
4+
* This program and the accompanying materials are made available under the
5+
* terms of the Eclipse Public License v. 2.0 which is available at
6+
* http://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0
7+
* which is available at https://www.apache.org/licenses/LICENSE-2.0.
8+
*
9+
* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0
10+
*
11+
* Contributors:
12+
* IBM Corporation - initial API and implementation
13+
*******************************************************************************/
14+
package io.openliberty.tools.intellij.lsp4jakarta.lsp4ij;
15+
16+
import java.util.regex.Matcher;
17+
import java.util.regex.Pattern;
18+
19+
import com.intellij.psi.PsiAnnotation;
20+
import com.intellij.psi.PsiAnnotationMemberValue;
21+
import io.openliberty.tools.intellij.lsp4jakarta.lsp4ij.jsonb.JsonbConstants;
22+
23+
24+
/**
25+
* Utilities for working with JSON properties and extracting/decoding values from its attribute, annotation etc.
26+
*/
27+
public class JsonPropertyUtils {
28+
29+
/**
30+
* @param propertyName
31+
* @return String
32+
* @description Method decodes unicode property name value to string value
33+
*/
34+
public static String decodeUnicodeName(String propertyName) {
35+
Pattern pattern = Pattern.compile(JsonbConstants.JSONB_PROPERTYNAME_UNICODE); // Pattern for detecting unicode sequence
36+
Matcher matcher = pattern.matcher(propertyName);
37+
StringBuffer decoded = new StringBuffer();
38+
while (matcher.find()) {
39+
String unicode = matcher.group(1);
40+
char decodedChar = (char) Integer.parseInt(unicode, 16);
41+
matcher.appendReplacement(decoded, Character.toString(decodedChar));
42+
}
43+
matcher.appendTail(decoded);
44+
return decoded.toString();
45+
}
46+
47+
/**
48+
* @param annotation
49+
* @return String
50+
* @description Method extracts property name value from the annotation
51+
*/
52+
public static String extractPropertyNameFromJsonField(PsiAnnotation annotation) {
53+
PsiAnnotationMemberValue psiValue = annotation.findAttributeValue("value");
54+
String value = psiValue != null ? psiValue.getText() : null;
55+
// Remove wrapping quotes if it's a string literal
56+
if (value != null && value.startsWith("\"") && value.endsWith("\"")) {
57+
value = value.substring(1, value.length() - 1);
58+
}
59+
return value;
60+
}
61+
}

src/main/java/io/openliberty/tools/intellij/lsp4jakarta/lsp4ij/annotations/AnnotationConstants.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2021, 2022 IBM Corporation and others.
2+
* Copyright (c) 2021, 2025 IBM Corporation and others.
33
*
44
* This program and the accompanying materials are made available under the
55
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -44,4 +44,8 @@ public class AnnotationConstants {
4444
public static final String DIAGNOSTIC_CODE_PREDESTROY_PARAMS = "PreDestroyParams";
4545
public static final String DIAGNOSTIC_CODE_PREDESTROY_EXCEPTION = "PreDestroyException";
4646
public static final String DIAGNOSTIC_CODE_PREDESTROY_STATIC = "PreDestroyStatic";
47+
48+
/* Exceptions */
49+
public static final String EXCEPTION = "java.lang.Exception";
50+
public static final String RUNTIME_EXCEPTION = "java.lang.RuntimeException";
4751
}

src/main/java/io/openliberty/tools/intellij/lsp4jakarta/lsp4ij/annotations/AnnotationDiagnosticsCollector.java

Lines changed: 59 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2021, 2024 IBM Corporation and others.
2+
* Copyright (c) 2021, 2025 IBM Corporation and others.
33
*
44
* This program and the accompanying materials are made available under the
55
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -14,8 +14,8 @@
1414
package io.openliberty.tools.intellij.lsp4jakarta.lsp4ij.annotations;
1515

1616
import com.intellij.psi.*;
17-
import com.intellij.psi.util.PsiUtil;
1817
import io.openliberty.tools.intellij.lsp4jakarta.lsp4ij.AbstractDiagnosticsCollector;
18+
import io.openliberty.tools.intellij.lsp4jakarta.lsp4ij.DiagnosticsUtils;
1919
import io.openliberty.tools.intellij.lsp4jakarta.lsp4ij.Messages;
2020
import org.eclipse.lsp4j.Diagnostic;
2121
import org.eclipse.lsp4j.DiagnosticSeverity;
@@ -25,6 +25,9 @@
2525
import java.util.List;
2626
import java.util.regex.Pattern;
2727

28+
import static io.openliberty.tools.intellij.lsp4jakarta.lsp4ij.annotations.AnnotationConstants.EXCEPTION;
29+
import static io.openliberty.tools.intellij.lsp4jakarta.lsp4ij.annotations.AnnotationConstants.RUNTIME_EXCEPTION;
30+
2831
/**
2932
*
3033
* jararta.annotation Diagnostics
@@ -148,6 +151,13 @@ public void collectDiagnostics(PsiJavaFile unit, List<Diagnostic> diagnostics) {
148151
if (isMatchedAnnotation(annotation, AnnotationConstants.POST_CONSTRUCT_FQ_NAME)) {
149152
if (element instanceof PsiMethod) {
150153
PsiMethod method = (PsiMethod) element;
154+
if (isCheckedExceptionPresent(method)) {
155+
String diagnosticMessage = Messages.getMessage("MethodMustNotThrow",
156+
"@PostConstruct");
157+
diagnostics.add(createDiagnostic(method, unit, diagnosticMessage,
158+
AnnotationConstants.DIAGNOSTIC_CODE_POSTCONSTRUCT_EXCEPTION, null,
159+
DiagnosticSeverity.Error));
160+
}
151161
if (method.getParameters().length != 0) {
152162
String diagnosticMessage = Messages.getMessage("MethodMustNotHaveParameters",
153163
"@PostConstruct");
@@ -163,18 +173,17 @@ public void collectDiagnostics(PsiJavaFile unit, List<Diagnostic> diagnostics) {
163173
AnnotationConstants.DIAGNOSTIC_CODE_POSTCONSTRUCT_RETURN_TYPE, null,
164174
DiagnosticSeverity.Error));
165175
}
166-
167-
if (method.getThrowsTypes().length != 0) {
168-
String diagnosticMessage = Messages.getMessage("MethodMustNotThrow",
169-
"@PostConstruct");
170-
diagnostics.add(createDiagnostic(method, unit, diagnosticMessage,
171-
AnnotationConstants.DIAGNOSTIC_CODE_POSTCONSTRUCT_EXCEPTION, null,
172-
DiagnosticSeverity.Warning));
173-
}
174176
}
175177
} else if (isMatchedAnnotation(annotation, AnnotationConstants.PRE_DESTROY_FQ_NAME)) {
176178
if (element instanceof PsiMethod) {
177179
PsiMethod method = (PsiMethod) element;
180+
if (isCheckedExceptionPresent(method)) {
181+
String diagnosticMessage = Messages.getMessage("MethodMustNotThrow",
182+
"@PreDestroy");
183+
diagnostics.add(createDiagnostic(method, unit, diagnosticMessage,
184+
AnnotationConstants.DIAGNOSTIC_CODE_PREDESTROY_EXCEPTION, null,
185+
DiagnosticSeverity.Error));
186+
}
178187
if (method.getParameters().length != 0) {
179188
String diagnosticMessage = Messages.getMessage("MethodMustNotHaveParameters",
180189
"@PreDestroy");
@@ -190,14 +199,6 @@ public void collectDiagnostics(PsiJavaFile unit, List<Diagnostic> diagnostics) {
190199
AnnotationConstants.DIAGNOSTIC_CODE_PREDESTROY_STATIC, method.getName(),
191200
DiagnosticSeverity.Error));
192201
}
193-
194-
if (method.getThrowsTypes().length != 0) {
195-
String diagnosticMessage = Messages.getMessage("MethodMustNotThrow",
196-
"@PreDestroy");
197-
diagnostics.add(createDiagnostic(method, unit, diagnosticMessage,
198-
AnnotationConstants.DIAGNOSTIC_CODE_PREDESTROY_EXCEPTION, null,
199-
DiagnosticSeverity.Warning));
200-
}
201202
}
202203
}
203204
}
@@ -224,4 +225,44 @@ private static boolean isValidAnnotation(String annotationName, String[] validAn
224225
}
225226
return false;
226227
}
228+
229+
/**
230+
* isCheckedExceptionPresent
231+
* This method scans the exception signatures to identify if any checked exceptions are declared.
232+
*
233+
* @param method
234+
* @return
235+
*/
236+
private boolean isCheckedExceptionPresent(PsiMethod method) {
237+
for (PsiClassType type : method.getThrowsList().getReferencedTypes()) {
238+
PsiClass exceptionClass = type.resolve();
239+
if (exceptionClass != null && extendsException(exceptionClass) && notExtendsRuntimeException(exceptionClass)) {
240+
return true;
241+
}
242+
}
243+
return false;
244+
}
245+
246+
/**
247+
* extendsException
248+
*
249+
* @param exceptionClass The root type of which the super-types are checked.
250+
* @return true if Exception is the superType of the given exception type.
251+
*/
252+
private static boolean extendsException(PsiClass exceptionClass) {
253+
return DiagnosticsUtils.inheritsFrom(exceptionClass, EXCEPTION);
254+
}
255+
256+
/**
257+
* notExtendsRuntimeException
258+
*
259+
* @param exceptionClass The root type of which the super-types are checked.
260+
* @return true if RuntimeException is not the superType of the given exception type.
261+
*/
262+
private static boolean notExtendsRuntimeException(PsiClass exceptionClass) {
263+
return !DiagnosticsUtils.inheritsFrom(exceptionClass, RUNTIME_EXCEPTION);
264+
}
265+
266+
267+
227268
}

src/main/java/io/openliberty/tools/intellij/lsp4jakarta/lsp4ij/beanvalidation/BeanValidationConstants.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2020, 2024 IBM Corporation, Reza Akhavan and others.
2+
* Copyright (c) 2020, 2025 IBM Corporation, Reza Akhavan and others.
33
*
44
* This program and the accompanying materials are made available under the
55
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -63,6 +63,8 @@ public class BeanValidationConstants {
6363
public static final String STRING = "java.lang.String";
6464
public static final String BIG_INTEGER = "java.math.BigInteger";
6565
public static final String BIG_DECIMAL = "java.math.BigDecimal";
66+
public static final String COLLECTION_FQ = "java.util.Collection";
67+
public static final String MAP_FQ = "java.util.Map";
6668

6769
public static final String DIAGNOSTIC_SOURCE = "jakarta-bean-validation";
6870
public static final String DIAGNOSTIC_CODE_INVALID_TYPE = "FixTypeOfElement";

src/main/java/io/openliberty/tools/intellij/lsp4jakarta/lsp4ij/beanvalidation/BeanValidationDiagnosticsCollector.java

Lines changed: 32 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2020, 2024 IBM Corporation, Reza Akhavan and others.
2+
* Copyright (c) 2020, 2025 IBM Corporation, Reza Akhavan and others.
33
*
44
* This program and the accompanying materials are made available under the
55
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -14,11 +14,13 @@
1414
package io.openliberty.tools.intellij.lsp4jakarta.lsp4ij.beanvalidation;
1515

1616
import com.intellij.psi.*;
17+
import com.intellij.psi.util.PsiUtil;
1718
import io.openliberty.tools.intellij.lsp4jakarta.lsp4ij.AbstractDiagnosticsCollector;
1819
import io.openliberty.tools.intellij.lsp4jakarta.lsp4ij.Messages;
1920
import org.eclipse.lsp4j.Diagnostic;
2021
import org.eclipse.lsp4j.DiagnosticSeverity;
2122

23+
import static io.openliberty.tools.intellij.lsp4jakarta.lsp4ij.DiagnosticsUtils.inheritsFrom;
2224
import static io.openliberty.tools.intellij.lsp4jakarta.lsp4ij.JDTUtils.getSimpleName;
2325
import static io.openliberty.tools.intellij.lsp4jakarta.lsp4ij.beanvalidation.BeanValidationConstants.*;
2426

@@ -159,40 +161,40 @@ private void validAnnotation(PsiElement element, PsiAnnotation annotation, Strin
159161
diagnostics.add(createDiagnostic(element, (PsiJavaFile) element.getContainingFile(),
160162
source, DIAGNOSTIC_CODE_INVALID_TYPE, annotationName, DiagnosticSeverity.Error));
161163
}
164+
} else if (matchedAnnotation.equals(NOT_EMPTY) || matchedAnnotation.equals(SIZE)) {
165+
if (!(isSizeOrNonEmptyAllowed(type))) {
166+
String source = isMethod ?
167+
Messages.getMessage("SizeOrNonEmptyAnnotationsMethod") : Messages.getMessage(
168+
"SizeOrNonEmptyAnnotationsField");
169+
diagnostics.add(createDiagnostic(element, (PsiJavaFile) element.getContainingFile(),
170+
source, DIAGNOSTIC_CODE_INVALID_TYPE, annotationName, DiagnosticSeverity.Error));
171+
}
162172
}
163-
164-
// These ones contains check on all collection types which requires resolving
165-
// the String of the type somehow
166-
// This will also require us to check if the field type was a custom collection
167-
// subtype which means we
168-
// have to resolve it and get the super interfaces and check to see if
169-
// Collection, Map or Array was implemented
170-
// for that custom type (which could as well be a user made subtype)
171-
172-
// else if (annotation.getElementName().equals(NOT_EMPTY) || annotation.getElementName().equals(SIZE)) {
173-
//
174-
// System.out.println("--Field name: " + Signature.getTypeSignatureKind(fieldType));
175-
// System.out.println("--Field name: " + Signature.getParameterTypes(fieldType));
176-
// if ( !fieldType.equals(getSignatureFormatOfType(CHAR_SEQUENCE)) &&
177-
// !fieldType.contains("List") &&
178-
// !fieldType.contains("Set") &&
179-
// !fieldType.contains("Collection") &&
180-
// !fieldType.contains("Array") &&
181-
// !fieldType.contains("Vector") &&
182-
// !fieldType.contains("Stack") &&
183-
// !fieldType.contains("Queue") &&
184-
// !fieldType.contains("Deque") &&
185-
// !fieldType.contains("Map")) {
186-
//
187-
// diagnostics.add(new Diagnostic(fieldAnnotationrange,
188-
// "This annotation can only be used on CharSequence, Collection, Array, "
189-
// + "Map type fields."));
190-
// }
191-
// }
192173
}
193174
}
194175
}
195176

177+
/**
178+
* isSizeOrNonEmptyAllowed
179+
* This method checks whether the supported types for the Size and NotEmpty annotations are CharSequence, Collection, Map, or array.
180+
*
181+
* @param childType
182+
* @return
183+
*/
184+
public static boolean isSizeOrNonEmptyAllowed(PsiType childType) {
185+
186+
if (childType instanceof PsiArrayType) {
187+
return true;
188+
}
189+
if (childType instanceof PsiPrimitiveType) {
190+
return false;
191+
}
192+
PsiClass resolvedClass = PsiUtil.resolveClassInClassTypeOnly(childType);
193+
return resolvedClass != null && (inheritsFrom(resolvedClass, CHAR_SEQUENCE)
194+
|| inheritsFrom(resolvedClass, COLLECTION_FQ)
195+
|| inheritsFrom(resolvedClass, MAP_FQ));
196+
}
197+
196198
private void checkStringOnly(PsiElement element, List<Diagnostic> diagnostics, String annotationName, boolean isMethod, PsiType type) {
197199
if (!type.getCanonicalText().equals(STRING)
198200
&& !type.getCanonicalText().equals(CHAR_SEQUENCE)) {

src/main/java/io/openliberty/tools/intellij/lsp4jakarta/lsp4ij/cdi/ManagedBeanConstants.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,12 @@ public class ManagedBeanConstants {
3636
public static final String DIAGNOSTIC_CODE_INVALID_INJECT_PARAM = "RemoveInjectOrConflictedAnnotations";
3737
public static final String DIAGNOSTIC_CODE_INVALID_PRODUCES_PARAM = "RemoveProducesOrConflictedAnnotations";
3838
public static final String DIAGNOSTIC_CODE_INVALID_DISPOSES_PARAM = "RemoveDisposesOrConflictedAnnotations";
39+
public static final String DIAGNOSTIC_INJECT_MULTIPLE_METHOD_PARAM = "InvalidInjectAnnotationOnMultipleMethodParams";
3940

4041
public static final String DIAGNOSTIC_CODE_REDUNDANT_DISPOSES = "RemoveExtraDisposes";
41-
42+
//Added as part of fix that adds two quick fixes which are mutually exclusive issue #540
43+
public static final String[] INVALID_DISPOSER_FQ_PARAMS = { DISPOSES_FQ_NAME };
44+
public static final String[] INVALID_DISPOSER_FQ_CONFLICTED_PARAMS = { OBSERVES_FQ_NAME, OBSERVES_ASYNC_FQ_NAME };
4245
public static final String[] INVALID_INJECT_PARAMS_FQ = { DISPOSES_FQ_NAME, OBSERVES_FQ_NAME,
4346
OBSERVES_ASYNC_FQ_NAME };
4447

0 commit comments

Comments
 (0)