Skip to content

Commit fbba3b5

Browse files
Riggs333Godin
authored andcommitted
Remove redundant modifiers in interfaces (bazel-contrib#768)
1 parent 1d0840f commit fbba3b5

31 files changed

+95
-97
lines changed

org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/IExceptionLogger.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@ public void logExeption(final Exception ex) {
3232
* @param ex
3333
* exception to log
3434
*/
35-
public void logExeption(Exception ex);
35+
void logExeption(Exception ex);
3636

3737
}

org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/output/IAgentOutput.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,15 @@ public interface IAgentOutput {
3333
* @throws Exception
3434
* in case startup fails
3535
*/
36-
public void startup(final AgentOptions options, final RuntimeData data)
37-
throws Exception;
36+
void startup(AgentOptions options, RuntimeData data) throws Exception;
3837

3938
/**
4039
* Shutdown the agent controller and clean up any resources it has created.
4140
*
4241
* @throws Exception
4342
* in case shutdown fails
4443
*/
45-
public void shutdown() throws Exception;
44+
void shutdown() throws Exception;
4645

4746
/**
4847
* Write all execution data in the runtime to a location determined by the
@@ -53,6 +52,6 @@ public void startup(final AgentOptions options, final RuntimeData data)
5352
* @throws IOException
5453
* in case writing fails
5554
*/
56-
public void writeExecutionData(boolean reset) throws IOException;
55+
void writeExecutionData(boolean reset) throws IOException;
5756

5857
}

org.jacoco.ant/src/org/jacoco/ant/CoverageTask.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ private interface TaskEnhancer {
179179
* @return <code>true</code> if this enhancer is capable of enhancing
180180
* the requested task type
181181
*/
182-
public boolean supportsTask(String taskname);
182+
boolean supportsTask(String taskname);
183183

184184
/**
185185
* Attempt to enhance the supplied task with coverage information. This
@@ -192,6 +192,6 @@ private interface TaskEnhancer {
192192
* Thrown if this enhancer can handle this type of task, but
193193
* this instance can not be enhanced for some reason.
194194
*/
195-
public void enhanceTask(Task task) throws BuildException;
195+
void enhanceTask(Task task) throws BuildException;
196196
}
197197
}

org.jacoco.core.test/src/org/jacoco/core/test/perf/IPerfOutput.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
public interface IPerfOutput {
1818

1919
/** Indicator for no reference time given */
20-
public static final long NO_REFERENCE = Long.MIN_VALUE;
20+
long NO_REFERENCE = Long.MIN_VALUE;
2121

2222
/**
2323
* Reports the result of a time measurement with a optional reference time

org.jacoco.core.test/src/org/jacoco/core/test/perf/IPerfScenario.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ public interface IPerfScenario {
2222
*
2323
* @param output
2424
*/
25-
public void run(IPerfOutput output) throws Exception;
25+
void run(IPerfOutput output) throws Exception;
2626

2727
}

org.jacoco.core/src/org/jacoco/core/analysis/IBundleCoverage.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ public interface IBundleCoverage extends ICoverageNode {
2525
*
2626
* @return all packages
2727
*/
28-
public Collection<IPackageCoverage> getPackages();
28+
Collection<IPackageCoverage> getPackages();
2929

3030
}

org.jacoco.core/src/org/jacoco/core/analysis/IClassCoverage.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public interface IClassCoverage extends ISourceNode {
2727
*
2828
* @return class identifier
2929
*/
30-
public long getId();
30+
long getId();
3131

3232
/**
3333
* Returns if the the analyzed class does match the execution data provided.
@@ -37,49 +37,49 @@ public interface IClassCoverage extends ISourceNode {
3737
* @return <code>true</code> if this class does not match to the provided
3838
* execution data.
3939
*/
40-
public boolean isNoMatch();
40+
boolean isNoMatch();
4141

4242
/**
4343
* Returns the VM signature of the class.
4444
*
4545
* @return VM signature of the class (may be <code>null</code>)
4646
*/
47-
public String getSignature();
47+
String getSignature();
4848

4949
/**
5050
* Returns the VM name of the superclass.
5151
*
5252
* @return VM name of the super class (may be <code>null</code>, i.e.
5353
* <code>java/lang/Object</code>)
5454
*/
55-
public String getSuperName();
55+
String getSuperName();
5656

5757
/**
5858
* Returns the VM names of implemented/extended interfaces.
5959
*
6060
* @return VM names of implemented/extended interfaces
6161
*/
62-
public String[] getInterfaceNames();
62+
String[] getInterfaceNames();
6363

6464
/**
6565
* Returns the VM name of the package this class belongs to.
6666
*
6767
* @return VM name of the package
6868
*/
69-
public String getPackageName();
69+
String getPackageName();
7070

7171
/**
7272
* Returns the optional name of the corresponding source file.
7373
*
7474
* @return name of the corresponding source file
7575
*/
76-
public String getSourceFileName();
76+
String getSourceFileName();
7777

7878
/**
7979
* Returns the methods included in this class.
8080
*
8181
* @return methods of this class
8282
*/
83-
public Collection<IMethodCoverage> getMethods();
83+
Collection<IMethodCoverage> getMethods();
8484

8585
}

org.jacoco.core/src/org/jacoco/core/analysis/ICounter.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public interface ICounter {
2020
/**
2121
* Different values provided by a counter.
2222
*/
23-
public enum CounterValue {
23+
enum CounterValue {
2424

2525
/** Total number of items */
2626
TOTALCOUNT,
@@ -41,22 +41,22 @@ public enum CounterValue {
4141
/**
4242
* Status flag for no items (value is 0x00).
4343
*/
44-
public static final int EMPTY = 0x00;
44+
int EMPTY = 0x00;
4545

4646
/**
4747
* Status flag when all items are not covered (value is 0x01).
4848
*/
49-
public static final int NOT_COVERED = 0x01;
49+
int NOT_COVERED = 0x01;
5050

5151
/**
5252
* Status flag when all items are covered (value is 0x02).
5353
*/
54-
public static final int FULLY_COVERED = 0x02;
54+
int FULLY_COVERED = 0x02;
5555

5656
/**
5757
* Status flag when items are partly covered (value is 0x03).
5858
*/
59-
public static final int PARTLY_COVERED = NOT_COVERED | FULLY_COVERED;
59+
int PARTLY_COVERED = NOT_COVERED | FULLY_COVERED;
6060

6161
/**
6262
* Returns the counter value of the given type.
@@ -65,44 +65,44 @@ public enum CounterValue {
6565
* value type to return
6666
* @return counter value
6767
*/
68-
public double getValue(CounterValue value);
68+
double getValue(CounterValue value);
6969

7070
/**
7171
* Returns the total count of items.
7272
*
7373
* @return total count of items
7474
*/
75-
public int getTotalCount();
75+
int getTotalCount();
7676

7777
/**
7878
* Returns the count of covered items.
7979
*
8080
* @return count of covered items
8181
*/
82-
public int getCoveredCount();
82+
int getCoveredCount();
8383

8484
/**
8585
* Returns the count of missed items.
8686
*
8787
* @return count of missed items
8888
*/
89-
public int getMissedCount();
89+
int getMissedCount();
9090

9191
/**
9292
* Calculates the ratio of covered to total count items. If total count
9393
* items is 0 this method returns NaN.
9494
*
9595
* @return ratio of covered to total count items
9696
*/
97-
public double getCoveredRatio();
97+
double getCoveredRatio();
9898

9999
/**
100100
* Calculates the ratio of missed to total count items. If total count items
101101
* is 0 this method returns NaN.
102102
*
103103
* @return ratio of missed to total count items
104104
*/
105-
public double getMissedRatio();
105+
double getMissedRatio();
106106

107107
/**
108108
* Returns the coverage status of this counter.
@@ -114,6 +114,6 @@ public enum CounterValue {
114114
*
115115
* @return status of this line
116116
*/
117-
public int getStatus();
117+
int getStatus();
118118

119119
}

org.jacoco.core/src/org/jacoco/core/analysis/ICoverageNode.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public interface ICoverageNode {
2020
/**
2121
* Type of a Java element represented by a {@link ICoverageNode} instance.
2222
*/
23-
public enum ElementType {
23+
enum ElementType {
2424

2525
/** Method */
2626
METHOD,
@@ -45,7 +45,7 @@ public enum ElementType {
4545
/**
4646
* Different counter types supported by JaCoCo.
4747
*/
48-
public enum CounterEntity {
48+
enum CounterEntity {
4949

5050
/** Counter for instructions */
5151
INSTRUCTION,
@@ -71,56 +71,56 @@ public enum CounterEntity {
7171
*
7272
* @return type of this node
7373
*/
74-
public abstract ElementType getElementType();
74+
ElementType getElementType();
7575

7676
/**
7777
* Returns the name of this node.
7878
*
7979
* @return name of this node
8080
*/
81-
public String getName();
81+
String getName();
8282

8383
/**
8484
* Returns the counter for byte code instructions.
8585
*
8686
* @return counter for instructions
8787
*/
88-
public abstract ICounter getInstructionCounter();
88+
ICounter getInstructionCounter();
8989

9090
/**
9191
* Returns the counter for branches.
9292
*
9393
* @return counter for branches
9494
*/
95-
public ICounter getBranchCounter();
95+
ICounter getBranchCounter();
9696

9797
/**
9898
* Returns the counter for lines.
9999
*
100100
* @return counter for lines
101101
*/
102-
public ICounter getLineCounter();
102+
ICounter getLineCounter();
103103

104104
/**
105105
* Returns the counter for cyclomatic complexity.
106106
*
107107
* @return counter for complexity
108108
*/
109-
public ICounter getComplexityCounter();
109+
ICounter getComplexityCounter();
110110

111111
/**
112112
* Returns the counter for methods.
113113
*
114114
* @return counter for methods
115115
*/
116-
public ICounter getMethodCounter();
116+
ICounter getMethodCounter();
117117

118118
/**
119119
* Returns the counter for classes.
120120
*
121121
* @return counter for classes
122122
*/
123-
public ICounter getClassCounter();
123+
ICounter getClassCounter();
124124

125125
/**
126126
* Generic access to the the counters.
@@ -129,7 +129,7 @@ public enum CounterEntity {
129129
* entity we're we want to have the counter for
130130
* @return counter for the given entity
131131
*/
132-
public ICounter getCounter(CounterEntity entity);
132+
ICounter getCounter(CounterEntity entity);
133133

134134
/**
135135
* Creates a plain copy of this node. While {@link ICoverageNode}
@@ -139,6 +139,6 @@ public enum CounterEntity {
139139
*
140140
* @return copy with counters only
141141
*/
142-
public ICoverageNode getPlainCopy();
142+
ICoverageNode getPlainCopy();
143143

144144
}

org.jacoco.core/src/org/jacoco/core/analysis/ICoverageVisitor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ public interface ICoverageVisitor {
2323
* @param coverage
2424
* coverage data for a class
2525
*/
26-
public void visitCoverage(IClassCoverage coverage);
26+
void visitCoverage(IClassCoverage coverage);
2727

2828
}

org.jacoco.core/src/org/jacoco/core/analysis/ILine.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ public interface ILine {
2222
*
2323
* @return instruction counter
2424
*/
25-
public ICounter getInstructionCounter();
25+
ICounter getInstructionCounter();
2626

2727
/**
2828
* Returns the branches counter for this line.
2929
*
3030
* @return branches counter
3131
*/
32-
public ICounter getBranchCounter();
32+
ICounter getBranchCounter();
3333

3434
/**
3535
* Returns the coverage status of this line, calculated from the
@@ -42,6 +42,6 @@ public interface ILine {
4242
*
4343
* @return status of this line
4444
*/
45-
public int getStatus();
45+
int getStatus();
4646

4747
}

org.jacoco.core/src/org/jacoco/core/analysis/IMethodCoverage.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ public interface IMethodCoverage extends ISourceNode {
2222
*
2323
* @return descriptor
2424
*/
25-
public String getDesc();
25+
String getDesc();
2626

2727
/**
2828
* Returns the generic signature of the method if defined.
2929
*
3030
* @return generic signature or <code>null</code>
3131
*/
32-
public String getSignature();
32+
String getSignature();
3333

3434
}

0 commit comments

Comments
 (0)