pombreda / google-guice

Automatically exported from code.google.com/p/google-guice
Apache License 2.0
0 stars 1 forks source link

Robot Legs PrivateModule leakage #805

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Description of the issue:

When using a PrivateModule (or PrivateBinding) to solve the robot legs problem, 
the private bindings used to construct a leg appear to leak into the other 
private bindings if one of the legs lack an binding annotation.

The attached example produces the following output:

left=RobotLegs$Leg@17a83597 foot=RobotLegs$Foot@245658a3 (righty)
right=RobotLegs$Leg@20d547f8 foot=RobotLegs$Foot@245658a3 (righty)

(Notice the legs have the same right foot).

If both legs are annotated, this works as expected:

left=RobotLegs$Leg@17a83597 foot=RobotLegs$Foot@245658a3 (lefty)
right=RobotLegs$Leg@20d547f8 foot=RobotLegs$Foot@1267fb9f (righty)

Steps to reproduce:

See attached.

Original issue reported on code.google.com by michael....@gmail.com on 3 May 2014 at 5:15

GoogleCodeExporter commented 9 years ago
Attaching missing example.

Original comment by michael....@gmail.com on 3 May 2014 at 5:16

Attachments: