Skip to content

Commit

Permalink
[JENKINS-43449] Use @GuardedBy annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyrille Le Clerc committed Apr 10, 2017
1 parent e094f46 commit 949b8af
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Expand Up @@ -41,6 +41,7 @@
import java.text.SimpleDateFormat;
import java.util.Date;

import javax.annotation.concurrent.GuardedBy;
import javax.annotation.concurrent.ThreadSafe;

/**
Expand All @@ -49,7 +50,9 @@
@ThreadSafe
public class FileMavenEventReporter implements MavenEventReporter {
File outFile;
@GuardedBy("this")
PrintWriter out;
@GuardedBy("this")
XMLWriter xmlWriter;

public FileMavenEventReporter() throws IOException {
Expand Down
Expand Up @@ -37,6 +37,7 @@
import java.nio.charset.StandardCharsets;
import java.sql.Timestamp;

import javax.annotation.concurrent.GuardedBy;
import javax.annotation.concurrent.ThreadSafe;

/**
Expand All @@ -45,7 +46,9 @@
@ThreadSafe
public class OutputStreamEventReporter implements MavenEventReporter {

@GuardedBy("this")
final PrintWriter out;
@GuardedBy("this")
final XMLWriter xmlWriter;

public OutputStreamEventReporter(OutputStream out) {
Expand Down

0 comments on commit 949b8af

Please sign in to comment.