-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EPMRPP-93073 migrate to Spring Boot 3 #14
base: develop
Are you sure you want to change the base?
Changes from 5 commits
eecfc95
a1ef860
aa5a5c9
b997ee3
4ed74a1
6ee6185
6369bc5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -105,4 +105,4 @@ jobs: | |
else | ||
echo 'Verification failed, please check the bundle' 1>&2 | ||
exit 1 | ||
fi | ||
fi |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ import org.owasp.dependencycheck.reporting.ReportGenerator | |
plugins { | ||
id 'java' | ||
id 'java-library' | ||
id 'org.owasp.dependencycheck' version '10.0.4' | ||
id 'org.owasp.dependencycheck' version '11.1.1' | ||
} | ||
|
||
def scriptsUrl = 'https://raw.githubusercontent.com/reportportal/gradle-scripts/' + | ||
|
@@ -40,24 +40,24 @@ java { | |
} | ||
|
||
wrapper { | ||
gradleVersion = '8.10' | ||
gradleVersion = '8.12' | ||
} | ||
|
||
dependencies { | ||
dependencies { | ||
implementation "org.springdoc:springdoc-openapi-data-rest:${sprindocAnnotationsVersion}" | ||
implementation "com.fasterxml.jackson.core:jackson-databind:${jacksonVersion}" | ||
implementation "javax.validation:validation-api:${validationApiVersion}" | ||
implementation "org.apache.commons:commons-lang3:${commonsLangVersion}" | ||
api "org.springdoc:springdoc-openapi-starter-common:${springDocVersion}" | ||
api "com.fasterxml.jackson.core:jackson-databind:${jacksonVersion}" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We don't want our users rely on jackson version specified by our library, since we want to be free changing it. Please revert to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixed |
||
api "org.hibernate.validator:hibernate-validator:${hibernateValidatorVersion}" | ||
api "org.apache.commons:commons-lang3:${commonsLangVersion}" | ||
api "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:${jacksonVersion}" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixed |
||
|
||
testImplementation "junit:junit:${junitVersion}" | ||
testImplementation "org.junit.jupiter:junit-jupiter-api:${jupiterVersion}" | ||
testImplementation "org.junit.jupiter:junit-jupiter-params:${jupiterVersion}" | ||
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${jupiterVersion}" | ||
testImplementation "org.mockito:mockito-junit-jupiter:${mockitoJunitJupiter}" | ||
testImplementation "org.hibernate.validator:hibernate-validator:${hibernateValidatorVersion}" | ||
testImplementation "javax.el:javax.el-api:${elApiVersion}" | ||
testImplementation "org.glassfish:javax.el:${elApiVersion}" | ||
testImplementation "org.junit.jupiter:junit-jupiter-api:${junitVersion}" | ||
testImplementation "org.junit.jupiter:junit-jupiter-params:${junitVersion}" | ||
testImplementation "org.junit.jupiter:junit-jupiter-engine:${junitVersion}" | ||
testImplementation "org.hamcrest:hamcrest:2.2" | ||
testImplementation "jakarta.el:jakarta.el-api:6.0.1" | ||
testImplementation "org.glassfish:jakarta.el:4.0.2" | ||
|
||
// add lombok support | ||
compileOnly "org.projectlombok:lombok:${lombokVersion}" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
version=5.12.3 | ||
|
||
org.gradle.parallel=true | ||
org.gradle.caching=true | ||
|
||
description=EPAM Report portal. REST Reporting API model | ||
hibernateValidatorVersion=6.1.2.Final | ||
validationApiVersion=2.0.1.Final | ||
junitVersion=4.12 | ||
jupiterVersion=5.8.1 | ||
elApiVersion=3.0.0 | ||
sprindocAnnotationsVersion=1.7.0 | ||
commonsLangVersion=3.9 | ||
mockitoJunitJupiter=3.4.6 | ||
jacksonVersion=2.10.2 | ||
lombokVersion=1.18.30 | ||
hibernateValidatorVersion=8.0.2.Final | ||
junitVersion=5.11.4 | ||
mockitoJunitJupiter=5.14.2 | ||
springDocVersion=2.7.0 | ||
commonsLangVersion=3.17.0 | ||
jacksonVersion=2.18.2 | ||
lombokVersion=1.18.36 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
jdk: | ||
- openjdk21 | ||
- openjdk21 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Migration to JDK 21 shifts potential usage of this library to unknown future. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the project already migrated to JDK 21 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The fact that I missed this, is not an excuse. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,34 +16,34 @@ | |
|
||
package com.epam.ta.reportportal.ws.annotations; | ||
|
||
import javax.validation.ConstraintValidator; | ||
import javax.validation.ConstraintValidatorContext; | ||
import java.util.ArrayList; | ||
import jakarta.validation.ConstraintValidator; | ||
import jakarta.validation.ConstraintValidatorContext; | ||
import java.util.Arrays; | ||
import java.util.Collection; | ||
import java.util.List; | ||
import java.util.Set; | ||
import java.util.stream.Collectors; | ||
|
||
/** | ||
* @author <a href="mailto:[email protected]">Ihar Kahadouski</a> | ||
*/ | ||
public class InCollectionValidator implements ConstraintValidator<In, Collection<String>> { | ||
|
||
private String[] allowedValues; | ||
private Set<String> allowedValues; | ||
|
||
@Override | ||
public void initialize(In constraintAnnotation) { | ||
allowedValues = new String[constraintAnnotation.allowedValues().length]; | ||
for (int i = 0; i < constraintAnnotation.allowedValues().length; i++) { | ||
allowedValues[i] = constraintAnnotation.allowedValues()[i].toUpperCase(); | ||
} | ||
allowedValues = Arrays.stream(constraintAnnotation.allowedValues()) | ||
.map(String::toUpperCase) | ||
.collect(Collectors.toSet()); | ||
} | ||
|
||
@Override | ||
public boolean isValid(Collection<String> value, ConstraintValidatorContext context) { | ||
List<String> upperCaseList = new ArrayList<>(); | ||
for (String next : value) { | ||
upperCaseList.add(next.toUpperCase()); | ||
} | ||
return Arrays.asList(allowedValues).containsAll(upperCaseList); | ||
List<String> upperCaseList = value.stream() | ||
.map(String::toUpperCase) | ||
.toList(); | ||
|
||
return allowedValues.containsAll(upperCaseList); | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,8 +16,8 @@ | |
|
||
package com.epam.ta.reportportal.ws.annotations; | ||
|
||
import javax.validation.ConstraintValidator; | ||
import javax.validation.ConstraintValidatorContext; | ||
import jakarta.validation.ConstraintValidator; | ||
import jakarta.validation.ConstraintValidatorContext; | ||
|
||
/** | ||
* @author <a href="mailto:[email protected]">Ihar Kahadouski</a> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,13 +17,17 @@ | |
package com.epam.ta.reportportal.ws.reporting; | ||
|
||
import java.util.List; | ||
import javax.validation.Valid; | ||
import javax.validation.constraints.NotNull; | ||
import javax.validation.constraints.Size; | ||
import jakarta.validation.Valid; | ||
import jakarta.validation.constraints.NotNull; | ||
import jakarta.validation.constraints.Size; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
/** | ||
* @author <a href="mailto:[email protected]">Ihar Kahadouski</a> | ||
*/ | ||
@Setter | ||
@Getter | ||
public class BulkInfoUpdateRQ { | ||
|
||
@NotNull | ||
|
@@ -35,56 +39,19 @@ public class BulkInfoUpdateRQ { | |
@Valid | ||
private List<UpdateItemAttributeRQ> attributes; | ||
|
||
public List<Long> getIds() { | ||
return ids; | ||
} | ||
|
||
public void setIds(List<Long> ids) { | ||
this.ids = ids; | ||
} | ||
|
||
public Description getDescription() { | ||
return description; | ||
} | ||
|
||
public void setDescription(Description description) { | ||
this.description = description; | ||
} | ||
|
||
public List<UpdateItemAttributeRQ> getAttributes() { | ||
return attributes; | ||
} | ||
|
||
public void setAttributes(List<UpdateItemAttributeRQ> attributes) { | ||
this.attributes = attributes; | ||
} | ||
|
||
public enum Action { | ||
public enum Action { | ||
DELETE, | ||
UPDATE, | ||
CREATE | ||
} | ||
|
||
public static class Description { | ||
@Setter | ||
@Getter | ||
public static class Description { | ||
|
||
String comment; | ||
|
||
Action action; | ||
|
||
public String getComment() { | ||
return comment; | ||
} | ||
|
||
public void setComment(String comment) { | ||
this.comment = comment; | ||
} | ||
|
||
public Action getAction() { | ||
return action; | ||
} | ||
|
||
public void setAction(Action action) { | ||
this.action = action; | ||
} | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't manage to find any single reference on Spring in the code. If don use this library only to include transient Swagger annotations, please remove it and include
swagger-annotations
directly.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed