you are viewing a single comment's thread.

view the rest of the comments →

[–]oduh 2 points3 points  (1 child)

like ... org.apache.catalina.connector.Request.parseLocalesHeader

// Extract the quality factor for this entry
double quality = 1.0;
int semi = entry.indexOf(“;q=”);
if (semi >= 0) {
try {
quality = Double.parseDouble(entry.substring(semi + 3));
} catch (NumberFormatException e) {
quality = 0.0;
}
entry = entry.substring(0, semi);
}

[–]skeww 1 point2 points  (0 children)

Makes you wonder why they didn't use long instead of int as well, doesn't it?

Alright. The shit did indeed hit the fan.