Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add javadoc throws #174

Merged
merged 6 commits into from Mar 3, 2023
Merged

Add javadoc throws #174

merged 6 commits into from Mar 3, 2023

Conversation

leerho
Copy link
Contributor

@leerho leerho commented Feb 25, 2023

Hopefully, this is the last of major edits to the core Java8 Memory before I integrate Java 17.

In this group of edits:

  • I implemented non-owner thread detection for the methods that create and close memory-mapped files and direct, off-heap memory segments. It would be risky to allow a non-owner thread to close these resources even if it is performed in a synchronized wrapper. This only affects the methods close(), load(), isLoaded(), and force(). This is clearly documented in the concomitant Javadocs.
  • I was able to simplify the 16 leaf node classes by moving common variables down to the root ResourceImpl class.
  • I removed some other duplication of methods.
  • The major task was to completely remove methods that would be incompatible with the Java17 Panama API. This will likely require more tweaking as I merge in the Java 17 Panama code.

This set of edits simplified the structure of the leaf nodes by moving
some of the common internal variables to ResourceImpl, the bottom of the
hierarchy.

I also eliminated some duplication in methods such as
getMemoryRequestServer, as well as simplified some of the check methods.
associated NioBitsFields class.

There was also an unnecessary copy of the Map class in the Java11 tree,
which no longer exists.

Now the only code difference between Java8 and Java11 is the locations
of the Cleaner and the VM classes.

I also cleaned up the package-info.java file.
org.datasketches.memory tree to satisfy Eclipse.
Copy link
Member

@davecromberge davecromberge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a lot of progress toward Java 17+ compatibility!

Copy link
Member

@davecromberge davecromberge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@leerho leerho merged commit c97c98f into master Mar 3, 2023
@leerho leerho deleted the addJavadocThrows branch March 3, 2023 00:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants