You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Jeremy Thomerson (JIRA)" <ji...@apache.org> on 2010/12/19 23:51:01 UTC
[jira] Updated: (WICKET-3264) MetaDataEntry set method traverses
metaData even after key is found and data set/cleared
[ https://issues.apache.org/jira/browse/WICKET-3264?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jeremy Thomerson updated WICKET-3264:
-------------------------------------
Fix Version/s: 1.4.15
Yes, I did forget to close it. I have a bunch of cleanup stuff I'm trying to finish today / tonight. Since it was in both branches, I have changed the fix version to reflect this.
> MetaDataEntry set method traverses metaData even after key is found and data set/cleared
> ----------------------------------------------------------------------------------------
>
> Key: WICKET-3264
> URL: https://issues.apache.org/jira/browse/WICKET-3264
> Project: Wicket
> Issue Type: Improvement
> Components: wicket
> Affects Versions: 1.5-M3
> Environment: all
> Reporter: Richard Emberson
> Assignee: Jeremy Thomerson
> Priority: Trivial
> Fix For: 1.4.15, 1.5-M4
>
>
> The for-loop in the MetaDataKey set method has a break statement that is only
> called if metaData is set to null. The break statement should be after the
> set = true;
> statement.
> Why? from what I can tell, per-key, data can only be entered into the MetaDataEntry
> array once. The data is added only if isSet == false, and this happens only if the
> key is not found in the array.
> Also, he get method only returns the first entry found for a given key so
> it makes no sense to actually have more than one entry.
> So, change from:
> else
> {
> metaData = null;
> break;
> }
> }
> set = true;
> }
> to:
> else
> {
> metaData = null;
> }
> }
> set = true;
> break;
> }
> I've made the change on my copy and all of the tests pass.
> If a user is directly playing with the data Object,
> Object data = null;
> in Component rather than using the given methods, then all bets are off anyway.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.