You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by GitBox <gi...@apache.org> on 2020/05/21 10:05:32 UTC

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

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



##########
File path: fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/service/CalendarUtils.java
##########
@@ -114,7 +116,7 @@ private static Date convertToiCal4JCompatibleDate(final LocalDate inputDate) {
         try {
             formattedDate = new Date(seedDateStr, "yyyy-MM-dd");
         } catch (final ParseException e) {
-            e.printStackTrace();
+            LOG.error("{}",e.getMessage());

Review comment:
       Two thoughts on this this: a) your LOG.error() is wrong, as everywhere else, please:
   
   ```suggestion
               LOG.error("Invalid date: " + seedDateStr, e);
   ```
   
   but, b) more importantly, isn't this catch plain wrong, not required, and can just be removed?! `new Date()` does not throw ParseException - or am I missing something obvious?




----------------------------------------------------------------
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:
users@infra.apache.org