fineract-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [fineract] vorburger commented on a change in pull request #906: FINERACT-942 Remove use of printStackTrace and added checkstyle
Date Thu, 21 May 2020 10:05:32 GMT

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



Mime
View raw message