OfficeDev / ews-java-api

A java client library to access Exchange web services. The API works against Office 365 Exchange Online as well as on premises Exchange.
MIT License
868 stars 559 forks source link

Findbugs fixes #200

Open ahaarrestad opened 9 years ago

ahaarrestad commented 9 years ago

As of the today's source, findbugs found the following 8 scary 3 troubling 2 of concern

at least the 8 scary issues must be fixed!

vboctor commented 9 years ago

Makes sense. Is there also a way to integrate this tool in Travis CI to keep the code clean once we make it clean?

ahaarrestad commented 9 years ago

We can use finbugs mojo in the reporting part of the pom.xml, and this will fail the build during verify if any bugs are found.

ahaarrestad commented 9 years ago

fixed a few issues. could need some input on the following scary that is harder to fix

timestamp = String.format(WSSecurityBasedCredentials.wsuTimeStampFormat, utcNow, utcNow);
protected static final String wsuTimeStampFormat =
    "<wsu:Timestamp>" +
        "<wsu:Created>{0:yyyy'-'MM'-'dd'T'HH':'mm':'ss'Z'}</wsu:Created>" +
        "<wsu:Expires>{1:yyyy'-'MM'-'dd'T'HH':'mm':'ss'Z'}</wsu:Expires>" +
        "</wsu:Timestamp>";