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

incorrect conditional statement for NOT_FOUND status #37

Closed
goldaxe opened this issue Jan 11, 2012 · 1 comment
Closed

incorrect conditional statement for NOT_FOUND status #37

goldaxe opened this issue Jan 11, 2012 · 1 comment

Comments

@goldaxe
Copy link

goldaxe commented Jan 11, 2012

Memcached-Java-Client 2.6.3

In code com.schooner.MemCached.AscIIClient

line 580: String line = new SockInputStream(sock, Integer.MAX_VALUE).getLine().split("\r\n")[0];
line 585: } else if (NOTFOUND.equals(line)) {

And com.danga.MemCached.MemCachedClient.NOTFOUND = "NOT_FOUND\r\n", but variable line = "NOT_FOUND", so the result of line 585 is always FALSE.

I use "NOTFOUND.startsWith(line)" to instead of "NOTFOUND.equals(line)" temporarily.

@newroot
Copy link
Collaborator

newroot commented May 29, 2012

Thanks for figuring out this bug.

will be fixed in next version.

@newroot newroot closed this as completed May 29, 2012
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

No branches or pull requests

2 participants