Date
API JAVA-W107231 @NotNull private Double marketCap;
32 @NotNull private Double marketCapDominance;
33 @NotNull private Double fullyDilutedMarketCap;
34 @NotNull private Date lastUpdated;35
36 public EntityModel<CryptoCoinQuoteDto> toModel() {
37 final EntityModel<CryptoCoinQuoteDto> resource = EntityModel.of(this);
19
20 private List<Long> ids;
21 private String currency;
22 private Date lastUpdatedBefore;23 private Date lastUpdatedAfter;
24 private List<Long> cryptoPriceIds;
25
20 private List<Long> ids;
21 private String currency;
22 private Date lastUpdatedBefore;
23 private Date lastUpdatedAfter;24 private List<Long> cryptoPriceIds;
25
26 public PageRequest generatePageRequest() {
24 private Double circulatingSupply;
25 private Double totalSupply;
26 private Double maxSupply;
27 private Date dateAdded;28 private Long platformId;
29
30 public EntityModel<CryptoCoinPriceDto> toModel() {
22 private Double circulatingSupply;
23 private Double totalSupply;
24 private Double maxSupply;
25 private Date dateAdded;26 private Long platformId;
27 private List<Long> cryptoCoinIds;
28 private List<String> cryptoCoinSymbols;
java.util.Date
API should be avoided.
Use of the old Date
API has been the source of many bugs in various Java programs. The design of this API is heavily
criticised by the Java community. Some notable oddities include:
1. Mutability of Date
instances.
2. Months being zero indexed.
3. No support for timezones.
Therefore, it is highly recommended to use an alternative API to work with date and time.
Replace all usage of Date
with Clock if you are on
Java version greater than 8. For earlier Java versions, consider using Joda-Time.
If you would like to keep using the Date
API, consider adding an ignore rule for this project. See here
for more information on that.