1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
package org.xwiki.extension; |
21 |
|
|
22 |
|
import org.apache.commons.lang3.StringUtils; |
23 |
|
import org.apache.commons.lang3.builder.HashCodeBuilder; |
24 |
|
|
25 |
|
|
26 |
|
@link |
27 |
|
|
28 |
|
@version |
29 |
|
@since |
30 |
|
|
|
|
| 76% |
Uncovered Elements: 6 (25) |
Complexity: 8 |
Complexity Density: 0.53 |
|
31 |
|
public abstract class AbstractExtensionScmConnection implements ExtensionScmConnection |
32 |
|
{ |
33 |
|
private String system; |
34 |
|
|
35 |
|
private String path; |
36 |
|
|
37 |
|
|
38 |
|
@param |
39 |
|
@param |
40 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
41 |
48788 |
public AbstractExtensionScmConnection(String system, String path)... |
42 |
|
{ |
43 |
48788 |
this.system = system; |
44 |
48788 |
this.path = path; |
45 |
|
} |
46 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
47 |
23338 |
@Override... |
48 |
|
public String getSystem() |
49 |
|
{ |
50 |
23338 |
return this.system; |
51 |
|
} |
52 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
53 |
23338 |
@Override... |
54 |
|
public String getPath() |
55 |
|
{ |
56 |
23338 |
return this.path; |
57 |
|
} |
58 |
|
|
|
|
| 60% |
Uncovered Elements: 4 (10) |
Complexity: 3 |
Complexity Density: 0.5 |
|
59 |
2 |
@Override... |
60 |
|
public boolean equals(Object obj) |
61 |
|
{ |
62 |
2 |
if (obj == this) { |
63 |
0 |
return true; |
64 |
|
} |
65 |
|
|
66 |
2 |
if (obj instanceof ExtensionScmConnection) { |
67 |
2 |
ExtensionScmConnection connection = (ExtensionScmConnection) obj; |
68 |
2 |
return StringUtils.equals(this.system, connection.getSystem()) |
69 |
|
&& StringUtils.equals(this.path, connection.getPath()); |
70 |
|
} |
71 |
|
|
72 |
0 |
return false; |
73 |
|
} |
74 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
75 |
2 |
@Override... |
76 |
|
public int hashCode() |
77 |
|
{ |
78 |
2 |
HashCodeBuilder builder = new HashCodeBuilder(); |
79 |
|
|
80 |
2 |
builder.append(this.system); |
81 |
2 |
builder.append(this.path); |
82 |
|
|
83 |
2 |
return builder.toHashCode(); |
84 |
|
} |
85 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
86 |
0 |
@Override... |
87 |
|
public String toString() |
88 |
|
{ |
89 |
0 |
return getSystem() + ':' + getPath(); |
90 |
|
} |
91 |
|
} |