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

Fixed issue #603 #604

Merged
merged 2 commits into from Feb 26, 2020
Merged

Fixed issue #603 #604

merged 2 commits into from Feb 26, 2020

Conversation

fabienrenaud
Copy link
Contributor

_currInputProcessed, _currInputRowStart, and _nameStartOffset must be updated before _inputPtr

See #603

@@ -3,6 +3,11 @@
import com.fasterxml.jackson.core.*;
import com.fasterxml.jackson.core.json.JsonFactory;

import java.io.IOException;
import java.util.Base64;
Copy link
Member

Choose a reason for hiding this comment

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

Can not use until 3.0 (part of JDK 8). Same for a few other things, will make necessary changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just replaced it with a generateRandomAlpha method.

@cowtowncoder
Copy link
Member

Thank you for the fix(es)!

Due to minor JDK 8 dependencies here I think I'll merge changes manually, starting with 2.10 branch. But keeping essential logic.

@fabienrenaud
Copy link
Contributor Author

fabienrenaud commented Feb 25, 2020

@cowtowncoder I can replace the JDK8 dependencies with this function if you'd like:

    private String generateRandomAlpha(int length)
    {
        StringBuilder sb = new StringBuilder(length);
        Random rnd = new Random(length);
        for (int i = 0; i < length; ++i) {
            // let's limit it not to include surrogate pairs:
            char ch = (char) ('A' + rnd.nextInt(26));
            sb.append(ch);
        }
        return sb.toString();
    }

Edit: done

@cowtowncoder
Copy link
Member

Jackson has full Base64 functionality in itself ....

@fabienrenaud
Copy link
Contributor Author

I don't really need base64 for this test, so it's okay...

@cowtowncoder cowtowncoder merged commit 993d66a into FasterXML:master Feb 26, 2020
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