This is an interesting problem..

What does the javadoc say is going to happen? Lets change it to accurate reflect what is going to happen.

My idea is that hackyReport can throw a RuntimeException if there is name duplication (which does not violate its design feature).
But, what if the client actually wants to replace the series? Much like the put method in a Map replaces the object associated with the key. Throwing a RuntimeException would make the method less robust.

This is the second time that I have spent time debugging this issue. I am sure there will be the third time (either me or somebody else) if we don't do anything about it.
Just curious, why would you be trying to chart out series with different values but have the same name anyway? In the extreme case of 10 series all with the same name and all with different values would seem very hard to understand.

just my 2 cents, aaron

At 11:31 PM 10/10/2004 -1000, you wrote:
My idea is that hackyReport can throw a RuntimeException if there is name duplication (which does not violate its design feature).

Fail-fast is always better than fail-late (and leave every one wondering what goes wrong).

This is the second time that I have spent time debugging this issue. I am sure there will be the third time (either me or somebody else) if we don't do anything about it.

Anyway, I have to change my program logic.
Cheers,
Cedric

Philip Johnson wrote:
My initial thought is that requiring each series to be uniquely identified by name is not an unreasonable design feature for hackyReport.
Cheers,
Philip
--On Sunday, October 10, 2004 2:16 PM -1000 "(Cedric) Qin ZHANG" <[EMAIL PROTECTED]> wrote:


Hi,

In report package, chart model consists of one or more "series", and each
series has a name.

I found that if two series has the same name, then only one of them will
show up in the rendered chart.

While I can change my program logic to guarantee uniqueness of series
name, but I am not sure whether the problem is generic enough so that
it's better to be handled in report model or not.

Any opinion?

Thanks.

Cedric





Reply via email to