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/29 18:05:41 UTC

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

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