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

non-compiling example in documenation

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 7u4
    • 7
    • docs
    • b10
    • x86
    • windows_7
    • Verified

        FULL PRODUCT VERSION :
        java version "1.7.0_02"
        Java(TM) SE Runtime Environment (build 1.7.0_02-b13)
        Java HotSpot(TM) 64-Bit Server VM (build 22.0-b10, mixed mode)


        ADDITIONAL OS VERSION INFORMATION :
        Windows 7 [Version 6.1.7601]

        A DESCRIPTION OF THE PROBLEM :
        on page
        http://docs.oracle.com/javase/7/docs/technotes/guides/deployment/deployment-guide/cookie_support.html
        it says:

           Map<String, List<String>> headers = handler.get(url.toURI(), new Map<String, List<String>>());

        Two problems:
        1. the second Map should read HashMap since Map is an interface and cannot be instantiated.

        2. There are a large number of pointless spaces after String, that should be removed.


        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        Just look at the web page in a browser.

        EXPECTED VERSUS ACTUAL BEHAVIOR :
        EXPECTED -
        Examples should not contain syntax errors. They should compile.
        ACTUAL -
        Code has syntax error

        REPRODUCIBILITY :
        This bug can be reproduced always.

              skannan Sowmya Kannan (Inactive)
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: