Skip to content

Commit

Permalink
Fix static analysis issues
Browse files Browse the repository at this point in the history
Restrict access level on classes + other static analysis fixes

Fix findbugs issues (issue #33)
Fix compile after AvroIO, TextIO, PubsubIO and State refactor
  • Loading branch information
iemejia committed Aug 23, 2017
1 parent a39cb80 commit 1541fad
Show file tree
Hide file tree
Showing 34 changed files with 221 additions and 220 deletions.
2 changes: 1 addition & 1 deletion integration/java/nexmark/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@

<dependency>
<groupId>org.apache.beam</groupId>
<artifactId>beam-sdks-java-extensions-gcp-core</artifactId>
<artifactId>beam-sdks-java-extensions-google-cloud-platform-core</artifactId>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ public void processElement(ProcessContext c) {

public final String name;
public final String prefix;
final MonitorDoFn doFn;
final PTransform<PCollection<? extends T>, PCollection<T>> transform;
private final MonitorDoFn doFn;
private final PTransform<PCollection<? extends T>, PCollection<T>> transform;

public Monitor(String name, String prefix) {
this.name = name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public class NexmarkDriver<OptionT extends NexmarkOptions> {
/**
* Entry point.
*/
public void runAll(OptionT options, NexmarkRunner runner) {
void runAll(OptionT options, NexmarkRunner runner) {
Instant start = Instant.now();
Map<NexmarkConfiguration, NexmarkPerf> baseline = loadBaseline(options.getBaselineFilename());
Map<NexmarkConfiguration, NexmarkPerf> actual = new LinkedHashMap<>();
Expand Down Expand Up @@ -87,7 +87,7 @@ public void runAll(OptionT options, NexmarkRunner runner) {
}

if (!successful) {
System.exit(1);
throw new RuntimeException("Execution was not successful");
}
}

Expand Down Expand Up @@ -149,8 +149,6 @@ private static Map<NexmarkConfiguration, NexmarkPerf> loadBaseline(

/**
* Print summary of {@code actual} vs (if non-null) {@code baseline}.
*
* @throws IOException
*/
private static void saveSummary(
@Nullable String summaryFilename,
Expand Down Expand Up @@ -227,7 +225,7 @@ private static void saveSummary(
if (actualPerf != null) {
List<String> errors = actualPerf.errors;
if (errors == null) {
errors = new ArrayList<String>();
errors = new ArrayList<>();
errors.add("NexmarkGoogleRunner returned null errors list");
}
for (String error : errors) {
Expand Down Expand Up @@ -300,7 +298,7 @@ public static void main(String[] args) {
NexmarkOptions options = PipelineOptionsFactory.fromArgs(args)
.withValidation()
.as(NexmarkOptions.class);
NexmarkRunner runner = new NexmarkRunner(options);
new NexmarkDriver().runAll(options, runner);
NexmarkRunner<NexmarkOptions> runner = new NexmarkRunner<>(options);
new NexmarkDriver<>().runAll(options, runner);
}
}
Loading

0 comments on commit 1541fad

Please sign in to comment.