Merge

Sat, 04 Aug 2018 12:55:17 +0100

author
aefimov
date
Sat, 04 Aug 2018 12:55:17 +0100
changeset 3736
7b508cdd33ae
parent 3735
554e7579f421
parent 3692
6c91965b2ac2
child 3737
d5c506c5e329

Merge

.hgtags file | annotate | diff | comparison | revisions
     1.1 --- a/.hgtags	Fri Jul 27 11:50:55 2018 +0100
     1.2 +++ b/.hgtags	Sat Aug 04 12:55:17 2018 +0100
     1.3 @@ -924,3 +924,10 @@
     1.4  1f33e21011aaeac7e0d567be4e67f8953c42f6e0 jdk8u201-b00
     1.5  1f33e21011aaeac7e0d567be4e67f8953c42f6e0 jdk8u191-b02
     1.6  87c55122c89d88cdfd4bf22a0bc9c115429cb78b jdk8u191-b03
     1.7 +249320309c12b00ce2c3c489b031d2cc1c99d265 jdk8u191-b04
     1.8 +aee7802a04daf266caadc5742737bdd7d9a17937 jdk8u182-b00
     1.9 +6412528c09e2af2f551b496f455eb2141f20d525 jdk8u192-b00
    1.10 +db3c95ad833530ff6454cf47b9063325902bbb64 jdk8u192-b01
    1.11 +b9b11d994f5cab7000f53a2a9cf8a15b2b3f23b1 jdk8u192-b02
    1.12 +df7eda60d98d11b89fae1eb901899dd88d33ae58 jdk8u192-b03
    1.13 +7031ed34a60400768d5136df03cbf8f05e6d9a6b jdk8u192-b04
     2.1 --- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/VisibleMemberMap.java	Fri Jul 27 11:50:55 2018 +0100
     2.2 +++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/VisibleMemberMap.java	Sat Aug 04 12:55:17 2018 +0100
     2.3 @@ -664,6 +664,9 @@
     2.4          // properties aren't named setA* or getA*
     2.5          private final Pattern pattern = Pattern.compile("[sg]et\\p{Upper}.*");
     2.6          private boolean isPropertyMethod(MethodDoc method) {
     2.7 +            if (!configuration.javafx) {
     2.8 +               return false;
     2.9 +            }
    2.10              if (!method.name().endsWith("Property")) {
    2.11                  return false;
    2.12              }
    2.13 @@ -675,7 +678,9 @@
    2.14              if (pattern.matcher(method.name()).matches()) {
    2.15                  return false;
    2.16              }
    2.17 -
    2.18 +            if (method.typeParameters().length > 0) {
    2.19 +                return false;
    2.20 +            }
    2.21              return 0 == method.parameters().length
    2.22                      && !"void".equals(method.returnType().simpleTypeName());
    2.23          }
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/test/com/sun/javadoc/testMethodEndingInProperty/Test.java	Sat Aug 04 12:55:17 2018 +0100
     3.3 @@ -0,0 +1,26 @@
     3.4 +/*
     3.5 + * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
     3.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3.7 + *
     3.8 + * This code is free software; you can redistribute it and/or modify it
     3.9 + * under the terms of the GNU General Public License version 2 only, as
    3.10 + * published by the Free Software Foundation.
    3.11 + *
    3.12 + * This code is distributed in the hope that it will be useful, but WITHOUT
    3.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    3.14 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    3.15 + * version 2 for more details (a copy is included in the LICENSE file that
    3.16 + * accompanied this code).
    3.17 + *
    3.18 + * You should have received a copy of the GNU General Public License version
    3.19 + * 2 along with this work; if not, write to the Free Software Foundation,
    3.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    3.21 + *
    3.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    3.23 + * or visit www.oracle.com if you need additional information or have any
    3.24 + * questions.
    3.25 + */
    3.26 +
    3.27 +public class Test {
    3.28 +    public <T> Object fProperty() { return null; }
    3.29 +}
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/test/com/sun/javadoc/testMethodEndingInProperty/TestMethodEndingInProperty.java	Sat Aug 04 12:55:17 2018 +0100
     4.3 @@ -0,0 +1,73 @@
     4.4 +/*
     4.5 + * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
     4.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4.7 + *
     4.8 + * This code is free software; you can redistribute it and/or modify it
     4.9 + * under the terms of the GNU General Public License version 2 only, as
    4.10 + * published by the Free Software Foundation.
    4.11 + *
    4.12 + * This code is distributed in the hope that it will be useful, but WITHOUT
    4.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    4.14 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    4.15 + * version 2 for more details (a copy is included in the LICENSE file that
    4.16 + * accompanied this code).
    4.17 + *
    4.18 + * You should have received a copy of the GNU General Public License version
    4.19 + * 2 along with this work; if not, write to the Free Software Foundation,
    4.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    4.21 + *
    4.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    4.23 + * or visit www.oracle.com if you need additional information or have any
    4.24 + * questions.
    4.25 + */
    4.26 +
    4.27 +/*
    4.28 + * @test
    4.29 + * @bug 8061305
    4.30 + * @summary Test methods ending in 'Property'
    4.31 + * @library ../lib/
    4.32 + * @build JavadocTester TestMethodEndingInProperty
    4.33 + * @run main TestMethodEndingInProperty
    4.34 + */
    4.35 +
    4.36 +public class TestMethodEndingInProperty extends JavadocTester {
    4.37 +
    4.38 +    private static final String BUG_ID = "8061305";
    4.39 +    private static final String ERROR_OUTPUT = "com.sun.tools.doclets.formats.html.PropertyWriterImpl " +
    4.40 +                                               "cannot be cast to " +
    4.41 +                                               "com.sun.tools.doclets.formats.html.AbstractExecutableMemberWriter";
    4.42 +
    4.43 +    private static final String[] ARGS = new String[] {
    4.44 +        "-d", BUG_ID, "-sourcepath", SRC_DIR, SRC_DIR + FS + "Test.java"
    4.45 +    };
    4.46 +
    4.47 +    /**
    4.48 +     * The entry point of the test.
    4.49 +     * @param args the array of command line arguments.
    4.50 +     */
    4.51 +    public static void main(String[] args) {
    4.52 +        TestMethodEndingInProperty tester = new TestMethodEndingInProperty();
    4.53 +        int actual = tester.runJavadoc(ARGS);
    4.54 +        int expected = 0;
    4.55 +        tester.checkExitCode(expected, actual);
    4.56 +        String errOut = tester.getErrorOutput();
    4.57 +        if (errOut.contains(ERROR_OUTPUT)) {
    4.58 +            throw new Error("Error output contained: " + ERROR_OUTPUT);
    4.59 +        }
    4.60 +        System.out.println("Test passed");
    4.61 +    }
    4.62 +
    4.63 +    /**
    4.64 +     * {@inheritDoc}
    4.65 +     */
    4.66 +    public String getBugId() {
    4.67 +        return BUG_ID;
    4.68 +    }
    4.69 +
    4.70 +    /**
    4.71 +     * {@inheritDoc}
    4.72 +     */
    4.73 +    public String getBugName() {
    4.74 +        return getClass().getName();
    4.75 +    }
    4.76 +}

mercurial