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

Resolves issue 323 #324

Open
wants to merge 3 commits into
base: JDK-8
Choose a base branch
from

Conversation

d-w-johnson
Copy link

See #323 for details. This PR includes:
1 - Some pom.xml updates that set it to use Java 8 and fix a javadoc issue that kept me from building the jar file.
2 - A complex test that can deterministically reproduce the bug.
3 - The simple one liner fix for the issue.

The fix would be good to get into other branches as well.

deserialization error  that I have been experiencing.
DefaultFSTInt2ObjectMap's clear method not setting next to null. When
the map was renamed to DefaultFSTInt2ObjectMap and an option of passing
in your own map was added the clear method was also optimized and I
think this was just missed.
to make more sense on the JDK-8 branch. I also changed how the javadoc
doclint is disabled so that I could build the jar.
@@ -78,7 +78,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<additionalparam>-Xdoclint:none</additionalparam>
Copy link
Author

Choose a reason for hiding this comment

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

I know Gradle a lot better than Maven. I'm happy to remove these changes if you don't want them.

@@ -172,6 +172,7 @@ public void clear() {
mKeys = new int[size];
mValues = new Object[size];
mNumberOfElements = 0;
next = null;
Copy link
Author

Choose a reason for hiding this comment

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

This is the most important line that is needed and which fixes the issue.

import deserialization_cache_bug.random.DeterministicRandomGenerator;
import deserialization_cache_bug.random.RandomGenerator;

public class DeserializationCacheTest {
Copy link
Author

Choose a reason for hiding this comment

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

This test is pretty complex, but I had a really hard time reproducing the issue and tried to mimic some of the things about our complex model that might make it more likely to happen.

@chrisco484
Copy link

Any news on when this might get merged into master and released?

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.

2 participants