From 8d06711b57cd835c28f1a681ce8fb7182adc85e5 Mon Sep 17 00:00:00 2001 From: Snjezana Peco Date: Mon, 17 Jun 2024 18:01:23 +0200 Subject: [PATCH] Ensure every null analysis annotation has a value defined when enabled Signed-off-by: Snjezana Peco --- .gitignore | 1 + .../internal/preferences/Preferences.java | 4 +-- .../projects/eclipse/testnullable3/.classpath | 7 +++++ .../projects/eclipse/testnullable3/.project | 17 +++++++++++ ...eans-api-annotations-common-RELEASE200.jar | Bin 0 -> 208506 bytes .../testnullable3/src/org/sample/Main.java | 10 +++++++ .../preferences/NullAnalysisTest.java | 28 ++++++++++++++++++ 7 files changed, 65 insertions(+), 2 deletions(-) create mode 100644 org.eclipse.jdt.ls.tests/projects/eclipse/testnullable3/.classpath create mode 100644 org.eclipse.jdt.ls.tests/projects/eclipse/testnullable3/.project create mode 100644 org.eclipse.jdt.ls.tests/projects/eclipse/testnullable3/lib/org-netbeans-api-annotations-common-RELEASE200.jar create mode 100644 org.eclipse.jdt.ls.tests/projects/eclipse/testnullable3/src/org/sample/Main.java diff --git a/.gitignore b/.gitignore index aa39c96c08..fc78d75716 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ bin/ **/lib/ !org.eclipse.jdt.ls.tests/projects/singlefile/simple/lib/ !org.eclipse.jdt.ls.tests/projects/eclipse/testnullable2/lib/ +!org.eclipse.jdt.ls.tests/projects/eclipse/testnullable3/lib/ !org.eclipse.jdt.ls.tests/projects/maven/salut5/node_modules/ !org.eclipse.jdt.ls.tests/fakejdk2/17a/bin !org.eclipse.jdt.ls.tests/fakejdk2/17a/lib diff --git a/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/preferences/Preferences.java b/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/preferences/Preferences.java index a0a0620ae0..88bc6fcc0e 100644 --- a/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/preferences/Preferences.java +++ b/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/preferences/Preferences.java @@ -2455,7 +2455,7 @@ private boolean hasAnnotationNullAnalysisTypes() { String nonnullType = getAnnotationType(javaProject, this.nonnullTypes, nonnullClasspathStorage); String nullableType = getAnnotationType(javaProject, this.nullableTypes, nullableClasspathStorage); String nonnullbydefaultTypes = getAnnotationType(javaProject, this.nonnullbydefaultTypes, nonnullbydefaultClasspathStorage); - if (nonnullType != null || nullableType != null || nonnullbydefaultTypes != null) { + if (nonnullType != null && nullableType != null && nonnullbydefaultTypes != null) { return true; } } @@ -2529,7 +2529,7 @@ private String findTypeInProject(IJavaProject javaProject, String annotationType */ private Map generateProjectNullAnalysisOptions(String nonnullType, String nullableType, String nonnullbydefaultType) { Map options = new HashMap<>(); - if (nonnullType == null && nullableType == null && nonnullbydefaultType == null) { + if (nonnullType == null || nullableType == null || nonnullbydefaultType == null) { options.put(JavaCore.COMPILER_ANNOTATION_NULL_ANALYSIS, "disabled"); // set default values Hashtable defaultOptions = JavaCore.getDefaultOptions(); diff --git a/org.eclipse.jdt.ls.tests/projects/eclipse/testnullable3/.classpath b/org.eclipse.jdt.ls.tests/projects/eclipse/testnullable3/.classpath new file mode 100644 index 0000000000..0781177cda --- /dev/null +++ b/org.eclipse.jdt.ls.tests/projects/eclipse/testnullable3/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/org.eclipse.jdt.ls.tests/projects/eclipse/testnullable3/.project b/org.eclipse.jdt.ls.tests/projects/eclipse/testnullable3/.project new file mode 100644 index 0000000000..cac8291a30 --- /dev/null +++ b/org.eclipse.jdt.ls.tests/projects/eclipse/testnullable3/.project @@ -0,0 +1,17 @@ + + + testnullable2 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/org.eclipse.jdt.ls.tests/projects/eclipse/testnullable3/lib/org-netbeans-api-annotations-common-RELEASE200.jar b/org.eclipse.jdt.ls.tests/projects/eclipse/testnullable3/lib/org-netbeans-api-annotations-common-RELEASE200.jar new file mode 100644 index 0000000000000000000000000000000000000000..cb8b9e4edc92846b60c806452598e597c66955ec GIT binary patch literal 208506 zcmeIb4V)awbsts(EHJ=gal8Y0M}nVC@JIqU%nWvc!`fqD&|Ll$_X+BiS6xjn`qz7}-h1`xRrQ^h4$sUoc8sxi`QLh< zMgARUGwkN_`eJ3}){WX%f10s7LD6@j=;wd!yZ65H5M%WB4%`+Ly}5X6<;L>bdiCaw zo2FxLS$?PTvgP@<>s&SFs~1nsE;^BK7Tach$1?C8ew@EponJUPyX0AB$7)or?c)yI zQk}n2oquZHIJ;bL+HD`D8*aN}cU$L9&facY&dT-W%1yV?ZCaH(-OZ+5uiP=~56o@L zziPZ@J~a2LrsKFBvjYs(^A~!*Yn_}mtd2>)x!!iwu{xWU>G)N%ZAWhPt97^4qAGft zeG#oxu3Ny;u$;P04bxY~H=}wVPJUas;A~Itv#o&&_W=XEmO^e8sHKU%s^Y z^g`q5ilFF8&j1L6FRl1+{eAMF zTMz8>xgl%7AgL$%@Ri^B;`tZ8e2CHCqo^iOwW}*j%eU5+XN`mYNhP}q0e5_BP^4Wox8WM-&>-uFYr>=SJu|=u3WoE-|!0NtHyO} z%XVy1;eM5WhkDP*9-T4#9kbaqTF}}?2j-+>c`e^CorY0&orbu}*m6Ci>suEL&jOVj z-8xlvL3WJFHf+D+*_&PZ-Y|WmK}}i>V{_kFvv_IWm`DAd+uhzVo-^Dne6Uf@t#?VC zCvmx653su1-uLY7osQw|I+h28Y~V(_vu~K)&W`KZ-@@CIpr|X!J32dN$3Uaoo{1Zs zZQfr=hX?>`+iV)kyy_khU57fz(OZUzj-eKX0%QOsW&17wNPy7VXbDY&pdHU`UNB6L z!0``F4w{T7{}wg^w}~MkYmxJbfA4XA3~g?86#yO5ZWssY0lkIu+i&TvNi z###HExYgaYybEBT2QCo^8$74$3r5E^>L!>@QNr?-_ z?vBN~5AO4JK`7K6rOd8P(uDTT+Cah?>hIWXs%gvK0#9M?Fbq1z*{3gl7zNOr3!(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+>r%~=0`v13CgIUl-H%otsZLw{rn@;IZupMS&=sZ>W2k7MkN-jNAmcxs#n&>x% zB(5ChVyLNsEPiX_x6gulKh7TeUCNL1eot=8JMp{hsWS7w1_~Z4v!yb_OuCETd3ptQ z19ylA*Q74Yfzad2Nx=nRxPvVzQSgHhaLF}d+N|enLYph zYxwGGVDU`!ZU!zLk}7ByDh|_i^n_H9kMBtZJ@W?p*!j2EH<0XqWA!iK8^#R$(Qowk z_VZt2-}DxHfqq~75tO`Ef>fLdHRmH>5W~WR!M>eU*dL8(uV*-+87JHfJA_rVL+o2n z_7E6N%O&r|oy&N~x(d4VLu}(HEkpbY`?VKN-+8HY=pBcllI77AR7(A$ZI0sKqwLog z=_)wL;;TPR*$d&V@5HGWpZ~S*-uq6N5&EMYYUzZca8 zV^E%Jkpz`I`6j%3<`)lzcZ-uok~b%hO^Mw6%aNOd;m-$j projects = importProjects("eclipse/testnullable3"); + IProject project = projects.get(0); + assertIsJavaProject(project); + boolean updated = this.preferenceManager.getPreferences().updateAnnotationNullAnalysisOptions(); + assertFalse(updated); + projects = importProjects("eclipse/testnullable2"); + project = projects.get(0); + assertIsJavaProject(project); + updated = this.preferenceManager.getPreferences().updateAnnotationNullAnalysisOptions(); + assertTrue(updated); + } finally { + this.preferenceManager.getPreferences().setNonnullTypes(Collections.emptyList()); + this.preferenceManager.getPreferences().setNullableTypes(Collections.emptyList()); + this.preferenceManager.getPreferences().setNonnullbydefaultTypes(Collections.emptyList()); + this.preferenceManager.getPreferences().updateAnnotationNullAnalysisOptions(); + this.preferenceManager.getPreferences().setNullAnalysisMode(FeatureStatus.disabled); + } + } + }