|
Lines 325-333
Link Here
|
| 325 |
|
325 |
|
| 326 |
String OS = Platform.getOS(); |
326 |
String OS = Platform.getOS(); |
| 327 |
String platform = Platform.getOSArch(); |
327 |
String platform = Platform.getOSArch(); |
|
|
328 |
String ws = Platform.getWS(); |
| 328 |
|
329 |
|
| 329 |
String bugzillaOS = null; // Bugzilla String for OS |
330 |
String bugzillaOS = null; // Bugzilla String for OS |
| 330 |
String bugzillaPlatform = null; // Bugzilla String for Platform |
331 |
String bugzillaPlatform = null; // Bugzilla String for Platform |
|
|
332 |
String[] wsExtentions = null; |
| 331 |
/* |
333 |
/* |
| 332 |
AIX -> AIX |
334 |
AIX -> AIX |
| 333 |
Linux -> Linux |
335 |
Linux -> Linux |
|
Lines 336-341
Link Here
|
| 336 |
MacOS X -> Mac OS X |
338 |
MacOS X -> Mac OS X |
| 337 |
*/ |
339 |
*/ |
| 338 |
|
340 |
|
|
|
341 |
if (ws.length() > 1) { |
| 342 |
char first = ws.charAt(0); |
| 343 |
char firstLower = Character.toLowerCase(first); |
| 344 |
char firstUpper = Character.toUpperCase(first); |
| 345 |
String[] wsExtentionsTemp = { " - " + firstUpper + ws.substring(1, ws.length()), //$NON-NLS-1$ |
| 346 |
" - " + firstLower + ws.substring(1, ws.length()), //$NON-NLS-1$ |
| 347 |
" " + firstUpper + ws.substring(1, ws.length()), //$NON-NLS-1$ |
| 348 |
" " + firstLower + ws.substring(1, ws.length()), "" }; //$NON-NLS-1$//$NON-NLS-2$ |
| 349 |
wsExtentions = wsExtentionsTemp; |
| 350 |
} else if (ws.length() == 1) { |
| 351 |
char first = ws.charAt(0); |
| 352 |
char firstLower = Character.toLowerCase(first); |
| 353 |
char firstUpper = Character.toUpperCase(first); |
| 354 |
String[] wsExtentionsTemp = { " - " + firstUpper, " - " + firstLower, " " + firstUpper, //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ |
| 355 |
" " + firstLower, "" }; //$NON-NLS-1$//$NON-NLS-2$ |
| 356 |
wsExtentions = wsExtentionsTemp; |
| 357 |
} else { |
| 358 |
String[] wsExtentionsTemp = { "" }; //$NON-NLS-1$ |
| 359 |
wsExtentions = wsExtentionsTemp; |
| 360 |
} |
| 361 |
|
| 339 |
bugzillaOS = System.getProperty("os.name") + " " + System.getProperty("os.version"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ |
362 |
bugzillaOS = System.getProperty("os.name") + " " + System.getProperty("os.version"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ |
| 340 |
// We start with the most specific Value as the Search String. |
363 |
// We start with the most specific Value as the Search String. |
| 341 |
// If we didn't find it we remove the last part of the version String or the OS Name from |
364 |
// If we didn't find it we remove the last part of the version String or the OS Name from |
|
Lines 343-360
Link Here
|
| 343 |
// |
366 |
// |
| 344 |
// The search in casesensitive. |
367 |
// The search in casesensitive. |
| 345 |
if (opSysAttribute != null) { |
368 |
if (opSysAttribute != null) { |
| 346 |
while (bugzillaOS != null && opSysAttribute.getOption(bugzillaOS) == null) { |
369 |
for (String element : wsExtentions) { |
| 347 |
int dotindex = bugzillaOS.lastIndexOf('.'); |
370 |
String bugzillaOSTemp = bugzillaOS; |
| 348 |
if (dotindex > 0) { |
371 |
while (bugzillaOSTemp != null && opSysAttribute.getOption(bugzillaOSTemp + element) == null) { |
| 349 |
bugzillaOS = bugzillaOS.substring(0, dotindex); |
372 |
int dotindex = bugzillaOSTemp.lastIndexOf('.'); |
| 350 |
} else { |
373 |
if (dotindex > 0) { |
| 351 |
int spaceindex = bugzillaOS.lastIndexOf(' '); |
374 |
bugzillaOSTemp = bugzillaOSTemp.substring(0, dotindex); |
| 352 |
if (spaceindex > 0) { |
|
|
| 353 |
bugzillaOS = bugzillaOS.substring(0, spaceindex); |
| 354 |
} else { |
375 |
} else { |
| 355 |
bugzillaOS = null; |
376 |
int spaceindex = bugzillaOSTemp.lastIndexOf(' '); |
|
|
377 |
if (spaceindex > 0) { |
| 378 |
bugzillaOSTemp = bugzillaOSTemp.substring(0, spaceindex); |
| 379 |
} else { |
| 380 |
bugzillaOSTemp = null; |
| 381 |
} |
| 356 |
} |
382 |
} |
| 357 |
} |
383 |
} |
|
|
384 |
if (bugzillaOSTemp != null) { |
| 385 |
bugzillaOS = bugzillaOSTemp + element; |
| 386 |
break; |
| 387 |
} |
| 358 |
} |
388 |
} |
| 359 |
} else { |
389 |
} else { |
| 360 |
bugzillaOS = null; |
390 |
bugzillaOS = null; |