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

Java客户端中HttpsqsStatus正则表达式有bug #18

Open
GoogleCodeExporter opened this issue May 22, 2015 · 0 comments
Open

Java客户端中HttpsqsStatus正则表达式有bug #18

GoogleCodeExporter opened this issue May 22, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

HttpsqsStatus.java line58:
protected static Pattern pattern = Pattern.compile("HTTP Simple Queue Service 
v(.+?)\\s(?:.+?)\\sQueue Name: (.+?)\\sMaximum number of queues: (\\d+)\\sPut 
position of queue \\((\\d+)st lap\\): (\\d+)\\sGet position of queue 
\\((\\d+)st lap\\): (\\d+)\\sNumber of unread queue: (\\d+)");

since the client use (\\d+)st lap to match the first lap, it will cause regex 
matching failed when the unread number goes into lap 2 or latter.

I change the pattern as follows:
protected static Pattern pattern = Pattern.compile("HTTP Simple Queue Service 
v(.+?)\\s(?:.+?)\\sQueue Name: (.+?)\\sMaximum number of queues: (\\d+)\\sPut 
position of queue \\((\\d+)\\w\\w lap\\): (\\d+)\\sGet position of queue 
\\((\\d+)\\w\\w lap\\): (\\d+)\\sNumber of unread queue: (\\d+)");

hope this would help

Original issue reported on code.google.com by [email protected] on 7 Jan 2011 at 8:16

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

No branches or pull requests

1 participant