-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix EnumTypedef name problem (#1091)
* ckp * Fix EnumTypedef name problem ## Description of Changes re: Issue #126 The code for handling enum types in Group.java is incorrect. When creating a new enum type, it is appropriate to search only the current group for a conflicting name and this is what the current code does. But when an enum typed variable searches for the matching enum type, it must search not only the current group but all parent groups and the current code does not do that. The fix consists of two similar parts. 1. Modify Group.findEnumeration to take an extra boolean parameter to control if search is this group only or to search up the group's parents. 2. Modify Group.Builder.findEnumTypedef to act like \#1 but to search the sequence of parent Group.Builder instances. As a consequence, this PR modifies a number of other files to adapt to the modified signatures. * 1. Remove unused import in H5HeaderNew 2. Add overloaded functions to Group.java to restore access to original versions of findEnumTypedef and findEnumeration. * Force re-test * It turns out that I missed the error in the code in H5headerNew that attempts to match an enum typed variable with the proper enumeration type declaration. The problem and fix (as described by a comment in H5headerNew) is a bit of a hack. It should be fixed in H5Object.read(). Unfortunately, information is not being passed down so that the proper fix can be applied early in the HDF5->CDM translation. Fixing this would affect a lot of function signatures. Also modified TestEnumTypedef.java to test two cases: 1. the actual enum type def is in the same group as the variable that uses it. 2. the actual enum type def is in a parent group of the variable that uses it ## Misc. Other Changes * Suppress printing of _NCProperties to simplify text-based comparison testing. * ## Addendum 2 Sigh! Apparently NetcdfFile.java defaulted to using H5iosp instead of H5iospNew. This meant that many of my changes were being bypassed. So, modify NetcdfFile to default to H5iospNew. * Undo change to NetcdfFile.java' * test4 * NCProperties fix * ## Additional modifications * NetcdfFile.java: convert to use H5iospNew (needed by TestH5iosp.java) * H5headerNew.java: provide get function for accessing the btree (needed by TestDataBTree.java) * H5iospNew.java: make getRandomAccessFile() method public (needed by tests) * CompareNetcdf2.java: Add a constructor to specify if attribute name comparison should ignore case or not. It turns out that some tests require case sensitive name matching. Specifically TestCoordSysCompare.java and TestN3iospCompare.java * Apply Spotless * remove debugging --------- Co-authored-by: haileyajohnson <hailey.johnson@ufl.edu>
- Loading branch information
1 parent
352c4d0
commit 6ff1775
Showing
21 changed files
with
591 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.