Skip to main content
Code Review

Return to Answer

replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link
  1. ExecutorService.awaitTermination has a return value:

true if this executor terminated and false if the timeout elapsed before termination

You should check that and at least print a warning to log if it's false.

  1. Consider setting an UncaughtExceptionHandler for the executor (through a ThreadFactory). (ThreadFactoryBuilder from Guava has a great API for that.)
  1. It's a little bit surprising that field declarations call probably complicated methods:
final JasperRestfulClient restClient = new JasperRestfulClient();
final List<Report> reportsToBeTested = restClient.getReports();

I'd put them into a constructor.

  1. These fields could be private:
final String format = "xml";
final String directoryReport = "\\var\\reports";
final JasperRestfulClient restClient = new JasperRestfulClient();
final List<Report> reportsToBeTested = restClient.getReports();

(Should I always use the private access modifier for class fields? Should I always use the private access modifier for class fields?; Item 13 of Effective Java 2nd Edition: Minimize the accessibility of classes and members.)

  1. fileName is rather one word, I'd not capitalize the n.
  1. ExecutorService.awaitTermination has a return value:

true if this executor terminated and false if the timeout elapsed before termination

You should check that and at least print a warning to log if it's false.

  1. Consider setting an UncaughtExceptionHandler for the executor (through a ThreadFactory). (ThreadFactoryBuilder from Guava has a great API for that.)
  1. It's a little bit surprising that field declarations call probably complicated methods:
final JasperRestfulClient restClient = new JasperRestfulClient();
final List<Report> reportsToBeTested = restClient.getReports();

I'd put them into a constructor.

  1. These fields could be private:
final String format = "xml";
final String directoryReport = "\\var\\reports";
final JasperRestfulClient restClient = new JasperRestfulClient();
final List<Report> reportsToBeTested = restClient.getReports();

(Should I always use the private access modifier for class fields?; Item 13 of Effective Java 2nd Edition: Minimize the accessibility of classes and members.)

  1. fileName is rather one word, I'd not capitalize the n.
  1. ExecutorService.awaitTermination has a return value:

true if this executor terminated and false if the timeout elapsed before termination

You should check that and at least print a warning to log if it's false.

  1. Consider setting an UncaughtExceptionHandler for the executor (through a ThreadFactory). (ThreadFactoryBuilder from Guava has a great API for that.)
  1. It's a little bit surprising that field declarations call probably complicated methods:
final JasperRestfulClient restClient = new JasperRestfulClient();
final List<Report> reportsToBeTested = restClient.getReports();

I'd put them into a constructor.

  1. These fields could be private:
final String format = "xml";
final String directoryReport = "\\var\\reports";
final JasperRestfulClient restClient = new JasperRestfulClient();
final List<Report> reportsToBeTested = restClient.getReports();

(Should I always use the private access modifier for class fields?; Item 13 of Effective Java 2nd Edition: Minimize the accessibility of classes and members.)

  1. fileName is rather one word, I'd not capitalize the n.
replaced http://english.stackexchange.com/ with https://english.stackexchange.com/
Source Link
  1. ExecutorService.awaitTermination has a return value:

true if this executor terminated and false if the timeout elapsed before termination

You should check that and at least print a warning to log if it's false.

  1. Consider setting an UncaughtExceptionHandler for the executor (through a ThreadFactory). (ThreadFactoryBuilder from Guava has a great API for that.)
  1. It's a little bit surprising that field declarations call probably complicated methods:
final JasperRestfulClient restClient = new JasperRestfulClient();
final List<Report> reportsToBeTested = restClient.getReports();

I'd put them into a constructor.

  1. These fields could be private:
final String format = "xml";
final String directoryReport = "\\var\\reports";
final JasperRestfulClient restClient = new JasperRestfulClient();
final List<Report> reportsToBeTested = restClient.getReports();

(Should I always use the private access modifier for class fields?; Item 13 of Effective Java 2nd Edition: Minimize the accessibility of classes and members.)

  1. fileName is rather one word fileName is rather one word, I'd not capitalize the n.
  1. ExecutorService.awaitTermination has a return value:

true if this executor terminated and false if the timeout elapsed before termination

You should check that and at least print a warning to log if it's false.

  1. Consider setting an UncaughtExceptionHandler for the executor (through a ThreadFactory). (ThreadFactoryBuilder from Guava has a great API for that.)
  1. It's a little bit surprising that field declarations call probably complicated methods:
final JasperRestfulClient restClient = new JasperRestfulClient();
final List<Report> reportsToBeTested = restClient.getReports();

I'd put them into a constructor.

  1. These fields could be private:
final String format = "xml";
final String directoryReport = "\\var\\reports";
final JasperRestfulClient restClient = new JasperRestfulClient();
final List<Report> reportsToBeTested = restClient.getReports();

(Should I always use the private access modifier for class fields?; Item 13 of Effective Java 2nd Edition: Minimize the accessibility of classes and members.)

  1. fileName is rather one word, I'd not capitalize the n.
  1. ExecutorService.awaitTermination has a return value:

true if this executor terminated and false if the timeout elapsed before termination

You should check that and at least print a warning to log if it's false.

  1. Consider setting an UncaughtExceptionHandler for the executor (through a ThreadFactory). (ThreadFactoryBuilder from Guava has a great API for that.)
  1. It's a little bit surprising that field declarations call probably complicated methods:
final JasperRestfulClient restClient = new JasperRestfulClient();
final List<Report> reportsToBeTested = restClient.getReports();

I'd put them into a constructor.

  1. These fields could be private:
final String format = "xml";
final String directoryReport = "\\var\\reports";
final JasperRestfulClient restClient = new JasperRestfulClient();
final List<Report> reportsToBeTested = restClient.getReports();

(Should I always use the private access modifier for class fields?; Item 13 of Effective Java 2nd Edition: Minimize the accessibility of classes and members.)

  1. fileName is rather one word, I'd not capitalize the n.
Source Link
palacsint
  • 30.4k
  • 9
  • 82
  • 157
  1. ExecutorService.awaitTermination has a return value:

true if this executor terminated and false if the timeout elapsed before termination

You should check that and at least print a warning to log if it's false.

  1. Consider setting an UncaughtExceptionHandler for the executor (through a ThreadFactory). (ThreadFactoryBuilder from Guava has a great API for that.)
  1. It's a little bit surprising that field declarations call probably complicated methods:
final JasperRestfulClient restClient = new JasperRestfulClient();
final List<Report> reportsToBeTested = restClient.getReports();

I'd put them into a constructor.

  1. These fields could be private:
final String format = "xml";
final String directoryReport = "\\var\\reports";
final JasperRestfulClient restClient = new JasperRestfulClient();
final List<Report> reportsToBeTested = restClient.getReports();

(Should I always use the private access modifier for class fields?; Item 13 of Effective Java 2nd Edition: Minimize the accessibility of classes and members.)

  1. fileName is rather one word, I'd not capitalize the n.
lang-java

AltStyle によって変換されたページ (->オリジナル) /