[GitHub] [fineract] vorburger commented on a change in pull request #906: [WIP] FINERACT-942 Remove use of printStackTrace and added checkstyle

2020-05-19 Thread GitBox


vorburger commented on a change in pull request #906:
URL: https://github.com/apache/fineract/pull/906#discussion_r427580230



##
File path: 
fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exception/MultiException.java
##
@@ -65,7 +65,6 @@ public String getMessage() {
 sb.append(++i);
 sb.append(". ");
 Writer w = CharStreams.asWriter(sb);
-e.printStackTrace(new PrintWriter(w, true));

Review comment:
   as below, must keep this as is





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [fineract] vorburger commented on a change in pull request #906: [WIP] FINERACT-942 Remove use of printStackTrace and added checkstyle

2020-05-19 Thread GitBox


vorburger commented on a change in pull request #906:
URL: https://github.com/apache/fineract/pull/906#discussion_r427580141



##
File path: 
fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exception/MultiException.java
##
@@ -77,7 +76,7 @@ public void printStackTrace() {
 int i = 0;
 for (Throwable e : throwables) {
 LOG.info("{}.",++i);
-e.printStackTrace();

Review comment:
   as below





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [fineract] vorburger commented on a change in pull request #906: [WIP] FINERACT-942 Remove use of printStackTrace and added checkstyle

2020-05-19 Thread GitBox


vorburger commented on a change in pull request #906:
URL: https://github.com/apache/fineract/pull/906#discussion_r427579788



##
File path: 
fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exception/MultiException.java
##
@@ -87,7 +86,6 @@ public void printStackTrace(PrintStream s) {
 int i = 0;
 for (Throwable e : throwables) {
 s.print(++i + ".");
-e.printStackTrace(s);

Review comment:
   @thesmallstar this needs to be kept. It's "special", and SupressWarning 
is OK here (only)





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [fineract] vorburger commented on a change in pull request #906: [WIP] FINERACT-942 Remove use of printStackTrace and added checkstyle

2020-05-19 Thread GitBox


vorburger commented on a change in pull request #906:
URL: https://github.com/apache/fineract/pull/906#discussion_r427580010



##
File path: 
fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exception/MultiException.java
##
@@ -97,7 +95,6 @@ public void printStackTrace(PrintWriter s) {
 int i = 0;
 for (Throwable e : throwables) {
 s.print(++i + ".");
-e.printStackTrace(s);

Review comment:
   as above





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [fineract] vorburger commented on a change in pull request #906: [WIP] FINERACT-942 Remove use of printStackTrace and added checkstyle

2020-05-18 Thread GitBox


vorburger commented on a change in pull request #906:
URL: https://github.com/apache/fineract/pull/906#discussion_r426435287



##
File path: 
fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/AccountingScenarioIntegrationTest.java
##
@@ -587,11 +587,8 @@ public void checkPeriodicAccrualAccountingFlow() {
 this.journalEntryHelper.checkJournalEntryForAssetAccount(assetAccount, 
this.EXPECTED_DISBURSAL_DATE, assetAccountInitialEntry);
 
 final String jobName = "Add Accrual Transactions";
-try {
-this.schedulerJobHelper.executeJob(jobName);
-} catch (InterruptedException e) {
-e.printStackTrace();

Review comment:
   No, in a test, exceptions typically should not be logged but just "fall 
through" (propagate, with 'testXYZ() throws SomeException, Another # 
Exception...'), so that the test fails, if the exception happens. PS: We need 
to write this and more like this up into Logging Guidelines, e.g. on the 
README. Do you want to make a start with that in this PR?





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org