Skip to content

Commit

Permalink
fix a few overridden with missing annotation warnings (#147)
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Graff committed Dec 7, 2017
1 parent ebce2b5 commit d59a351
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,20 @@
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

import javax.annotation.Nonnull;

@Component
public class AtlasFetchStage {

@Bean
StageDefinitionBuilder atlasFetchStageBuilder(){
return new StageDefinitionBuilder() {
@Override
public void taskGraph(Stage stage, TaskNode.Builder builder) {
public void taskGraph(@Nonnull Stage stage, @Nonnull TaskNode.Builder builder) {
builder.withTask("atlasFetch", AtlasFetchTask.class);
}

@Nonnull
@Override
public String getType() {
return "atlasFetch";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.annotation.Nonnull;
import java.io.IOException;
import java.time.Duration;
import java.util.Collections;
Expand Down Expand Up @@ -79,8 +80,9 @@ public long getDynamicBackoffPeriod(Duration taskDuration) {
return Duration.ofSeconds(backoffPeriodSeconds).toMillis();
}

@Nonnull
@Override
public TaskResult execute(Stage stage) {
public TaskResult execute(@Nonnull Stage stage) {
Map<String, Object> context = stage.getContext();
String metricsAccountName = (String)context.get("metricsAccountName");
String storageAccountName = (String)context.get("storageAccountName");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,20 @@
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

import javax.annotation.Nonnull;

@Component
public class PrometheusFetchStage {

@Bean
StageDefinitionBuilder prometheusFetchStageBuilder(){
return new StageDefinitionBuilder() {
@Override
public void taskGraph(Stage stage, TaskNode.Builder builder) {
public void taskGraph(@Nonnull Stage stage, @Nonnull TaskNode.Builder builder) {
builder.withTask("prometheusFetch", PrometheusFetchTask.class);
}

@Nonnull
@Override
public String getType() {
return "prometheusFetch";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.annotation.Nonnull;
import java.io.IOException;
import java.time.Duration;
import java.util.Collections;
Expand Down Expand Up @@ -68,8 +69,9 @@ public long getTimeout() {
return Duration.ofMinutes(2).toMillis();
}

@Nonnull
@Override
public TaskResult execute(Stage stage) {
public TaskResult execute(@Nonnull Stage stage) {
Map<String, Object> context = stage.getContext();
String metricsAccountName = (String)context.get("metricsAccountName");
String storageAccountName = (String)context.get("storageAccountName");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,20 @@
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

import javax.annotation.Nonnull;

@Component
public class StackdriverFetchStage {

@Bean
StageDefinitionBuilder stackdriverFetchStageBuilder(){
return new StageDefinitionBuilder() {
@Override
public void taskGraph(Stage stage, TaskNode.Builder builder) {
public void taskGraph(@Nonnull Stage stage, @Nonnull TaskNode.Builder builder) {
builder.withTask("stackdriverFetch", StackdriverFetchTask.class);
}

@Nonnull
@Override
public String getType() {
return "stackdriverFetch";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.annotation.Nonnull;
import java.io.IOException;
import java.time.Duration;
import java.util.Collections;
Expand Down Expand Up @@ -66,8 +67,9 @@ public long getTimeout() {
return Duration.ofMinutes(2).toMillis();
}

@Nonnull
@Override
public TaskResult execute(Stage stage) {
public TaskResult execute(@Nonnull Stage stage) {
Map<String, Object> context = stage.getContext();
String metricsAccountName = (String)context.get("metricsAccountName");
String storageAccountName = (String)context.get("storageAccountName");
Expand Down

0 comments on commit d59a351

Please sign in to comment.