Here you can find the source of filterSupportedSourceVersionWarnings( List
public static List<Diagnostic<? extends JavaFileObject>> filterSupportedSourceVersionWarnings( List<Diagnostic<? extends JavaFileObject>> diagnostics)
//package com.java2s; //License from project: Open Source License import java.util.ArrayList; import java.util.List; import java.util.Locale; import javax.tools.Diagnostic; import javax.tools.JavaFileObject; public class Main { /**/* w ww.j a va 2 s .co m*/ * Filter out warnings about {@link SupportedSourceVersion}. * {@code metainf-services-1.1.jar} produces {@code warning: No SupportedSourceVersion annotation found on org.kohsuke.metainf_services.AnnotationProcessorImpl, returning RELEASE_6.} which is irrelevant to us. * (Development versions have already fixed this; when released and used here, delete this method.) */ public static List<Diagnostic<? extends JavaFileObject>> filterSupportedSourceVersionWarnings( List<Diagnostic<? extends JavaFileObject>> diagnostics) { List<Diagnostic<? extends JavaFileObject>> r = new ArrayList<Diagnostic<? extends JavaFileObject>>(); for (Diagnostic<? extends JavaFileObject> d : diagnostics) { if (!d.getMessage(Locale.ENGLISH).contains("SupportedSourceVersion")) { r.add(d); } } return r; } }