Skip to content

Commit

Permalink
chore(deps): update dependency com.diffplug.spotless:spotless-maven-p…
Browse files Browse the repository at this point in the history
…lugin to v2.44.1 (#496)

* chore(deps): update dependency com.diffplug.spotless:spotless-maven-plugin to v2.44.1

* fix format

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Raja Kolli <rajadilipkolli@gmail.com>
  • Loading branch information
renovate[bot] and rajadilipkolli authored Jan 9, 2025
1 parent 24cf98c commit eac987e
Show file tree
Hide file tree
Showing 13 changed files with 21 additions and 47 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<org.mapstruct.version>1.6.3</org.mapstruct.version>
<flexy-pool.version>3.0.2</flexy-pool.version>

<spotless.version>2.43.0</spotless.version>
<spotless.version>2.44.1</spotless.version>
<properties-maven-plugin.version>1.2.1</properties-maven-plugin.version>
<sonar-maven-plugin.version>5.0.0.4389</sonar-maven-plugin.version>
<jacoco-maven-plugin.version>0.8.12</jacoco-maven-plugin.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
@Validated
public class AppDataSourceProperties {

@Min(value = 5, message = "Min OverGrow size should be 5")
private int maxOvergrowPoolSize;
@Min(value = 5, message = "Min OverGrow size should be 5") private int maxOvergrowPoolSize;

private AcquisitionStrategy acquisitionStrategy;

Expand All @@ -36,18 +35,14 @@ public void setAcquisitionStrategy(AcquisitionStrategy acquisitionStrategy) {
public static class AcquisitionStrategy {

/** Number of retry attempts for connection acquisition */
@Min(value = 1, message = "At least one retry must be configured")
@Max(value = 10, message = "Maximum 10 retries allowed")
private int retries;
@Min(value = 1, message = "At least one retry must be configured") @Max(value = 10, message = "Maximum 10 retries allowed") private int retries;

/** Timeout increment in milliseconds between retries */
@Min(value = 50, message = "Increment timeout must be at least 50ms")
private int incrementTimeout;
@Min(value = 50, message = "Increment timeout must be at least 50ms") private int incrementTimeout;

@Positive(message = "Lease time threshold must be non-negative") private long leaseTimeThreshold;

@Min(value = 100, message = "Acquisition timeout must be at least 100ms")
private long acquisitionTimeout;
@Min(value = 100, message = "Acquisition timeout must be at least 100ms") private long acquisitionTimeout;

public int getRetries() {
return retries;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
@ConfigurationProperties(prefix = "app.amfi")
public class AmfiProperties {

@Valid
private SchemeProperties scheme;
@Valid private SchemeProperties scheme;

private String dataUrl;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,11 @@
@Validated
public class ApplicationProperties {

@Valid
private AmfiProperties amfi;
@Valid private AmfiProperties amfi;

@Valid
private BseStarProperties bseStar;
@Valid private BseStarProperties bseStar;

@Valid
private NavProperties nav;
@Valid private NavProperties nav;

public AmfiProperties getAmfi() {
return amfi;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
@ConfigurationProperties(prefix = "app.bsestar")
public class BseStarProperties {

@Valid
private SchemeProperties scheme;
@Valid private SchemeProperties scheme;

public SchemeProperties getScheme() {
return scheme;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
@ConfigurationProperties(prefix = "app.nav.mfapi")
public class MfApiProperties {

@NotBlank(message = "Data URL must not be blank")
@Pattern(regexp = "^https?://.*", message = "Data URL must be a valid HTTP(S) URL")
@NotBlank(message = "Data URL must not be blank") @Pattern(regexp = "^https?://.*", message = "Data URL must be a valid HTTP(S) URL")
private String dataUrl;

public String getDataUrl() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,9 @@
@Validated
public class NavProperties {

@Valid
private AmfiProperties amfi;
@Valid private AmfiProperties amfi;

@Valid
private MfApiProperties mfApi;
@Valid private MfApiProperties mfApi;

public AmfiProperties getAmfi() {
return amfi;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
@Validated
public class SchemeProperties {

@NotBlank(message = "Data URL must not be blank")
@Pattern(
@NotBlank(message = "Data URL must not be blank") @Pattern(
regexp = "^https?://[-a-zA-Z0-9+&@#/%?=~_|!:,.;]*[-a-zA-Z0-9+&@#/%=~_|]",
message = "Data URL must be a valid HTTP(S) URL")
private String dataUrl;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,14 @@ public NAVController(MFNavService mfNavService) {
@GetMapping(path = "/{schemeCode}")
MFSchemeDTO getScheme(
@PathVariable
@Min(value = 100000, message = "Min value of schemeCode should be greater than 100000")
@Max(value = 160000, message = "Max value of schemeCode should be less than 160000")
@Valid
Long schemeCode) {
@Min(value = 100000, message = "Min value of schemeCode should be greater than 100000") @Max(value = 160000, message = "Max value of schemeCode should be less than 160000") @Valid Long schemeCode) {
return mfNavService.getNav(schemeCode);
}

@GetMapping(path = "/{schemeCode}/{date}")
public MFSchemeDTO getSchemeNavOnDate(
@PathVariable
@Min(value = 100000, message = "Min value of schemeCode should be greater than 100000")
@Max(value = 160000, message = "Max value of schemeCode should be less than 160000")
@Valid
Long schemeCode,
@Min(value = 100000, message = "Min value of schemeCode should be greater than 100000") @Max(value = 160000, message = "Max value of schemeCode should be less than 160000") @Valid Long schemeCode,
@PathVariable("date") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate inputDate) {
return mfNavService.getNavOnDate(schemeCode, inputDate);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,4 @@
*/
public record Fund(
@Positive(message = "Fund value cannot be negative") double value,
@DecimalMin(value = "0.0", message = "Fund ratio must be between 0 and 1")
@DecimalMax(value = "1.0", message = "Fund ratio must be between 0 and 1")
double ratio) {}
@DecimalMin(value = "0.0", message = "Fund ratio must be between 0 and 1") @DecimalMax(value = "1.0", message = "Fund ratio must be between 0 and 1") double ratio) {}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,5 @@
* The funds list must not be empty, and the investment amount must be positive.
*/
public record InvestmentRequest(
@NotEmpty(message = "Investment request and funds list cannot be null or empty") @ValidSumOfRatios @Valid
List<Fund> funds,
@NotEmpty(message = "Investment request and funds list cannot be null or empty") @ValidSumOfRatios @Valid List<Fund> funds,
@PositiveOrZero(message = "Amount to invest cannot be negative") double amountToInvest) {}
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,10 @@ UploadFileResponse upload(@RequestPart("file") MultipartFile multipartFile) thro

@GetMapping("/api/portfolio/{pan}")
public PortfolioResponse getPortfolio(
@PathVariable("pan") @Pattern(regexp = "[A-Z]{5}[0-9]{4}[A-Z]", message = "Invalid PAN number format")
String panNumber,
@PathVariable("pan") @Pattern(regexp = "[A-Z]{5}[0-9]{4}[A-Z]", message = "Invalid PAN number format") String panNumber,
@RequestParam(required = false)
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE)
@PastOrPresent(message = "Date should be past or today")
LocalDate asOfDate) {
@PastOrPresent(message = "Date should be past or today") LocalDate asOfDate) {
return userDetailService.getPortfolioByPAN(panNumber, asOfDate);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ class UserTransactionsController {

@GetMapping("/investments/{pan}")
public List<MonthlyInvestmentResponse> getTotalInvestmentsByPanPerMonth(
@PathVariable("pan") @Pattern(regexp = "[A-Z]{5}[0-9]{4}[A-Z]", message = "Invalid PAN number format")
String pan) {
@PathVariable("pan") @Pattern(regexp = "[A-Z]{5}[0-9]{4}[A-Z]", message = "Invalid PAN number format") String pan) {
return userTransactionDetailsService.getTotalInvestmentsByPanPerMonth(pan);
}
}

0 comments on commit eac987e

Please sign in to comment.