# Difference in API description and actual implementation

**URL:** <https://forum.hdfgroup.org/t/difference-in-api-description-and-actual-implementation/12687>\
**Category:** HDFView / Java HDF Object Package\
**Created:** [September 25, 2024, 1:06pm UTC](https://forum.hdfgroup.org/t/difference-in-api-description-and-actual-implementation/12687 "2024-09-25T13:06:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![martin.raedel](https://forum.hdfgroup.org/letter_avatar_proxy/v4/letter/m/3e96dc/32.png) [@martin.raedel](https://forum.hdfgroup.org/u/martin.raedel)\
**Post date:** [September 25, 2024, 1:06pm UTC](https://forum.hdfgroup.org/t/difference-in-api-description-and-actual-implementation/12687/1 "2024-09-25T13:06:09Z")

</div>

I recently updated to the HDFObject package from HDFView 3.3.2. I found the following API description on the hdf website: [H5Attribute (HDFView 3.1.3) (hdfgroup.org)](https://docs.hdfgroup.org/releases/hdfview/v3_3/v3_3_2/documentation/UsersGuide/javadocs/hdfview_java_doc/org.hdfgroup.object/hdf/object/h5/H5Attribute.html). At least it says 3.3.2 in the actual link.

Therein, `H5Attribute` is a class which implements the `Attribute` interface. Ok, changes to my code were made accordingly. I was then surprised to get an error message in my implementation that says that `H5Attribute` is an interface and can therefore not be instantiated. I was confused and had a look at the `hdfobject.jar` that is shipped with HDFView 3.3.2 (from `HDFView\3.3.2\app\`).

To my surprise I found that therein, `H5Attribute` actually is an interface with implementations in `H5CompoundAttr` and `H5ScalarAttr`:

 ![image](https://dbkt.hdfgroup.org/original/2X/7/7bd55afece1478bf116d963b1544394c5b27a143.png)

How can that be? It is the same version. What am I missing here? Is that a mixup in the documentation and the link is for 3.1.3 as it somehow gets for the link description by pasting it here?

---

<div class="post-metadata">

**Author:** ![byrn](https://forum.hdfgroup.org/letter_avatar_proxy/v4/letter/b/85f322/32.png) [@byrn](https://forum.hdfgroup.org/u/byrn)\
**Post date:** [September 25, 2024, 1:32pm UTC](https://forum.hdfgroup.org/t/difference-in-api-description-and-actual-implementation/12687/2 "2024-09-25T13:32:14Z")

</div>

Yes the documentation is incorrect - I am looking at a recent build and the documentation correctly indicates it is an interface.

Looks like we missed something in getting the correct javadocs files. I will investigate and post update javadocs to our “[support.hdfgroup.org/releases/hdfview/v3\_3/v3\_3\_2/documentation/index.html](http://support.hdfgroup.org/releases/hdfview/v3_3/v3_3_2/documentation/index.html)” location.

However, please refer to the source in our github repository for accurate documentation until I can fix it.

---

<div class="post-metadata">

**Author:** ![martin.raedel](https://forum.hdfgroup.org/letter_avatar_proxy/v4/letter/m/3e96dc/32.png) [@martin.raedel](https://forum.hdfgroup.org/u/martin.raedel)\
**Post date:** [September 25, 2024, 1:37pm UTC](https://forum.hdfgroup.org/t/difference-in-api-description-and-actual-implementation/12687/3 "2024-09-25T13:37:53Z")

</div>

Thanks for the clarification
