Skip to content

Commit

Permalink
Annotate deprecated methods to silence compiler warning (#182)
Browse files Browse the repository at this point in the history
The methods are already listed as deprecated in their Javadoc.
Let's silence the compiler warnings by annotating them as deprecated.
  • Loading branch information
MarkEWaite authored Dec 19, 2023
1 parent 2c485d4 commit 69a7da9
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/java/hudson/matrix/Axis.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ public class Axis extends AbstractDescribableImpl<Axis> implements Comparable<Ax
* @deprecated as of 1.373
* Use {@link #getName()}
*/
@Deprecated
@Restricted(NoExternalUse.class)
public final String name;

Expand All @@ -72,6 +73,7 @@ public class Axis extends AbstractDescribableImpl<Axis> implements Comparable<Ax
* @deprecated as of 1.373
* Use {@link #getValues()}
*/
@Deprecated
@Restricted(NoExternalUse.class)
@RestrictedSince("1.463")
public final List<String> values;
Expand Down Expand Up @@ -106,6 +108,7 @@ public Axis(String name, String valueString) {
* @deprecated as of 1.373
* System vs user difference are generalized into extension point.
*/
@Deprecated
public boolean isSystem() {
return false;
}
Expand Down
1 change: 1 addition & 0 deletions src/main/java/hudson/matrix/Combination.java
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ public boolean evalGroovyExpression(AxisList axes, String expression) {
* @deprecated as of 1.528
* Use {@link FilterScript#apply(hudson.matrix.MatrixBuild.MatrixBuildExecution, Combination)}
*/
@Deprecated
public boolean evalGroovyExpression(AxisList axes, String expression, Binding binding) {
return FilterScript.parse(expression).apply(axes, this, binding);
}
Expand Down
1 change: 1 addition & 0 deletions src/main/java/hudson/matrix/LinkedLogRotator.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ final class LinkedLogRotator extends LogRotator {
* @deprecated since 1.369
* Use {@link #LinkedLogRotator(int, int)}
*/
@Deprecated
LinkedLogRotator() {
super(-1, -1, -1, -1);
}
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/hudson/matrix/MatrixConfiguration.java
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,7 @@ public SCM getScm() {
* @deprecated
* Not supported.
*/
@Deprecated
@Override
public void setJDK(JDK jdk) throws IOException {
throw new UnsupportedOperationException();
Expand All @@ -435,6 +436,7 @@ public void setJDK(JDK jdk) throws IOException {
* @deprecated
* Value is controlled by {@link MatrixProject}.
*/
@Deprecated
@Override
public void setBuildDiscarder(BuildDiscarder logRotator) {
throw new UnsupportedOperationException();
Expand Down Expand Up @@ -467,6 +469,7 @@ public boolean isActiveConfiguration() {
* @deprecated
* Use {@link #scheduleBuild(ParametersAction, Cause)}. Since 1.283
*/
@Deprecated
public boolean scheduleBuild(ParametersAction parameters) {
return scheduleBuild(parameters, new Cause.UserIdCause());
}
Expand All @@ -478,6 +481,7 @@ public boolean scheduleBuild(ParametersAction parameters) {
* @deprecated
* Use {@link #scheduleBuild(List, Cause)}. Since 1.480
*/
@Deprecated
public boolean scheduleBuild(ParametersAction parameters, Cause c) {
return scheduleBuild(Collections.singletonList(parameters), c);
}
Expand Down
1 change: 1 addition & 0 deletions src/main/java/hudson/matrix/MatrixExecutionStrategy.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ public Result run(MatrixBuildExecution execution) throws InterruptedException, I
* @deprecated
* Override {@link #run(MatrixBuild.MatrixBuildExecution)}
*/
@Deprecated
public Result run(MatrixBuild build, List<MatrixAggregator> aggregators, BuildListener listener) throws InterruptedException, IOException {
throw new UnsupportedOperationException(getClass()+" needs to override run(MatrixBuildExecution)");
}
Expand Down

0 comments on commit 69a7da9

Please sign in to comment.