litesoft
Diff Revisions
474
vs
475
for /trunk/Java/GWT/Client/src/org/litesoft/GWT/client/nonpublic/NP_UserAgent_IE.java
|
@@ -26,13 +26,16 @@ |
26 |
26 |
|
private static int determineReal() |
27 |
27 |
|
{ |
28 |
28 |
|
String zUserAgent = getBrowserUserAgent(); |
29 |
|
- |
int atStart = zUserAgent.indexOf("; MSIE ") + 7; |
30 |
|
- |
int atEnd = zUserAgent.indexOf(".0;", atStart); |
31 |
|
- |
if ( (atStart > 6) && (atEnd != -1) && (atEnd <= (atStart + 2))) |
|
29 |
+ |
int atStart = zUserAgent.indexOf( "; MSIE " ) + 7; |
|
30 |
+ |
int atEnd = zUserAgent.indexOf( ".0;", atStart ); |
|
31 |
+ |
if ( (atStart > 6) && (atEnd != -1) && (atEnd <= (atStart + 2)) ) |
32 |
32 |
|
{ |
33 |
|
- |
try { |
34 |
|
- |
return Integer.parseInt(zUserAgent.substring(atStart,atEnd)); |
35 |
|
- |
} catch (NumberFormatException e) { |
|
33 |
+ |
try |
|
34 |
+ |
{ |
|
35 |
+ |
return Integer.parseInt( zUserAgent.substring( atStart, atEnd ) ); |
|
36 |
+ |
} |
|
37 |
+ |
catch ( NumberFormatException e ) |
|
38 |
+ |
{ |
36 |
39 |
|
// Really? Then Assume the default |
37 |
40 |
|
} |
38 |
41 |
|
} |