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

Fixing bug #WFLY-1467 by padding the stream to a manifest file with a '\n' #13

Merged
merged 1 commit into from
Jul 11, 2013
Merged

Conversation

ehsavoie
Copy link
Contributor

@ehsavoie ehsavoie commented Jul 1, 2013

if this char is missing at the end of the file.

}

@Override
public int read() throws IOException {
Copy link
Contributor

Choose a reason for hiding this comment

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

What about bulk read operations?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Currently the code only loads the manifest using new Manifest(stream) which is using the byte per byte read.
I agree that this depends on the JDK manifest implementation. So it might be interesting (as a defensive approach) to wrap the bulk read.

… '\n' if this char is missing at the end of the file.

Adding some tests for bunk reading.
@ehsavoie
Copy link
Contributor Author

I have updated the code so it works with bulk read operations. I added some unit tests to prove it.

@dmlloyd dmlloyd merged commit 6877662 into jbossas:master Jul 11, 2013
@dmlloyd
Copy link
Contributor

dmlloyd commented Jul 11, 2013

Merged, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants