diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
index d2c8d1c..35e1ae3 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -7,17 +7,17 @@ assignees: ''
---
-**Versions Used**
+**Versions Used**
-**Description**
+**Description**
-**How to reproduce**
+**How to reproduce**
-**Possible Solution**
+**Possible Solution**
-**Additional context**
+**Additional context**
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
index f5a5d08..6166e64 100644
--- a/.github/pull_request_template.md
+++ b/.github/pull_request_template.md
@@ -1,32 +1,26 @@
## Description
-
## Related Issue
-
## Motivation and Context
-
## How Has This Been Tested?
-
## Documentation:
-
## Checklist:
-
- [ ] I have updated the documentation accordingly.
- [ ] I have assigned the correct milestone or created one if non-existent.
- [ ] I have correctly labeled this pull request.
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
index 0000000..f98a515
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,37 @@
+name: Continuous Integration
+on: push
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v2
+
+ - name: Set up JDK
+ uses: actions/setup-java@v1
+ with:
+ java-version: 11
+
+ - name: Grant execute permission for gradlew
+ run: chmod +x gradlew
+
+ - name: Build with Gradle
+ run: ./gradlew build -PignoreCheckFailures=true -PgithubUsername=${{ github.actor }} -PgithubPassword=${{ secrets.GITHUB_TOKEN }}
+
+ - name: Checkstyle
+ uses: jwgmeligmeyling/checkstyle-github-action@v1.2
+ with:
+ path: ./build/reports/checkstyle/*.xml
+
+ - name: Test Report
+ uses: scacap/action-surefire-report@v1.0.9
+ with:
+ github_token: ${{ secrets.GITHUB_TOKEN }}
+ report_paths: ./**/build/test-results/test/*.xml
+
+ - name: Archive build output
+ uses: actions/upload-artifact@v2
+ with:
+ name: gradle-build
+ path: ./**/build/
diff --git a/.github/workflows/inspect.yml b/.github/workflows/inspect.yml
new file mode 100644
index 0000000..741ea35
--- /dev/null
+++ b/.github/workflows/inspect.yml
@@ -0,0 +1,25 @@
+name: Intellij
+on: push
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v2
+
+ - name: Run Intellij
+ uses: mridang/action-idea@2020.3.3
+ with:
+ target: /github/workspace
+ profile: /github/workspace/.idea/inspectionProfiles/CI.xml
+ output: output
+ verbosity: v2
+ scope: Inspection
+
+ - name: Archive inspection results
+ if: ${{ failure() }}
+ uses: actions/upload-artifact@v1
+ with:
+ name: inspection-results
+ path: output
diff --git a/.github/workflows/qodana.yml b/.github/workflows/qodana.yml
deleted file mode 100644
index 92952ef..0000000
--- a/.github/workflows/qodana.yml
+++ /dev/null
@@ -1,12 +0,0 @@
-name: Qodana
-on: push
-
-jobs:
- inspect:
- runs-on: ubuntu-latest
-
- steps:
- - uses: actions/checkout@v2
-
- - name: 'Qodana Scan'
- uses: JetBrains/qodana-action@v5.0.2
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
deleted file mode 100644
index 170049c..0000000
--- a/.github/workflows/tests.yml
+++ /dev/null
@@ -1,28 +0,0 @@
-name: Tests
-on: push
-
-jobs:
- build:
- runs-on: ubuntu-latest
-
- steps:
- - uses: actions/checkout@v2
-
- - name: Set up JDK
- uses: actions/setup-java@v3
- with:
- java-version: 17
- distribution: temurin
-
- - name: Setup and execute Gradle 'test' task
- uses: gradle/gradle-build-action@v2
- with:
- arguments: build -PignoreCheckFailures=true -PgithubUsername=${{ github.actor }} -PgithubPassword=${{ secrets.GITHUB_TOKEN }}
-
- - name: Archive build output
- uses: actions/upload-artifact@v2
- if: always()
- with:
- name: test-results
- path: build/reports/tests/
- retention-days: 3
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
index 4d74049..af11d46 100644
--- a/.idea/compiler.xml
+++ b/.idea/compiler.xml
@@ -5,45 +5,44 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
+
-
-
-
-
-
-
-
+
-
+
+
diff --git a/.idea/gradle.xml b/.idea/gradle.xml
index 908786e..7c6a09e 100644
--- a/.idea/gradle.xml
+++ b/.idea/gradle.xml
@@ -4,16 +4,14 @@
\ No newline at end of file
diff --git a/.idea/scala_compiler.xml b/.idea/scala_compiler.xml
new file mode 100644
index 0000000..3c0e0f6
--- /dev/null
+++ b/.idea/scala_compiler.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
deleted file mode 100644
index 82b0fe0..0000000
--- a/.idea/workspace.xml
+++ /dev/null
@@ -1,266 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {
- "keyToString": {
- "RunOnceActivity.OpenProjectViewOnStart": "true",
- "RunOnceActivity.ShowReadmeOnStart": "true",
- "last_opened_file_path": "/Users/mridang/Nosto/beanie/.github/workflows",
- "node.js.detected.package.eslint": "true",
- "node.js.selected.package.eslint": "(autodetect)",
- "nodejs_package_manager_path": "npm",
- "project.structure.last.edited": "Project",
- "project.structure.proportion": "0.15",
- "project.structure.side.proportion": "0.2",
- "settings.editor.selected.configurable": "reference.settingsdialog.project.gradle",
- "vue.rearranger.settings.migration": "true"
- }
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- false
- true
- false
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- false
- true
- false
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- false
- true
- false
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- true
- true
- false
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- true
- true
- false
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1636488164570
-
-
- 1636488164570
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- file://$PROJECT_DIR$/junit-vintage/src/test/java/com/nosto/beanie/InvalidSnakeCasePropertyNamingStrategyTest.java
- 29
-
-
-
- file://$PROJECT_DIR$/beanie-core/src/main/java/com/nosto/beanie/NamingStrategyTest.java
- 95
-
-
-
- file://$PROJECT_DIR$/beanie-core/src/main/java/com/nosto/beanie/NamingStrategyTest.java
- 112
-
-
-
-
-
-
\ No newline at end of file
diff --git a/README.md b/README.md
index 9567fbd..6e79b9e 100644
--- a/README.md
+++ b/README.md
@@ -15,6 +15,7 @@ Registry, [https://docs.github.com/en/packages/guides/configuring-gradle-for-use
## Usage
+
### Usage in JUnit 4 (Vintage)
In order to use Beanie if you're using JUnit 4, you'll need to use the `junit-vintage` artifact.
@@ -49,7 +50,7 @@ public class CheckMyBeansTest extends AbstractJacksonBeanTest {
### Usage in JUnit 5 (Jupiter)
-In order to use Beanie if you're using JUnit 5, you'll need to use the `junit-jupiter` artifact.
+In order to use Beanie if you're using JUnit 5, you'll need to use the `junit-jupiter` artifact.
In order to get the test to be picked up and run by your test engine, you will need to
include a test stub such as the one below into your test suite.
diff --git a/beanie-annotations/build.gradle b/beanie-annotations/build.gradle
index 45c9384..3c26d8c 100644
--- a/beanie-annotations/build.gradle
+++ b/beanie-annotations/build.gradle
@@ -1,11 +1,8 @@
plugins {
- id 'myproject.java-conventions'
+ id 'java'
}
dependencies {
- testRuntimeOnly group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.8.2'
- testRuntimeOnly group: 'org.junit.vintage', name: 'junit-vintage-engine', version: '5.8.2'
- implementation group: 'com.github.spotbugs', name: 'spotbugs-annotations', version: '4.6.0'
implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0'
- implementation group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: '2.13.2'
+ implementation group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: '2.11.0'
}
diff --git a/beanie-core/build.gradle b/beanie-core/build.gradle
index fa5f0c8..23bdb20 100644
--- a/beanie-core/build.gradle
+++ b/beanie-core/build.gradle
@@ -1,17 +1,14 @@
plugins {
- id 'myproject.java-conventions'
+ id 'java'
}
dependencies {
api project(':beanie-annotations')
- testImplementation group: 'junit', name: 'junit', version: '4.13.2'
- testRuntimeOnly group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.8.2'
- testRuntimeOnly group: 'org.junit.vintage', name: 'junit-vintage-engine', version: '5.8.2'
- implementation group: 'com.github.spotbugs', name: 'spotbugs-annotations', version: '4.6.0'
- api group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.17.2'
- api group: 'org.reflections', name: 'reflections', version: '0.10.2'
+ testImplementation group: 'junit', name: 'junit', version: '4.12'
+ api group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.14.1'
+ api group: 'org.reflections', name: 'reflections', version: '0.9.12'
api group: 'org.jeasy', name: 'easy-random-core', version: '5.0.0'
api group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0'
- api group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.13.2.2'
+ api group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.11.0'
api group: 'javax.annotation', name: 'jsr305', version: '1.0'
}
diff --git a/beanie-core/src/main/java/com/nosto/beanie/CollectionHandlingTest.java b/beanie-core/src/main/java/com/nosto/beanie/CollectionHandlingTest.java
index a6f0013..7a29440 100644
--- a/beanie-core/src/main/java/com/nosto/beanie/CollectionHandlingTest.java
+++ b/beanie-core/src/main/java/com/nosto/beanie/CollectionHandlingTest.java
@@ -29,7 +29,6 @@ public interface CollectionHandlingTest extends BeanieTest {
* Generate multiple random objects of the given class
* and assert serializing and deserializing back returns
* the original object.
- *
* @param concreteClass the bean class to be tests as provided by Junit
*/
default void testSerdeCollection(Class extends T> concreteClass) {
@@ -56,7 +55,6 @@ default void testSerdeCollection(Class extends T> concreteClass) {
* Generate multiple random objects of the given class
* and assert serializing and deserializing back returns
* the original object.
- *
* @param concreteClass the bean class to be tests as provided by Junit
*/
default void testSerdeCollectionAsWell(Class extends T> concreteClass) {
diff --git a/beanie-core/src/main/java/com/nosto/beanie/DefaultBeanieProvider.java b/beanie-core/src/main/java/com/nosto/beanie/DefaultBeanieProvider.java
index 3c1c340..25be83a 100644
--- a/beanie-core/src/main/java/com/nosto/beanie/DefaultBeanieProvider.java
+++ b/beanie-core/src/main/java/com/nosto/beanie/DefaultBeanieProvider.java
@@ -13,8 +13,6 @@
import com.fasterxml.jackson.databind.ObjectMapper;
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
-
public final class DefaultBeanieProvider implements BeanieProvider {
private final ObjectMapper objectMapper;
@@ -33,7 +31,6 @@ public DefaultBeanieProvider(Consumer mapperConsumer) {
@Override
- @SuppressFBWarnings(value = {"EI_EXPOSE_REP", "EI_EXPOSE_REP2"})
public ObjectMapper getMapper() {
return objectMapper;
}
diff --git a/beanie-core/src/main/java/com/nosto/beanie/FinalPropertiesTest.java b/beanie-core/src/main/java/com/nosto/beanie/FinalPropertiesTest.java
index 75619cc..a1d395b 100644
--- a/beanie-core/src/main/java/com/nosto/beanie/FinalPropertiesTest.java
+++ b/beanie-core/src/main/java/com/nosto/beanie/FinalPropertiesTest.java
@@ -13,6 +13,7 @@
import java.lang.reflect.Modifier;
import java.util.List;
import java.util.Objects;
+import java.util.Optional;
import java.util.stream.Collectors;
import com.fasterxml.jackson.databind.introspect.AnnotatedField;
@@ -22,7 +23,6 @@ public interface FinalPropertiesTest extends BeanieTest {
/**
* All fields should be final
- *
* @param concreteClass the bean class to be tests as provided by Junit
*/
default void testFinalProperties(Class extends T> concreteClass) {
diff --git a/beanie-core/src/main/java/com/nosto/beanie/NamingStrategyTest.java b/beanie-core/src/main/java/com/nosto/beanie/NamingStrategyTest.java
index c17324c..51ea2a2 100644
--- a/beanie-core/src/main/java/com/nosto/beanie/NamingStrategyTest.java
+++ b/beanie-core/src/main/java/com/nosto/beanie/NamingStrategyTest.java
@@ -17,12 +17,6 @@
import java.util.stream.Collectors;
import com.fasterxml.jackson.databind.BeanDescription;
-import com.fasterxml.jackson.databind.PropertyNamingStrategies.KebabCaseStrategy;
-import com.fasterxml.jackson.databind.PropertyNamingStrategies.LowerCamelCaseStrategy;
-import com.fasterxml.jackson.databind.PropertyNamingStrategies.LowerCaseStrategy;
-import com.fasterxml.jackson.databind.PropertyNamingStrategies.LowerDotCaseStrategy;
-import com.fasterxml.jackson.databind.PropertyNamingStrategies.SnakeCaseStrategy;
-import com.fasterxml.jackson.databind.PropertyNamingStrategies.UpperCamelCaseStrategy;
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.fasterxml.jackson.databind.annotation.JsonNaming;
import com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition;
@@ -32,7 +26,6 @@ public interface NamingStrategyTest extends BeanieTest {
/**
* Test that all properties of a bean are named with a consistent naming strategy and all property names
* comply with the bean's naming strategy.
- *
* @param concreteClass the bean class to be tests as provided by Junit
*/
default void testNamingStrategy(Class extends T> concreteClass) {
@@ -40,56 +33,14 @@ default void testNamingStrategy(Class extends T> concreteClass) {
@SuppressWarnings("unchecked")
Class configuredNamingStrategy = Optional.ofNullable(getMapper().getPropertyNamingStrategy())
- .map(namingStrategy -> {
- if (namingStrategy.getClass().equals(LowerCamelCaseStrategy.class)) {
- return PropertyNamingStrategy.LOWER_CAMEL_CASE.getClass();
- }
- if (namingStrategy.getClass().equals(UpperCamelCaseStrategy.class)) {
- return PropertyNamingStrategy.UPPER_CAMEL_CASE.getClass();
- }
- if (namingStrategy.getClass().equals(SnakeCaseStrategy.class)) {
- return PropertyNamingStrategy.SNAKE_CASE.getClass();
- }
- if (namingStrategy.getClass().equals(LowerCaseStrategy.class)) {
- return PropertyNamingStrategy.LOWER_CASE.getClass();
- }
- if (namingStrategy.getClass().equals(KebabCaseStrategy.class)) {
- return PropertyNamingStrategy.KEBAB_CASE.getClass();
- }
- if (namingStrategy.getClass().equals(LowerDotCaseStrategy.class)) {
- return PropertyNamingStrategy.LOWER_DOT_CASE.getClass();
- }
- return namingStrategy.getClass();
- })
// Required to get around compilation error
- .map(klass -> (Class) klass)
+ .map(s -> (Class) s.getClass())
.orElse(PropertyNamingStrategy.class);
@SuppressWarnings("unchecked")
Class beanPropertyNamingStrategy = Optional.ofNullable(beanDescription.getClassAnnotations().get(JsonNaming.class))
.map(JsonNaming::value)
// Required to get around compilation error
- .map(klass -> {
- if (klass.equals(LowerCamelCaseStrategy.class)) {
- return PropertyNamingStrategy.LOWER_CAMEL_CASE.getClass();
- }
- if (klass.equals(UpperCamelCaseStrategy.class)) {
- return PropertyNamingStrategy.UPPER_CAMEL_CASE.getClass();
- }
- if (klass.equals(SnakeCaseStrategy.class)) {
- return PropertyNamingStrategy.SNAKE_CASE.getClass();
- }
- if (klass.equals(LowerCaseStrategy.class)) {
- return PropertyNamingStrategy.LOWER_CASE.getClass();
- }
- if (klass.equals(KebabCaseStrategy.class)) {
- return PropertyNamingStrategy.KEBAB_CASE.getClass();
- }
- if (klass.equals(LowerDotCaseStrategy.class)) {
- return PropertyNamingStrategy.LOWER_DOT_CASE.getClass();
- }
- return klass;
- })
.map(s -> (Class) s)
.orElse(configuredNamingStrategy);
diff --git a/beanie-core/src/main/java/com/nosto/beanie/NoSettersTest.java b/beanie-core/src/main/java/com/nosto/beanie/NoSettersTest.java
index a757f45..9a48496 100644
--- a/beanie-core/src/main/java/com/nosto/beanie/NoSettersTest.java
+++ b/beanie-core/src/main/java/com/nosto/beanie/NoSettersTest.java
@@ -19,7 +19,6 @@ public interface NoSettersTest extends BeanieTest {
/**
* Check that there is no setters
- *
* @param concreteClass the bean class to be tests as provided by Junit
*/
default void testNoSetters(Class extends T> concreteClass) {
diff --git a/beanie-core/src/main/java/com/nosto/beanie/SerdeKosherTest.java b/beanie-core/src/main/java/com/nosto/beanie/SerdeKosherTest.java
index eaff928..09987ba 100644
--- a/beanie-core/src/main/java/com/nosto/beanie/SerdeKosherTest.java
+++ b/beanie-core/src/main/java/com/nosto/beanie/SerdeKosherTest.java
@@ -24,7 +24,6 @@ public interface SerdeKosherTest extends BeanieTest {
* Generate multiple random objects of the given class
* and assert serializing and deserializing back returns
* the original object.
- *
* @param concreteClass the bean class to be tests as provided by Junit
*/
default void testSerde(Class extends T> concreteClass) {
diff --git a/beanie-core/src/main/java/com/nosto/beanie/jeasy/ExcludedMapAndCollectionsAsEmptyRandomizerRegistry.java b/beanie-core/src/main/java/com/nosto/beanie/jeasy/ExcludedMapAndCollectionsAsEmptyRandomizerRegistry.java
index a1760f1..fb1a53e 100644
--- a/beanie-core/src/main/java/com/nosto/beanie/jeasy/ExcludedMapAndCollectionsAsEmptyRandomizerRegistry.java
+++ b/beanie-core/src/main/java/com/nosto/beanie/jeasy/ExcludedMapAndCollectionsAsEmptyRandomizerRegistry.java
@@ -40,7 +40,6 @@ public class ExcludedMapAndCollectionsAsEmptyRandomizerRegistry implements Rando
private EasyRandomParameters easyRandomParameters;
@Override
- @SuppressFBWarnings(value = {"EI_EXPOSE_REP", "EI_EXPOSE_REP2"})
public void init(EasyRandomParameters easyRandomParameters) {
this.easyRandomParameters = easyRandomParameters;
}
diff --git a/beanie-core/src/main/java/com/nosto/beanie/jeasy/ForceAllNonPrimitivesAsNullRandomizerRegistry.java b/beanie-core/src/main/java/com/nosto/beanie/jeasy/ForceAllNonPrimitivesAsNullRandomizerRegistry.java
index db41586..7842d00 100644
--- a/beanie-core/src/main/java/com/nosto/beanie/jeasy/ForceAllNonPrimitivesAsNullRandomizerRegistry.java
+++ b/beanie-core/src/main/java/com/nosto/beanie/jeasy/ForceAllNonPrimitivesAsNullRandomizerRegistry.java
@@ -32,7 +32,6 @@ public class ForceAllNonPrimitivesAsNullRandomizerRegistry implements Randomizer
private EasyRandomParameters easyRandomParameters;
@Override
- @SuppressFBWarnings(value = {"EI_EXPOSE_REP", "EI_EXPOSE_REP2"})
public void init(EasyRandomParameters easyRandomParameters) {
this.easyRandomParameters = easyRandomParameters;
}
diff --git a/build.gradle b/build.gradle
index a55f243..7eebaff 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,71 +1,259 @@
-plugins {
- id 'myproject.java-conventions'
+//file:noinspection GrUnresolvedAccess
+//file:noinspection GroovyAssignabilityCheck
+import org.gradle.api.tasks.testing.logging.TestLogEvent
+
+buildscript {
+ repositories {
+ google()
+ mavenCentral()
+ gradlePluginPortal()
+ }
+ dependencies {
+ classpath group: 'org.github.ngbinh.scalastyle', name: 'gradle-scalastyle-plugin_2.11', version: '1.0.1'
+ classpath group: 'com.diffplug.spotless', name: 'spotless-plugin-gradle', version: '5.12.4'
+ classpath group: 'gradle.plugin.com.github.spotbugs.snom', name: 'spotbugs-gradle-plugin', version: '4.7.1'
+ classpath group: 'net.ltgt.gradle', name: 'gradle-errorprone-plugin', version: '2.0.1'
+ classpath group: 'net.ltgt.gradle', name: 'gradle-nullaway-plugin', version: '1.1.0'
+ classpath group: 'gradle.plugin.com.dorongold.plugins', name: 'task-tree', version: '1.5'
+ classpath group: 'gradle.plugin.com.github.johnrengelman', name: 'shadow', version: '7.1.0'
+ }
}
-group 'com.nosto.beanie'
-version '3.1.2'
+allprojects { project ->
-java {
- sourceCompatibility "11"
- targetCompatibility "11"
-}
+ apply plugin: 'java'
+ apply plugin: 'checkstyle'
+ apply plugin: "com.github.spotbugs"
+ apply plugin: 'maven-publish'
+ apply plugin: 'java-library'
+ apply plugin: "jacoco"
+ apply plugin: "com.github.johnrengelman.shadow"
+ apply plugin: 'com.diffplug.spotless'
+ apply plugin: "com.github.spotbugs"
+ apply plugin: 'net.ltgt.errorprone'
+ apply plugin: 'net.ltgt.nullaway'
+ apply plugin: "com.dorongold.task-tree"
-dependencies {
- testImplementation group: 'junit', name: 'junit', version: '4.13.2'
- testRuntimeOnly group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.8.2'
- testRuntimeOnly group: 'org.junit.vintage', name: 'junit-vintage-engine', version: '5.8.2'
- compileOnly group: 'com.github.spotbugs', name: 'spotbugs-annotations', version: '4.6.0'
- testCompileOnly group: 'com.github.spotbugs', name: 'spotbugs-annotations', version: '4.6.0'
- errorprone group: 'com.uber.nullaway', name: 'nullaway', version: '0.9.6'
- errorprone group: 'com.google.errorprone', name: 'error_prone_core', version: '2.12.1'
- spotbugsPlugins group: 'com.h3xstream.findsecbugs', name: 'findsecbugs-plugin', version: '1.10.1'
-}
+ group 'com.nosto.beanie'
+ version '3.1.0'
-publishing {
repositories {
+ mavenCentral()
maven {
- name = "github"
- url = uri("https://maven.pkg.github.com/nosto/beanie")
- credentials(PasswordCredentials)
+ url 'https://maven.onehippo.com/maven2/'
+ }
+ }
+
+ dependencies {
+ testImplementation group: 'junit', name: 'junit', version: '4.12'
+ testRuntimeOnly group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.2.0'
+ testRuntimeOnly group: 'org.junit.vintage', name: 'junit-vintage-engine', version: '5.2.0'
+ compileOnly group: 'com.github.spotbugs', name: 'spotbugs-annotations', version: '3.1.3'
+ testCompileOnly group: 'com.github.spotbugs', name: 'spotbugs-annotations', version: '3.1.3'
+ errorprone group: 'com.uber.nullaway', name: 'nullaway', version: '0.9.1'
+ errorprone group: 'com.google.errorprone', name: 'error_prone_core', version: '2.6.0'
+ spotbugsPlugins group: 'com.h3xstream.findsecbugs', name: 'findsecbugs-plugin', version: '1.10.1'
+ }
+
+ // Configuration for the nullaway extension. The rest of the parameters must be
+ // specified on the java-compile tasks. The only option that be specified here
+ // is the name of the root package to be analysed.
+ nullaway {
+ //noinspection GrUnresolvedAccess
+ annotatedPackages.add("com.nosto")
+ }
+
+ // Configuration for the Jacoco plugin. It seems that it isn't possible to define
+ // the output report formats here and those seem to be defined on the individual
+ // task level.
+ // I'm not sure why the tool version is defined here and it isn't managed as a
+ // dependency.
+ jacoco {
+ toolVersion = "0.8.5"
+ }
+
+ // We only need the XML report so that the CI tools can parse it. The HTML isn't needed.
+ jacocoTestReport {
+ reports {
+ csv.enabled = true
+ xml.enabled = false
+ html.enabled = true
+ }
+ }
+
+ test {
+ useJUnitPlatform()
+ testLogging.events.addAll([TestLogEvent.PASSED, TestLogEvent.SKIPPED, TestLogEvent.FAILED])
+ reports {
+ junitXml.enabled = true
+ html.enabled = true
+ }
+ maxParallelForks = (int) (Runtime.runtime.availableProcessors() / 2 + 1)
+ finalizedBy jacocoTestReport // report is always generated after tests run
+ }
+
+ jacocoTestReport {
+ dependsOn test // tests are required to run before generating the report
+ }
+
+ javadoc {
+ options.addBooleanOption('html5', true)
+ }
+
+ task sourcesJar(type: Jar, dependsOn: classes) {
+ archiveClassifier.set("sources")
+ from sourceSets.main.allSource
+ }
+
+ java {
+ withSourcesJar()
+ withJavadocJar()
+ }
+
+ // Configuration for the Spotbugs plugin. It seems that it isn't possible to define
+ // the output report formats here and those seem to be defined on the individual
+ // task level.
+ // I'm not sure why the tool version is defined here and it isn't managed as a
+ // dependency.
+ spotbugs {
+ //noinspection GroovyAccessibility,GrFinalVariableAccess,GroovyAssignabilityCheck
+ toolVersion = '4.0.2'
+ //noinspection GroovyAccessibility,GrFinalVariableAccess,GroovyAssignabilityCheck
+ ignoreFailures = true
+ //noinspection GroovyAccessibility,GrFinalVariableAccess,GroovyAssignabilityCheck
+ effort = 'max'
+ // Exclude all *.scala files as Spotbugs doesn't work too well with Scala.
+ //noinspection GroovyAccessibility,GrFinalVariableAccess,GroovyAssignabilityCheck
+ excludeFilter = file("$rootDir/gradle/config/spotbugs/exclude.xml")
+ }
+
+ // We only need the XML report so that the CI tools can parse it. The HTML isn't needed.
+ spotbugsMain {
+ //noinspection GroovyAssignabilityCheck
+ reports {
+ xml.enabled = true
+ }
+ }
+
+ // We only need the XML report so that the CI tools can parse it. The HTML isn't needed.
+ spotbugsTest {
+ //noinspection GroovyAssignabilityCheck
+ reports {
+ xml.enabled = true
}
}
- publications {
- maven(MavenPublication) {
- from components.java
-
- pom {
- name = 'Beanie'
- description = 'A simple library to sanity-check your bean ser-deser'
- url = 'https://github.com/nosto/beanie'
- licenses {
- license {
- name = 'The Apache Software License, Version 2.0'
- url = 'https://www.apache.org/licenses/LICENSE-2.0.txt'
- distribution = 'repo'
+
+ // Configuration for the Checkstyle plugin. It seems that it isn't possible to define
+ // the output report formats here and those seem to be defined on the individual
+ // task level.
+ // I'm not sure why the tool version is defined here and it isn't managed as a
+ // dependency.
+ checkstyle {
+ toolVersion "7.6.1"
+ config rootProject.resources.text.fromFile("gradle/config/checkstyle/checkstyle.xml")
+ }
+
+ // We only need the XML report so that the CI tools can parse it. The HTML isn't needed
+ // and must be explicitly disabled
+ checkstyleMain {
+ reports {
+ xml.enabled = true
+ html.enabled = false
+ }
+ }
+
+ // We only need the XML report so that the CI tools can parse it. The HTML isn't needed.
+ checkstyleTest {
+ reports {
+ xml.enabled = true
+ html.enabled = false
+ }
+ }
+
+ publishing {
+ repositories {
+ maven {
+ name = "github"
+ url = uri("https://maven.pkg.github.com/nosto/beanie")
+ credentials(PasswordCredentials)
+ }
+ }
+ publications {
+ //noinspection GroovyAssignabilityCheck
+ maven(MavenPublication) {
+ //noinspection GroovyAssignabilityCheck
+ from components.java
+
+ pom {
+ //noinspection GroovyAssignabilityCheck
+ name = 'Beanie'
+ //noinspection GroovyAssignabilityCheck
+ description = 'A simple library to sanity-check your bean ser-deser'
+ //noinspection GroovyAssignabilityCheck
+ url = 'https://github.com/nosto/beanie'
+ licenses {
+ license {
+ //noinspection GroovyAssignabilityCheck
+ name = 'The Apache Software License, Version 2.0'
+ //noinspection GroovyAssignabilityCheck
+ url = 'https://www.apache.org/licenses/LICENSE-2.0.txt'
+ //noinspection GroovyAssignabilityCheck
+ distribution = 'repo'
+ }
}
- }
- developers {
- developer {
- id = 'ollik1'
- name = 'Olli Kuonanoja'
- email = 'olli@nosto.com'
+ developers {
+ developer {
+ //noinspection GroovyAssignabilityCheck
+ id = 'ollik1'
+ //noinspection GroovyAssignabilityCheck
+ name = 'Olli Kuonanoja'
+ //noinspection GroovyAssignabilityCheck
+ email = 'olli@nosto.com'
+ }
+ developer {
+ //noinspection GroovyAssignabilityCheck
+ id = 'mridang'
+ //noinspection GroovyAssignabilityCheck
+ name = 'Mridang Agarwalla'
+ //noinspection GroovyAssignabilityCheck
+ email = 'mridang@nosto.com'
+ }
}
- developer {
- id = 'mridang'
- name = 'Mridang Agarwalla'
- email = 'mridang@nosto.com'
+ scm {
+ //noinspection GroovyAssignabilityCheck
+ connection = 'scm:git:git://github.com/nosto/beanie.git'
+ //noinspection GroovyAssignabilityCheck
+ developerConnection = 'scm:git:ssh://github.com/nosto/beanie.git'
+ //noinspection GroovyAssignabilityCheck
+ url = 'https://github.com/nosto/beanie'
+ }
+ issueManagement {
+ //noinspection GroovyAssignabilityCheck
+ system = "Github"
+ //noinspection GroovyAssignabilityCheck
+ url = "https://github.com/nosto/beanie/issues"
}
- }
- scm {
- connection = 'scm:git:git://github.com/nosto/beanie.git'
- developerConnection = 'scm:git:ssh://github.com/nosto/beanie.git'
- url = 'https://github.com/nosto/beanie'
- }
- issueManagement {
- system = "Github"
- url = "https://github.com/nosto/beanie/issues"
}
}
}
}
}
+
+// Task for building the zip file for upload
+task buildZip(type: Zip) {
+ zip64 = true
+ archiveBaseName.set(rootProject.name)
+ from compileJava
+ from processResources
+ into('lib') {
+ from configurations.runtimeClasspath
+ }
+}
+
+shadowJar {
+ zip64 true
+}
+
+build {
+ dependsOn buildZip
+}
\ No newline at end of file
diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle
deleted file mode 100644
index 8e0b47d..0000000
--- a/buildSrc/build.gradle
+++ /dev/null
@@ -1,30 +0,0 @@
-plugins {
- id 'groovy-gradle-plugin'
-}
-
-repositories {
- google()
- mavenCentral()
- gradlePluginPortal()
- maven {
- url "https://repo.spring.io/milestone"
- }
-}
-
-dependencies {
- implementation group: 'gradle.plugin.com.github.johnrengelman', name: 'shadow', version: '7.1.2'
- implementation group: 'com.github.alisiikh', name: 'gradle-scalastyle-plugin', version: '3.4.1'
- implementation group: 'com.diffplug.spotless', name: 'spotless-plugin-gradle', version: '6.5.0'
- implementation group: 'com.github.spotbugs.snom', name: 'spotbugs-gradle-plugin', version: '5.0.6'
- implementation group: 'net.ltgt.gradle', name: 'gradle-errorprone-plugin', version: '2.0.2'
- implementation group: 'net.ltgt.gradle', name: 'gradle-nullaway-plugin', version: '1.2.0'
- implementation group: 'com.dorongold.plugins', name: 'task-tree', version: '2.1.0'
- implementation group: 'net.idlestate', name: 'gradle-duplicate-classes-check', version: '1.1.0'
- implementation group: 'org.jetbrains.qodana', name: 'gradle-qodana-plugin', version: '0.1.13'
- implementation group: 'org.jetbrains.intellij.plugins', name: 'gradle-intellij-plugin', version: '1.5.3'
- implementation group: 'gradle.plugin.com.hierynomus.gradle.plugins', name: 'license-gradle-plugin', version: '0.16.1'
- implementation group: 'gradle.plugin.io.snyk.gradle.plugin', name: 'snyk', version: '0.4'
- implementation group: 'org.springframework.boot', name: 'spring-boot-gradle-plugin', version: '2.7.0-M3'
- implementation group: 'io.spring.gradle', name: 'dependency-management-plugin', version: '1.0.11.RELEASE'
- implementation group: 'org.springdoc', name: 'springdoc-openapi-gradle-plugin', version: '1.3.4'
-}
diff --git a/buildSrc/src/main/groovy/myproject.java-conventions.gradle b/buildSrc/src/main/groovy/myproject.java-conventions.gradle
deleted file mode 100644
index 57b5ebf..0000000
--- a/buildSrc/src/main/groovy/myproject.java-conventions.gradle
+++ /dev/null
@@ -1,228 +0,0 @@
-plugins {
- id 'java'
- id 'checkstyle'
- id 'maven-publish'
- id 'java-library'
- id 'java-test-fixtures'
- id "jacoco"
- id "com.github.johnrengelman.shadow"
- id 'com.diffplug.spotless'
- id "com.github.spotbugs"
- id "net.ltgt.errorprone"
- id 'net.ltgt.nullaway'
- id "com.dorongold.task-tree"
- id 'net.idlestate.gradle-duplicate-classes-check'
- id "org.jetbrains.qodana"
- //id "org.jetbrains.intellij"
- id "com.github.hierynomus.license-report"
- id "io.snyk.gradle.plugin.snykplugin"
-}
-
-repositories {
- mavenCentral()
- maven {
- url "https://maven.onehippo.com/maven2/"
- }
- maven {
- name = "mridang"
- url = uri("https://maven.pkg.github.com/nosto/beanie")
- credentials {
- username = project.findProperty("githubUsername") ?: System.getenv("GITHUB_ACTOR")
- password = project.findProperty("githubPassword") ?: System.getenv("GITHUB_TOKEN")
- }
- }
-}
-
-dependencies {
- errorprone group: 'com.uber.nullaway', name: 'nullaway', version: '0.9.6'
- errorprone group: 'com.google.errorprone', name: 'error_prone_core', version: '2.12.1'
- spotbugsPlugins group: 'com.h3xstream.findsecbugs', name: 'findsecbugs-plugin', version: '1.12.0'
- //checkstyle group: 'io.spring.nohttp', name: 'nohttp-checkstyle', version: '0.0.10'
-}
-
-// Configuration for the nullaway extension. The rest of the parameters must be
-// specified on the java-compile tasks. The only option that be specified here
-// is the name of the root package to be analysed.
-nullaway {
- annotatedPackages.add("com.nosto")
-}
-
-// Configuration for the Jacoco plugin. It seems that it isn't possible to define
-// the output report formats here and those seem to be defined on the individual
-// task level.
-// I'm not sure why the tool version is defined here and it isn't managed as a
-// dependency.
-jacoco {
- toolVersion = "0.8.8"
-}
-
-// We only need the XML report so that the CI tools can parse it. The HTML isn't needed.
-jacocoTestReport {
- reports {
- csv {
- enabled true
- }
- xml {
- enabled false
- }
- html {
- enabled true
- }
- }
-}
-
-test {
- useJUnitPlatform()
- testLogging {
- events "passed", "skipped", "failed"
- }
- reports {
- junitXml {
- enabled true
- }
- html {
- enabled true
- }
- }
- maxParallelForks = (int) (Runtime.runtime.availableProcessors() / 2 + 1)
- finalizedBy jacocoTestReport // report is always generated after tests run
-}
-
-jacocoTestReport {
- dependsOn test // tests are required to run before generating the report
-}
-
-javadoc {
- options.addBooleanOption('html5', true)
-}
-
-task sourcesJar(type: Jar, dependsOn: classes) {
- archiveClassifier.set("sources")
- from sourceSets.main.allSource
-}
-
-java {
- sourceCompatibility '17'
- targetCompatibility '17'
- withSourcesJar()
- withJavadocJar()
-}
-
-// Configuration for the Spotbugs plugin. It seems that it isn't possible to define
-// the output report formats here and those seem to be defined on the individual
-// task level.
-// I'm not sure why the tool version is defined here and it isn't managed as a
-// dependency.
-spotbugs {
- toolVersion = '4.6.0'
- ignoreFailures = true
- effort = 'max'
- // Exclude all *.scala files as Spotbugs doesn't work too well with Scala.
- excludeFilter = file("$rootDir/gradle/config/spotbugs/exclude.xml")
-}
-
-// We only need the XML report so that the CI tools can parse it. The HTML isn't needed.
-spotbugsMain {
- reports {
- sarif {
- enabled true
- }
- xml {
- enabled true
- }
- }
-}
-
-// We only need the XML report so that the CI tools can parse it. The HTML isn't needed.
-spotbugsTest {
- reports {
- sarif {
- enabled true
- }
- xml {
- enabled true
- }
- }
-}
-
-// Configuration for the Checkstyle plugin. It seems that it isn't possible to define
-// the output report formats here and those seem to be defined on the individual
-// task level.
-// I'm not sure why the tool version is defined here and it isn't managed as a
-// dependency.
-checkstyle {
- toolVersion "10.1"
- config rootProject.resources.text.fromFile("gradle/config/checkstyle/checkstyle.xml")
-}
-
-// We only need the XML report so that the CI tools can parse it. The HTML isn't needed
-// and must be explicitly disabled
-checkstyleMain {
- reports {
- xml {
- enabled true
- }
- html {
- enabled false
- }
- }
-}
-
-// We only need the XML report so that the CI tools can parse it. The HTML isn't needed.
-checkstyleTest {
- reports {
- xml {
- enabled true
- }
- html {
- enabled false
- }
- }
-}
-
-// Task for building the zip file for upload
-task buildZip(type: Zip) {
- zip64 = true
- archiveBaseName.set(rootProject.name)
- from compileJava
- from processResources
- into('lib') {
- from configurations.runtimeClasspath //TODO: Check for imagevector
- }
-}
-
-shadowJar {
- zip64 true
-}
-
-build {
- dependsOn buildZip
-}
-
-qodana {
- saveReport = true
-}
-
-
-checkForDuplicateClasses {
- dependsOn assemble
- excludes(['LICENSE',
- '^com/sun/.*',
- '^javax/.*',
- '^org/apache/commons/logging/*',
- ])
- configurationsToCheck configurations.runtimeClasspath
-}
-
-
-downloadLicenses {
- dependencyConfiguration = 'implementation'
- includeProjectDependencies = true
-}
-
-configurations.implementation.setCanBeResolved(true)
-configurations.api.setCanBeResolved(true)
-
-snyk {
- arguments = '--all-sub-projects --remote-repo-url=Nosto/fortknox --org=nosto'
-}
diff --git a/buildSrc/src/main/groovy/myproject.spring-conventions.gradle b/buildSrc/src/main/groovy/myproject.spring-conventions.gradle
deleted file mode 100644
index 514beca..0000000
--- a/buildSrc/src/main/groovy/myproject.spring-conventions.gradle
+++ /dev/null
@@ -1,17 +0,0 @@
-plugins {
- id 'groovy-gradle-plugin'
- id 'java'
- id "org.springframework.boot"
- id "io.spring.dependency-management"
- id "org.springdoc.openapi-gradle-plugin"
-}
-
-repositories {
- mavenCentral()
- maven {
- url "https://maven.onehippo.com/maven2/"
- }
- maven {
- url "https://repo.spring.io/milestone"
- }
-}
diff --git a/gradle.properties b/gradle.properties
index 6234343..e69de29 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,5 +0,0 @@
-# suppress inspection "UnusedProperty" for whole file
-org.gradle.warning.mode=none
-org.gradle.parallel=true
-org.gradle.caching=true
-org.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
diff --git a/gradle/config/checkstyle/sun_checks.xml b/gradle/config/checkstyle/sun_checks.xml
index 6d282b1..682e242 100644
--- a/gradle/config/checkstyle/sun_checks.xml
+++ b/gradle/config/checkstyle/sun_checks.xml
@@ -53,14 +53,14 @@
-
+
-
+
-
+
-
+
-
+
-
+
@@ -106,7 +106,7 @@
-
+
@@ -115,14 +115,14 @@
-
+
-
+
@@ -134,7 +134,7 @@
-
+
@@ -143,13 +143,13 @@
-
+
-
+
@@ -162,12 +162,12 @@
-
+
-
+
@@ -175,7 +175,7 @@
-
+
@@ -188,7 +188,7 @@
-
+
@@ -196,7 +196,7 @@
-
+
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index aa991fc..0f80bbf 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
diff --git a/inspect.sh b/inspect.sh
new file mode 100644
index 0000000..3fe1b40
--- /dev/null
+++ b/inspect.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+#
+# Copyright (c) 2021 Nosto Solutions Ltd All Rights Reserved.
+#
+# This software is the confidential and proprietary information of
+# Nosto Solutions Ltd ("Confidential Information"). You shall not
+# disclose such Confidential Information and shall use it only in
+# accordance with the terms of the agreement you entered into with
+# Nosto Solutions Ltd.
+#
+
+docker run --env GITHUB_WORKSPACE=/app --volume="$(pwd)"/.:/app docker.pkg.github.com/mridang/action-idea/idealize:2020.3.3 /app /app/.idea/inspectionProfiles/CI.xml /out v2 Inspection noop 1347
diff --git a/junit-jupiter/build.gradle b/junit-jupiter/build.gradle
index 75e7eb5..3b46525 100644
--- a/junit-jupiter/build.gradle
+++ b/junit-jupiter/build.gradle
@@ -1,14 +1,11 @@
plugins {
- id 'myproject.java-conventions'
+ id 'java'
}
dependencies {
api project(':beanie-core')
- implementation(platform('org.junit:junit-bom:5.8.2'))
- testRuntimeOnly group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.8.2'
- testRuntimeOnly group: 'org.junit.vintage', name: 'junit-vintage-engine', version: '5.8.2'
+ implementation(platform('org.junit:junit-bom:5.8.1'))
implementation group: 'org.junit.jupiter', name: 'junit-jupiter'
implementation group: 'org.junit.jupiter', name: 'junit-jupiter-params'
- implementation group: 'com.github.spotbugs', name: 'spotbugs-annotations', version: '4.6.0'
- implementation group: 'org.reflections', name: 'reflections', version: '0.10.2'
-}
+ implementation group: 'org.reflections', name: 'reflections', version: '0.9.12'
+}
\ No newline at end of file
diff --git a/junit-jupiter/src/main/java/com/nosto/beanie/AbstractJacksonBeanTest.java b/junit-jupiter/src/main/java/com/nosto/beanie/AbstractJacksonBeanTest.java
index ad5da6f..2cb3fda 100644
--- a/junit-jupiter/src/main/java/com/nosto/beanie/AbstractJacksonBeanTest.java
+++ b/junit-jupiter/src/main/java/com/nosto/beanie/AbstractJacksonBeanTest.java
@@ -91,7 +91,6 @@ public static Stream> finalProperties() {
/**
* For more information @see ConstructorParametersTest#testConstructorParameters(Class)
- *
* @param concreteClass the bean class to be tests as provided by Junit
*/
@ParameterizedTest
@@ -102,7 +101,6 @@ public void constructorParameters(Class concreteClass) {
/**
* For more information @see SerdeKosherTest#testSerde(Class)
- *
* @param concreteClass the bean class to be tests as provided by Junit
*/
@ParameterizedTest
@@ -113,7 +111,6 @@ public void serde(Class concreteClass) {
/**
* For more information @see NamingStrategyTest#testNamingStrategy(Class)
- *
* @param concreteClass the bean class to be tests as provided by Junit
*/
@ParameterizedTest
@@ -124,7 +121,6 @@ public void namingStrategy(Class concreteClass) {
/**
* For more information @see CollectionHandlingTest#testSerdeCollection(Class)
- *
* @param concreteClass the bean class to be tests as provided by Junit
*/
@ParameterizedTest
@@ -135,7 +131,6 @@ public void serdeCollection(Class concreteClass) {
/**
* For more information @see CollectionHandlingTest#testSerdeCollectionAsWell(Class)
- *
* @param concreteClass the bean class to be tests as provided by Junit
*/
@ParameterizedTest
@@ -146,7 +141,6 @@ public void serdeCollectionAsWell(Class concreteClass) {
/**
* For more information @see NoSettersTest#testNoSetters(Class)
- *
* @param concreteClass the bean class to be tests as provided by Junit
*/
@ParameterizedTest
@@ -157,7 +151,6 @@ public void noSetters(Class concreteClass) {
/**
* For more information @see FinalPropertiesTest#testFinalProperties(Class)
- *
* @param concreteClass the bean class to be tests as provided by Junit
*/
@ParameterizedTest
diff --git a/junit-jupiter/src/test/java/com/nosto/beanie/AbstractTestBean.java b/junit-jupiter/src/test/java/com/nosto/beanie/AbstractTestBean.java
index c69006a..7b05240 100644
--- a/junit-jupiter/src/test/java/com/nosto/beanie/AbstractTestBean.java
+++ b/junit-jupiter/src/test/java/com/nosto/beanie/AbstractTestBean.java
@@ -1,6 +1,6 @@
/*
* Copyright (c) 2021 Nosto Solutions Ltd All Rights Reserved.
- *
+ *
* This software is the confidential and proprietary information of
* Nosto Solutions Ltd ("Confidential Information"). You shall not
* disclose such Confidential Information and shall use it only in
diff --git a/junit-jupiter/src/test/java/com/nosto/beanie/ConstructorNullPointerTest.java b/junit-jupiter/src/test/java/com/nosto/beanie/ConstructorNullPointerTest.java
index a31c2bf..7cc0afd 100644
--- a/junit-jupiter/src/test/java/com/nosto/beanie/ConstructorNullPointerTest.java
+++ b/junit-jupiter/src/test/java/com/nosto/beanie/ConstructorNullPointerTest.java
@@ -30,17 +30,17 @@
public class ConstructorNullPointerTest implements JupiterBeanieTest
, ConstructorParametersTest {
- @SuppressWarnings("unused")
- public static Stream> constructorParameters() {
- return Stream.of(AbstractTestBean.class);
- }
-
@ParameterizedTest
@MethodSource
public void constructorParameters(Class concreteClass) {
testConstructorParameters(concreteClass);
}
+ @SuppressWarnings("unused")
+ public static Stream> constructorParameters() {
+ return Stream.of(AbstractTestBean.class);
+ }
+
public static class TestBean extends AbstractTestBean {
@Nullable
diff --git a/junit-vintage/build.gradle b/junit-vintage/build.gradle
index 8d006de..5b5b5ea 100644
--- a/junit-vintage/build.gradle
+++ b/junit-vintage/build.gradle
@@ -1,12 +1,9 @@
plugins {
- id 'myproject.java-conventions'
+ id 'java'
}
dependencies {
api project(':beanie-core')
- testRuntimeOnly group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.8.2'
- testRuntimeOnly group: 'org.junit.vintage', name: 'junit-vintage-engine', version: '5.8.2'
- implementation group: 'junit', name: 'junit', version: '4.13.2'
- implementation group: 'com.github.spotbugs', name: 'spotbugs-annotations', version: '4.6.0'
- implementation group: 'org.reflections', name: 'reflections', version: '0.10.2'
-}
+ implementation group: 'junit', name: 'junit', version: '4.12'
+ implementation group: 'org.reflections', name: 'reflections', version: '0.9.12'
+}
\ No newline at end of file
diff --git a/junit-vintage/src/main/java/com/nosto/beanie/AbstractJacksonBeanTest.java b/junit-vintage/src/main/java/com/nosto/beanie/AbstractJacksonBeanTest.java
index 6109edd..bc6d4b8 100644
--- a/junit-vintage/src/main/java/com/nosto/beanie/AbstractJacksonBeanTest.java
+++ b/junit-vintage/src/main/java/com/nosto/beanie/AbstractJacksonBeanTest.java
@@ -98,7 +98,7 @@ public void noSetters() {
}
/**
- * For more information @see FinalPropertiesTest#testFinalProperties(Class)
+ * For more information @see FinalPropertiesTest#testFinalProperties(Class)
*/
@Test
public void finalProperties() {
diff --git a/junit-vintage/src/test/java/com/nosto/beanie/AbstractTestBean.java b/junit-vintage/src/test/java/com/nosto/beanie/AbstractTestBean.java
index c69006a..7b05240 100644
--- a/junit-vintage/src/test/java/com/nosto/beanie/AbstractTestBean.java
+++ b/junit-vintage/src/test/java/com/nosto/beanie/AbstractTestBean.java
@@ -1,6 +1,6 @@
/*
* Copyright (c) 2021 Nosto Solutions Ltd All Rights Reserved.
- *
+ *
* This software is the confidential and proprietary information of
* Nosto Solutions Ltd ("Confidential Information"). You shall not
* disclose such Confidential Information and shall use it only in
diff --git a/junit-vintage/src/test/java/com/nosto/beanie/InvalidSnakeCasePropertyNamingStrategiesTest.java b/junit-vintage/src/test/java/com/nosto/beanie/InvalidSnakeCasePropertyNamingStrategiesTest.java
deleted file mode 100644
index ab2592e..0000000
--- a/junit-vintage/src/test/java/com/nosto/beanie/InvalidSnakeCasePropertyNamingStrategiesTest.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 2021 Nosto Solutions Ltd All Rights Reserved.
- *
- * This software is the confidential and proprietary information of
- * Nosto Solutions Ltd ("Confidential Information"). You shall not
- * disclose such Confidential Information and shall use it only in
- * accordance with the terms of the agreement you entered into with
- * Nosto Solutions Ltd.
- */
-
-package com.nosto.beanie;
-
-import org.junit.Test;
-
-import com.fasterxml.jackson.annotation.JsonCreator;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.databind.PropertyNamingStrategies;
-import com.fasterxml.jackson.databind.annotation.JsonNaming;
-
-public class InvalidSnakeCasePropertyNamingStrategiesTest extends AbstractJacksonBeanTest {
-
- public InvalidSnakeCasePropertyNamingStrategiesTest() {
- super(TestBean.class);
- }
-
- @SuppressWarnings("EmptyMethod")
- @Test(expected = AssertionError.class)
- @Override
- public void namingStrategy() {
- super.namingStrategy();
- }
-
- @Override
- public BeanieProvider getBeanieProvider() {
- return new DefaultBeanieProvider();
- }
-
- @JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
- public static class TestBean extends AbstractTestBean {
-
- private final String propertyA;
- private final String propertyB;
-
- @JsonCreator
- public TestBean(@JsonProperty("propertyA") String propertyA, @JsonProperty("propertyB") String propertyB) {
- this.propertyA = propertyA;
- this.propertyB = propertyB;
- }
-
- @SuppressWarnings("unused")
- public String getPropertyA() {
- return propertyA;
- }
-
- @SuppressWarnings("unused")
- public String getPropertyB() {
- return propertyB;
- }
- }
-}
diff --git a/junit-vintage/src/test/java/com/nosto/beanie/InvalidSnakeCasePropertyNamingStrategyTest.java b/junit-vintage/src/test/java/com/nosto/beanie/InvalidSnakeCasePropertyNamingStrategyTest.java
index de92983..ba99664 100644
--- a/junit-vintage/src/test/java/com/nosto/beanie/InvalidSnakeCasePropertyNamingStrategyTest.java
+++ b/junit-vintage/src/test/java/com/nosto/beanie/InvalidSnakeCasePropertyNamingStrategyTest.java
@@ -18,7 +18,6 @@
import com.fasterxml.jackson.databind.annotation.JsonNaming;
public class InvalidSnakeCasePropertyNamingStrategyTest extends AbstractJacksonBeanTest {
-
public InvalidSnakeCasePropertyNamingStrategyTest() {
super(TestBean.class);
}
diff --git a/junit-vintage/src/test/java/com/nosto/beanie/NoNullCollectionsTest.java b/junit-vintage/src/test/java/com/nosto/beanie/NoNullCollectionsTest.java
index a94ced8..fbeb59a 100644
--- a/junit-vintage/src/test/java/com/nosto/beanie/NoNullCollectionsTest.java
+++ b/junit-vintage/src/test/java/com/nosto/beanie/NoNullCollectionsTest.java
@@ -16,8 +16,6 @@
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
-
/**
* Test that the test suite catches issues where {@link JsonCreator}
* property names do not match with the bean property names
@@ -46,13 +44,11 @@ public static class TestBean extends AbstractTestBean {
private final List bars;
@JsonCreator
- @SuppressFBWarnings(value = {"EI_EXPOSE_REP", "EI_EXPOSE_REP2"})
public TestBean(@JsonProperty("bars") List bars) {
this.bars = bars;
}
@SuppressWarnings("unused")
- @SuppressFBWarnings(value = {"EI_EXPOSE_REP", "EI_EXPOSE_REP2"})
public List getBars() {
return bars;
}