[ https://issues.apache.org/jira/browse/WICKET-3264?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Juergen Donnerstag resolved WICKET-3264. ---------------------------------------- Resolution: Fixed Fix Version/s: 1.5-M4 Assignee: Jeremy Thomerson looks like Jeremy forgot to close it. Source code has been changed already. > 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.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.