Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8061305

Javadoc crashes when method name ends with "Property"

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 9
    • 8u20, 9
    • tools
    • b39
    • x86_64
    • windows_7
    • Verified

    Backports

      Description

        FULL PRODUCT VERSION :


        ADDITIONAL OS VERSION INFORMATION :
        Windows 7, Ubuntu, probably all

        A DESCRIPTION OF THE PROBLEM :
        When generating javadoc if there is method that ends with "Property" java doc fails.
         

        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        Generate javadoc for the following class

        public class Utils {
            /**
             * Create a new SimpleListProperty with an empty ObservableList instantiated.
             *
             * @param <T> The type.
             * @return The property.
             */
            public static <T> SimpleListProperty<T> newSimpleListProperty() {
                return new SimpleListProperty<>(FXCollections.<T>observableArrayList());
            }
        }

        EXPECTED VERSUS ACTUAL BEHAVIOR :
        EXPECTED -
        To generate javadoc.
        ACTUAL -
        It fails with error message: Exit code: 1 - javadoc: error - com.sun.tools.doclets.internal.toolkit.util.DocletAbortException: java.lang.ClassCastException: com.sun.tools.doclets.formats.html.PropertyWriterImpl cannot be cast to com.sun.tools.doclets.formats.html.AbstractExecutableMemberWriter

        ERROR MESSAGES/STACK TRACES THAT OCCUR :
        MavenReportException: Error while creating archive:
        Exit code: 1 - javadoc: error - com.sun.tools.doclets.internal.toolkit.util.DocletAbortException: java.lang.ClassCastException: com.sun.tools.doclets.formats.html.PropertyWriterImpl cannot be cast to com.sun.tools.doclets.formats.html.AbstractExecutableMemberWriter

        Command line was: "C:\Program Files\Java\jdk1.8.0_20\jre\..\bin\javadoc.exe" @options @packages

        Refer to the generated Javadoc files in 'C:\Users\goran\Documents\NetBeansProjects\anahata-jfx\target\apidocs' dir.

        org.apache.maven.reporting.MavenReportException:
        Exit code: 1 - javadoc: error - com.sun.tools.doclets.internal.toolkit.util.DocletAbortException: java.lang.ClassCastException: com.sun.tools.doclets.formats.html.PropertyWriterImpl cannot be cast to com.sun.tools.doclets.formats.html.AbstractExecutableMemberWriter

        Command line was: "C:\Program Files\Java\jdk1.8.0_20\jre\..\bin\javadoc.exe" @options @packages

        Refer to the generated Javadoc files in 'C:\Users\goran\Documents\NetBeansProjects\anahata-jfx\target\apidocs' dir.

        at org.apache.maven.plugin.javadoc.AbstractJavadocMojo.executeJavadocCommandLine(AbstractJavadocMojo.java:5074)
        at org.apache.maven.plugin.javadoc.AbstractJavadocMojo.executeReport(AbstractJavadocMojo.java:1999)
        at org.apache.maven.plugin.javadoc.JavadocJar.execute(JavadocJar.java:181)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
        at org.apache.maven.lifecycle.internal.LifecycleThreadedBuilder$1.call(LifecycleThreadedBuilder.java:167)
        at org.apache.maven.lifecycle.internal.LifecycleThreadedBuilder$1.call(LifecycleThreadedBuilder.java:163)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)

        REPRODUCIBILITY :
        This bug can be reproduced always.

        ---------- BEGIN SOURCE ----------
        public class Utils {
            /**
             * Create a new SimpleListProperty with an empty ObservableList instantiated.
             *
             * @param <T> The type.
             * @return The property.
             */
            public static <T> SimpleListProperty<T> newSimpleListProperty() {
                return new SimpleListProperty<>(FXCollections.<T>observableArrayList());
            }
        }
        ---------- END SOURCE ----------

        CUSTOMER SUBMITTED WORKAROUND :
        Change method name so it does not end with "Property"

        For example:
         public static <T> SimpleListProperty<T> newListPropertySimple() {
                return new SimpleListProperty<>(FXCollections.<T>observableArrayList());
            }

        Attachments

          Issue Links

            Activity

              People

                ksrini Kumar Srinivasan
                webbuggrp Webbug Group
                Votes:
                0 Vote for this issue
                Watchers:
                9 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: