prometheus/client_java — pull request #16 by matttproud (2014-03-24 08:09:53+00:00)
Title: Fix broken API contract for metric cloning.

The ``Metric`` primitives support cloning of their mutation objects
by means of a call to ``Metric.Child#clone``. This has been an code path that
has seldom been used but was explicitly asked for by prospective users.
Unfortunately it was not tested thoroughly until recently, when it was
discovered that the exposed protocol to API consumers results in

Counter.Child#clone() // yields Metric.Child
Gauge.Child#clone() // yields Metric.Child
Summary.Child#clone() // yields Metric.Child

and not

Counter.Child#clone() // yields Counter.Child
Gauge.Child#clone() // yields Gauge.Child
Summary.Child#clone() // yields Summary.Child

This commit adds elementary workflow cases to ensure the promise of the
API.