1. Project Clover database Tue Dec 20 2016 21:24:09 CET
  2. Package org.xwiki.extension

File AbstractExtensionIssueManagement.java

 

Coverage histogram

../../../img/srcFileCovDistChart9.png
38% of files have more coverage

Code metrics

4
14
5
1
91
44
7
0.5
2.8
5
1.4

Classes

Class Line # Actions
AbstractExtensionIssueManagement 31 14 0% 7 4
0.8260869482.6%
 

Contributing tests

This file is covered by 10 tests. .

Source view

1    /*
2    * See the NOTICE file distributed with this work for additional
3    * information regarding copyright ownership.
4    *
5    * This is free software; you can redistribute it and/or modify it
6    * under the terms of the GNU Lesser General Public License as
7    * published by the Free Software Foundation; either version 2.1 of
8    * the License, or (at your option) any later version.
9    *
10    * This software is distributed in the hope that it will be useful,
11    * but WITHOUT ANY WARRANTY; without even the implied warranty of
12    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13    * Lesser General Public License for more details.
14    *
15    * You should have received a copy of the GNU Lesser General Public
16    * License along with this software; if not, write to the Free
17    * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
18    * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
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    * Base class for implementations of {@link ExtensionIssueManagement}.
27    *
28    * @version $Id: 06dfecc0cb8a0e665eea583efc7cfde9a63f1710 $
29    * @since 6.3M1
30    */
 
31    public abstract class AbstractExtensionIssueManagement implements ExtensionIssueManagement
32    {
33    /**
34    * @see #getSystem()
35    */
36    private String system;
37   
38    /**
39    * @see #getURL()
40    */
41    private String url;
42   
43    /**
44    * @param system the name of the issue management system (jira, bugzilla, etc.)
45    * @param url the URL of that extension in the issues management system
46    */
 
47  19365 toggle public AbstractExtensionIssueManagement(String system, String url)
48    {
49  19365 this.system = system;
50  19365 this.url = url;
51    }
52   
 
53  21925 toggle @Override
54    public String getSystem()
55    {
56  21925 return this.system;
57    }
58   
 
59  21925 toggle @Override
60    public String getURL()
61    {
62  21925 return this.url;
63    }
64   
 
65  12299 toggle @Override
66    public boolean equals(Object obj)
67    {
68  12299 if (obj == this) {
69  0 return true;
70    }
71   
72  12299 if (obj instanceof ExtensionIssueManagement) {
73  12299 ExtensionIssueManagement issueManagement = (ExtensionIssueManagement) obj;
74  12299 return StringUtils.equals(this.system, issueManagement.getSystem())
75    && StringUtils.equals(this.url, issueManagement.getURL());
76    }
77   
78  0 return false;
79    }
80   
 
81  26428 toggle @Override
82    public int hashCode()
83    {
84  26428 HashCodeBuilder builder = new HashCodeBuilder();
85   
86  26428 builder.append(this.system);
87  26428 builder.append(this.url);
88   
89  26428 return builder.toHashCode();
90    }
91    }