1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
package jalview.util; |
22 |
|
|
23 |
|
import jalview.bin.Cache; |
24 |
|
|
|
|
| 0% |
Uncovered Elements: 35 (35) |
Complexity: 4 |
Complexity Density: 0.14 |
|
25 |
|
public class UserAgent |
26 |
|
{ |
27 |
|
|
|
|
| 0% |
Uncovered Elements: 32 (32) |
Complexity: 3 |
Complexity Density: 0.11 |
|
28 |
0 |
public static String getUserAgent(String className)... |
29 |
|
{ |
30 |
0 |
StringBuilder sb = new StringBuilder(); |
31 |
0 |
sb.append("Jalview"); |
32 |
0 |
sb.append('/'); |
33 |
0 |
sb.append(Cache.getDefault("VERSION", "Unknown")); |
34 |
0 |
sb.append(" ("); |
35 |
0 |
sb.append(System.getProperty("os.name")); |
36 |
0 |
sb.append("; "); |
37 |
0 |
sb.append(System.getProperty("os.arch")); |
38 |
0 |
sb.append(' '); |
39 |
0 |
sb.append(System.getProperty("os.name")); |
40 |
0 |
sb.append(' '); |
41 |
0 |
sb.append(System.getProperty("os.version")); |
42 |
0 |
sb.append("; "); |
43 |
0 |
sb.append("java/"); |
44 |
0 |
sb.append(System.getProperty("java.version")); |
45 |
0 |
sb.append("; "); |
46 |
0 |
sb.append("jalview/"); |
47 |
0 |
sb.append(ChannelProperties.getProperty("channel")); |
48 |
0 |
if (className != null) |
49 |
|
{ |
50 |
0 |
sb.append("; "); |
51 |
0 |
sb.append(className); |
52 |
|
} |
53 |
0 |
String installation = Cache.applicationProperties |
54 |
|
.getProperty("INSTALLATION"); |
55 |
0 |
if (installation != null) |
56 |
|
{ |
57 |
0 |
sb.append("; "); |
58 |
0 |
sb.append(installation); |
59 |
|
} |
60 |
0 |
sb.append(')'); |
61 |
0 |
sb.append(" help@jalview.org"); |
62 |
0 |
return sb.toString(); |
63 |
|
} |
64 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
65 |
0 |
public static String getUserAgent()... |
66 |
|
{ |
67 |
0 |
return getUserAgent(null); |
68 |
|
} |
69 |
|
|
70 |
|
} |