Unidata / IDV

The Integrated Data Viewer (IDV) from Unidata is a framework for analyzing and displaying geoscience data.
http://www.unidata.ucar.edu/software/idv/
Other
79 stars 37 forks source link

XmlEncoder Support for Map and Set Collections. #57

Closed jon4than closed 10 years ago

jon4than commented 10 years ago

I've been using these changes in local builds without problems and thought they might be useful for others.

I'm happy to change anything that appears amiss!

:shipit:

donmurray commented 10 years ago

The IDV encodes hash tables frequently since that's how properties are stored. Is there a difference between a bundle saved with the current code and one saved with your changes?

jon4than commented 10 years ago

I saved two bundles (started up the IDV, saved bundle, and quit):

  1. "bundle-master.xidv" that was generated by running ant idvjar while in the master branch.
  2. "bundle-test.xidv" that was generated by running ant idvjar while in my branch dedicated to this pull request.

Running diff on the two shows that the only differences are the UniqueID values for the views and share groups.

[ I also loaded your moore_ok_tornado.zidv in the testing version without any problems. ]

Everything should Just Work because Hashtable implements the Map interface (and XmlEncoder uses the implementation type!). So if you serialize a Hashtable, you get a Hashtable back when you deserialize (same thing for HashMap and friends).