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

(spec) java.compiler related inconsistency between implementation and docs

    XMLWordPrintable

    Details

    • Subcomponent:
    • Understanding:
      Cause Known

      Backports

        Description

        The 1.5.0 javadoc for java.lang.System states:

          The current set of system properties for use by the getProperty(String)
          method is returned as a Properties object. If there is no current set
          of system properties, a set of system properties is first created and
          initialized. This set of system properties always includes values for
          the following keys: ...

        And among the keys listed is java.compiler. The above statement thus
        quite clearly claims that a value for java.compiler always should
        be included.

        However, when executing a small program that lists the system
        properties (see attachment), java.compiler is lacking when using
        1.5.0. Further, the 1.5.0 javadoc for java.lang.Compiler states:

          When the Java Virtual Machine first starts, it determines if the system
          property java.compiler exists. (System properties are accessible through
          getProperty and , a method defined by the System class.) If so, it is
          assumed to be the name of a library ...

        I interpret this as "sometimes the system property java.compiler could
        be missing".

        So, in addition to aforementioned discrepancy between implementation and
        documentation, there also appears to be a discrepancy (contradiction)
        within the documentation itself.

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                Unassigned Unassigned
                Reporter:
                clucasius Carlos Lucasius (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Imported:
                  Indexed: