Skip to content

Commit

Permalink
refactor($muscle-and-fitness-server): enhance validation - @notempty ->
Browse files Browse the repository at this point in the history
@notblank

enhance validation - @notempty -> @notblank

BREAKING CHANGE: enhance validation - @notempty -> @notblank

[skip ci]
  • Loading branch information
johnnymillergh committed Feb 8, 2021
1 parent c40c304 commit b4150f1
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import reactor.core.publisher.Mono;

import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.List;

Expand Down Expand Up @@ -104,7 +104,7 @@ public Mono<List<GetPermissionListByRoleIdListResponse.Permission>> getPermissio
* @return the mono
*/
@GetMapping("/jwt-remote-api/parse")
public Mono<ParseJwtResponse> parse(@NotEmpty String authorization) {
public Mono<ParseJwtResponse> parse(@NotBlank String authorization) {
return webClientBuilder
.build()
.get()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
Expand All @@ -19,6 +19,6 @@ public class ValidationTestPayload {
@NotNull
@Min(value = 1L)
private Long id;
@NotEmpty
@NotBlank
private String name;
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
Expand All @@ -16,13 +16,13 @@ public class LoginPayload {
/**
* The Login token: username / email
*/
@NotEmpty
@NotBlank
@Length(max = 100)
private String loginToken;
/**
* The Password.
*/
@NotEmpty
@NotBlank
@Length(max = 60)
private String password;
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import lombok.Data;
import org.springframework.integration.file.support.FileExistsMode;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.File;

Expand All @@ -27,7 +27,7 @@ public class SftpUploadFile {
* SFTP server's sub directory (if sub directory does'nt exist, will be auto created). Not empty and it looks
* like this: "/some/sub/directory/"
*/
@NotEmpty
@NotBlank
private String subDirectory;
/**
* This enumeration indicates what action shall be taken in case the destination file already exists. In default,
Expand Down

0 comments on commit b4150f1

Please sign in to comment.