portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zb ...@bisp.com>
Subject codec patch
Date Mon, 03 Apr 2006 03:21:07 GMT
Dear Ate:

	Thank you for your works in jetspeed2, But I just found a bug in the
code, the file path is
jetspeed-2/components/portal/src/java/org/apache/jetspeed/container/state/impl/JetspeedNavigationalStateCodec.java.

The problem is when you encode params, you write number of params with:
[line384]paramBuffer.append(parameterValues.length);
but when decode you use:
[line 479]parameterValueCount = Integer.parseInt(buffer.toString(), 16);
These will make decode expected more parameters than is should be,so
when I use ActionResopnse.setRenderParameter(key, values) where values
is a String[] with length >= 10 will cause the reusult of values to be
empty. The reason is decoder expected more parameters without set the
parameter Map on line 489 when parameters exhausted.

Because I don't know the whole structure of jetspeed2, and I'm not sure
whether I found the real problem, but when I change 16 to 10, I can get
right parameters in render stage. So I submit this patch to you, the
author of the program, and hope it will be helpful.


Best Regards,

zb



Mime
View raw message