PicoContainer
  1. PicoContainer
  2. PICO-385

Introduction Documentation on Container Hierarchies: sample comments in the code and sentences behing are not consistent

    Details

    • Type: Improvement Improvement
    • Status: Open Open
    • Priority: Trivial Trivial
    • Resolution: Unresolved
    • Affects Version/s: 2.13.5
    • Fix Version/s: None
    • Component/s: Documentation
    • Labels:
      None
    • Number of attachments :
      0

      Description

      In this page http://picocontainer.org/introduction.html, on the section Container Hierarchies.

      Peeler peeler = (Peeler) z.getComponent(Peeler.class); // WON'T WORK! peeler will be null 
      peeler = (Peeler) x.getComponent(Peeler.class); // WON'T WORK! This will throw an exception 
      Juicer juicer = (Juicer) y.getComponent(Juicer.class);
      

      I think the comments are not attached to the correct lines:

      • // WON'T WORK! peeler will be null => must apply to the 2nd line
      • // WON'T WORK! This will throw an exception => must apply to the 3rd line
        At first read it's not clear.

      Furthermore, the sentences explaining the code are not correct regarding line numbers.
      There is no line 12, 14, 16

        People

        • Assignee:
          Unassigned
          Reporter:
          Alexandre GIGLEUX
        • Votes:
          0 Vote for this issue
          Watchers:
          0 Start watching this issue

          Dates

          • Created:
            Updated: