[
https://issues.apache.org/jira/browse/FINERACT-1245?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17227597#comment-17227597
]
Michael Vorburger commented on FINERACT-1245:
---------------------------------------------
Hm, wait a second, this is curious:
I have run into the same error when I've moved that {{OfficeTest}} from
{{fineract-client}} to {{integration-tests}} for FINERACT-1209.
But in {{integration-tests}} it fails with {{error: warnings found and -Werror
specified}} (so I'll fix it in my upcoming PR).
But why was this just a warning and not an error as long as it was in
{{fineract-client}}? The {{options.compilerArgs}} for {{"-Werror"}} in the root
{{build.gradle}} should apply to all our Java projects... I can't figure out
why it doesn't (given that {{develop}} as is right now, before my next PR for
FINERACT-1209, is passing).
[~aleks] do you understand why this is so? Hope you don't mind if I assign this
to you.
> Error Prone Bug Pattern JavaTimeDefaultTimeZone should be Error not just
> Warning
> --------------------------------------------------------------------------------
>
> Key: FINERACT-1245
> URL: https://issues.apache.org/jira/browse/FINERACT-1245
> Project: Apache Fineract
> Issue Type: Bug
> Reporter: Michael Vorburger
> Assignee: Michael Vorburger
> Priority: Major
> Fix For: 1.5.0
>
>
> This should be configured to be an Error, not just a Warning, and the
> occurrence fixed:
> {noformat}> 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{noformat}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)