Uploaded image for project: 'Apache Fineract'
  1. Apache Fineract
  2. FINERACT-1245

Error Prone Bug Pattern JavaTimeDefaultTimeZone should be Error not just Warning

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: In Progress
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 1.6.0
    • Component/s: None
    • Labels:
      None

      Description

      This should be configured to be an Error, not just a Warning, and the occurrence fixed:

      > Task :fineract-client:compileTestJava                                                                                               
      /home/vorburger/dev/Mifos/fineract/fineract-client/src/test/java/org/apache/fineract/integrationtests/newstyle/OfficeTest.java:40: warning: [JavaTimeDefaultTimeZone] LocalDate.now() is not allowed because it silently uses the system default time-zone. You must pass an explicit time-zone (e.g., ZoneId.of("America/Los_Angeles")) to this method.                                                          
                      .openingDate(LocalDate.now()).dateFormat(dateFormat()).locale("en_US"))).getOfficeId()).isGreaterThan(0);             
                                                ^                                                                                           
          (see https://errorprone.info/bugpattern/JavaTimeDefaultTimeZone)                                                                  
        Did you mean '.openingDate(LocalDate.now(ZoneId.systemDefault())).dateFormat(dateFormat()).locale("en_US"))).getOfficeId()).isGreaterThan(0);'?                                                                                                                           
      1 warning

        Attachments

          Activity

            People

            • Assignee:
              aleks Aleksandar Vidakovic
              Reporter:
              vorburger Michael Vorburger
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: