RE: logic:empty and logicnotEmpty with a Collection (again)

2003-02-19 Thread Steffen . Uhlig
> Ok.  Scratch that, I was correct the first time.

You are right. I had been using 1.1b2 without knowing :-(. I changed to
1.1b3 and everything is fine.

Sorry, my fault. Thanks for the help.

Btw, is there an easy way to tell which particular minor version of Struts
is in use, maybe from the JAR's manifest? All it says is

  Implementation-Version: 1.1

with no beta information.

Steffen


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




logic:empty and logicnotEmpty with a Collection (again)

2003-02-19 Thread Steffen . Uhlig
Hi,

I found some behaviour of the logic:notEmpty tag which I think is
inconsistent.

Reading the documentation, I think it should call a collection's isEmpty()
method. It works as expected with a bean of type List, but it doesn't work
with a Map.

Testcase:

If emptyList was built with

  List emptyList = new ArrayList();

the following fragment correctly states only "emptyList empty":

  emptyList empty
  emptyList not empty

But if I change from emtpyList to

  Map emptyMap = new HashMap();

and test it with

  emptyMap empty
  emptyMap not empty

I get

  emptyMap not empty
  nonemptyMap not empty

instead of just "emptyMap empty". Both (mutually exclusive) statements seem
to evaluate to true.

So, is this a misunderstanding from my side or a bug in the implementation?

TIA

Steffen


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]