Skip to content

ASAPSerialization empty Charsequence Bug #6

@TakenUsername404

Description

@TakenUsername404

When serializing and then deserializing an Empty Charsequence a "net.sharksystem.asap.ASAPException: read -1: no more data in stream" occurs.

A reproducable example:

public void ASAPSerialization_EmptyCharSequence_Exception() throws ASAPException, IOException {
    ByteArrayOutputStream os = new ByteArrayOutputStream();
    ASAPSerialization.writeCharSequenceParameter("", os);

    byte[] serialized = os.toByteArray();

    ByteArrayInputStream is = new ByteArrayInputStream(serialized);
    CharSequence deserialized = ASAPSerialization.readCharSequenceParameter(is);

    // Never reaches this statement
    System.out.println(deserialized);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions