Path: blob/aarch64-shenandoah-jdk8u272-b10/langtools/test/tools/javadoc/BreakIteratorWarning.java
32285 views
/*1* Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation.7*8* This code is distributed in the hope that it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11* version 2 for more details (a copy is included in the LICENSE file that12* accompanied this code).13*14* You should have received a copy of the GNU General Public License version15* 2 along with this work; if not, write to the Free Software Foundation,16* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.17*18* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA19* or visit www.oracle.com if you need additional information or have any20* questions.21*/2223/*24* @test25* @bug 495998526* @summary Verify that (verbose) warnings are no longer generated when27* the default first-sentence algorithm doesn't match the28* BreakIterator algorithm.29*/3031import com.sun.javadoc.*;3233public class BreakIteratorWarning extends Doclet {3435public static void main(String[] args) {36String thisFile = "" +37new java.io.File(System.getProperty("test.src", "."),38"BreakIteratorWarning.java");3940if (com.sun.tools.javadoc.Main.execute(41"javadoc",42"BreakIteratorWarning",43BreakIteratorWarning.class.getClassLoader(),44new String[] {"-Xwerror", thisFile}) != 0)45throw new Error("Javadoc encountered warnings or errors.");46}4748public static boolean start(RootDoc root) {49ClassDoc cd = root.classes()[0];50FieldDoc fd = cd.fields()[0];51fd.firstSentenceTags();52return true;53}545556/**57* "He'll never catch up!" the Sicilian cried. "Inconceivable!"58* "You keep using that word!" the Spaniard snapped. "I do not59* think it means what you think it means."60*61* <p> This comment used to trigger a warning, but no longer does.62*/63public String author = "William Goldman";64}656667