tcurdt / jdeb

This library provides an Ant task and a Maven plugin to create Debian packages from Java builds in a truly cross platform manner.
https://github.com/tcurdt/jdeb
Apache License 2.0
485 stars 264 forks source link

Fixed all the warning of the issue no#628 #643

Open arunsak04 opened 4 months ago

arunsak04 commented 4 months ago

In this refactored code:(DebMojo.java)

Generics are used where applicable to make the code type-safe. Unchecked or unsafe operations are addressed. Warnings are suppressed only when necessary. Some code optimizations and improvements are made

In this refactored code:(OutputTimestampResolver.java)

We use java.time.Instant to represent a point in time. We convert the output date to an Instant, then to milliseconds since the epoch using toEpochMilli() method. We use java.time.LocalDateTime instead of Date for parsing the output timestamp, and convert it to an Instant. We use TimeUnit.SECONDS.toMillis() for converting seconds to milliseconds when reading from the environment variable.

tcurdt commented 3 months ago

Thanks for the contribution.

A few notes: The re-formatting makes it quite hard to follow though. Re-formatting should better be kept in a separate PR. Also I am not sure why you thought to remove javadocs. And as you can see the CI is failing.

tcurdt commented 3 months ago

Could you please revert the reformatting and rebase. It's too hard to review the PR like this.