You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2021/03/28 10:58:54 UTC

[GitHub] [netbeans] JaroslavTulach opened a new pull request #2835: Opt-in and treat warnings are errors

JaroslavTulach opened a new pull request #2835:
URL: https://github.com/apache/netbeans/pull/2835


   I am trying to use some of the NetBeans libraries in GraalVM. Graal project is very strict when it comes to code styling issues. Formatting, warnings, Findbugs or Jackpot findings are treated as errors. I kinda got used to that. However it is not enough to fix the warnings once, it is important to compile with `-Werror` to prevent reintroduction of the warnings.
   
   I think NetBeans would benefit from disallowing warnings as well. Commit 
   70bf5cb  demonstrates how to go about it - add `-Werror` to your module `nbproject/project.properties`. Compilation with `ant clean build` is likely to fail. Fix the errors. One of the tricky problem is usage of `@NonNull` & co. annotations:
   ```
    org-netbeans-api-annotations-common.jar(org/netbeans/api/annotations/common/NonNull.class): warning: Cannot find annotation method 'when()' in type 'Nonnull': class file for javax.annotation.Nonnull not found
   warning: unknown enum constant When.ALWAYS
     reason: class file for javax.annotation.meta.When not found
    org-netbeans-api-annotations-common.jar(org/netbeans/api/annotations/common/NullAllowed.class): warning: Cannot find annotation method 'when()' in type 'Nonnull'
   warning: unknown enum constant When.MAYBE
   warning: No processor claimed any of these annotations: org.netbeans.api.annotations.common.NullAllowed,javax.annotation.processing.SupportedAnnotationTypes,org.netbeans.api.annotations.common.NonNull
    org-netbeans-api-annotations-common.jar(org/netbeans/api/annotations/common/NonNull.class): warning: Cannot find annotation method 'when()' in type 'Nonnull': class file for javax.annotation.Nonnull not found
   warning: unknown enum constant When.ALWAYS
     reason: class file for javax.annotation.meta.When not found
    org-netbeans-api-annotations-common.jar(org/netbeans/api/annotations/common/NullAllowed.class): warning: Cannot find annotation method 'when()' in type 'Nonnull'
   warning: unknown enum constant When.MAYBE
    org-netbeans-api-annotations-common.jar(org/netbeans/api/annotations/common/NonNull.class): warning: Cannot find annotation method 'when()' in type 'Nonnull': class file for javax.annotation.Nonnull not found
   warning: unknown enum constant When.ALWAYS
     reason: class file for javax.annotation.meta.When not found
    org-netbeans-api-annotations-common.jar(org/netbeans/api/annotations/common/NullAllowed.class): warning: Cannot find annotation method 'when()' in type 'Nonnull'
   warning: unknown enum constant When.MAYBE
   ```
   which is caused by the way our build system works. This PR tries to address that as well and does that by removing the `jsr305.jar` in b906a98 and using IDE hints to create the missing classes, fields and methods (see f3cacd2). Exposing the `javax.annotation.meta` package to other modules then fixes the warnings in `api.intent` module.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] phejl commented on a change in pull request #2835: Opt-in to treat warnings as errors

Posted by GitBox <gi...@apache.org>.
phejl commented on a change in pull request #2835:
URL: https://github.com/apache/netbeans/pull/2835#discussion_r605013017



##########
File path: platform/api.annotations.common/build.xml
##########
@@ -24,79 +24,4 @@
 
     <import file="../../nbbuild/templates/projectized.xml"/>
 
-    <!--
-    <target name="findbugs-annotations-init" if="api.annotations.common.findbugs">
-        <echo>Building common annotations for usage with FindBugs...</echo>
-
-        <property name="src.dir" location="build/generated"/>
-        <property name="src.common" location="src"/>
-
-    </target>
-
-    <target name="build-init" depends="findbugs-annotations-init, projectized.build-init"/>
-
-    <target name="compile" depends="findbugs-annotations, projectized-common.compile"/>
-
-    <target name="findbugs-annotations" if="api.annotations.common.findbugs" depends="build-init, projectized.findbugs-init">

Review comment:
       It's been a long time so I don't remember exactly (and I'm not sure where this might have evolved) but this was present to change annotations to class retention and thus usable in FindBugs/SpotBugs check as it operates on class files.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] JaroslavTulach commented on a change in pull request #2835: Opt-in to treat warnings as errors

Posted by GitBox <gi...@apache.org>.
JaroslavTulach commented on a change in pull request #2835:
URL: https://github.com/apache/netbeans/pull/2835#discussion_r605101715



##########
File path: platform/api.annotations.common/build.xml
##########
@@ -24,79 +24,4 @@
 
     <import file="../../nbbuild/templates/projectized.xml"/>
 
-    <!--
-    <target name="findbugs-annotations-init" if="api.annotations.common.findbugs">
-        <echo>Building common annotations for usage with FindBugs...</echo>
-
-        <property name="src.dir" location="build/generated"/>
-        <property name="src.common" location="src"/>
-
-    </target>
-
-    <target name="build-init" depends="findbugs-annotations-init, projectized.build-init"/>
-
-    <target name="compile" depends="findbugs-annotations, projectized-common.compile"/>
-
-    <target name="findbugs-annotations" if="api.annotations.common.findbugs" depends="build-init, projectized.findbugs-init">

Review comment:
       Welcome back Petr! Looks like the annotations now have `Retention.CLASS` by default: https://bits.netbeans.org/12.3/javadoc/org-netbeans-api-annotations-common/org/netbeans/api/annotations/common/package-summary.html
   
   Otherwise `javac` wouldn't see them when `org-netbeans-api-annotation-commons.jar` is used as a library (which produces the nasty warnings). But probably I should have apply `Retention.CLASS` to `Nonnull`, `TypeQualifierNickname` and `TypeQualifier` as well...




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] jtulach commented on pull request #2835: Opt-in to treat warnings as errors

Posted by GitBox <gi...@apache.org>.
jtulach commented on pull request #2835:
URL: https://github.com/apache/netbeans/pull/2835#issuecomment-810161601


   > Is this ready for 12.4?
   
   I guess it is ready. The remaining question is whether to keep 93699b9 in or rather use `-Xlint:proccesor`. I am fine with both alternatives, but I prefer to go with 93699b9 as there can be various warnings in annotation processing and having them as errors is useful. The [JDK bug](https://bugs.openjdk.java.net/browse/JDK-6999068) is unlikely to be fixed and moreover we want to compile on existing JDKs anyway. 
   
   If 93699b9 is kept in, then: over time it may happen that we need to expand the list of annotations that deserve to be marked as processed. I see no problem with that. As people turn `-Werror` in certain modules, they should be ready to expand the annotation list (or to add `-Xlint:processor` - the decision can be done per each module).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] JaroslavTulach edited a comment on pull request #2835: Opt-in to treat warnings as errors

Posted by GitBox <gi...@apache.org>.
JaroslavTulach edited a comment on pull request #2835:
URL: https://github.com/apache/netbeans/pull/2835#issuecomment-810370576


   OK. There is an approval by Matthias. Unless objections are raised, I'll merge tomorrow together with 93699b9 - if that commit is too adventurous, speak up and I merge without it and replace it with `-Xlint:processor`.
   
   Note to myself: **don't forget** to add `apichages.xml` and **versioning** in `api.annotations.common`!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] JaroslavTulach commented on pull request #2835: Opt-in to treat warnings as errors

Posted by GitBox <gi...@apache.org>.
JaroslavTulach commented on pull request #2835:
URL: https://github.com/apache/netbeans/pull/2835#issuecomment-811160577


   Mac build failed due to network error. RAT check is failing for everyone. Let's integrate!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] JaroslavTulach merged pull request #2835: Opt-in to treat warnings as errors

Posted by GitBox <gi...@apache.org>.
JaroslavTulach merged pull request #2835:
URL: https://github.com/apache/netbeans/pull/2835


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] jtulach commented on a change in pull request #2835: Opt-in to treat warnings as errors

Posted by GitBox <gi...@apache.org>.
jtulach commented on a change in pull request #2835:
URL: https://github.com/apache/netbeans/pull/2835#discussion_r604025566



##########
File path: platform/libs.junit4/src/META-INF/services/javax.annotation.processing.Processor
##########
@@ -14,4 +14,5 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-25EA2E8B0C338A877313BD4672D3FE056EA78F0D com.google.code.findbugs:jsr305:3.0.2
\ No newline at end of file
+#
+#org.netbeans.libs.junit4.NbJUnitProcessor

Review comment:
       Opps. Corrected in: 93699b9




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] JaroslavTulach edited a comment on pull request #2835: Opt-in and treat warnings are errors

Posted by GitBox <gi...@apache.org>.
JaroslavTulach edited a comment on pull request #2835:
URL: https://github.com/apache/netbeans/pull/2835#issuecomment-808880242


   Now, when I run `ant -f platform/api.annotations.common build` I get a [SigTest](http://github.com/jtulach/netbeans-apitest) failure:
   ```
   Class javax.annotation.Nonnull
     "E2.8 - Removing default value from member of annotation type" : method public abstract !hasdefault javax.annotation.meta.When javax.annotation.Nonnull.when()
   Class javax.annotation.meta.TypeQualifier
     "E1.2 - API type removed" : CLASS public abstract interface !annotation javax.annotation.meta.TypeQualifier
    anno 0 java.lang.annotation.Documented()
    anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME)
    anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[ANNOTATION_TYPE])
   ```
   Looks like I haven't recreated the API properly. Let's fix that now! With 4f644ae the sigtest failures are gone - e.g. the emulation of JSR-305 is good enough from [SigTest](http://github.com/jtulach/netbeans-apitest) perspective.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] JaroslavTulach commented on pull request #2835: Opt-in and treat warnings are errors

Posted by GitBox <gi...@apache.org>.
JaroslavTulach commented on pull request #2835:
URL: https://github.com/apache/netbeans/pull/2835#issuecomment-808886073


   Particularly tricky problem is the `-Xlint:-processor` option. The option isn't checking just `Retention.SOURCE` annotations (that have to have a processor to be useful), but all of kinds of them. Either we can disable the _annotation processor linting_ (as done in 70bf5cb  commit) or we need to mark the well known annotations processed by some dedicated processors to avoid warnings like:
   ```
   warning: No processor claimed any of these annotations: javax.annotation.processing.SupportedAnnotationTypes
   warning: No processor claimed any of these annotations: org.junit.Test,org.junit.Before
   ```
   Commit 100db7f30d shows how such processor would look like.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] neilcsmith-net commented on pull request #2835: Opt-in to treat warnings as errors

Posted by GitBox <gi...@apache.org>.
neilcsmith-net commented on pull request #2835:
URL: https://github.com/apache/netbeans/pull/2835#issuecomment-810167690


   Thanks for additional thoughts @JaroslavTulach Makes sense.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] JaroslavTulach commented on pull request #2835: Opt-in and treat warnings are errors

Posted by GitBox <gi...@apache.org>.
JaroslavTulach commented on pull request #2835:
URL: https://github.com/apache/netbeans/pull/2835#issuecomment-808880242


   Now, when I run `ant -f platform/api.annotations.common build` I get a [SigTest](http://github.com/jtulach/netbeans-apitest) failure:
   ```
   Class javax.annotation.Nonnull
     "E2.8 - Removing default value from member of annotation type" : method public abstract !hasdefault javax.annotation.meta.When javax.annotation.Nonnull.when()
   Class javax.annotation.meta.TypeQualifier
     "E1.2 - API type removed" : CLASS public abstract interface !annotation javax.annotation.meta.TypeQualifier
    anno 0 java.lang.annotation.Documented()
    anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME)
    anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[ANNOTATION_TYPE])
   ```
   Looks like I haven't recreated the API properly. Let's fix that now!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] matthiasblaesing commented on a change in pull request #2835: Opt-in to treat warnings as errors

Posted by GitBox <gi...@apache.org>.
matthiasblaesing commented on a change in pull request #2835:
URL: https://github.com/apache/netbeans/pull/2835#discussion_r602909457



##########
File path: platform/api.annotations.common/src/org/netbeans/api/annotations/common/proc/StaticResourceProcessor.java
##########
@@ -35,12 +36,31 @@
 import javax.tools.Diagnostic;
 import javax.tools.JavaFileManager;
 import javax.tools.StandardLocation;
+import org.netbeans.api.annotations.common.CheckForNull;
+import org.netbeans.api.annotations.common.CheckReturnValue;
+import org.netbeans.api.annotations.common.NonNull;
+import org.netbeans.api.annotations.common.NullAllowed;
+import org.netbeans.api.annotations.common.NullUnknown;
 import org.netbeans.api.annotations.common.StaticResource;
 
 public class StaticResourceProcessor extends AbstractProcessor {
 
     public @Override Set<String> getSupportedAnnotationTypes() {
-        return Collections.singleton(StaticResource.class.getCanonicalName());
+        TreeSet<String> all = new TreeSet<>();
+
+        // org.netbeans.api.annotations.common annotations
+        all.add(CheckForNull.class.getCanonicalName());
+        all.add(CheckReturnValue.class.getCanonicalName());
+        all.add(NonNull.class.getCanonicalName());
+        all.add(NullAllowed.class.getCanonicalName());
+        all.add(NullUnknown.class.getCanonicalName());
+        all.add(StaticResource.class.getCanonicalName());
+        all.add(SuppressWarnings.class.getCanonicalName());
+
+        // other well-known Java platform annotations
+        all.add(SupportedAnnotationTypes.class.getCanonicalName());

Review comment:
       If I read the description correctly this code is intended to silence warnings. I understand, that the java compiler warns, that no processor claims to process these annotations and these annotations are pure marker annotations 
   
   I'm not so sure in case of SuppressWarnings and SupportedAnnotationTypes, which come from the JDK itself and thus indicate an issue in the JDK itself.

##########
File path: platform/libs.junit4/src/META-INF/services/javax.annotation.processing.Processor
##########
@@ -14,4 +14,5 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-25EA2E8B0C338A877313BD4672D3FE056EA78F0D com.google.code.findbugs:jsr305:3.0.2
\ No newline at end of file
+#
+#org.netbeans.libs.junit4.NbJUnitProcessor

Review comment:
       Why is this commented?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] neilcsmith-net commented on pull request #2835: Opt-in to treat warnings as errors

Posted by GitBox <gi...@apache.org>.
neilcsmith-net commented on pull request #2835:
URL: https://github.com/apache/netbeans/pull/2835#issuecomment-810044292


   IMO, not quite yet. I read as WIP approach to annotation warnings? As per my question (re. already suggested options), do we really want processor linting? If we really need an annotation processor to grab things that don't need grabbing, should it be a dedicated and documented one? Other than that, positive change though!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] neilcsmith-net edited a comment on pull request #2835: Opt-in to treat warnings as errors

Posted by GitBox <gi...@apache.org>.
neilcsmith-net edited a comment on pull request #2835:
URL: https://github.com/apache/netbeans/pull/2835#issuecomment-810167690


   Thanks for additional thoughts @jtulach Makes sense.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] phejl commented on a change in pull request #2835: Opt-in to treat warnings as errors

Posted by GitBox <gi...@apache.org>.
phejl commented on a change in pull request #2835:
URL: https://github.com/apache/netbeans/pull/2835#discussion_r605439474



##########
File path: platform/api.annotations.common/build.xml
##########
@@ -24,79 +24,4 @@
 
     <import file="../../nbbuild/templates/projectized.xml"/>
 
-    <!--
-    <target name="findbugs-annotations-init" if="api.annotations.common.findbugs">
-        <echo>Building common annotations for usage with FindBugs...</echo>
-
-        <property name="src.dir" location="build/generated"/>
-        <property name="src.common" location="src"/>
-
-    </target>
-
-    <target name="build-init" depends="findbugs-annotations-init, projectized.build-init"/>
-
-    <target name="compile" depends="findbugs-annotations, projectized-common.compile"/>
-
-    <target name="findbugs-annotations" if="api.annotations.common.findbugs" depends="build-init, projectized.findbugs-init">

Review comment:
       Ok, then. Thanks @JaroslavTulach. I guess it would be safer to have the other annotations with CLASS retention as well. 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] JaroslavTulach edited a comment on pull request #2835: Opt-in to treat warnings as errors

Posted by GitBox <gi...@apache.org>.
JaroslavTulach edited a comment on pull request #2835:
URL: https://github.com/apache/netbeans/pull/2835#issuecomment-810370576


   OK. There is an approval by Matthias. Unless objections are raised, I'll merge tomorrow together with 93699b9 - if that commit is too adventurous, speak up and I merge without it and replace it with `-Xlint:processor`.
   
   Javadoc, `apichages.xml` and **versioning** finalized in 3338dbc 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] neilcsmith-net commented on a change in pull request #2835: Opt-in to treat warnings as errors

Posted by GitBox <gi...@apache.org>.
neilcsmith-net commented on a change in pull request #2835:
URL: https://github.com/apache/netbeans/pull/2835#discussion_r603514972



##########
File path: platform/api.annotations.common/src/org/netbeans/api/annotations/common/proc/StaticResourceProcessor.java
##########
@@ -35,12 +36,31 @@
 import javax.tools.Diagnostic;
 import javax.tools.JavaFileManager;
 import javax.tools.StandardLocation;
+import org.netbeans.api.annotations.common.CheckForNull;
+import org.netbeans.api.annotations.common.CheckReturnValue;
+import org.netbeans.api.annotations.common.NonNull;
+import org.netbeans.api.annotations.common.NullAllowed;
+import org.netbeans.api.annotations.common.NullUnknown;
 import org.netbeans.api.annotations.common.StaticResource;
 
 public class StaticResourceProcessor extends AbstractProcessor {
 
     public @Override Set<String> getSupportedAnnotationTypes() {
-        return Collections.singleton(StaticResource.class.getCanonicalName());
+        TreeSet<String> all = new TreeSet<>();
+
+        // org.netbeans.api.annotations.common annotations
+        all.add(CheckForNull.class.getCanonicalName());
+        all.add(CheckReturnValue.class.getCanonicalName());
+        all.add(NonNull.class.getCanonicalName());
+        all.add(NullAllowed.class.getCanonicalName());
+        all.add(NullUnknown.class.getCanonicalName());
+        all.add(StaticResource.class.getCanonicalName());
+        all.add(SuppressWarnings.class.getCanonicalName());
+
+        // other well-known Java platform annotations
+        all.add(SupportedAnnotationTypes.class.getCanonicalName());

Review comment:
       Yes, surely "Either we can disable the annotation processor linting.." is the right approach here? But what other warnings might be lost by doing that, and of those what might actually be errors? Curious a quick search found this - https://bugs.openjdk.java.net/browse/JDK-6999068




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] JaroslavTulach commented on pull request #2835: Opt-in to treat warnings as errors

Posted by GitBox <gi...@apache.org>.
JaroslavTulach commented on pull request #2835:
URL: https://github.com/apache/netbeans/pull/2835#issuecomment-810370576


   OK. There is an approval by Matthias. Unless objections are raised, I'll merge tomorrow together with 93699b9 - if that commit is too adventurous, speak up and I merge without it and replace it with `-Xlint:processor`.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] geertjanw commented on pull request #2835: Opt-in to treat warnings as errors

Posted by GitBox <gi...@apache.org>.
geertjanw commented on pull request #2835:
URL: https://github.com/apache/netbeans/pull/2835#issuecomment-810021637


   Is this ready for 12.4?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] sdedic commented on pull request #2835: Opt-in to treat warnings as errors

Posted by GitBox <gi...@apache.org>.
sdedic commented on pull request #2835:
URL: https://github.com/apache/netbeans/pull/2835#issuecomment-809330661


   Looks sane.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists