| 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 java.util.Objects; |
| 23 |
|
|
| 24 |
|
import org.apache.commons.lang3.StringUtils; |
| 25 |
|
import org.apache.commons.lang3.builder.HashCodeBuilder; |
| 26 |
|
|
| 27 |
|
|
| 28 |
|
@link |
| 29 |
|
|
| 30 |
|
@version |
| 31 |
|
@since |
| 32 |
|
|
| |
|
| 85.2% |
Uncovered Elements: 4 (27) |
Complexity: 8 |
Complexity Density: 0.47 |
|
| 33 |
|
public abstract class AbstractExtensionScm implements ExtensionScm |
| 34 |
|
{ |
| 35 |
|
private ExtensionScmConnection connection; |
| 36 |
|
|
| 37 |
|
private ExtensionScmConnection developerConnection; |
| 38 |
|
|
| 39 |
|
private String url; |
| 40 |
|
|
| 41 |
|
|
| 42 |
|
@param |
| 43 |
|
@param |
| 44 |
|
@param |
| 45 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
| 46 |
26878 |
public AbstractExtensionScm(String url, ExtensionScmConnection connection,... |
| 47 |
|
ExtensionScmConnection developerConnection) |
| 48 |
|
{ |
| 49 |
26878 |
this.url = url; |
| 50 |
26878 |
this.connection = connection; |
| 51 |
26878 |
this.developerConnection = developerConnection; |
| 52 |
|
} |
| 53 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 54 |
13030 |
@Override... |
| 55 |
|
public ExtensionScmConnection getConnection() |
| 56 |
|
{ |
| 57 |
13030 |
return this.connection; |
| 58 |
|
} |
| 59 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 60 |
12982 |
@Override... |
| 61 |
|
public ExtensionScmConnection getDeveloperConnection() |
| 62 |
|
{ |
| 63 |
12982 |
return this.developerConnection; |
| 64 |
|
} |
| 65 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 66 |
13051 |
@Override... |
| 67 |
|
public String getUrl() |
| 68 |
|
{ |
| 69 |
13051 |
return this.url; |
| 70 |
|
} |
| 71 |
|
|
| |
|
| 60% |
Uncovered Elements: 4 (10) |
Complexity: 3 |
Complexity Density: 0.5 |
|
| 72 |
1 |
@Override... |
| 73 |
|
public boolean equals(Object obj) |
| 74 |
|
{ |
| 75 |
1 |
if (obj == this) { |
| 76 |
0 |
return true; |
| 77 |
|
} |
| 78 |
|
|
| 79 |
1 |
if (obj instanceof ExtensionScm) { |
| 80 |
1 |
ExtensionScm scm = (ExtensionScm) obj; |
| 81 |
1 |
return StringUtils.equals(this.url, scm.getUrl()) && Objects.equals(this.connection, scm.getConnection()) |
| 82 |
|
&& Objects.equals(this.developerConnection, scm.getDeveloperConnection()); |
| 83 |
|
} |
| 84 |
|
|
| 85 |
0 |
return false; |
| 86 |
|
} |
| 87 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 1 |
Complexity Density: 0.2 |
|
| 88 |
55 |
@Override... |
| 89 |
|
public int hashCode() |
| 90 |
|
{ |
| 91 |
55 |
HashCodeBuilder builder = new HashCodeBuilder(); |
| 92 |
|
|
| 93 |
55 |
builder.append(this.connection); |
| 94 |
55 |
builder.append(this.developerConnection); |
| 95 |
55 |
builder.append(this.url); |
| 96 |
|
|
| 97 |
55 |
return builder.toHashCode(); |
| 98 |
|
} |
| 99 |
|
} |