diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 3235155f83..33bad9eb99 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -2,12 +2,28 @@ version: 2 updates: - package-ecosystem: gradle target-branch: main + milestone: 97 # 4.0.x + directory: / + schedule: + interval: daily + time: '03:40' + timezone: Etc/UTC + open-pull-requests-limit: 10 + labels: + - 'type: dependency-upgrade' + - 'in: build' + ignore: + - dependency-name: org.apache.directory.server:* + - dependency-name: org.apache.directory.shared:* + - package-ecosystem: gradle + target-branch: 3.3.x milestone: 79 # 3.3.x directory: / schedule: interval: daily time: '03:40' timezone: Etc/UTC + open-pull-requests-limit: 10 labels: - 'type: dependency-upgrade' - 'in: build' @@ -32,6 +48,7 @@ updates: interval: daily time: '03:40' timezone: Etc/UTC + open-pull-requests-limit: 10 labels: - 'type: dependency-upgrade' - 'in: build' diff --git a/.github/workflows/continuous-integration-workflow.yml b/.github/workflows/continuous-integration-workflow.yml index eb07c4fb81..381e3311e8 100644 --- a/.github/workflows/continuous-integration-workflow.yml +++ b/.github/workflows/continuous-integration-workflow.yml @@ -31,13 +31,14 @@ jobs: - java-version: 17 with: java-version: ${{ matrix.java-version }} - test-args: --refresh-dependencies -PforceMavenRepositories=snapshot -PisOverrideVersionCatalog -PtestToolchain=17 -PspringFrameworkVersion=6.2.+ -PspringDataVersion=2024.0.+ --stacktrace + test-args: --refresh-dependencies -PforceMavenRepositories=snapshot -PisOverrideVersionCatalog -PtestToolchain=17 -PspringFrameworkVersion=7.+ -PspringDataVersion=2025.0.+ --stacktrace deploy-artifacts: name: Deploy Artifacts - needs: [ build ] + needs: [ build, test ] uses: spring-io/spring-security-release-tools/.github/workflows/deploy-artifacts.yml@v1 with: should-deploy-artifacts: ${{ needs.build.outputs.should-deploy-artifacts }} + default-publish-milestones-central: true secrets: inherit deploy-docs: name: Deploy Docs @@ -60,7 +61,7 @@ jobs: with: should-perform-release: ${{ needs.deploy-artifacts.outputs.artifacts-deployed }} project-version: ${{ needs.deploy-artifacts.outputs.project-version }} - milestone-repo-url: https://repo.spring.io/artifactory/milestone + milestone-repo-url: https://repo1.maven.org/maven2 release-repo-url: https://repo1.maven.org/maven2 artifact-path: org/springframework/ldap/spring-ldap-core slack-announcing-id: spring-ldap-announcing diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index 442b653490..f751fedf76 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -17,7 +17,7 @@ jobs: # if: github.repository_owner == 'spring-projects' steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: ref: docs-build fetch-depth: 1 diff --git a/.github/workflows/pr-build-workflow.yml b/.github/workflows/pr-build-workflow.yml index cc7a2631a4..9395064905 100644 --- a/.github/workflows/pr-build-workflow.yml +++ b/.github/workflows/pr-build-workflow.yml @@ -12,7 +12,7 @@ jobs: jdk: [17] fail-fast: false steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Set up JDK ${{ matrix.jdk }} uses: actions/setup-java@v4 with: diff --git a/.github/workflows/release-scheduler.yml b/.github/workflows/release-scheduler.yml index 0a7343fb7b..2bbcc5ecad 100644 --- a/.github/workflows/release-scheduler.yml +++ b/.github/workflows/release-scheduler.yml @@ -14,11 +14,11 @@ jobs: strategy: matrix: # List of active maintenance branches. - branch: [ main, 3.2.x, 2.4.x ] + branch: [ main, 3.3.x, 3.2.x, 2.4.x ] runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: fetch-depth: 1 - name: Dispatch diff --git a/license.txt b/LICENSE.txt similarity index 100% rename from license.txt rename to LICENSE.txt diff --git a/build.gradle b/build.gradle index a6c5f9faf8..a84a87a663 100644 --- a/build.gradle +++ b/build.gradle @@ -6,7 +6,7 @@ buildscript { dependencies { classpath "com.github.ben-manes:gradle-versions-plugin:0.52.0" classpath "io.spring.gradle:dependency-management-plugin:1.1.7" - classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4.34.1" + classpath "org.jfrog.buildinfo:build-info-extractor-gradle:6.0.0" classpath 'org.hidetake:gradle-ssh-plugin:2.10.1' classpath 'io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.30.0' classpath "io.spring.javaformat:spring-javaformat-gradle-plugin:$springJavaformatVersion" diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle index c17b2d54eb..aac0b2b5c6 100644 --- a/buildSrc/build.gradle +++ b/buildSrc/build.gradle @@ -2,7 +2,7 @@ plugins { id "java-gradle-plugin" id "java" id "groovy" - id 'com.apollographql.apollo' version '2.5.14' + id 'com.apollographql.apollo' version '4.3.1' } sourceCompatibility = JavaVersion.VERSION_17 @@ -81,33 +81,33 @@ dependencies { implementation 'org.yaml:snakeyaml:1.33' implementation localGroovy() - implementation 'io.github.gradle-nexus:publish-plugin:1.3.0' - implementation 'io.projectreactor:reactor-core:3.7.6' - implementation ('org.gretty:gretty:4.1.6') { + implementation 'io.github.gradle-nexus:publish-plugin:2.0.0' + implementation 'io.projectreactor:reactor-core:3.7.8' + implementation ('org.gretty:gretty:4.1.7') { exclude group: 'org.springframework.boot', module: 'spring-boot-loader-tools' } - implementation 'com.apollographql.apollo:apollo-runtime:2.5.14' + implementation 'com.apollographql.apollo:apollo-runtime:4.3.1' implementation 'com.github.ben-manes:gradle-versions-plugin:0.52.0' implementation 'com.github.spullara.mustache.java:compiler:0.9.14' - implementation 'io.spring.javaformat:spring-javaformat-gradle-plugin:0.0.44' - implementation 'io.spring.gradle:spring-security-release-plugin:1.0.6' + implementation 'io.spring.javaformat:spring-javaformat-gradle-plugin:0.0.47' + implementation 'io.spring.gradle:spring-security-release-plugin:1.0.10' implementation 'io.spring.nohttp:nohttp-gradle:0.0.11' implementation 'net.sourceforge.htmlunit:htmlunit:2.70.0' - implementation 'org.asciidoctor:asciidoctor-gradle-jvm:3.3.2' + implementation 'org.asciidoctor:asciidoctor-gradle-jvm:4.0.4' implementation 'org.hidetake:gradle-ssh-plugin:2.10.1' - implementation 'org.jfrog.buildinfo:build-info-extractor-gradle:4.34.1' - implementation 'org.springframework:spring-core:6.2.7' - implementation 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.8.0.1969' + implementation 'org.jfrog.buildinfo:build-info-extractor-gradle:6.0.0' + implementation 'org.springframework:spring-core:6.2.9' + implementation 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:6.2.0.5505' - testImplementation platform('org.junit:junit-bom:5.12.2') + testImplementation platform('org.junit:junit-bom:5.13.4') testImplementation "org.junit.jupiter:junit-jupiter-api" testImplementation "org.junit.jupiter:junit-jupiter-params" testImplementation "org.junit.jupiter:junit-jupiter-engine" testImplementation 'org.apache.commons:commons-io:1.3.2' testImplementation 'org.assertj:assertj-core:3.27.3' - testImplementation 'org.mockito:mockito-core:3.12.4' - testImplementation 'org.mockito:mockito-junit-jupiter:3.12.4' - testImplementation "com.squareup.okhttp3:mockwebserver:3.14.9" + testImplementation 'org.mockito:mockito-core:5.18.0' + testImplementation 'org.mockito:mockito-junit-jupiter:5.18.0' + testImplementation "com.squareup.okhttp3:mockwebserver:5.1.0" } diff --git a/buildSrc/src/main/groovy/io/spring/gradle/IncludeRepoTask.groovy b/buildSrc/src/main/groovy/io/spring/gradle/IncludeRepoTask.groovy index b549ff7309..04933f0046 100644 --- a/buildSrc/src/main/groovy/io/spring/gradle/IncludeRepoTask.groovy +++ b/buildSrc/src/main/groovy/io/spring/gradle/IncludeRepoTask.groovy @@ -1,5 +1,5 @@ /* - * Copyright 2002-2021 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/buildSrc/src/main/groovy/io/spring/gradle/convention/AbstractSpringJavaPlugin.groovy b/buildSrc/src/main/groovy/io/spring/gradle/convention/AbstractSpringJavaPlugin.groovy index 27a9fac8fc..aa14e6c9be 100644 --- a/buildSrc/src/main/groovy/io/spring/gradle/convention/AbstractSpringJavaPlugin.groovy +++ b/buildSrc/src/main/groovy/io/spring/gradle/convention/AbstractSpringJavaPlugin.groovy @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/buildSrc/src/main/groovy/io/spring/gradle/convention/ArtifactoryPlugin.groovy b/buildSrc/src/main/groovy/io/spring/gradle/convention/ArtifactoryPlugin.groovy index 3292ca4b31..c0c0f5057e 100644 --- a/buildSrc/src/main/groovy/io/spring/gradle/convention/ArtifactoryPlugin.groovy +++ b/buildSrc/src/main/groovy/io/spring/gradle/convention/ArtifactoryPlugin.groovy @@ -1,5 +1,5 @@ /* - * Copyright 2002-2017 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/buildSrc/src/main/groovy/io/spring/gradle/convention/CheckstylePlugin.groovy b/buildSrc/src/main/groovy/io/spring/gradle/convention/CheckstylePlugin.groovy index 4ed89b8bef..c87f4b4d02 100644 --- a/buildSrc/src/main/groovy/io/spring/gradle/convention/CheckstylePlugin.groovy +++ b/buildSrc/src/main/groovy/io/spring/gradle/convention/CheckstylePlugin.groovy @@ -1,5 +1,5 @@ /* - * Copyright 2016-2019 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/buildSrc/src/main/groovy/io/spring/gradle/convention/DeployDocsPlugin.groovy b/buildSrc/src/main/groovy/io/spring/gradle/convention/DeployDocsPlugin.groovy index 050ece5abf..b7e55477c0 100644 --- a/buildSrc/src/main/groovy/io/spring/gradle/convention/DeployDocsPlugin.groovy +++ b/buildSrc/src/main/groovy/io/spring/gradle/convention/DeployDocsPlugin.groovy @@ -1,5 +1,5 @@ /* - * Copyright 2002-2017 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/buildSrc/src/main/groovy/io/spring/gradle/convention/IncludeCheckRemotePlugin.groovy b/buildSrc/src/main/groovy/io/spring/gradle/convention/IncludeCheckRemotePlugin.groovy index c6a7a02001..f763516bbb 100644 --- a/buildSrc/src/main/groovy/io/spring/gradle/convention/IncludeCheckRemotePlugin.groovy +++ b/buildSrc/src/main/groovy/io/spring/gradle/convention/IncludeCheckRemotePlugin.groovy @@ -1,5 +1,5 @@ /* - * Copyright 2002-2021 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/buildSrc/src/main/groovy/io/spring/gradle/convention/IntegrationTestPlugin.groovy b/buildSrc/src/main/groovy/io/spring/gradle/convention/IntegrationTestPlugin.groovy index 9858458b8f..ad2895c379 100644 --- a/buildSrc/src/main/groovy/io/spring/gradle/convention/IntegrationTestPlugin.groovy +++ b/buildSrc/src/main/groovy/io/spring/gradle/convention/IntegrationTestPlugin.groovy @@ -1,5 +1,5 @@ /* - * Copyright 2016-2018 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/buildSrc/src/main/groovy/io/spring/gradle/convention/JacocoPlugin.groovy b/buildSrc/src/main/groovy/io/spring/gradle/convention/JacocoPlugin.groovy index 551958210d..73574c5254 100644 --- a/buildSrc/src/main/groovy/io/spring/gradle/convention/JacocoPlugin.groovy +++ b/buildSrc/src/main/groovy/io/spring/gradle/convention/JacocoPlugin.groovy @@ -1,5 +1,5 @@ /* - * Copyright 2016-2018 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/buildSrc/src/main/groovy/io/spring/gradle/convention/JavadocApiPlugin.groovy b/buildSrc/src/main/groovy/io/spring/gradle/convention/JavadocApiPlugin.groovy index aea52507f6..6ea63cb564 100644 --- a/buildSrc/src/main/groovy/io/spring/gradle/convention/JavadocApiPlugin.groovy +++ b/buildSrc/src/main/groovy/io/spring/gradle/convention/JavadocApiPlugin.groovy @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/buildSrc/src/main/groovy/io/spring/gradle/convention/ManagementConfigurationPlugin.java b/buildSrc/src/main/groovy/io/spring/gradle/convention/ManagementConfigurationPlugin.java index 8db6fd970b..39a891c32e 100644 --- a/buildSrc/src/main/groovy/io/spring/gradle/convention/ManagementConfigurationPlugin.java +++ b/buildSrc/src/main/groovy/io/spring/gradle/convention/ManagementConfigurationPlugin.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2021 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/buildSrc/src/main/groovy/io/spring/gradle/convention/RepositoryConventionPlugin.groovy b/buildSrc/src/main/groovy/io/spring/gradle/convention/RepositoryConventionPlugin.groovy index 407163d82a..8a005f6a9f 100644 --- a/buildSrc/src/main/groovy/io/spring/gradle/convention/RepositoryConventionPlugin.groovy +++ b/buildSrc/src/main/groovy/io/spring/gradle/convention/RepositoryConventionPlugin.groovy @@ -1,5 +1,5 @@ /* - * Copyright 2016-2018 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/buildSrc/src/main/groovy/io/spring/gradle/convention/RootProjectPlugin.groovy b/buildSrc/src/main/groovy/io/spring/gradle/convention/RootProjectPlugin.groovy index f06b15f508..a12f3b6fdc 100644 --- a/buildSrc/src/main/groovy/io/spring/gradle/convention/RootProjectPlugin.groovy +++ b/buildSrc/src/main/groovy/io/spring/gradle/convention/RootProjectPlugin.groovy @@ -1,5 +1,5 @@ /* - * Copyright 2016-2019 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/buildSrc/src/main/groovy/io/spring/gradle/convention/SortedProperties.groovy b/buildSrc/src/main/groovy/io/spring/gradle/convention/SortedProperties.groovy index ccb4d90ab1..4461ca36fa 100644 --- a/buildSrc/src/main/groovy/io/spring/gradle/convention/SortedProperties.groovy +++ b/buildSrc/src/main/groovy/io/spring/gradle/convention/SortedProperties.groovy @@ -1,5 +1,5 @@ /* - * Copyright 2002-2017 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/buildSrc/src/main/groovy/io/spring/gradle/convention/SpringModulePlugin.groovy b/buildSrc/src/main/groovy/io/spring/gradle/convention/SpringModulePlugin.groovy index 55c8ef6398..4cc0085588 100644 --- a/buildSrc/src/main/groovy/io/spring/gradle/convention/SpringModulePlugin.groovy +++ b/buildSrc/src/main/groovy/io/spring/gradle/convention/SpringModulePlugin.groovy @@ -1,5 +1,5 @@ /* - * Copyright 2016-2019 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -20,6 +20,7 @@ import org.gradle.api.JavaVersion import org.gradle.api.Project import org.gradle.api.plugins.JavaLibraryPlugin import org.gradle.api.plugins.PluginManager +import org.gradle.api.tasks.bundling.Jar import org.springframework.gradle.maven.SpringMavenPlugin /** @@ -40,6 +41,11 @@ class SpringModulePlugin extends AbstractSpringJavaPlugin { if (!Utils.isRelease(project)) { deployArtifacts.dependsOn project.tasks.artifactoryPublish } + project.tasks.withType(Jar) { + from(project.rootProject.files('LICENSE.txt')) { + into('META-INF') + } + } } } diff --git a/buildSrc/src/main/groovy/io/spring/gradle/convention/SpringTestPlugin.groovy b/buildSrc/src/main/groovy/io/spring/gradle/convention/SpringTestPlugin.groovy index ff18dfc5df..552ec3b712 100644 --- a/buildSrc/src/main/groovy/io/spring/gradle/convention/SpringTestPlugin.groovy +++ b/buildSrc/src/main/groovy/io/spring/gradle/convention/SpringTestPlugin.groovy @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/buildSrc/src/main/groovy/io/spring/gradle/convention/TestsConfigurationPlugin.groovy b/buildSrc/src/main/groovy/io/spring/gradle/convention/TestsConfigurationPlugin.groovy index 8d2fffd4d5..4c6778b011 100644 --- a/buildSrc/src/main/groovy/io/spring/gradle/convention/TestsConfigurationPlugin.groovy +++ b/buildSrc/src/main/groovy/io/spring/gradle/convention/TestsConfigurationPlugin.groovy @@ -1,5 +1,5 @@ /* - * Copyright 2002-2017 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/buildSrc/src/main/java/org/springframework/gradle/github/changelog/GitHubChangelogPlugin.java b/buildSrc/src/main/java/org/springframework/gradle/github/changelog/GitHubChangelogPlugin.java index 7c09fa6ceb..fe240dd6b4 100644 --- a/buildSrc/src/main/java/org/springframework/gradle/github/changelog/GitHubChangelogPlugin.java +++ b/buildSrc/src/main/java/org/springframework/gradle/github/changelog/GitHubChangelogPlugin.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2020 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/buildSrc/src/main/java/org/springframework/gradle/github/milestones/GitHubMilestoneApi.java b/buildSrc/src/main/java/org/springframework/gradle/github/milestones/GitHubMilestoneApi.java index fd3c0d817b..8f24f6a6e0 100644 --- a/buildSrc/src/main/java/org/springframework/gradle/github/milestones/GitHubMilestoneApi.java +++ b/buildSrc/src/main/java/org/springframework/gradle/github/milestones/GitHubMilestoneApi.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2020 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/buildSrc/src/main/java/org/springframework/gradle/github/milestones/GitHubMilestoneHasNoOpenIssuesTask.java b/buildSrc/src/main/java/org/springframework/gradle/github/milestones/GitHubMilestoneHasNoOpenIssuesTask.java index 40b026c804..bfee59755e 100644 --- a/buildSrc/src/main/java/org/springframework/gradle/github/milestones/GitHubMilestoneHasNoOpenIssuesTask.java +++ b/buildSrc/src/main/java/org/springframework/gradle/github/milestones/GitHubMilestoneHasNoOpenIssuesTask.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2020 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/buildSrc/src/main/java/org/springframework/gradle/github/milestones/GitHubMilestonePlugin.java b/buildSrc/src/main/java/org/springframework/gradle/github/milestones/GitHubMilestonePlugin.java index 57f749d97c..45cc06fb36 100644 --- a/buildSrc/src/main/java/org/springframework/gradle/github/milestones/GitHubMilestonePlugin.java +++ b/buildSrc/src/main/java/org/springframework/gradle/github/milestones/GitHubMilestonePlugin.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2020 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/buildSrc/src/main/java/org/springframework/gradle/github/release/CreateGitHubReleaseTask.java b/buildSrc/src/main/java/org/springframework/gradle/github/release/CreateGitHubReleaseTask.java index 65c8b687be..6598e29852 100644 --- a/buildSrc/src/main/java/org/springframework/gradle/github/release/CreateGitHubReleaseTask.java +++ b/buildSrc/src/main/java/org/springframework/gradle/github/release/CreateGitHubReleaseTask.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2021 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/buildSrc/src/main/java/org/springframework/gradle/github/release/GitHubReleaseApi.java b/buildSrc/src/main/java/org/springframework/gradle/github/release/GitHubReleaseApi.java index 65238d0b82..6cc8e78ebe 100644 --- a/buildSrc/src/main/java/org/springframework/gradle/github/release/GitHubReleaseApi.java +++ b/buildSrc/src/main/java/org/springframework/gradle/github/release/GitHubReleaseApi.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2021 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/buildSrc/src/main/java/org/springframework/gradle/github/release/GitHubReleasePlugin.java b/buildSrc/src/main/java/org/springframework/gradle/github/release/GitHubReleasePlugin.java index 1a33162e33..6182ff9b03 100644 --- a/buildSrc/src/main/java/org/springframework/gradle/github/release/GitHubReleasePlugin.java +++ b/buildSrc/src/main/java/org/springframework/gradle/github/release/GitHubReleasePlugin.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2021 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/buildSrc/src/main/java/org/springframework/gradle/github/release/Release.java b/buildSrc/src/main/java/org/springframework/gradle/github/release/Release.java index 6dec2ceb79..74d7a45e86 100644 --- a/buildSrc/src/main/java/org/springframework/gradle/github/release/Release.java +++ b/buildSrc/src/main/java/org/springframework/gradle/github/release/Release.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2021 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/buildSrc/src/main/java/org/springframework/gradle/maven/SpringSigningPlugin.java b/buildSrc/src/main/java/org/springframework/gradle/maven/SpringSigningPlugin.java index ed3f46e2ca..76ea1ad846 100644 --- a/buildSrc/src/main/java/org/springframework/gradle/maven/SpringSigningPlugin.java +++ b/buildSrc/src/main/java/org/springframework/gradle/maven/SpringSigningPlugin.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2019 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/buildSrc/src/main/java/org/springframework/gradle/propdeps/PropDepsEclipsePlugin.groovy b/buildSrc/src/main/java/org/springframework/gradle/propdeps/PropDepsEclipsePlugin.groovy index bf88ca6c7d..82d402524d 100644 --- a/buildSrc/src/main/java/org/springframework/gradle/propdeps/PropDepsEclipsePlugin.groovy +++ b/buildSrc/src/main/java/org/springframework/gradle/propdeps/PropDepsEclipsePlugin.groovy @@ -1,5 +1,5 @@ /* - * Copyright 2002-2021 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/buildSrc/src/main/java/org/springframework/gradle/propdeps/PropDepsIdeaPlugin.groovy b/buildSrc/src/main/java/org/springframework/gradle/propdeps/PropDepsIdeaPlugin.groovy index 4035971a7c..75eb608d35 100644 --- a/buildSrc/src/main/java/org/springframework/gradle/propdeps/PropDepsIdeaPlugin.groovy +++ b/buildSrc/src/main/java/org/springframework/gradle/propdeps/PropDepsIdeaPlugin.groovy @@ -1,5 +1,5 @@ /* - * Copyright 2002-2021 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/buildSrc/src/main/java/org/springframework/gradle/propdeps/PropDepsPlugin.groovy b/buildSrc/src/main/java/org/springframework/gradle/propdeps/PropDepsPlugin.groovy index e0893e6a88..5d3c248612 100644 --- a/buildSrc/src/main/java/org/springframework/gradle/propdeps/PropDepsPlugin.groovy +++ b/buildSrc/src/main/java/org/springframework/gradle/propdeps/PropDepsPlugin.groovy @@ -1,5 +1,5 @@ /* - * Copyright 2002-2021 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/buildSrc/src/main/java/org/springframework/gradle/sagan/Release.java b/buildSrc/src/main/java/org/springframework/gradle/sagan/Release.java index 5e62c658e0..ff8596239f 100644 --- a/buildSrc/src/main/java/org/springframework/gradle/sagan/Release.java +++ b/buildSrc/src/main/java/org/springframework/gradle/sagan/Release.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2020 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/buildSrc/src/main/java/org/springframework/gradle/sagan/SaganApi.java b/buildSrc/src/main/java/org/springframework/gradle/sagan/SaganApi.java index b2a413f8e6..9ff8003491 100644 --- a/buildSrc/src/main/java/org/springframework/gradle/sagan/SaganApi.java +++ b/buildSrc/src/main/java/org/springframework/gradle/sagan/SaganApi.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2020 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/buildSrc/src/main/java/org/springframework/gradle/sagan/SaganCreateReleaseTask.java b/buildSrc/src/main/java/org/springframework/gradle/sagan/SaganCreateReleaseTask.java index 6592544b1f..38c6de296a 100644 --- a/buildSrc/src/main/java/org/springframework/gradle/sagan/SaganCreateReleaseTask.java +++ b/buildSrc/src/main/java/org/springframework/gradle/sagan/SaganCreateReleaseTask.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2020 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/buildSrc/src/main/java/org/springframework/gradle/sagan/SaganDeleteReleaseTask.java b/buildSrc/src/main/java/org/springframework/gradle/sagan/SaganDeleteReleaseTask.java index 49a3885226..55d9a3538a 100644 --- a/buildSrc/src/main/java/org/springframework/gradle/sagan/SaganDeleteReleaseTask.java +++ b/buildSrc/src/main/java/org/springframework/gradle/sagan/SaganDeleteReleaseTask.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2020 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/buildSrc/src/main/java/org/springframework/gradle/sagan/SaganPlugin.java b/buildSrc/src/main/java/org/springframework/gradle/sagan/SaganPlugin.java index 987a8a3b4d..2a893b9d63 100644 --- a/buildSrc/src/main/java/org/springframework/gradle/sagan/SaganPlugin.java +++ b/buildSrc/src/main/java/org/springframework/gradle/sagan/SaganPlugin.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2020 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/buildSrc/src/main/java/s101/S101Configure.java b/buildSrc/src/main/java/s101/S101Configure.java index a8e2154dfd..913de4518d 100644 --- a/buildSrc/src/main/java/s101/S101Configure.java +++ b/buildSrc/src/main/java/s101/S101Configure.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2021 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/buildSrc/src/main/java/s101/S101Configurer.java b/buildSrc/src/main/java/s101/S101Configurer.java index 6ce3caf7f5..86696aa97b 100644 --- a/buildSrc/src/main/java/s101/S101Configurer.java +++ b/buildSrc/src/main/java/s101/S101Configurer.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2021 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/buildSrc/src/main/java/s101/S101Install.java b/buildSrc/src/main/java/s101/S101Install.java index 8d95db0d1f..3e8ca5ef8f 100644 --- a/buildSrc/src/main/java/s101/S101Install.java +++ b/buildSrc/src/main/java/s101/S101Install.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2021 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/buildSrc/src/main/java/s101/S101Plugin.java b/buildSrc/src/main/java/s101/S101Plugin.java index 00894fb335..c7cf0d8bd2 100644 --- a/buildSrc/src/main/java/s101/S101Plugin.java +++ b/buildSrc/src/main/java/s101/S101Plugin.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2021 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/buildSrc/src/main/java/s101/S101PluginExtension.java b/buildSrc/src/main/java/s101/S101PluginExtension.java index f3abe0f156..5a09ba5a48 100644 --- a/buildSrc/src/main/java/s101/S101PluginExtension.java +++ b/buildSrc/src/main/java/s101/S101PluginExtension.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2021 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/buildSrc/src/test/java/io/spring/gradle/TestKit.java b/buildSrc/src/test/java/io/spring/gradle/TestKit.java index e7e0f0afeb..cc529da6b7 100644 --- a/buildSrc/src/test/java/io/spring/gradle/TestKit.java +++ b/buildSrc/src/test/java/io/spring/gradle/TestKit.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2017 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/buildSrc/src/test/java/io/spring/gradle/convention/IncludeCheckRemotePluginTests.java b/buildSrc/src/test/java/io/spring/gradle/convention/IncludeCheckRemotePluginTests.java index 6bcc5fe8a3..2086785546 100644 --- a/buildSrc/src/test/java/io/spring/gradle/convention/IncludeCheckRemotePluginTests.java +++ b/buildSrc/src/test/java/io/spring/gradle/convention/IncludeCheckRemotePluginTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2021 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/buildSrc/src/test/java/io/spring/gradle/convention/IntegrationPluginTests.java b/buildSrc/src/test/java/io/spring/gradle/convention/IntegrationPluginTests.java index b1e8ed9d29..084b83fa8a 100644 --- a/buildSrc/src/test/java/io/spring/gradle/convention/IntegrationPluginTests.java +++ b/buildSrc/src/test/java/io/spring/gradle/convention/IntegrationPluginTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/buildSrc/src/test/java/io/spring/gradle/convention/JavadocApiPluginTests.java b/buildSrc/src/test/java/io/spring/gradle/convention/JavadocApiPluginTests.java index 532b0f5bd2..b45b3f8820 100644 --- a/buildSrc/src/test/java/io/spring/gradle/convention/JavadocApiPluginTests.java +++ b/buildSrc/src/test/java/io/spring/gradle/convention/JavadocApiPluginTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/buildSrc/src/test/java/io/spring/gradle/convention/RepositoryConventionPluginTests.java b/buildSrc/src/test/java/io/spring/gradle/convention/RepositoryConventionPluginTests.java index f1048dbbab..79d0a195ef 100644 --- a/buildSrc/src/test/java/io/spring/gradle/convention/RepositoryConventionPluginTests.java +++ b/buildSrc/src/test/java/io/spring/gradle/convention/RepositoryConventionPluginTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2018 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/buildSrc/src/test/java/io/spring/gradle/convention/sagan/SaganApiTests.java b/buildSrc/src/test/java/io/spring/gradle/convention/sagan/SaganApiTests.java index 61168e9013..3f699621b6 100644 --- a/buildSrc/src/test/java/io/spring/gradle/convention/sagan/SaganApiTests.java +++ b/buildSrc/src/test/java/io/spring/gradle/convention/sagan/SaganApiTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2020 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/buildSrc/src/test/java/org/springframework/gradle/github/release/GitHubReleaseApiTests.java b/buildSrc/src/test/java/org/springframework/gradle/github/release/GitHubReleaseApiTests.java index c24e5990f0..439bf48780 100644 --- a/buildSrc/src/test/java/org/springframework/gradle/github/release/GitHubReleaseApiTests.java +++ b/buildSrc/src/test/java/org/springframework/gradle/github/release/GitHubReleaseApiTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2021 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/buildSrc/src/test/java/org/springframework/security/convention/versions/DependencyExcludesTests.java b/buildSrc/src/test/java/org/springframework/security/convention/versions/DependencyExcludesTests.java index da515af733..b3bf937a8a 100644 --- a/buildSrc/src/test/java/org/springframework/security/convention/versions/DependencyExcludesTests.java +++ b/buildSrc/src/test/java/org/springframework/security/convention/versions/DependencyExcludesTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2020 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/buildSrc/src/test/java/org/springframework/security/convention/versions/TransitiveDependencyLookupUtilsTests.java b/buildSrc/src/test/java/org/springframework/security/convention/versions/TransitiveDependencyLookupUtilsTests.java index 8b0637d6f3..47bbafd129 100644 --- a/buildSrc/src/test/java/org/springframework/security/convention/versions/TransitiveDependencyLookupUtilsTests.java +++ b/buildSrc/src/test/java/org/springframework/security/convention/versions/TransitiveDependencyLookupUtilsTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2020 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/buildSrc/src/test/resources/samples/integrationtest/withgroovy/src/integration-test/groovy/sample/TheTest.groovy b/buildSrc/src/test/resources/samples/integrationtest/withgroovy/src/integration-test/groovy/sample/TheTest.groovy index 36f17864aa..0b61becf60 100644 --- a/buildSrc/src/test/resources/samples/integrationtest/withgroovy/src/integration-test/groovy/sample/TheTest.groovy +++ b/buildSrc/src/test/resources/samples/integrationtest/withgroovy/src/integration-test/groovy/sample/TheTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright 2002-2017 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/core/build.gradle b/core/build.gradle index 5b5b03d0e4..40040d318b 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -38,13 +38,13 @@ dependencies { exclude group: 'org.assertj' } testImplementation platform('org.junit:junit-bom') - testImplementation "org.junit.vintage:junit-vintage-engine" + testImplementation "org.junit.jupiter:junit-jupiter-api" + testImplementation "org.junit.jupiter:junit-jupiter-engine" testRuntimeOnly("org.junit.platform:junit-platform-launcher") - - testImplementation "junit:junit" testImplementation "commons-lang:commons-lang" testImplementation "gsbase:gsbase" testImplementation "org.mockito:mockito-core" + testImplementation "org.mockito:mockito-junit-jupiter:5.18.0" testImplementation "org.springframework:spring-test" testImplementation "org.assertj:assertj-core" testImplementation "com.unboundid:unboundid-ldapsdk" @@ -60,6 +60,7 @@ compileTestJava { test { jvmArgs '--add-exports', 'java.naming/com.sun.jndi.ldap=ALL-UNNAMED' + useJUnitPlatform() } checkFormatMain { diff --git a/core/src/itest-openldap/java/org/springframework/ldap/LdapTemplateLookupOpenLdapITests.java b/core/src/itest-openldap/java/org/springframework/ldap/LdapTemplateLookupOpenLdapITests.java index 0cf73f9535..ea789dcdf3 100644 --- a/core/src/itest-openldap/java/org/springframework/ldap/LdapTemplateLookupOpenLdapITests.java +++ b/core/src/itest-openldap/java/org/springframework/ldap/LdapTemplateLookupOpenLdapITests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/itest-openldap/java/org/springframework/ldap/control/LdapTemplatePagedSearchITests.java b/core/src/itest-openldap/java/org/springframework/ldap/control/LdapTemplatePagedSearchITests.java index 38c106bcf0..7f2152bf5e 100644 --- a/core/src/itest-openldap/java/org/springframework/ldap/control/LdapTemplatePagedSearchITests.java +++ b/core/src/itest-openldap/java/org/springframework/ldap/control/LdapTemplatePagedSearchITests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/itest-openldap/java/org/springframework/ldap/control/LdapTemplateSortedSearchITests.java b/core/src/itest-openldap/java/org/springframework/ldap/control/LdapTemplateSortedSearchITests.java index ec072f8142..98e9c1c76d 100644 --- a/core/src/itest-openldap/java/org/springframework/ldap/control/LdapTemplateSortedSearchITests.java +++ b/core/src/itest-openldap/java/org/springframework/ldap/control/LdapTemplateSortedSearchITests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/LdapDataEntry.java b/core/src/main/java/org/springframework/LdapDataEntry.java index 0ab9ffafda..f4e9bb94cc 100644 --- a/core/src/main/java/org/springframework/LdapDataEntry.java +++ b/core/src/main/java/org/springframework/LdapDataEntry.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2023 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/AttributeInUseException.java b/core/src/main/java/org/springframework/ldap/AttributeInUseException.java index 5e1353645e..25368d6a79 100644 --- a/core/src/main/java/org/springframework/ldap/AttributeInUseException.java +++ b/core/src/main/java/org/springframework/ldap/AttributeInUseException.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/AttributeModificationException.java b/core/src/main/java/org/springframework/ldap/AttributeModificationException.java index b5660cdeba..08ef55eeaf 100644 --- a/core/src/main/java/org/springframework/ldap/AttributeModificationException.java +++ b/core/src/main/java/org/springframework/ldap/AttributeModificationException.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/AuthenticationException.java b/core/src/main/java/org/springframework/ldap/AuthenticationException.java index 91a375aa6b..086481257b 100644 --- a/core/src/main/java/org/springframework/ldap/AuthenticationException.java +++ b/core/src/main/java/org/springframework/ldap/AuthenticationException.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/AuthenticationNotSupportedException.java b/core/src/main/java/org/springframework/ldap/AuthenticationNotSupportedException.java index f688117634..557d445103 100644 --- a/core/src/main/java/org/springframework/ldap/AuthenticationNotSupportedException.java +++ b/core/src/main/java/org/springframework/ldap/AuthenticationNotSupportedException.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/BadLdapGrammarException.java b/core/src/main/java/org/springframework/ldap/BadLdapGrammarException.java index f95b2daa39..683899d561 100644 --- a/core/src/main/java/org/springframework/ldap/BadLdapGrammarException.java +++ b/core/src/main/java/org/springframework/ldap/BadLdapGrammarException.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/CannotProceedException.java b/core/src/main/java/org/springframework/ldap/CannotProceedException.java index df7febdc28..7895998193 100644 --- a/core/src/main/java/org/springframework/ldap/CannotProceedException.java +++ b/core/src/main/java/org/springframework/ldap/CannotProceedException.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/CommunicationException.java b/core/src/main/java/org/springframework/ldap/CommunicationException.java index 60913c01b1..51f297aa92 100644 --- a/core/src/main/java/org/springframework/ldap/CommunicationException.java +++ b/core/src/main/java/org/springframework/ldap/CommunicationException.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/ConfigurationException.java b/core/src/main/java/org/springframework/ldap/ConfigurationException.java index 48cf393cfb..b074279454 100644 --- a/core/src/main/java/org/springframework/ldap/ConfigurationException.java +++ b/core/src/main/java/org/springframework/ldap/ConfigurationException.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/ContextNotEmptyException.java b/core/src/main/java/org/springframework/ldap/ContextNotEmptyException.java index 8418a44499..b966c3f6c2 100644 --- a/core/src/main/java/org/springframework/ldap/ContextNotEmptyException.java +++ b/core/src/main/java/org/springframework/ldap/ContextNotEmptyException.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/InsufficientResourcesException.java b/core/src/main/java/org/springframework/ldap/InsufficientResourcesException.java index a853c5dc69..5942ac450e 100644 --- a/core/src/main/java/org/springframework/ldap/InsufficientResourcesException.java +++ b/core/src/main/java/org/springframework/ldap/InsufficientResourcesException.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/InterruptedNamingException.java b/core/src/main/java/org/springframework/ldap/InterruptedNamingException.java index 6208805f00..a57aa540c7 100644 --- a/core/src/main/java/org/springframework/ldap/InterruptedNamingException.java +++ b/core/src/main/java/org/springframework/ldap/InterruptedNamingException.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/InvalidAttributeIdentifierException.java b/core/src/main/java/org/springframework/ldap/InvalidAttributeIdentifierException.java index cdbcc39272..a2a8e734b4 100644 --- a/core/src/main/java/org/springframework/ldap/InvalidAttributeIdentifierException.java +++ b/core/src/main/java/org/springframework/ldap/InvalidAttributeIdentifierException.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/InvalidAttributeValueException.java b/core/src/main/java/org/springframework/ldap/InvalidAttributeValueException.java index 77570b8762..f9b364e0b7 100644 --- a/core/src/main/java/org/springframework/ldap/InvalidAttributeValueException.java +++ b/core/src/main/java/org/springframework/ldap/InvalidAttributeValueException.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/InvalidAttributesException.java b/core/src/main/java/org/springframework/ldap/InvalidAttributesException.java index 27dbe24eac..39a383f0d9 100644 --- a/core/src/main/java/org/springframework/ldap/InvalidAttributesException.java +++ b/core/src/main/java/org/springframework/ldap/InvalidAttributesException.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/InvalidNameException.java b/core/src/main/java/org/springframework/ldap/InvalidNameException.java index 7197b86022..2391116a5d 100644 --- a/core/src/main/java/org/springframework/ldap/InvalidNameException.java +++ b/core/src/main/java/org/springframework/ldap/InvalidNameException.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/InvalidSearchControlsException.java b/core/src/main/java/org/springframework/ldap/InvalidSearchControlsException.java index 49423b43e7..2594740df6 100644 --- a/core/src/main/java/org/springframework/ldap/InvalidSearchControlsException.java +++ b/core/src/main/java/org/springframework/ldap/InvalidSearchControlsException.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/InvalidSearchFilterException.java b/core/src/main/java/org/springframework/ldap/InvalidSearchFilterException.java index 4d1e311e07..39e87fb531 100644 --- a/core/src/main/java/org/springframework/ldap/InvalidSearchFilterException.java +++ b/core/src/main/java/org/springframework/ldap/InvalidSearchFilterException.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/LdapReferralException.java b/core/src/main/java/org/springframework/ldap/LdapReferralException.java index 04b48e2408..ba2e1dd54b 100644 --- a/core/src/main/java/org/springframework/ldap/LdapReferralException.java +++ b/core/src/main/java/org/springframework/ldap/LdapReferralException.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/LimitExceededException.java b/core/src/main/java/org/springframework/ldap/LimitExceededException.java index 8c37157fa8..2a19db6e5e 100644 --- a/core/src/main/java/org/springframework/ldap/LimitExceededException.java +++ b/core/src/main/java/org/springframework/ldap/LimitExceededException.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/LinkException.java b/core/src/main/java/org/springframework/ldap/LinkException.java index a938545866..67e2922851 100644 --- a/core/src/main/java/org/springframework/ldap/LinkException.java +++ b/core/src/main/java/org/springframework/ldap/LinkException.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/LinkLoopException.java b/core/src/main/java/org/springframework/ldap/LinkLoopException.java index 6fcfac52d2..f222c1be5e 100644 --- a/core/src/main/java/org/springframework/ldap/LinkLoopException.java +++ b/core/src/main/java/org/springframework/ldap/LinkLoopException.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/MalformedLinkException.java b/core/src/main/java/org/springframework/ldap/MalformedLinkException.java index b63e059041..9e87d9de8f 100644 --- a/core/src/main/java/org/springframework/ldap/MalformedLinkException.java +++ b/core/src/main/java/org/springframework/ldap/MalformedLinkException.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/NameAlreadyBoundException.java b/core/src/main/java/org/springframework/ldap/NameAlreadyBoundException.java index 33592059d2..fe797c7258 100644 --- a/core/src/main/java/org/springframework/ldap/NameAlreadyBoundException.java +++ b/core/src/main/java/org/springframework/ldap/NameAlreadyBoundException.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/NameNotFoundException.java b/core/src/main/java/org/springframework/ldap/NameNotFoundException.java index 283f1e6845..9a77be3be7 100644 --- a/core/src/main/java/org/springframework/ldap/NameNotFoundException.java +++ b/core/src/main/java/org/springframework/ldap/NameNotFoundException.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/NamingException.java b/core/src/main/java/org/springframework/ldap/NamingException.java index 0b4de5a1ed..aea44a498c 100644 --- a/core/src/main/java/org/springframework/ldap/NamingException.java +++ b/core/src/main/java/org/springframework/ldap/NamingException.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/NamingSecurityException.java b/core/src/main/java/org/springframework/ldap/NamingSecurityException.java index c96666e3a6..a98071026c 100644 --- a/core/src/main/java/org/springframework/ldap/NamingSecurityException.java +++ b/core/src/main/java/org/springframework/ldap/NamingSecurityException.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/NoInitialContextException.java b/core/src/main/java/org/springframework/ldap/NoInitialContextException.java index d7368f7e98..d51aa72fd8 100644 --- a/core/src/main/java/org/springframework/ldap/NoInitialContextException.java +++ b/core/src/main/java/org/springframework/ldap/NoInitialContextException.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/NoPermissionException.java b/core/src/main/java/org/springframework/ldap/NoPermissionException.java index 6cf8aafb5d..ffc3d2d2ee 100644 --- a/core/src/main/java/org/springframework/ldap/NoPermissionException.java +++ b/core/src/main/java/org/springframework/ldap/NoPermissionException.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/NoSuchAttributeException.java b/core/src/main/java/org/springframework/ldap/NoSuchAttributeException.java index df62bf6aa7..b5d3620fbb 100644 --- a/core/src/main/java/org/springframework/ldap/NoSuchAttributeException.java +++ b/core/src/main/java/org/springframework/ldap/NoSuchAttributeException.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/NotContextException.java b/core/src/main/java/org/springframework/ldap/NotContextException.java index a0a1196ac2..d190d04c96 100644 --- a/core/src/main/java/org/springframework/ldap/NotContextException.java +++ b/core/src/main/java/org/springframework/ldap/NotContextException.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/OperationNotSupportedException.java b/core/src/main/java/org/springframework/ldap/OperationNotSupportedException.java index 274895c602..768d2bf886 100644 --- a/core/src/main/java/org/springframework/ldap/OperationNotSupportedException.java +++ b/core/src/main/java/org/springframework/ldap/OperationNotSupportedException.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/PartialResultException.java b/core/src/main/java/org/springframework/ldap/PartialResultException.java index f7ece08256..4d435d85f0 100644 --- a/core/src/main/java/org/springframework/ldap/PartialResultException.java +++ b/core/src/main/java/org/springframework/ldap/PartialResultException.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/ReferralException.java b/core/src/main/java/org/springframework/ldap/ReferralException.java index e6bf27f45d..3758efde4f 100644 --- a/core/src/main/java/org/springframework/ldap/ReferralException.java +++ b/core/src/main/java/org/springframework/ldap/ReferralException.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/SchemaViolationException.java b/core/src/main/java/org/springframework/ldap/SchemaViolationException.java index b2021a1aac..f147749eee 100644 --- a/core/src/main/java/org/springframework/ldap/SchemaViolationException.java +++ b/core/src/main/java/org/springframework/ldap/SchemaViolationException.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/ServiceUnavailableException.java b/core/src/main/java/org/springframework/ldap/ServiceUnavailableException.java index 900880a89a..a58fdc395a 100644 --- a/core/src/main/java/org/springframework/ldap/ServiceUnavailableException.java +++ b/core/src/main/java/org/springframework/ldap/ServiceUnavailableException.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/SizeLimitExceededException.java b/core/src/main/java/org/springframework/ldap/SizeLimitExceededException.java index 9d0df109ce..3ded7ffbb9 100644 --- a/core/src/main/java/org/springframework/ldap/SizeLimitExceededException.java +++ b/core/src/main/java/org/springframework/ldap/SizeLimitExceededException.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/TimeLimitExceededException.java b/core/src/main/java/org/springframework/ldap/TimeLimitExceededException.java index 1b4dfdc4c4..09f9e2b723 100644 --- a/core/src/main/java/org/springframework/ldap/TimeLimitExceededException.java +++ b/core/src/main/java/org/springframework/ldap/TimeLimitExceededException.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/UncategorizedLdapException.java b/core/src/main/java/org/springframework/ldap/UncategorizedLdapException.java index 039cad5b9e..278c83c93d 100644 --- a/core/src/main/java/org/springframework/ldap/UncategorizedLdapException.java +++ b/core/src/main/java/org/springframework/ldap/UncategorizedLdapException.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/aot/hint/LdapCoreRuntimeHints.java b/core/src/main/java/org/springframework/ldap/aot/hint/LdapCoreRuntimeHints.java index 130bf2caa0..ec373e7f2f 100644 --- a/core/src/main/java/org/springframework/ldap/aot/hint/LdapCoreRuntimeHints.java +++ b/core/src/main/java/org/springframework/ldap/aot/hint/LdapCoreRuntimeHints.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2023 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/authentication/DefaultValuesAuthenticationSourceDecorator.java b/core/src/main/java/org/springframework/ldap/authentication/DefaultValuesAuthenticationSourceDecorator.java index e7954875c3..680eff27bc 100644 --- a/core/src/main/java/org/springframework/ldap/authentication/DefaultValuesAuthenticationSourceDecorator.java +++ b/core/src/main/java/org/springframework/ldap/authentication/DefaultValuesAuthenticationSourceDecorator.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/config/ContextSourceParser.java b/core/src/main/java/org/springframework/ldap/config/ContextSourceParser.java index 55f29890fe..1f676958ca 100644 --- a/core/src/main/java/org/springframework/ldap/config/ContextSourceParser.java +++ b/core/src/main/java/org/springframework/ldap/config/ContextSourceParser.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2025 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/config/DefaultRenamingStrategyParser.java b/core/src/main/java/org/springframework/ldap/config/DefaultRenamingStrategyParser.java index 7af4dffe5e..041b25a881 100644 --- a/core/src/main/java/org/springframework/ldap/config/DefaultRenamingStrategyParser.java +++ b/core/src/main/java/org/springframework/ldap/config/DefaultRenamingStrategyParser.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/config/Elements.java b/core/src/main/java/org/springframework/ldap/config/Elements.java index 652169f321..b88833354a 100644 --- a/core/src/main/java/org/springframework/ldap/config/Elements.java +++ b/core/src/main/java/org/springframework/ldap/config/Elements.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2015 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/config/LdapNamespaceHandler.java b/core/src/main/java/org/springframework/ldap/config/LdapNamespaceHandler.java index d95792cbef..176d9eba49 100644 --- a/core/src/main/java/org/springframework/ldap/config/LdapNamespaceHandler.java +++ b/core/src/main/java/org/springframework/ldap/config/LdapNamespaceHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/config/LdapTemplateParser.java b/core/src/main/java/org/springframework/ldap/config/LdapTemplateParser.java index 0bf676dec0..1df40d5905 100644 --- a/core/src/main/java/org/springframework/ldap/config/LdapTemplateParser.java +++ b/core/src/main/java/org/springframework/ldap/config/LdapTemplateParser.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/config/ParserUtils.java b/core/src/main/java/org/springframework/ldap/config/ParserUtils.java index d7f22d207b..d62535536c 100644 --- a/core/src/main/java/org/springframework/ldap/config/ParserUtils.java +++ b/core/src/main/java/org/springframework/ldap/config/ParserUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/config/TransactionManagerParser.java b/core/src/main/java/org/springframework/ldap/config/TransactionManagerParser.java index 550a2904ae..2c52de655e 100644 --- a/core/src/main/java/org/springframework/ldap/config/TransactionManagerParser.java +++ b/core/src/main/java/org/springframework/ldap/config/TransactionManagerParser.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,8 +24,6 @@ import org.springframework.beans.factory.xml.AbstractBeanDefinitionParser; import org.springframework.beans.factory.xml.BeanDefinitionParser; import org.springframework.beans.factory.xml.ParserContext; -import org.springframework.ldap.transaction.compensating.manager.ContextSourceAndDataSourceTransactionManager; -import org.springframework.ldap.transaction.compensating.manager.ContextSourceAndHibernateTransactionManager; import org.springframework.ldap.transaction.compensating.manager.ContextSourceTransactionManager; import org.springframework.ldap.transaction.compensating.support.DefaultTempEntryRenamingStrategy; import org.springframework.ldap.transaction.compensating.support.DifferentSubtreeTempEntryRenamingStrategy; @@ -58,24 +56,13 @@ public BeanDefinition parse(Element element, ParserContext parserContext) { String dataSourceRef = element.getAttribute(ATT_DATA_SOURCE_REF); String sessionFactoryRef = element.getAttribute(ATT_SESSION_FACTORY_REF); - if (StringUtils.hasText(dataSourceRef) && StringUtils.hasText(sessionFactoryRef)) { - throw new IllegalArgumentException(String.format("Only one of %s and %s can be specified", + if (StringUtils.hasText(dataSourceRef) || StringUtils.hasText(sessionFactoryRef)) { + throw new IllegalArgumentException(String.format( + "ContextSourceAndHibernateTransactionManager and ContextSourceAndDataSourceTransactionManager are removed in Spring LDAP 4.0. Please remove your usage of data-source-ref and session-factory-ref.", ATT_DATA_SOURCE_REF, ATT_SESSION_FACTORY_REF)); } - BeanDefinitionBuilder builder; - if (StringUtils.hasText(dataSourceRef)) { - builder = BeanDefinitionBuilder.rootBeanDefinition(ContextSourceAndDataSourceTransactionManager.class); - builder.addPropertyReference("dataSource", dataSourceRef); - } - else if (StringUtils.hasText(sessionFactoryRef)) { - builder = BeanDefinitionBuilder.rootBeanDefinition(ContextSourceAndHibernateTransactionManager.class); - builder.addPropertyReference("sessionFactory", sessionFactoryRef); - } - else { - // Standard transaction manager - builder = BeanDefinitionBuilder.rootBeanDefinition(ContextSourceTransactionManager.class); - } + BeanDefinitionBuilder builder = BeanDefinitionBuilder.rootBeanDefinition(ContextSourceTransactionManager.class); builder.addPropertyReference("contextSource", contextSourceRef); diff --git a/core/src/main/java/org/springframework/ldap/control/AbstractFallbackRequestAndResponseControlDirContextProcessor.java b/core/src/main/java/org/springframework/ldap/control/AbstractFallbackRequestAndResponseControlDirContextProcessor.java index a3ff9e73a9..a0d9364c81 100644 --- a/core/src/main/java/org/springframework/ldap/control/AbstractFallbackRequestAndResponseControlDirContextProcessor.java +++ b/core/src/main/java/org/springframework/ldap/control/AbstractFallbackRequestAndResponseControlDirContextProcessor.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/control/AbstractRequestControlDirContextProcessor.java b/core/src/main/java/org/springframework/ldap/control/AbstractRequestControlDirContextProcessor.java index 6c1ddafc66..5c83f3b1fa 100644 --- a/core/src/main/java/org/springframework/ldap/control/AbstractRequestControlDirContextProcessor.java +++ b/core/src/main/java/org/springframework/ldap/control/AbstractRequestControlDirContextProcessor.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/control/CreateControlFailedException.java b/core/src/main/java/org/springframework/ldap/control/CreateControlFailedException.java index 26f921eb2c..5ae80bd39c 100644 --- a/core/src/main/java/org/springframework/ldap/control/CreateControlFailedException.java +++ b/core/src/main/java/org/springframework/ldap/control/CreateControlFailedException.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/control/PagedResult.java b/core/src/main/java/org/springframework/ldap/control/PagedResult.java index 97ba2b08a5..6070e944bd 100644 --- a/core/src/main/java/org/springframework/ldap/control/PagedResult.java +++ b/core/src/main/java/org/springframework/ldap/control/PagedResult.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/control/PagedResultsCookie.java b/core/src/main/java/org/springframework/ldap/control/PagedResultsCookie.java index e90b69fb99..92c678513d 100644 --- a/core/src/main/java/org/springframework/ldap/control/PagedResultsCookie.java +++ b/core/src/main/java/org/springframework/ldap/control/PagedResultsCookie.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/control/PagedResultsDirContextProcessor.java b/core/src/main/java/org/springframework/ldap/control/PagedResultsDirContextProcessor.java index 7e5fe5ac2f..ae010b9aab 100644 --- a/core/src/main/java/org/springframework/ldap/control/PagedResultsDirContextProcessor.java +++ b/core/src/main/java/org/springframework/ldap/control/PagedResultsDirContextProcessor.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/control/PagedResultsRequestControl.java b/core/src/main/java/org/springframework/ldap/control/PagedResultsRequestControl.java index f5a5a8be0e..7a60598381 100644 --- a/core/src/main/java/org/springframework/ldap/control/PagedResultsRequestControl.java +++ b/core/src/main/java/org/springframework/ldap/control/PagedResultsRequestControl.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/control/SortControlDirContextProcessor.java b/core/src/main/java/org/springframework/ldap/control/SortControlDirContextProcessor.java index bdf81a6114..3893592c8c 100644 --- a/core/src/main/java/org/springframework/ldap/control/SortControlDirContextProcessor.java +++ b/core/src/main/java/org/springframework/ldap/control/SortControlDirContextProcessor.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/convert/ConversionServiceBeanFactoryPostProcessor.java b/core/src/main/java/org/springframework/ldap/convert/ConversionServiceBeanFactoryPostProcessor.java index 96a196df87..577bd19db7 100644 --- a/core/src/main/java/org/springframework/ldap/convert/ConversionServiceBeanFactoryPostProcessor.java +++ b/core/src/main/java/org/springframework/ldap/convert/ConversionServiceBeanFactoryPostProcessor.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2025 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/convert/ConverterUtils.java b/core/src/main/java/org/springframework/ldap/convert/ConverterUtils.java index ca768e6dc5..5763f391df 100644 --- a/core/src/main/java/org/springframework/ldap/convert/ConverterUtils.java +++ b/core/src/main/java/org/springframework/ldap/convert/ConverterUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2025 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/convert/NameToStringConverter.java b/core/src/main/java/org/springframework/ldap/convert/NameToStringConverter.java index 6bc0d55911..ed07fe6358 100644 --- a/core/src/main/java/org/springframework/ldap/convert/NameToStringConverter.java +++ b/core/src/main/java/org/springframework/ldap/convert/NameToStringConverter.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2025 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/convert/StringToNameConverter.java b/core/src/main/java/org/springframework/ldap/convert/StringToNameConverter.java index 2eb4041b6e..c942be3b50 100644 --- a/core/src/main/java/org/springframework/ldap/convert/StringToNameConverter.java +++ b/core/src/main/java/org/springframework/ldap/convert/StringToNameConverter.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2025 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/core/AttributeModificationsAware.java b/core/src/main/java/org/springframework/ldap/core/AttributeModificationsAware.java index c167556dfa..22b1d0c51f 100644 --- a/core/src/main/java/org/springframework/ldap/core/AttributeModificationsAware.java +++ b/core/src/main/java/org/springframework/ldap/core/AttributeModificationsAware.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/core/AttributesMapper.java b/core/src/main/java/org/springframework/ldap/core/AttributesMapper.java index 429d974588..d988201a10 100644 --- a/core/src/main/java/org/springframework/ldap/core/AttributesMapper.java +++ b/core/src/main/java/org/springframework/ldap/core/AttributesMapper.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/core/AttributesMapperCallbackHandler.java b/core/src/main/java/org/springframework/ldap/core/AttributesMapperCallbackHandler.java index d403882dc4..b1339a3f7c 100644 --- a/core/src/main/java/org/springframework/ldap/core/AttributesMapperCallbackHandler.java +++ b/core/src/main/java/org/springframework/ldap/core/AttributesMapperCallbackHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/core/AuthenticatedLdapEntryContextCallback.java b/core/src/main/java/org/springframework/ldap/core/AuthenticatedLdapEntryContextCallback.java index ab21100a00..8f5ced9001 100644 --- a/core/src/main/java/org/springframework/ldap/core/AuthenticatedLdapEntryContextCallback.java +++ b/core/src/main/java/org/springframework/ldap/core/AuthenticatedLdapEntryContextCallback.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/core/AuthenticatedLdapEntryContextMapper.java b/core/src/main/java/org/springframework/ldap/core/AuthenticatedLdapEntryContextMapper.java index 9951c0c21e..bdddac0f05 100644 --- a/core/src/main/java/org/springframework/ldap/core/AuthenticatedLdapEntryContextMapper.java +++ b/core/src/main/java/org/springframework/ldap/core/AuthenticatedLdapEntryContextMapper.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/core/AuthenticationErrorCallback.java b/core/src/main/java/org/springframework/ldap/core/AuthenticationErrorCallback.java index 41da20c620..2c38e1a038 100644 --- a/core/src/main/java/org/springframework/ldap/core/AuthenticationErrorCallback.java +++ b/core/src/main/java/org/springframework/ldap/core/AuthenticationErrorCallback.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2023 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/core/AuthenticationSource.java b/core/src/main/java/org/springframework/ldap/core/AuthenticationSource.java index f5e7946bd6..c9dccfcd73 100644 --- a/core/src/main/java/org/springframework/ldap/core/AuthenticationSource.java +++ b/core/src/main/java/org/springframework/ldap/core/AuthenticationSource.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/core/CollectingAuthenticationErrorCallback.java b/core/src/main/java/org/springframework/ldap/core/CollectingAuthenticationErrorCallback.java index e0a8308fba..aa3f9cda7f 100644 --- a/core/src/main/java/org/springframework/ldap/core/CollectingAuthenticationErrorCallback.java +++ b/core/src/main/java/org/springframework/ldap/core/CollectingAuthenticationErrorCallback.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/core/CollectingNameClassPairCallbackHandler.java b/core/src/main/java/org/springframework/ldap/core/CollectingNameClassPairCallbackHandler.java index 304a6e6274..d81c2d623c 100644 --- a/core/src/main/java/org/springframework/ldap/core/CollectingNameClassPairCallbackHandler.java +++ b/core/src/main/java/org/springframework/ldap/core/CollectingNameClassPairCallbackHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2025 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/core/ContextAssembler.java b/core/src/main/java/org/springframework/ldap/core/ContextAssembler.java index f9edf32056..2c4e5fc2a7 100644 --- a/core/src/main/java/org/springframework/ldap/core/ContextAssembler.java +++ b/core/src/main/java/org/springframework/ldap/core/ContextAssembler.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/core/ContextExecutor.java b/core/src/main/java/org/springframework/ldap/core/ContextExecutor.java index 50eff38f82..de8a3fad94 100644 --- a/core/src/main/java/org/springframework/ldap/core/ContextExecutor.java +++ b/core/src/main/java/org/springframework/ldap/core/ContextExecutor.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/core/ContextMapper.java b/core/src/main/java/org/springframework/ldap/core/ContextMapper.java index 2f8bfe9d67..aa25188ea2 100644 --- a/core/src/main/java/org/springframework/ldap/core/ContextMapper.java +++ b/core/src/main/java/org/springframework/ldap/core/ContextMapper.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/core/ContextMapperCallbackHandler.java b/core/src/main/java/org/springframework/ldap/core/ContextMapperCallbackHandler.java index dfee6f9cf0..4e0f6e885a 100644 --- a/core/src/main/java/org/springframework/ldap/core/ContextMapperCallbackHandler.java +++ b/core/src/main/java/org/springframework/ldap/core/ContextMapperCallbackHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/core/ContextSource.java b/core/src/main/java/org/springframework/ldap/core/ContextSource.java index 9c5e954a90..e7d84f01c3 100644 --- a/core/src/main/java/org/springframework/ldap/core/ContextSource.java +++ b/core/src/main/java/org/springframework/ldap/core/ContextSource.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/core/DefaultDnParserFactory.java b/core/src/main/java/org/springframework/ldap/core/DefaultDnParserFactory.java index ccfe1acdee..adc14038ab 100644 --- a/core/src/main/java/org/springframework/ldap/core/DefaultDnParserFactory.java +++ b/core/src/main/java/org/springframework/ldap/core/DefaultDnParserFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/core/DefaultLdapClient.java b/core/src/main/java/org/springframework/ldap/core/DefaultLdapClient.java index ee5fea492a..19f54d8e43 100644 --- a/core/src/main/java/org/springframework/ldap/core/DefaultLdapClient.java +++ b/core/src/main/java/org/springframework/ldap/core/DefaultLdapClient.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2025 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/core/DefaultLdapClientBuilder.java b/core/src/main/java/org/springframework/ldap/core/DefaultLdapClientBuilder.java index 6146cd4889..6ee9788d68 100644 --- a/core/src/main/java/org/springframework/ldap/core/DefaultLdapClientBuilder.java +++ b/core/src/main/java/org/springframework/ldap/core/DefaultLdapClientBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2023 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/core/DefaultNameClassPairMapper.java b/core/src/main/java/org/springframework/ldap/core/DefaultNameClassPairMapper.java index fb25f6fd8a..2a82f67647 100644 --- a/core/src/main/java/org/springframework/ldap/core/DefaultNameClassPairMapper.java +++ b/core/src/main/java/org/springframework/ldap/core/DefaultNameClassPairMapper.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/core/DirContextAdapter.java b/core/src/main/java/org/springframework/ldap/core/DirContextAdapter.java index 1749f6d9d5..2c3c347f77 100644 --- a/core/src/main/java/org/springframework/ldap/core/DirContextAdapter.java +++ b/core/src/main/java/org/springframework/ldap/core/DirContextAdapter.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2025 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/core/DirContextOperations.java b/core/src/main/java/org/springframework/ldap/core/DirContextOperations.java index e10293b0df..e3d0a54b5c 100644 --- a/core/src/main/java/org/springframework/ldap/core/DirContextOperations.java +++ b/core/src/main/java/org/springframework/ldap/core/DirContextOperations.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/core/DirContextProcessor.java b/core/src/main/java/org/springframework/ldap/core/DirContextProcessor.java index f81371085a..f35a2efa0e 100644 --- a/core/src/main/java/org/springframework/ldap/core/DirContextProcessor.java +++ b/core/src/main/java/org/springframework/ldap/core/DirContextProcessor.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/core/DirContextProxy.java b/core/src/main/java/org/springframework/ldap/core/DirContextProxy.java index a6490cd6e2..bed5734074 100644 --- a/core/src/main/java/org/springframework/ldap/core/DirContextProxy.java +++ b/core/src/main/java/org/springframework/ldap/core/DirContextProxy.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/core/DistinguishedName.java b/core/src/main/java/org/springframework/ldap/core/DistinguishedName.java index 0d46887eaf..a76d5002b3 100644 --- a/core/src/main/java/org/springframework/ldap/core/DistinguishedName.java +++ b/core/src/main/java/org/springframework/ldap/core/DistinguishedName.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/core/DistinguishedNameEditor.java b/core/src/main/java/org/springframework/ldap/core/DistinguishedNameEditor.java index 45b2bfca5d..bb2da1b1f0 100644 --- a/core/src/main/java/org/springframework/ldap/core/DistinguishedNameEditor.java +++ b/core/src/main/java/org/springframework/ldap/core/DistinguishedNameEditor.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/core/DnParser.java b/core/src/main/java/org/springframework/ldap/core/DnParser.java index 235cd48f90..2a7e3b7253 100644 --- a/core/src/main/java/org/springframework/ldap/core/DnParser.java +++ b/core/src/main/java/org/springframework/ldap/core/DnParser.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/core/IncrementalAttributesMapper.java b/core/src/main/java/org/springframework/ldap/core/IncrementalAttributesMapper.java index 1ef7b7d4e3..c0279fd666 100644 --- a/core/src/main/java/org/springframework/ldap/core/IncrementalAttributesMapper.java +++ b/core/src/main/java/org/springframework/ldap/core/IncrementalAttributesMapper.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/core/IterableNamingEnumeration.java b/core/src/main/java/org/springframework/ldap/core/IterableNamingEnumeration.java index 4082e7bb06..973f907a36 100644 --- a/core/src/main/java/org/springframework/ldap/core/IterableNamingEnumeration.java +++ b/core/src/main/java/org/springframework/ldap/core/IterableNamingEnumeration.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2023 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/core/LdapAttribute.java b/core/src/main/java/org/springframework/ldap/core/LdapAttribute.java index de8cf7b560..4eda3ae510 100644 --- a/core/src/main/java/org/springframework/ldap/core/LdapAttribute.java +++ b/core/src/main/java/org/springframework/ldap/core/LdapAttribute.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2025 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/core/LdapAttributes.java b/core/src/main/java/org/springframework/ldap/core/LdapAttributes.java index ff3a416551..e792984b38 100644 --- a/core/src/main/java/org/springframework/ldap/core/LdapAttributes.java +++ b/core/src/main/java/org/springframework/ldap/core/LdapAttributes.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/core/LdapClient.java b/core/src/main/java/org/springframework/ldap/core/LdapClient.java index 3092dceacd..3095ca5168 100644 --- a/core/src/main/java/org/springframework/ldap/core/LdapClient.java +++ b/core/src/main/java/org/springframework/ldap/core/LdapClient.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2025 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/core/LdapEntryIdentification.java b/core/src/main/java/org/springframework/ldap/core/LdapEntryIdentification.java index 74af11f047..3e8ef1fbf4 100644 --- a/core/src/main/java/org/springframework/ldap/core/LdapEntryIdentification.java +++ b/core/src/main/java/org/springframework/ldap/core/LdapEntryIdentification.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/core/LdapEntryIdentificationContextMapper.java b/core/src/main/java/org/springframework/ldap/core/LdapEntryIdentificationContextMapper.java index f27ee25f02..7266208110 100644 --- a/core/src/main/java/org/springframework/ldap/core/LdapEntryIdentificationContextMapper.java +++ b/core/src/main/java/org/springframework/ldap/core/LdapEntryIdentificationContextMapper.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/core/LdapOperations.java b/core/src/main/java/org/springframework/ldap/core/LdapOperations.java index b03fb7475c..64711b39c8 100644 --- a/core/src/main/java/org/springframework/ldap/core/LdapOperations.java +++ b/core/src/main/java/org/springframework/ldap/core/LdapOperations.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2022 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/core/LdapRdn.java b/core/src/main/java/org/springframework/ldap/core/LdapRdn.java index 8375e0d7d5..a576cb825c 100644 --- a/core/src/main/java/org/springframework/ldap/core/LdapRdn.java +++ b/core/src/main/java/org/springframework/ldap/core/LdapRdn.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2025 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/core/LdapRdnComponent.java b/core/src/main/java/org/springframework/ldap/core/LdapRdnComponent.java index 071e4b98e3..7406460309 100644 --- a/core/src/main/java/org/springframework/ldap/core/LdapRdnComponent.java +++ b/core/src/main/java/org/springframework/ldap/core/LdapRdnComponent.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/core/LdapTemplate.java b/core/src/main/java/org/springframework/ldap/core/LdapTemplate.java index 5328ec0f53..315089ed92 100644 --- a/core/src/main/java/org/springframework/ldap/core/LdapTemplate.java +++ b/core/src/main/java/org/springframework/ldap/core/LdapTemplate.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2025 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/core/NameAwareAttribute.java b/core/src/main/java/org/springframework/ldap/core/NameAwareAttribute.java index c46ce89cfe..80791539c4 100644 --- a/core/src/main/java/org/springframework/ldap/core/NameAwareAttribute.java +++ b/core/src/main/java/org/springframework/ldap/core/NameAwareAttribute.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2025 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/core/NameAwareAttributes.java b/core/src/main/java/org/springframework/ldap/core/NameAwareAttributes.java index bad22553fe..4484c99602 100644 --- a/core/src/main/java/org/springframework/ldap/core/NameAwareAttributes.java +++ b/core/src/main/java/org/springframework/ldap/core/NameAwareAttributes.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2025 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,7 +25,8 @@ import javax.naming.directory.Attribute; import javax.naming.directory.Attributes; -import org.springframework.lang.NonNull; +import org.jspecify.annotations.NonNull; + import org.springframework.util.Assert; /** diff --git a/core/src/main/java/org/springframework/ldap/core/NameClassPairCallbackHandler.java b/core/src/main/java/org/springframework/ldap/core/NameClassPairCallbackHandler.java index 43bcb2526c..f66a8cea51 100644 --- a/core/src/main/java/org/springframework/ldap/core/NameClassPairCallbackHandler.java +++ b/core/src/main/java/org/springframework/ldap/core/NameClassPairCallbackHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/core/NameClassPairMapper.java b/core/src/main/java/org/springframework/ldap/core/NameClassPairMapper.java index 77a199289b..09e518121f 100644 --- a/core/src/main/java/org/springframework/ldap/core/NameClassPairMapper.java +++ b/core/src/main/java/org/springframework/ldap/core/NameClassPairMapper.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/core/ObjectRetrievalException.java b/core/src/main/java/org/springframework/ldap/core/ObjectRetrievalException.java index 63cfc45ba6..e430f12173 100644 --- a/core/src/main/java/org/springframework/ldap/core/ObjectRetrievalException.java +++ b/core/src/main/java/org/springframework/ldap/core/ObjectRetrievalException.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/core/SearchExecutor.java b/core/src/main/java/org/springframework/ldap/core/SearchExecutor.java index 64a2824e4d..3d23f2e5a9 100644 --- a/core/src/main/java/org/springframework/ldap/core/SearchExecutor.java +++ b/core/src/main/java/org/springframework/ldap/core/SearchExecutor.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/core/support/AbstractContextMapper.java b/core/src/main/java/org/springframework/ldap/core/support/AbstractContextMapper.java index 6d828f3b0e..baf98d0ade 100644 --- a/core/src/main/java/org/springframework/ldap/core/support/AbstractContextMapper.java +++ b/core/src/main/java/org/springframework/ldap/core/support/AbstractContextMapper.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/core/support/AbstractContextSource.java b/core/src/main/java/org/springframework/ldap/core/support/AbstractContextSource.java index 4524f51684..a61e4c9578 100644 --- a/core/src/main/java/org/springframework/ldap/core/support/AbstractContextSource.java +++ b/core/src/main/java/org/springframework/ldap/core/support/AbstractContextSource.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2025 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/core/support/AbstractTlsDirContextAuthenticationStrategy.java b/core/src/main/java/org/springframework/ldap/core/support/AbstractTlsDirContextAuthenticationStrategy.java index 375214cbbe..5f67607ebc 100755 --- a/core/src/main/java/org/springframework/ldap/core/support/AbstractTlsDirContextAuthenticationStrategy.java +++ b/core/src/main/java/org/springframework/ldap/core/support/AbstractTlsDirContextAuthenticationStrategy.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2024 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/core/support/AggregateDirContextProcessor.java b/core/src/main/java/org/springframework/ldap/core/support/AggregateDirContextProcessor.java index bbb2f184d3..44e8d90264 100644 --- a/core/src/main/java/org/springframework/ldap/core/support/AggregateDirContextProcessor.java +++ b/core/src/main/java/org/springframework/ldap/core/support/AggregateDirContextProcessor.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2025 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/core/support/BaseLdapNameAware.java b/core/src/main/java/org/springframework/ldap/core/support/BaseLdapNameAware.java index 275d7ea85b..895f4e7da4 100644 --- a/core/src/main/java/org/springframework/ldap/core/support/BaseLdapNameAware.java +++ b/core/src/main/java/org/springframework/ldap/core/support/BaseLdapNameAware.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/core/support/BaseLdapPathAware.java b/core/src/main/java/org/springframework/ldap/core/support/BaseLdapPathAware.java index 5892c62da6..a7df9c7451 100644 --- a/core/src/main/java/org/springframework/ldap/core/support/BaseLdapPathAware.java +++ b/core/src/main/java/org/springframework/ldap/core/support/BaseLdapPathAware.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/core/support/BaseLdapPathBeanPostProcessor.java b/core/src/main/java/org/springframework/ldap/core/support/BaseLdapPathBeanPostProcessor.java index e99e034e04..243d83bc28 100644 --- a/core/src/main/java/org/springframework/ldap/core/support/BaseLdapPathBeanPostProcessor.java +++ b/core/src/main/java/org/springframework/ldap/core/support/BaseLdapPathBeanPostProcessor.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/core/support/BaseLdapPathContextSource.java b/core/src/main/java/org/springframework/ldap/core/support/BaseLdapPathContextSource.java index 035254dec8..cc71cf8673 100644 --- a/core/src/main/java/org/springframework/ldap/core/support/BaseLdapPathContextSource.java +++ b/core/src/main/java/org/springframework/ldap/core/support/BaseLdapPathContextSource.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/core/support/BaseLdapPathSource.java b/core/src/main/java/org/springframework/ldap/core/support/BaseLdapPathSource.java index 9742eedd7a..68e63aeb15 100644 --- a/core/src/main/java/org/springframework/ldap/core/support/BaseLdapPathSource.java +++ b/core/src/main/java/org/springframework/ldap/core/support/BaseLdapPathSource.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/core/support/ContextMapperCallbackHandlerWithControls.java b/core/src/main/java/org/springframework/ldap/core/support/ContextMapperCallbackHandlerWithControls.java index c883c9910e..71a9e6b58c 100644 --- a/core/src/main/java/org/springframework/ldap/core/support/ContextMapperCallbackHandlerWithControls.java +++ b/core/src/main/java/org/springframework/ldap/core/support/ContextMapperCallbackHandlerWithControls.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/core/support/ContextMapperWithControls.java b/core/src/main/java/org/springframework/ldap/core/support/ContextMapperWithControls.java index 84b474fe0c..e682baebda 100644 --- a/core/src/main/java/org/springframework/ldap/core/support/ContextMapperWithControls.java +++ b/core/src/main/java/org/springframework/ldap/core/support/ContextMapperWithControls.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/core/support/ContextSourceObservationPostProcessor.java b/core/src/main/java/org/springframework/ldap/core/support/ContextSourceObservationPostProcessor.java index 2dfdf52563..64275159d6 100644 --- a/core/src/main/java/org/springframework/ldap/core/support/ContextSourceObservationPostProcessor.java +++ b/core/src/main/java/org/springframework/ldap/core/support/ContextSourceObservationPostProcessor.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2025 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/core/support/CountNameClassPairCallbackHandler.java b/core/src/main/java/org/springframework/ldap/core/support/CountNameClassPairCallbackHandler.java index edf3be9361..591a419596 100644 --- a/core/src/main/java/org/springframework/ldap/core/support/CountNameClassPairCallbackHandler.java +++ b/core/src/main/java/org/springframework/ldap/core/support/CountNameClassPairCallbackHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/core/support/DefaultDirObjectFactory.java b/core/src/main/java/org/springframework/ldap/core/support/DefaultDirObjectFactory.java index 8bf24cc5d0..b7be4b43a1 100644 --- a/core/src/main/java/org/springframework/ldap/core/support/DefaultDirObjectFactory.java +++ b/core/src/main/java/org/springframework/ldap/core/support/DefaultDirObjectFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/core/support/DefaultIncrementalAttributesMapper.java b/core/src/main/java/org/springframework/ldap/core/support/DefaultIncrementalAttributesMapper.java index 5588dd1f5d..1c3d2696c5 100644 --- a/core/src/main/java/org/springframework/ldap/core/support/DefaultIncrementalAttributesMapper.java +++ b/core/src/main/java/org/springframework/ldap/core/support/DefaultIncrementalAttributesMapper.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2025 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/core/support/DefaultTlsDirContextAuthenticationStrategy.java b/core/src/main/java/org/springframework/ldap/core/support/DefaultTlsDirContextAuthenticationStrategy.java index 643af87970..76a92f9c6e 100755 --- a/core/src/main/java/org/springframework/ldap/core/support/DefaultTlsDirContextAuthenticationStrategy.java +++ b/core/src/main/java/org/springframework/ldap/core/support/DefaultTlsDirContextAuthenticationStrategy.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/core/support/DelegatingBaseLdapPathContextSourceSupport.java b/core/src/main/java/org/springframework/ldap/core/support/DelegatingBaseLdapPathContextSourceSupport.java index 2c58e4faa9..f0589fa00c 100644 --- a/core/src/main/java/org/springframework/ldap/core/support/DelegatingBaseLdapPathContextSourceSupport.java +++ b/core/src/main/java/org/springframework/ldap/core/support/DelegatingBaseLdapPathContextSourceSupport.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/core/support/DigestMd5DirContextAuthenticationStrategy.java b/core/src/main/java/org/springframework/ldap/core/support/DigestMd5DirContextAuthenticationStrategy.java index ea2b01daa1..f96715412a 100644 --- a/core/src/main/java/org/springframework/ldap/core/support/DigestMd5DirContextAuthenticationStrategy.java +++ b/core/src/main/java/org/springframework/ldap/core/support/DigestMd5DirContextAuthenticationStrategy.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/core/support/DirContextAuthenticationStrategy.java b/core/src/main/java/org/springframework/ldap/core/support/DirContextAuthenticationStrategy.java index 07d16179d9..556b725fef 100755 --- a/core/src/main/java/org/springframework/ldap/core/support/DirContextAuthenticationStrategy.java +++ b/core/src/main/java/org/springframework/ldap/core/support/DirContextAuthenticationStrategy.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/core/support/DirContextSource.java b/core/src/main/java/org/springframework/ldap/core/support/DirContextSource.java index 7cefe68ebf..43d3aa9cee 100644 --- a/core/src/main/java/org/springframework/ldap/core/support/DirContextSource.java +++ b/core/src/main/java/org/springframework/ldap/core/support/DirContextSource.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/core/support/ExternalTlsDirContextAuthenticationStrategy.java b/core/src/main/java/org/springframework/ldap/core/support/ExternalTlsDirContextAuthenticationStrategy.java index 63ea449d36..ddc9c3c557 100755 --- a/core/src/main/java/org/springframework/ldap/core/support/ExternalTlsDirContextAuthenticationStrategy.java +++ b/core/src/main/java/org/springframework/ldap/core/support/ExternalTlsDirContextAuthenticationStrategy.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/core/support/LdapContextSource.java b/core/src/main/java/org/springframework/ldap/core/support/LdapContextSource.java index 0d013c0129..a29fc4faf8 100644 --- a/core/src/main/java/org/springframework/ldap/core/support/LdapContextSource.java +++ b/core/src/main/java/org/springframework/ldap/core/support/LdapContextSource.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/core/support/LdapOperationsCallback.java b/core/src/main/java/org/springframework/ldap/core/support/LdapOperationsCallback.java index 50721939b4..ac709c5eef 100644 --- a/core/src/main/java/org/springframework/ldap/core/support/LdapOperationsCallback.java +++ b/core/src/main/java/org/springframework/ldap/core/support/LdapOperationsCallback.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/core/support/LookupAttemptingCallback.java b/core/src/main/java/org/springframework/ldap/core/support/LookupAttemptingCallback.java index e6094eaac9..21d0c062d6 100644 --- a/core/src/main/java/org/springframework/ldap/core/support/LookupAttemptingCallback.java +++ b/core/src/main/java/org/springframework/ldap/core/support/LookupAttemptingCallback.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/core/support/ObservationContextSource.java b/core/src/main/java/org/springframework/ldap/core/support/ObservationContextSource.java index 46b76814da..dd20d7546b 100644 --- a/core/src/main/java/org/springframework/ldap/core/support/ObservationContextSource.java +++ b/core/src/main/java/org/springframework/ldap/core/support/ObservationContextSource.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2025 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -45,8 +45,8 @@ import io.micrometer.observation.Observation; import io.micrometer.observation.ObservationConvention; import io.micrometer.observation.ObservationRegistry; +import org.jspecify.annotations.NonNull; -import org.springframework.lang.NonNull; import org.springframework.ldap.NamingException; import org.springframework.ldap.core.ContextSource; import org.springframework.ldap.core.DirContextOperations; @@ -190,7 +190,7 @@ public KeyValues getLowCardinalityKeyValues(DirContextOperationObservationContex } @Override - public boolean supportsContext(@NonNull Observation.Context context) { + public boolean supportsContext(Observation.Context context) { return context instanceof DirContextOperationObservationContext; } diff --git a/core/src/main/java/org/springframework/ldap/core/support/RangeOption.java b/core/src/main/java/org/springframework/ldap/core/support/RangeOption.java index ba09970049..794b7becc2 100644 --- a/core/src/main/java/org/springframework/ldap/core/support/RangeOption.java +++ b/core/src/main/java/org/springframework/ldap/core/support/RangeOption.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/core/support/SimpleDirContextAuthenticationStrategy.java b/core/src/main/java/org/springframework/ldap/core/support/SimpleDirContextAuthenticationStrategy.java index 2fc1a71c83..3e47105a3a 100755 --- a/core/src/main/java/org/springframework/ldap/core/support/SimpleDirContextAuthenticationStrategy.java +++ b/core/src/main/java/org/springframework/ldap/core/support/SimpleDirContextAuthenticationStrategy.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/core/support/SingleContextSource.java b/core/src/main/java/org/springframework/ldap/core/support/SingleContextSource.java index 29e7ea9056..634867bf5a 100644 --- a/core/src/main/java/org/springframework/ldap/core/support/SingleContextSource.java +++ b/core/src/main/java/org/springframework/ldap/core/support/SingleContextSource.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/filter/AbsoluteFalseFilter.java b/core/src/main/java/org/springframework/ldap/filter/AbsoluteFalseFilter.java index 3243c5aa61..0ec18a8202 100644 --- a/core/src/main/java/org/springframework/ldap/filter/AbsoluteFalseFilter.java +++ b/core/src/main/java/org/springframework/ldap/filter/AbsoluteFalseFilter.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/filter/AbsoluteTrueFilter.java b/core/src/main/java/org/springframework/ldap/filter/AbsoluteTrueFilter.java index a293887726..e68549ccff 100644 --- a/core/src/main/java/org/springframework/ldap/filter/AbsoluteTrueFilter.java +++ b/core/src/main/java/org/springframework/ldap/filter/AbsoluteTrueFilter.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/filter/AbstractFilter.java b/core/src/main/java/org/springframework/ldap/filter/AbstractFilter.java index ef006fbf1a..543f39ecf6 100644 --- a/core/src/main/java/org/springframework/ldap/filter/AbstractFilter.java +++ b/core/src/main/java/org/springframework/ldap/filter/AbstractFilter.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/filter/AndFilter.java b/core/src/main/java/org/springframework/ldap/filter/AndFilter.java index 0cdaf9ad53..65587417d2 100644 --- a/core/src/main/java/org/springframework/ldap/filter/AndFilter.java +++ b/core/src/main/java/org/springframework/ldap/filter/AndFilter.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/filter/BinaryLogicalFilter.java b/core/src/main/java/org/springframework/ldap/filter/BinaryLogicalFilter.java index 63776cfd41..85e578ff41 100644 --- a/core/src/main/java/org/springframework/ldap/filter/BinaryLogicalFilter.java +++ b/core/src/main/java/org/springframework/ldap/filter/BinaryLogicalFilter.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2025 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/filter/CompareFilter.java b/core/src/main/java/org/springframework/ldap/filter/CompareFilter.java index 684cb8334a..f22bdfa966 100644 --- a/core/src/main/java/org/springframework/ldap/filter/CompareFilter.java +++ b/core/src/main/java/org/springframework/ldap/filter/CompareFilter.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2025 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/filter/EqualsFilter.java b/core/src/main/java/org/springframework/ldap/filter/EqualsFilter.java index 6904bb7151..589a456116 100644 --- a/core/src/main/java/org/springframework/ldap/filter/EqualsFilter.java +++ b/core/src/main/java/org/springframework/ldap/filter/EqualsFilter.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2025 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/filter/Filter.java b/core/src/main/java/org/springframework/ldap/filter/Filter.java index 3c70bf527a..4260ca6ace 100644 --- a/core/src/main/java/org/springframework/ldap/filter/Filter.java +++ b/core/src/main/java/org/springframework/ldap/filter/Filter.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/filter/FilterEditor.java b/core/src/main/java/org/springframework/ldap/filter/FilterEditor.java index f4919060cb..d2ef9e332e 100644 --- a/core/src/main/java/org/springframework/ldap/filter/FilterEditor.java +++ b/core/src/main/java/org/springframework/ldap/filter/FilterEditor.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/filter/GreaterThanOrEqualsFilter.java b/core/src/main/java/org/springframework/ldap/filter/GreaterThanOrEqualsFilter.java index e8b66a6deb..3e9c18082b 100644 --- a/core/src/main/java/org/springframework/ldap/filter/GreaterThanOrEqualsFilter.java +++ b/core/src/main/java/org/springframework/ldap/filter/GreaterThanOrEqualsFilter.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2025 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/filter/HardcodedFilter.java b/core/src/main/java/org/springframework/ldap/filter/HardcodedFilter.java index d7c0f0205d..52dfa5611c 100644 --- a/core/src/main/java/org/springframework/ldap/filter/HardcodedFilter.java +++ b/core/src/main/java/org/springframework/ldap/filter/HardcodedFilter.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/filter/LessThanOrEqualsFilter.java b/core/src/main/java/org/springframework/ldap/filter/LessThanOrEqualsFilter.java index b203ac5d63..c60b2d2b2b 100644 --- a/core/src/main/java/org/springframework/ldap/filter/LessThanOrEqualsFilter.java +++ b/core/src/main/java/org/springframework/ldap/filter/LessThanOrEqualsFilter.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2025 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/filter/LikeFilter.java b/core/src/main/java/org/springframework/ldap/filter/LikeFilter.java index a0692a459e..01be8c859d 100644 --- a/core/src/main/java/org/springframework/ldap/filter/LikeFilter.java +++ b/core/src/main/java/org/springframework/ldap/filter/LikeFilter.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2025 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/filter/NotFilter.java b/core/src/main/java/org/springframework/ldap/filter/NotFilter.java index 2e48c12fb4..7b4f089e78 100644 --- a/core/src/main/java/org/springframework/ldap/filter/NotFilter.java +++ b/core/src/main/java/org/springframework/ldap/filter/NotFilter.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/filter/NotPresentFilter.java b/core/src/main/java/org/springframework/ldap/filter/NotPresentFilter.java index 63f1294741..c8dfca962e 100644 --- a/core/src/main/java/org/springframework/ldap/filter/NotPresentFilter.java +++ b/core/src/main/java/org/springframework/ldap/filter/NotPresentFilter.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/filter/OrFilter.java b/core/src/main/java/org/springframework/ldap/filter/OrFilter.java index 5a68c229af..f0160fa675 100644 --- a/core/src/main/java/org/springframework/ldap/filter/OrFilter.java +++ b/core/src/main/java/org/springframework/ldap/filter/OrFilter.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/filter/PresentFilter.java b/core/src/main/java/org/springframework/ldap/filter/PresentFilter.java index b3ca179a11..88230894b9 100644 --- a/core/src/main/java/org/springframework/ldap/filter/PresentFilter.java +++ b/core/src/main/java/org/springframework/ldap/filter/PresentFilter.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/filter/ProximityFilter.java b/core/src/main/java/org/springframework/ldap/filter/ProximityFilter.java index dc34924d50..7ee56a56bf 100644 --- a/core/src/main/java/org/springframework/ldap/filter/ProximityFilter.java +++ b/core/src/main/java/org/springframework/ldap/filter/ProximityFilter.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2025 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/filter/WhitespaceWildcardsFilter.java b/core/src/main/java/org/springframework/ldap/filter/WhitespaceWildcardsFilter.java index 31e836aa8b..d2f62ad4cf 100644 --- a/core/src/main/java/org/springframework/ldap/filter/WhitespaceWildcardsFilter.java +++ b/core/src/main/java/org/springframework/ldap/filter/WhitespaceWildcardsFilter.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/odm/annotations/Attribute.java b/core/src/main/java/org/springframework/ldap/odm/annotations/Attribute.java index af73ef3c87..303eb56f68 100755 --- a/core/src/main/java/org/springframework/ldap/odm/annotations/Attribute.java +++ b/core/src/main/java/org/springframework/ldap/odm/annotations/Attribute.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2023 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/odm/annotations/DnAttribute.java b/core/src/main/java/org/springframework/ldap/odm/annotations/DnAttribute.java index ae9612e1b1..11c1cead67 100644 --- a/core/src/main/java/org/springframework/ldap/odm/annotations/DnAttribute.java +++ b/core/src/main/java/org/springframework/ldap/odm/annotations/DnAttribute.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2023 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/odm/annotations/Entry.java b/core/src/main/java/org/springframework/ldap/odm/annotations/Entry.java index 8c51ad824e..50272d04ba 100755 --- a/core/src/main/java/org/springframework/ldap/odm/annotations/Entry.java +++ b/core/src/main/java/org/springframework/ldap/odm/annotations/Entry.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2023 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/odm/annotations/Id.java b/core/src/main/java/org/springframework/ldap/odm/annotations/Id.java index 0fcdfff08e..a4360128d3 100755 --- a/core/src/main/java/org/springframework/ldap/odm/annotations/Id.java +++ b/core/src/main/java/org/springframework/ldap/odm/annotations/Id.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2023 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/odm/annotations/Transient.java b/core/src/main/java/org/springframework/ldap/odm/annotations/Transient.java index 43aba6b972..dc8ab366be 100755 --- a/core/src/main/java/org/springframework/ldap/odm/annotations/Transient.java +++ b/core/src/main/java/org/springframework/ldap/odm/annotations/Transient.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2023 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/odm/annotations/package-info.java b/core/src/main/java/org/springframework/ldap/odm/annotations/package-info.java index ce9d11dd65..833783b991 100755 --- a/core/src/main/java/org/springframework/ldap/odm/annotations/package-info.java +++ b/core/src/main/java/org/springframework/ldap/odm/annotations/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2023 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/odm/config/ObjectDirectoryMapperConfiguration.java b/core/src/main/java/org/springframework/ldap/odm/config/ObjectDirectoryMapperConfiguration.java index 6a4c5c7bb4..9153e4e8e4 100644 --- a/core/src/main/java/org/springframework/ldap/odm/config/ObjectDirectoryMapperConfiguration.java +++ b/core/src/main/java/org/springframework/ldap/odm/config/ObjectDirectoryMapperConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2025 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/odm/core/ObjectDirectoryMapper.java b/core/src/main/java/org/springframework/ldap/odm/core/ObjectDirectoryMapper.java index cea272e667..5af27cd10b 100644 --- a/core/src/main/java/org/springframework/ldap/odm/core/ObjectDirectoryMapper.java +++ b/core/src/main/java/org/springframework/ldap/odm/core/ObjectDirectoryMapper.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/odm/core/OdmException.java b/core/src/main/java/org/springframework/ldap/odm/core/OdmException.java index 3560397610..86874ede04 100755 --- a/core/src/main/java/org/springframework/ldap/odm/core/OdmException.java +++ b/core/src/main/java/org/springframework/ldap/odm/core/OdmException.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/odm/core/impl/AttributeMetaData.java b/core/src/main/java/org/springframework/ldap/odm/core/impl/AttributeMetaData.java index 29e5d340bc..aa7ad6d7f1 100755 --- a/core/src/main/java/org/springframework/ldap/odm/core/impl/AttributeMetaData.java +++ b/core/src/main/java/org/springframework/ldap/odm/core/impl/AttributeMetaData.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2025 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/odm/core/impl/CaseIgnoreString.java b/core/src/main/java/org/springframework/ldap/odm/core/impl/CaseIgnoreString.java index 2f92fcebe6..9112c9745a 100755 --- a/core/src/main/java/org/springframework/ldap/odm/core/impl/CaseIgnoreString.java +++ b/core/src/main/java/org/springframework/ldap/odm/core/impl/CaseIgnoreString.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/odm/core/impl/DefaultObjectDirectoryMapper.java b/core/src/main/java/org/springframework/ldap/odm/core/impl/DefaultObjectDirectoryMapper.java index cd69fabc17..ca096e7c5d 100644 --- a/core/src/main/java/org/springframework/ldap/odm/core/impl/DefaultObjectDirectoryMapper.java +++ b/core/src/main/java/org/springframework/ldap/odm/core/impl/DefaultObjectDirectoryMapper.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2025 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -39,7 +39,7 @@ import org.springframework.LdapDataEntry; import org.springframework.core.convert.ConversionService; -import org.springframework.core.convert.support.GenericConversionService; +import org.springframework.core.convert.support.DefaultConversionService; import org.springframework.ldap.convert.ConverterUtils; import org.springframework.ldap.filter.AndFilter; import org.springframework.ldap.filter.EqualsFilter; @@ -78,7 +78,7 @@ public DefaultObjectDirectoryMapper() { } private static ConverterManager createDefaultConverterManager() { - GenericConversionService conversionService = new GenericConversionService(); + DefaultConversionService conversionService = new DefaultConversionService(); ConverterUtils.addDefaultConverters(conversionService); return new ConversionServiceConverterManager(conversionService); } diff --git a/core/src/main/java/org/springframework/ldap/odm/core/impl/InvalidEntryException.java b/core/src/main/java/org/springframework/ldap/odm/core/impl/InvalidEntryException.java index 901add113e..f60d409287 100755 --- a/core/src/main/java/org/springframework/ldap/odm/core/impl/InvalidEntryException.java +++ b/core/src/main/java/org/springframework/ldap/odm/core/impl/InvalidEntryException.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/odm/core/impl/MetaDataException.java b/core/src/main/java/org/springframework/ldap/odm/core/impl/MetaDataException.java index 7322b42ee8..6c3a53c22a 100755 --- a/core/src/main/java/org/springframework/ldap/odm/core/impl/MetaDataException.java +++ b/core/src/main/java/org/springframework/ldap/odm/core/impl/MetaDataException.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/odm/core/impl/ObjectMetaData.java b/core/src/main/java/org/springframework/ldap/odm/core/impl/ObjectMetaData.java index 4c2e71cc39..9ddeab1858 100755 --- a/core/src/main/java/org/springframework/ldap/odm/core/impl/ObjectMetaData.java +++ b/core/src/main/java/org/springframework/ldap/odm/core/impl/ObjectMetaData.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2025 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/odm/core/impl/UnmanagedClassException.java b/core/src/main/java/org/springframework/ldap/odm/core/impl/UnmanagedClassException.java index 9c22595f70..2bad5bdb0e 100755 --- a/core/src/main/java/org/springframework/ldap/odm/core/impl/UnmanagedClassException.java +++ b/core/src/main/java/org/springframework/ldap/odm/core/impl/UnmanagedClassException.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/odm/core/impl/package-info.java b/core/src/main/java/org/springframework/ldap/odm/core/impl/package-info.java index c1762c5208..259dd51bd6 100755 --- a/core/src/main/java/org/springframework/ldap/odm/core/impl/package-info.java +++ b/core/src/main/java/org/springframework/ldap/odm/core/impl/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2023 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/odm/core/package-info.java b/core/src/main/java/org/springframework/ldap/odm/core/package-info.java index 403034b2ed..06db21f07a 100755 --- a/core/src/main/java/org/springframework/ldap/odm/core/package-info.java +++ b/core/src/main/java/org/springframework/ldap/odm/core/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2023 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/odm/typeconversion/ConverterException.java b/core/src/main/java/org/springframework/ldap/odm/typeconversion/ConverterException.java index 8621dbd0dc..6db56bde0a 100755 --- a/core/src/main/java/org/springframework/ldap/odm/typeconversion/ConverterException.java +++ b/core/src/main/java/org/springframework/ldap/odm/typeconversion/ConverterException.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2025 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/odm/typeconversion/ConverterManager.java b/core/src/main/java/org/springframework/ldap/odm/typeconversion/ConverterManager.java index 3c221166aa..9d72e9ac41 100755 --- a/core/src/main/java/org/springframework/ldap/odm/typeconversion/ConverterManager.java +++ b/core/src/main/java/org/springframework/ldap/odm/typeconversion/ConverterManager.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2025 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/odm/typeconversion/impl/ConversionServiceConverterManager.java b/core/src/main/java/org/springframework/ldap/odm/typeconversion/impl/ConversionServiceConverterManager.java index ee0609b4a3..1c5dc1ec9f 100644 --- a/core/src/main/java/org/springframework/ldap/odm/typeconversion/impl/ConversionServiceConverterManager.java +++ b/core/src/main/java/org/springframework/ldap/odm/typeconversion/impl/ConversionServiceConverterManager.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2025 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/odm/typeconversion/impl/Converter.java b/core/src/main/java/org/springframework/ldap/odm/typeconversion/impl/Converter.java index c998f90f19..4279b8b0e0 100755 --- a/core/src/main/java/org/springframework/ldap/odm/typeconversion/impl/Converter.java +++ b/core/src/main/java/org/springframework/ldap/odm/typeconversion/impl/Converter.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2025 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/odm/typeconversion/impl/ConverterManagerFactoryBean.java b/core/src/main/java/org/springframework/ldap/odm/typeconversion/impl/ConverterManagerFactoryBean.java index 140f81181f..bffc186f33 100755 --- a/core/src/main/java/org/springframework/ldap/odm/typeconversion/impl/ConverterManagerFactoryBean.java +++ b/core/src/main/java/org/springframework/ldap/odm/typeconversion/impl/ConverterManagerFactoryBean.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2025 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/odm/typeconversion/impl/ConverterManagerImpl.java b/core/src/main/java/org/springframework/ldap/odm/typeconversion/impl/ConverterManagerImpl.java old mode 100755 new mode 100644 index 3df19e20eb..a69764455d --- a/core/src/main/java/org/springframework/ldap/odm/typeconversion/impl/ConverterManagerImpl.java +++ b/core/src/main/java/org/springframework/ldap/odm/typeconversion/impl/ConverterManagerImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2025 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -127,7 +127,7 @@ public boolean canConvert(Class fromClass, String syntax, Class toClass) { public T convert(Object source, String syntax, Class toClass) { Object result = null; - // What are we converting form + // What are we converting from Class fromClass = source.getClass(); // Deal with primitives diff --git a/core/src/main/java/org/springframework/ldap/odm/typeconversion/impl/StringConverter.java b/core/src/main/java/org/springframework/ldap/odm/typeconversion/impl/StringConverter.java index 1391881a7a..5c0aa72c1d 100644 --- a/core/src/main/java/org/springframework/ldap/odm/typeconversion/impl/StringConverter.java +++ b/core/src/main/java/org/springframework/ldap/odm/typeconversion/impl/StringConverter.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2025 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/odm/typeconversion/impl/converters/FromStringConverter.java b/core/src/main/java/org/springframework/ldap/odm/typeconversion/impl/converters/FromStringConverter.java index 16a3ac8068..4ea1bdba71 100755 --- a/core/src/main/java/org/springframework/ldap/odm/typeconversion/impl/converters/FromStringConverter.java +++ b/core/src/main/java/org/springframework/ldap/odm/typeconversion/impl/converters/FromStringConverter.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2025 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/odm/typeconversion/impl/converters/ToStringConverter.java b/core/src/main/java/org/springframework/ldap/odm/typeconversion/impl/converters/ToStringConverter.java index 935553d370..f713c2d44d 100755 --- a/core/src/main/java/org/springframework/ldap/odm/typeconversion/impl/converters/ToStringConverter.java +++ b/core/src/main/java/org/springframework/ldap/odm/typeconversion/impl/converters/ToStringConverter.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2025 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/odm/typeconversion/impl/converters/package-info.java b/core/src/main/java/org/springframework/ldap/odm/typeconversion/impl/converters/package-info.java index b0f30d09d7..13adad0789 100755 --- a/core/src/main/java/org/springframework/ldap/odm/typeconversion/impl/converters/package-info.java +++ b/core/src/main/java/org/springframework/ldap/odm/typeconversion/impl/converters/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2023 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/odm/typeconversion/impl/package-info.java b/core/src/main/java/org/springframework/ldap/odm/typeconversion/impl/package-info.java index da5288899b..6a89c11ce0 100755 --- a/core/src/main/java/org/springframework/ldap/odm/typeconversion/impl/package-info.java +++ b/core/src/main/java/org/springframework/ldap/odm/typeconversion/impl/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2023 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/odm/typeconversion/package-info.java b/core/src/main/java/org/springframework/ldap/odm/typeconversion/package-info.java index 24f4521af3..2ff19d0d93 100755 --- a/core/src/main/java/org/springframework/ldap/odm/typeconversion/package-info.java +++ b/core/src/main/java/org/springframework/ldap/odm/typeconversion/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2023 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/pool/DelegatingContext.java b/core/src/main/java/org/springframework/ldap/pool/DelegatingContext.java index f497ccfffb..6bb7d91739 100644 --- a/core/src/main/java/org/springframework/ldap/pool/DelegatingContext.java +++ b/core/src/main/java/org/springframework/ldap/pool/DelegatingContext.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/pool/DelegatingDirContext.java b/core/src/main/java/org/springframework/ldap/pool/DelegatingDirContext.java index 824682c75d..a8651049ec 100644 --- a/core/src/main/java/org/springframework/ldap/pool/DelegatingDirContext.java +++ b/core/src/main/java/org/springframework/ldap/pool/DelegatingDirContext.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/pool/DelegatingLdapContext.java b/core/src/main/java/org/springframework/ldap/pool/DelegatingLdapContext.java index b145ecf2a5..b0ad1ae6f2 100644 --- a/core/src/main/java/org/springframework/ldap/pool/DelegatingLdapContext.java +++ b/core/src/main/java/org/springframework/ldap/pool/DelegatingLdapContext.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/pool/DirContextType.java b/core/src/main/java/org/springframework/ldap/pool/DirContextType.java index da665e65cc..9227ed2d9a 100644 --- a/core/src/main/java/org/springframework/ldap/pool/DirContextType.java +++ b/core/src/main/java/org/springframework/ldap/pool/DirContextType.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/pool/FailureAwareContext.java b/core/src/main/java/org/springframework/ldap/pool/FailureAwareContext.java index d5d9f6f877..e967578f32 100644 --- a/core/src/main/java/org/springframework/ldap/pool/FailureAwareContext.java +++ b/core/src/main/java/org/springframework/ldap/pool/FailureAwareContext.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/pool/MutableDelegatingLdapContext.java b/core/src/main/java/org/springframework/ldap/pool/MutableDelegatingLdapContext.java index a9bf43fd92..f906e8dd9c 100644 --- a/core/src/main/java/org/springframework/ldap/pool/MutableDelegatingLdapContext.java +++ b/core/src/main/java/org/springframework/ldap/pool/MutableDelegatingLdapContext.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/pool/PoolExhaustedAction.java b/core/src/main/java/org/springframework/ldap/pool/PoolExhaustedAction.java index 18a72c7bec..838854d0f1 100644 --- a/core/src/main/java/org/springframework/ldap/pool/PoolExhaustedAction.java +++ b/core/src/main/java/org/springframework/ldap/pool/PoolExhaustedAction.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2023 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/pool/factory/DirContextPoolableObjectFactory.java b/core/src/main/java/org/springframework/ldap/pool/factory/DirContextPoolableObjectFactory.java index 6c7d05a79a..6d698adf4b 100644 --- a/core/src/main/java/org/springframework/ldap/pool/factory/DirContextPoolableObjectFactory.java +++ b/core/src/main/java/org/springframework/ldap/pool/factory/DirContextPoolableObjectFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2025 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/pool/factory/MutablePoolingContextSource.java b/core/src/main/java/org/springframework/ldap/pool/factory/MutablePoolingContextSource.java index 61ac66803e..5013372b91 100644 --- a/core/src/main/java/org/springframework/ldap/pool/factory/MutablePoolingContextSource.java +++ b/core/src/main/java/org/springframework/ldap/pool/factory/MutablePoolingContextSource.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/pool/factory/PoolingContextSource.java b/core/src/main/java/org/springframework/ldap/pool/factory/PoolingContextSource.java index ee59d3bdcc..7ce3833dff 100644 --- a/core/src/main/java/org/springframework/ldap/pool/factory/PoolingContextSource.java +++ b/core/src/main/java/org/springframework/ldap/pool/factory/PoolingContextSource.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/pool/validation/DefaultDirContextValidator.java b/core/src/main/java/org/springframework/ldap/pool/validation/DefaultDirContextValidator.java index e9cd7d6586..54d3b97a9a 100644 --- a/core/src/main/java/org/springframework/ldap/pool/validation/DefaultDirContextValidator.java +++ b/core/src/main/java/org/springframework/ldap/pool/validation/DefaultDirContextValidator.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2022 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/pool/validation/DirContextValidator.java b/core/src/main/java/org/springframework/ldap/pool/validation/DirContextValidator.java index a4e37ecf1c..ed5810da40 100644 --- a/core/src/main/java/org/springframework/ldap/pool/validation/DirContextValidator.java +++ b/core/src/main/java/org/springframework/ldap/pool/validation/DirContextValidator.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/pool2/DelegatingContext.java b/core/src/main/java/org/springframework/ldap/pool2/DelegatingContext.java index 0890af1251..e4a1bdbb4f 100644 --- a/core/src/main/java/org/springframework/ldap/pool2/DelegatingContext.java +++ b/core/src/main/java/org/springframework/ldap/pool2/DelegatingContext.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2015 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/pool2/DelegatingDirContext.java b/core/src/main/java/org/springframework/ldap/pool2/DelegatingDirContext.java index 7dd8f792aa..59346ff7f8 100644 --- a/core/src/main/java/org/springframework/ldap/pool2/DelegatingDirContext.java +++ b/core/src/main/java/org/springframework/ldap/pool2/DelegatingDirContext.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2015 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/pool2/DelegatingLdapContext.java b/core/src/main/java/org/springframework/ldap/pool2/DelegatingLdapContext.java index 39d1401ad5..6c2f29b040 100644 --- a/core/src/main/java/org/springframework/ldap/pool2/DelegatingLdapContext.java +++ b/core/src/main/java/org/springframework/ldap/pool2/DelegatingLdapContext.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2015 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/pool2/DirContextType.java b/core/src/main/java/org/springframework/ldap/pool2/DirContextType.java index 4f7d04cb98..cf0bc68b32 100644 --- a/core/src/main/java/org/springframework/ldap/pool2/DirContextType.java +++ b/core/src/main/java/org/springframework/ldap/pool2/DirContextType.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/pool2/FailureAwareContext.java b/core/src/main/java/org/springframework/ldap/pool2/FailureAwareContext.java index 1c45ff75f6..31c69dafa7 100644 --- a/core/src/main/java/org/springframework/ldap/pool2/FailureAwareContext.java +++ b/core/src/main/java/org/springframework/ldap/pool2/FailureAwareContext.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/pool2/MutableDelegatingLdapContext.java b/core/src/main/java/org/springframework/ldap/pool2/MutableDelegatingLdapContext.java index e53f0fc18a..0a46e0a19f 100644 --- a/core/src/main/java/org/springframework/ldap/pool2/MutableDelegatingLdapContext.java +++ b/core/src/main/java/org/springframework/ldap/pool2/MutableDelegatingLdapContext.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2015 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/pool2/factory/DirContextPooledObjectFactory.java b/core/src/main/java/org/springframework/ldap/pool2/factory/DirContextPooledObjectFactory.java index 7b1631cd21..00c9a930ef 100644 --- a/core/src/main/java/org/springframework/ldap/pool2/factory/DirContextPooledObjectFactory.java +++ b/core/src/main/java/org/springframework/ldap/pool2/factory/DirContextPooledObjectFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2025 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/pool2/factory/MutablePooledContextSource.java b/core/src/main/java/org/springframework/ldap/pool2/factory/MutablePooledContextSource.java index b5ce6f1c7d..83a067dcbf 100644 --- a/core/src/main/java/org/springframework/ldap/pool2/factory/MutablePooledContextSource.java +++ b/core/src/main/java/org/springframework/ldap/pool2/factory/MutablePooledContextSource.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2015 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/pool2/factory/PoolConfig.java b/core/src/main/java/org/springframework/ldap/pool2/factory/PoolConfig.java index a69cd8032c..f194774943 100644 --- a/core/src/main/java/org/springframework/ldap/pool2/factory/PoolConfig.java +++ b/core/src/main/java/org/springframework/ldap/pool2/factory/PoolConfig.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2015 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/pool2/factory/PooledContextSource.java b/core/src/main/java/org/springframework/ldap/pool2/factory/PooledContextSource.java index 4e0cb5f630..6852670c1a 100644 --- a/core/src/main/java/org/springframework/ldap/pool2/factory/PooledContextSource.java +++ b/core/src/main/java/org/springframework/ldap/pool2/factory/PooledContextSource.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2025 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/pool2/validation/DefaultDirContextValidator.java b/core/src/main/java/org/springframework/ldap/pool2/validation/DefaultDirContextValidator.java index feb7bf57a2..ac3cdb15fb 100644 --- a/core/src/main/java/org/springframework/ldap/pool2/validation/DefaultDirContextValidator.java +++ b/core/src/main/java/org/springframework/ldap/pool2/validation/DefaultDirContextValidator.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2022 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/pool2/validation/DirContextValidator.java b/core/src/main/java/org/springframework/ldap/pool2/validation/DirContextValidator.java index 21c2403e0a..7afe1874f2 100644 --- a/core/src/main/java/org/springframework/ldap/pool2/validation/DirContextValidator.java +++ b/core/src/main/java/org/springframework/ldap/pool2/validation/DirContextValidator.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/query/AppendableContainerCriteria.java b/core/src/main/java/org/springframework/ldap/query/AppendableContainerCriteria.java index 313e625d4e..dfaee2c69c 100644 --- a/core/src/main/java/org/springframework/ldap/query/AppendableContainerCriteria.java +++ b/core/src/main/java/org/springframework/ldap/query/AppendableContainerCriteria.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/query/ConditionCriteria.java b/core/src/main/java/org/springframework/ldap/query/ConditionCriteria.java index bd5c026e72..ff6ecdc42a 100644 --- a/core/src/main/java/org/springframework/ldap/query/ConditionCriteria.java +++ b/core/src/main/java/org/springframework/ldap/query/ConditionCriteria.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/query/ContainerCriteria.java b/core/src/main/java/org/springframework/ldap/query/ContainerCriteria.java index a2ddff54c8..caafb7cfae 100644 --- a/core/src/main/java/org/springframework/ldap/query/ContainerCriteria.java +++ b/core/src/main/java/org/springframework/ldap/query/ContainerCriteria.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/query/CriteriaContainerType.java b/core/src/main/java/org/springframework/ldap/query/CriteriaContainerType.java index 4230ccf6c4..d2cc78c478 100644 --- a/core/src/main/java/org/springframework/ldap/query/CriteriaContainerType.java +++ b/core/src/main/java/org/springframework/ldap/query/CriteriaContainerType.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/query/DefaultConditionCriteria.java b/core/src/main/java/org/springframework/ldap/query/DefaultConditionCriteria.java index 7228789017..6d69fbcfbd 100644 --- a/core/src/main/java/org/springframework/ldap/query/DefaultConditionCriteria.java +++ b/core/src/main/java/org/springframework/ldap/query/DefaultConditionCriteria.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/query/DefaultContainerCriteria.java b/core/src/main/java/org/springframework/ldap/query/DefaultContainerCriteria.java index 55e47a0763..42dc9bbe7e 100644 --- a/core/src/main/java/org/springframework/ldap/query/DefaultContainerCriteria.java +++ b/core/src/main/java/org/springframework/ldap/query/DefaultContainerCriteria.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2025 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/query/LdapQuery.java b/core/src/main/java/org/springframework/ldap/query/LdapQuery.java index d6e079bfbf..cd7ed83dd3 100644 --- a/core/src/main/java/org/springframework/ldap/query/LdapQuery.java +++ b/core/src/main/java/org/springframework/ldap/query/LdapQuery.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/query/LdapQueryBuilder.java b/core/src/main/java/org/springframework/ldap/query/LdapQueryBuilder.java index 461a509257..17bfb88c1d 100644 --- a/core/src/main/java/org/springframework/ldap/query/LdapQueryBuilder.java +++ b/core/src/main/java/org/springframework/ldap/query/LdapQueryBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2021 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/query/SearchScope.java b/core/src/main/java/org/springframework/ldap/query/SearchScope.java index 0532e5f9b8..cdaa593796 100644 --- a/core/src/main/java/org/springframework/ldap/query/SearchScope.java +++ b/core/src/main/java/org/springframework/ldap/query/SearchScope.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/support/AttributeValueCallbackHandler.java b/core/src/main/java/org/springframework/ldap/support/AttributeValueCallbackHandler.java index 07da5778fa..eb122d1300 100644 --- a/core/src/main/java/org/springframework/ldap/support/AttributeValueCallbackHandler.java +++ b/core/src/main/java/org/springframework/ldap/support/AttributeValueCallbackHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/support/LdapEncoder.java b/core/src/main/java/org/springframework/ldap/support/LdapEncoder.java index e7ae6339de..8901a06a1f 100644 --- a/core/src/main/java/org/springframework/ldap/support/LdapEncoder.java +++ b/core/src/main/java/org/springframework/ldap/support/LdapEncoder.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2021 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/support/LdapNameBuilder.java b/core/src/main/java/org/springframework/ldap/support/LdapNameBuilder.java index 992872f3ea..4d22b72909 100644 --- a/core/src/main/java/org/springframework/ldap/support/LdapNameBuilder.java +++ b/core/src/main/java/org/springframework/ldap/support/LdapNameBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2021 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/support/LdapUtils.java b/core/src/main/java/org/springframework/ldap/support/LdapUtils.java index a556ff36af..afcfc95a80 100644 --- a/core/src/main/java/org/springframework/ldap/support/LdapUtils.java +++ b/core/src/main/java/org/springframework/ldap/support/LdapUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2025 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/support/ListComparator.java b/core/src/main/java/org/springframework/ldap/support/ListComparator.java index d470cd220f..58c98c50c4 100644 --- a/core/src/main/java/org/springframework/ldap/support/ListComparator.java +++ b/core/src/main/java/org/springframework/ldap/support/ListComparator.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/transaction/compensating/BindOperationExecutor.java b/core/src/main/java/org/springframework/ldap/transaction/compensating/BindOperationExecutor.java index 0071ee422b..67fcc034a2 100644 --- a/core/src/main/java/org/springframework/ldap/transaction/compensating/BindOperationExecutor.java +++ b/core/src/main/java/org/springframework/ldap/transaction/compensating/BindOperationExecutor.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/transaction/compensating/BindOperationRecorder.java b/core/src/main/java/org/springframework/ldap/transaction/compensating/BindOperationRecorder.java index 849238762b..336ed3dc22 100644 --- a/core/src/main/java/org/springframework/ldap/transaction/compensating/BindOperationRecorder.java +++ b/core/src/main/java/org/springframework/ldap/transaction/compensating/BindOperationRecorder.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/transaction/compensating/LdapCompensatingTransactionOperationFactory.java b/core/src/main/java/org/springframework/ldap/transaction/compensating/LdapCompensatingTransactionOperationFactory.java index cdc1bcfa83..d6376d85aa 100644 --- a/core/src/main/java/org/springframework/ldap/transaction/compensating/LdapCompensatingTransactionOperationFactory.java +++ b/core/src/main/java/org/springframework/ldap/transaction/compensating/LdapCompensatingTransactionOperationFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/transaction/compensating/LdapTransactionUtils.java b/core/src/main/java/org/springframework/ldap/transaction/compensating/LdapTransactionUtils.java index 38d402f124..924fa5f6a6 100644 --- a/core/src/main/java/org/springframework/ldap/transaction/compensating/LdapTransactionUtils.java +++ b/core/src/main/java/org/springframework/ldap/transaction/compensating/LdapTransactionUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/transaction/compensating/ModifyAttributesOperationExecutor.java b/core/src/main/java/org/springframework/ldap/transaction/compensating/ModifyAttributesOperationExecutor.java index 93c621a518..88f1f58489 100644 --- a/core/src/main/java/org/springframework/ldap/transaction/compensating/ModifyAttributesOperationExecutor.java +++ b/core/src/main/java/org/springframework/ldap/transaction/compensating/ModifyAttributesOperationExecutor.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/transaction/compensating/ModifyAttributesOperationRecorder.java b/core/src/main/java/org/springframework/ldap/transaction/compensating/ModifyAttributesOperationRecorder.java index 46e8c64ad1..f8c04c07af 100644 --- a/core/src/main/java/org/springframework/ldap/transaction/compensating/ModifyAttributesOperationRecorder.java +++ b/core/src/main/java/org/springframework/ldap/transaction/compensating/ModifyAttributesOperationRecorder.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2025 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/transaction/compensating/NullOperationExecutor.java b/core/src/main/java/org/springframework/ldap/transaction/compensating/NullOperationExecutor.java index 21e86264a3..4035e3d4b8 100644 --- a/core/src/main/java/org/springframework/ldap/transaction/compensating/NullOperationExecutor.java +++ b/core/src/main/java/org/springframework/ldap/transaction/compensating/NullOperationExecutor.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/transaction/compensating/NullOperationRecorder.java b/core/src/main/java/org/springframework/ldap/transaction/compensating/NullOperationRecorder.java index 0f2d70ecd8..bd0e00ce6b 100644 --- a/core/src/main/java/org/springframework/ldap/transaction/compensating/NullOperationRecorder.java +++ b/core/src/main/java/org/springframework/ldap/transaction/compensating/NullOperationRecorder.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/transaction/compensating/RebindOperationExecutor.java b/core/src/main/java/org/springframework/ldap/transaction/compensating/RebindOperationExecutor.java index 6b07948730..5a14df7945 100644 --- a/core/src/main/java/org/springframework/ldap/transaction/compensating/RebindOperationExecutor.java +++ b/core/src/main/java/org/springframework/ldap/transaction/compensating/RebindOperationExecutor.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/transaction/compensating/RebindOperationRecorder.java b/core/src/main/java/org/springframework/ldap/transaction/compensating/RebindOperationRecorder.java index 9db5de5736..a48456ebb1 100644 --- a/core/src/main/java/org/springframework/ldap/transaction/compensating/RebindOperationRecorder.java +++ b/core/src/main/java/org/springframework/ldap/transaction/compensating/RebindOperationRecorder.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/transaction/compensating/RenameOperationExecutor.java b/core/src/main/java/org/springframework/ldap/transaction/compensating/RenameOperationExecutor.java index 3f5af01e66..8f6a43d220 100644 --- a/core/src/main/java/org/springframework/ldap/transaction/compensating/RenameOperationExecutor.java +++ b/core/src/main/java/org/springframework/ldap/transaction/compensating/RenameOperationExecutor.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/transaction/compensating/RenameOperationRecorder.java b/core/src/main/java/org/springframework/ldap/transaction/compensating/RenameOperationRecorder.java index cb3fe6c061..8690e1b667 100644 --- a/core/src/main/java/org/springframework/ldap/transaction/compensating/RenameOperationRecorder.java +++ b/core/src/main/java/org/springframework/ldap/transaction/compensating/RenameOperationRecorder.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/transaction/compensating/TempEntryRenamingStrategy.java b/core/src/main/java/org/springframework/ldap/transaction/compensating/TempEntryRenamingStrategy.java index c740824f46..99cf3feaa9 100644 --- a/core/src/main/java/org/springframework/ldap/transaction/compensating/TempEntryRenamingStrategy.java +++ b/core/src/main/java/org/springframework/ldap/transaction/compensating/TempEntryRenamingStrategy.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/transaction/compensating/UnbindOperationExecutor.java b/core/src/main/java/org/springframework/ldap/transaction/compensating/UnbindOperationExecutor.java index 011c43b04b..b3ed62a5e4 100644 --- a/core/src/main/java/org/springframework/ldap/transaction/compensating/UnbindOperationExecutor.java +++ b/core/src/main/java/org/springframework/ldap/transaction/compensating/UnbindOperationExecutor.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/transaction/compensating/UnbindOperationRecorder.java b/core/src/main/java/org/springframework/ldap/transaction/compensating/UnbindOperationRecorder.java index 0c7270938b..ffec1e832a 100644 --- a/core/src/main/java/org/springframework/ldap/transaction/compensating/UnbindOperationRecorder.java +++ b/core/src/main/java/org/springframework/ldap/transaction/compensating/UnbindOperationRecorder.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/transaction/compensating/manager/ContextSourceAndDataSourceTransactionManager.java b/core/src/main/java/org/springframework/ldap/transaction/compensating/manager/ContextSourceAndDataSourceTransactionManager.java deleted file mode 100644 index 37562b4bef..0000000000 --- a/core/src/main/java/org/springframework/ldap/transaction/compensating/manager/ContextSourceAndDataSourceTransactionManager.java +++ /dev/null @@ -1,218 +0,0 @@ -/* - * Copyright 2005-2013 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.ldap.transaction.compensating.manager; - -import org.springframework.jdbc.datasource.DataSourceTransactionManager; -import org.springframework.ldap.core.ContextSource; -import org.springframework.ldap.transaction.compensating.TempEntryRenamingStrategy; -import org.springframework.transaction.TransactionDefinition; -import org.springframework.transaction.TransactionException; -import org.springframework.transaction.TransactionSuspensionNotSupportedException; -import org.springframework.transaction.support.DefaultTransactionStatus; - -/** - * A Transaction Manager to manage LDAP and JDBC operations within the same transaction. - * Note that even though the same logical transaction is used, this is not a JTA XA - * transaction; no two-phase commit will be performed, and thus commit and rollback may - * yield unexpected results. - * - * Note that nested transactions are not supported. - * - * @author Mattias Hellborg Arthursson - * @since 1.2 - * @deprecated The idea of wrapping two transaction managers without actual XA support is - * probably not such a good idea after all. AbstractPlatformTransactionManager is not - * designed for this usage. - */ -@Deprecated -public class ContextSourceAndDataSourceTransactionManager extends DataSourceTransactionManager { - - private static final long serialVersionUID = 6832868697460384648L; - - private ContextSourceTransactionManagerDelegate ldapManagerDelegate = new ContextSourceTransactionManagerDelegate(); - - public ContextSourceAndDataSourceTransactionManager() { - super(); - // Override the default behaviour. - setNestedTransactionAllowed(false); - } - - /* - * @see org.springframework.jdbc.datasource.DataSourceTransactionManager# - * isExistingTransaction(java.lang.Object) - */ - @Override - protected boolean isExistingTransaction(Object transaction) { - // We don't support nested transactions here - return false; - } - - /* - * @see - * org.springframework.jdbc.datasource.DataSourceTransactionManager#doGetTransaction() - */ - @Override - protected Object doGetTransaction() { - Object dataSourceTransactionObject = super.doGetTransaction(); - Object contextSourceTransactionObject = this.ldapManagerDelegate.doGetTransaction(); - - return new ContextSourceAndDataSourceTransactionObject(contextSourceTransactionObject, - dataSourceTransactionObject); - } - - /* - * @see - * org.springframework.jdbc.datasource.DataSourceTransactionManager#doBegin(java.lang. - * Object, org.springframework.transaction.TransactionDefinition) - */ - @Override - protected void doBegin(Object transaction, TransactionDefinition definition) { - ContextSourceAndDataSourceTransactionObject actualTransactionObject = (ContextSourceAndDataSourceTransactionObject) transaction; - - super.doBegin(actualTransactionObject.getDataSourceTransactionObject(), definition); - try { - this.ldapManagerDelegate.doBegin(actualTransactionObject.getLdapTransactionObject(), definition); - } - catch (TransactionException ex) { - // Failed to start LDAP transaction - make sure we clean up properly - super.doCleanupAfterCompletion(actualTransactionObject.getDataSourceTransactionObject()); - throw ex; - } - } - - /* - * @see org.springframework.jdbc.datasource.DataSourceTransactionManager# - * doCleanupAfterCompletion(java.lang.Object) - */ - @Override - protected void doCleanupAfterCompletion(Object transaction) { - ContextSourceAndDataSourceTransactionObject actualTransactionObject = (ContextSourceAndDataSourceTransactionObject) transaction; - - super.doCleanupAfterCompletion(actualTransactionObject.getDataSourceTransactionObject()); - this.ldapManagerDelegate.doCleanupAfterCompletion(actualTransactionObject.getLdapTransactionObject()); - } - - /* - * @see org.springframework.jdbc.datasource.DataSourceTransactionManager#doCommit(org. - * springframework.transaction.support.DefaultTransactionStatus) - */ - @Override - protected void doCommit(DefaultTransactionStatus status) { - - ContextSourceAndDataSourceTransactionObject actualTransactionObject = (ContextSourceAndDataSourceTransactionObject) status - .getTransaction(); - - try { - super.doCommit(new DefaultTransactionStatus(actualTransactionObject.getDataSourceTransactionObject(), - status.isNewTransaction(), status.isNewSynchronization(), status.isReadOnly(), status.isDebug(), - status.getSuspendedResources())); - } - catch (TransactionException ex) { - if (isRollbackOnCommitFailure()) { - logger.debug("Failed to commit db resource, rethrowing", ex); - // If we are to rollback on commit failure, just rethrow the - // exception - this will cause a rollback to be performed on - // both resources. - throw ex; - } - else { - logger.warn("Failed to commit and resource is rollbackOnCommit not set -" - + " proceeding to commit ldap resource."); - } - } - this.ldapManagerDelegate.doCommit(new DefaultTransactionStatus( - actualTransactionObject.getLdapTransactionObject(), status.isNewTransaction(), - status.isNewSynchronization(), status.isReadOnly(), status.isDebug(), status.getSuspendedResources())); - } - - /* - * @see - * org.springframework.jdbc.datasource.DataSourceTransactionManager#doRollback(org. - * springframework.transaction.support.DefaultTransactionStatus) - */ - @Override - protected void doRollback(DefaultTransactionStatus status) { - ContextSourceAndDataSourceTransactionObject actualTransactionObject = (ContextSourceAndDataSourceTransactionObject) status - .getTransaction(); - - super.doRollback(new DefaultTransactionStatus(actualTransactionObject.getDataSourceTransactionObject(), - status.isNewTransaction(), status.isNewSynchronization(), status.isReadOnly(), status.isDebug(), - status.getSuspendedResources())); - this.ldapManagerDelegate.doRollback(new DefaultTransactionStatus( - actualTransactionObject.getLdapTransactionObject(), status.isNewTransaction(), - status.isNewSynchronization(), status.isReadOnly(), status.isDebug(), status.getSuspendedResources())); - } - - public ContextSource getContextSource() { - return this.ldapManagerDelegate.getContextSource(); - } - - public void setContextSource(ContextSource contextSource) { - this.ldapManagerDelegate.setContextSource(contextSource); - } - - public void setRenamingStrategy(TempEntryRenamingStrategy renamingStrategy) { - this.ldapManagerDelegate.setRenamingStrategy(renamingStrategy); - } - - /* - * @see - * org.springframework.jdbc.datasource.DataSourceTransactionManager#doSuspend(java. - * lang.Object) - */ - protected Object doSuspend(Object transaction) { - throw new TransactionSuspensionNotSupportedException( - "Transaction manager [" + getClass().getName() + "] does not support transaction suspension"); - } - - /* - * @see - * org.springframework.jdbc.datasource.DataSourceTransactionManager#doResume(java.lang - * .Object, java.lang.Object) - */ - protected void doResume(Object transaction, Object suspendedResources) { - throw new TransactionSuspensionNotSupportedException( - "Transaction manager [" + getClass().getName() + "] does not support transaction suspension"); - } - - public void afterPropertiesSet() { - super.afterPropertiesSet(); - this.ldapManagerDelegate.checkRenamingStrategy(); - } - - private static final class ContextSourceAndDataSourceTransactionObject { - - private Object ldapTransactionObject; - - private Object dataSourceTransactionObject; - - ContextSourceAndDataSourceTransactionObject(Object ldapTransactionObject, Object dataSourceTransactionObject) { - this.ldapTransactionObject = ldapTransactionObject; - this.dataSourceTransactionObject = dataSourceTransactionObject; - } - - Object getDataSourceTransactionObject() { - return this.dataSourceTransactionObject; - } - - Object getLdapTransactionObject() { - return this.ldapTransactionObject; - } - - } - -} diff --git a/core/src/main/java/org/springframework/ldap/transaction/compensating/manager/ContextSourceAndHibernateTransactionManager.java b/core/src/main/java/org/springframework/ldap/transaction/compensating/manager/ContextSourceAndHibernateTransactionManager.java deleted file mode 100755 index 3d32dc72cb..0000000000 --- a/core/src/main/java/org/springframework/ldap/transaction/compensating/manager/ContextSourceAndHibernateTransactionManager.java +++ /dev/null @@ -1,221 +0,0 @@ -/* - * Copyright 2005-2013 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.ldap.transaction.compensating.manager; - -import org.springframework.ldap.core.ContextSource; -import org.springframework.ldap.transaction.compensating.TempEntryRenamingStrategy; -import org.springframework.orm.hibernate5.HibernateTransactionManager; -import org.springframework.transaction.TransactionDefinition; -import org.springframework.transaction.TransactionException; -import org.springframework.transaction.TransactionSuspensionNotSupportedException; -import org.springframework.transaction.support.DefaultTransactionStatus; - -/** - * A Transaction Manager to manage LDAP and Hibernate 3 operations within the same - * transaction. Note that even though the same logical transaction is used, this is - * not a JTA XA transaction; no two-phase commit will be performed, and thus commit - * and rollback may yield unexpected results.
- * This Transaction Manager is as good as it gets when you are using in LDAP in - * combination with a Hibernate 3 and unable to use XA transactions because LDAP is not - * transactional by design to begin with.
- * - * Furthermore, this manager does not support nested transactions - * - * @author Hans Westerbeek - * @since 1.2.2 - * @deprecated The idea of wrapping two transaction managers without actual XA support is - * probably not such a good idea after all. AbstractPlatformTransactionManager is not - * designed for this usage. - */ -@Deprecated -public class ContextSourceAndHibernateTransactionManager extends HibernateTransactionManager { - - /** - * - */ - private static final long serialVersionUID = 1L; - - private ContextSourceTransactionManagerDelegate ldapManagerDelegate = new ContextSourceTransactionManagerDelegate(); - - /* - * @see org.springframework.orm.hibernate5.HibernateTransactionManager# - * isExistingTransaction(java.lang.Object) - */ - @Override - protected boolean isExistingTransaction(Object transaction) { - ContextSourceAndHibernateTransactionObject actualTransactionObject = (ContextSourceAndHibernateTransactionObject) transaction; - - return super.isExistingTransaction(actualTransactionObject.getHibernateTransactionObject()); - } - - /* - * @see - * org.springframework.orm.hibernate5.HibernateTransactionManager#doGetTransaction() - */ - @Override - protected Object doGetTransaction() { - Object dataSourceTransactionObject = super.doGetTransaction(); - Object contextSourceTransactionObject = this.ldapManagerDelegate.doGetTransaction(); - - return new ContextSourceAndHibernateTransactionObject(contextSourceTransactionObject, - dataSourceTransactionObject); - } - - /* - * @see - * org.springframework.orm.hibernate5.HibernateTransactionManager#doBegin(java.lang. - * Object, org.springframework.transaction.TransactionDefinition) - */ - @Override - protected void doBegin(Object transaction, TransactionDefinition definition) { - ContextSourceAndHibernateTransactionObject actualTransactionObject = (ContextSourceAndHibernateTransactionObject) transaction; - - super.doBegin(actualTransactionObject.getHibernateTransactionObject(), definition); - try { - this.ldapManagerDelegate.doBegin(actualTransactionObject.getLdapTransactionObject(), definition); - } - catch (TransactionException ex) { - // Failed to start LDAP transaction - make sure we clean up properly - super.doCleanupAfterCompletion(actualTransactionObject.getHibernateTransactionObject()); - throw ex; - } - } - - /* - * @see org.springframework.orm.hibernate5.HibernateTransactionManager# - * doCleanupAfterCompletion(java.lang.Object) - */ - @Override - protected void doCleanupAfterCompletion(Object transaction) { - ContextSourceAndHibernateTransactionObject actualTransactionObject = (ContextSourceAndHibernateTransactionObject) transaction; - - super.doCleanupAfterCompletion(actualTransactionObject.getHibernateTransactionObject()); - this.ldapManagerDelegate.doCleanupAfterCompletion(actualTransactionObject.getLdapTransactionObject()); - } - - /* - * @see org.springframework.orm.hibernate5.HibernateTransactionManager#doCommit(org. - * springframework.transaction.support.DefaultTransactionStatus) - */ - @Override - protected void doCommit(DefaultTransactionStatus status) { - - ContextSourceAndHibernateTransactionObject actualTransactionObject = (ContextSourceAndHibernateTransactionObject) status - .getTransaction(); - - try { - super.doCommit(new DefaultTransactionStatus(actualTransactionObject.getHibernateTransactionObject(), - status.isNewTransaction(), status.isNewSynchronization(), status.isReadOnly(), status.isDebug(), - status.getSuspendedResources())); - } - catch (TransactionException ex) { - if (isRollbackOnCommitFailure()) { - logger.debug("Failed to commit db resource, rethrowing", ex); - // If we are to rollback on commit failure, just rethrow the - // exception - this will cause a rollback to be performed on - // both resources. - throw ex; - } - else { - logger.warn("Failed to commit and resource is rollbackOnCommit not set -" - + " proceeding to commit ldap resource."); - } - } - this.ldapManagerDelegate.doCommit(new DefaultTransactionStatus( - actualTransactionObject.getLdapTransactionObject(), status.isNewTransaction(), - status.isNewSynchronization(), status.isReadOnly(), status.isDebug(), status.getSuspendedResources())); - } - - /* - * @see org.springframework.orm.hibernate5.HibernateTransactionManager#doRollback(org. - * springframework.transaction.support.DefaultTransactionStatus) - */ - @Override - protected void doRollback(DefaultTransactionStatus status) { - ContextSourceAndHibernateTransactionObject actualTransactionObject = (ContextSourceAndHibernateTransactionObject) status - .getTransaction(); - - super.doRollback(new DefaultTransactionStatus(actualTransactionObject.getHibernateTransactionObject(), - status.isNewTransaction(), status.isNewSynchronization(), status.isReadOnly(), status.isDebug(), - status.getSuspendedResources())); - this.ldapManagerDelegate.doRollback(new DefaultTransactionStatus( - actualTransactionObject.getLdapTransactionObject(), status.isNewTransaction(), - status.isNewSynchronization(), status.isReadOnly(), status.isDebug(), status.getSuspendedResources())); - } - - public ContextSource getContextSource() { - return this.ldapManagerDelegate.getContextSource(); - } - - public void setContextSource(ContextSource contextSource) { - this.ldapManagerDelegate.setContextSource(contextSource); - } - - public void setRenamingStrategy(TempEntryRenamingStrategy renamingStrategy) { - this.ldapManagerDelegate.setRenamingStrategy(renamingStrategy); - } - - /* - * @see - * org.springframework.orm.hibernate5.HibernateTransactionManager#doSuspend(java.lang. - * Object) - */ - @Override - protected Object doSuspend(Object transaction) { - throw new TransactionSuspensionNotSupportedException( - "Transaction manager [" + getClass().getName() + "] does not support transaction suspension"); - } - - /* - * @see - * org.springframework.orm.hibernate5.HibernateTransactionManager#doResume(java.lang. - * Object, java.lang.Object) - */ - @Override - protected void doResume(Object transaction, Object suspendedResources) { - throw new TransactionSuspensionNotSupportedException( - "Transaction manager [" + getClass().getName() + "] does not support transaction suspension"); - } - - @Override - public void afterPropertiesSet() { - super.afterPropertiesSet(); - this.ldapManagerDelegate.checkRenamingStrategy(); - } - - private static final class ContextSourceAndHibernateTransactionObject { - - private Object ldapTransactionObject; - - private Object hibernateTransactionObject; - - ContextSourceAndHibernateTransactionObject(Object ldapTransactionObject, Object hibernateTransactionObject) { - this.ldapTransactionObject = ldapTransactionObject; - this.hibernateTransactionObject = hibernateTransactionObject; - } - - Object getHibernateTransactionObject() { - return this.hibernateTransactionObject; - } - - Object getLdapTransactionObject() { - return this.ldapTransactionObject; - } - - } - -} diff --git a/core/src/main/java/org/springframework/ldap/transaction/compensating/manager/ContextSourceTransactionManager.java b/core/src/main/java/org/springframework/ldap/transaction/compensating/manager/ContextSourceTransactionManager.java index 30bca18db0..8c5a4e26ba 100644 --- a/core/src/main/java/org/springframework/ldap/transaction/compensating/manager/ContextSourceTransactionManager.java +++ b/core/src/main/java/org/springframework/ldap/transaction/compensating/manager/ContextSourceTransactionManager.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/transaction/compensating/manager/ContextSourceTransactionManagerDelegate.java b/core/src/main/java/org/springframework/ldap/transaction/compensating/manager/ContextSourceTransactionManagerDelegate.java index 2408dc7ebc..5baf9a8380 100644 --- a/core/src/main/java/org/springframework/ldap/transaction/compensating/manager/ContextSourceTransactionManagerDelegate.java +++ b/core/src/main/java/org/springframework/ldap/transaction/compensating/manager/ContextSourceTransactionManagerDelegate.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/transaction/compensating/manager/DirContextHolder.java b/core/src/main/java/org/springframework/ldap/transaction/compensating/manager/DirContextHolder.java index 399d96912e..c2908a3094 100644 --- a/core/src/main/java/org/springframework/ldap/transaction/compensating/manager/DirContextHolder.java +++ b/core/src/main/java/org/springframework/ldap/transaction/compensating/manager/DirContextHolder.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2007 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/transaction/compensating/manager/TransactionAwareContextSourceProxy.java b/core/src/main/java/org/springframework/ldap/transaction/compensating/manager/TransactionAwareContextSourceProxy.java index 276bfb82ed..87b2f521a2 100644 --- a/core/src/main/java/org/springframework/ldap/transaction/compensating/manager/TransactionAwareContextSourceProxy.java +++ b/core/src/main/java/org/springframework/ldap/transaction/compensating/manager/TransactionAwareContextSourceProxy.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2007 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/transaction/compensating/manager/TransactionAwareDirContextInvocationHandler.java b/core/src/main/java/org/springframework/ldap/transaction/compensating/manager/TransactionAwareDirContextInvocationHandler.java index 9ce5edb245..36218fe686 100644 --- a/core/src/main/java/org/springframework/ldap/transaction/compensating/manager/TransactionAwareDirContextInvocationHandler.java +++ b/core/src/main/java/org/springframework/ldap/transaction/compensating/manager/TransactionAwareDirContextInvocationHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/transaction/compensating/support/DefaultTempEntryRenamingStrategy.java b/core/src/main/java/org/springframework/ldap/transaction/compensating/support/DefaultTempEntryRenamingStrategy.java index 23d449b2e4..b875f0e145 100644 --- a/core/src/main/java/org/springframework/ldap/transaction/compensating/support/DefaultTempEntryRenamingStrategy.java +++ b/core/src/main/java/org/springframework/ldap/transaction/compensating/support/DefaultTempEntryRenamingStrategy.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/ldap/transaction/compensating/support/DifferentSubtreeTempEntryRenamingStrategy.java b/core/src/main/java/org/springframework/ldap/transaction/compensating/support/DifferentSubtreeTempEntryRenamingStrategy.java index c89b2ef62d..4885551739 100644 --- a/core/src/main/java/org/springframework/ldap/transaction/compensating/support/DifferentSubtreeTempEntryRenamingStrategy.java +++ b/core/src/main/java/org/springframework/ldap/transaction/compensating/support/DifferentSubtreeTempEntryRenamingStrategy.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/transaction/compensating/CompensatingTransactionOperationExecutor.java b/core/src/main/java/org/springframework/transaction/compensating/CompensatingTransactionOperationExecutor.java index 5f010e68dd..c7055ed36f 100644 --- a/core/src/main/java/org/springframework/transaction/compensating/CompensatingTransactionOperationExecutor.java +++ b/core/src/main/java/org/springframework/transaction/compensating/CompensatingTransactionOperationExecutor.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/transaction/compensating/CompensatingTransactionOperationFactory.java b/core/src/main/java/org/springframework/transaction/compensating/CompensatingTransactionOperationFactory.java index ed227a265e..e60b7c9b56 100644 --- a/core/src/main/java/org/springframework/transaction/compensating/CompensatingTransactionOperationFactory.java +++ b/core/src/main/java/org/springframework/transaction/compensating/CompensatingTransactionOperationFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/transaction/compensating/CompensatingTransactionOperationManager.java b/core/src/main/java/org/springframework/transaction/compensating/CompensatingTransactionOperationManager.java index 97f284897a..76af7ebe79 100644 --- a/core/src/main/java/org/springframework/transaction/compensating/CompensatingTransactionOperationManager.java +++ b/core/src/main/java/org/springframework/transaction/compensating/CompensatingTransactionOperationManager.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/transaction/compensating/CompensatingTransactionOperationRecorder.java b/core/src/main/java/org/springframework/transaction/compensating/CompensatingTransactionOperationRecorder.java index 9e32826534..9b38fc3a33 100644 --- a/core/src/main/java/org/springframework/transaction/compensating/CompensatingTransactionOperationRecorder.java +++ b/core/src/main/java/org/springframework/transaction/compensating/CompensatingTransactionOperationRecorder.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/transaction/compensating/support/AbstractCompensatingTransactionManagerDelegate.java b/core/src/main/java/org/springframework/transaction/compensating/support/AbstractCompensatingTransactionManagerDelegate.java index c550f7b74b..9ea2ee92be 100644 --- a/core/src/main/java/org/springframework/transaction/compensating/support/AbstractCompensatingTransactionManagerDelegate.java +++ b/core/src/main/java/org/springframework/transaction/compensating/support/AbstractCompensatingTransactionManagerDelegate.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/transaction/compensating/support/CompensatingTransactionHolderSupport.java b/core/src/main/java/org/springframework/transaction/compensating/support/CompensatingTransactionHolderSupport.java index 5456c3aee6..657bdef824 100644 --- a/core/src/main/java/org/springframework/transaction/compensating/support/CompensatingTransactionHolderSupport.java +++ b/core/src/main/java/org/springframework/transaction/compensating/support/CompensatingTransactionHolderSupport.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/transaction/compensating/support/CompensatingTransactionObject.java b/core/src/main/java/org/springframework/transaction/compensating/support/CompensatingTransactionObject.java index dc42871f99..439f934451 100644 --- a/core/src/main/java/org/springframework/transaction/compensating/support/CompensatingTransactionObject.java +++ b/core/src/main/java/org/springframework/transaction/compensating/support/CompensatingTransactionObject.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/transaction/compensating/support/CompensatingTransactionUtils.java b/core/src/main/java/org/springframework/transaction/compensating/support/CompensatingTransactionUtils.java index 65cffb3d08..8cf58b7767 100644 --- a/core/src/main/java/org/springframework/transaction/compensating/support/CompensatingTransactionUtils.java +++ b/core/src/main/java/org/springframework/transaction/compensating/support/CompensatingTransactionUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/java/org/springframework/transaction/compensating/support/DefaultCompensatingTransactionOperationManager.java b/core/src/main/java/org/springframework/transaction/compensating/support/DefaultCompensatingTransactionOperationManager.java index d34b076b7d..faa10efc3f 100644 --- a/core/src/main/java/org/springframework/transaction/compensating/support/DefaultCompensatingTransactionOperationManager.java +++ b/core/src/main/java/org/springframework/transaction/compensating/support/DefaultCompensatingTransactionOperationManager.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2025 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/main/resources/META-INF/spring.schemas b/core/src/main/resources/META-INF/spring.schemas index 752edee1d9..7377496dd1 100644 --- a/core/src/main/resources/META-INF/spring.schemas +++ b/core/src/main/resources/META-INF/spring.schemas @@ -1,4 +1,4 @@ -http\://www.springframework.org/schema/ldap/spring-ldap.xsd=org/springframework/ldap/config/spring-ldap-2.2.xsd +http\://www.springframework.org/schema/ldap/spring-ldap.xsd=org/springframework/ldap/config/spring-ldap-4.0.xsd http\://www.springframework.org/schema/ldap/spring-ldap-2.0.xsd=org/springframework/ldap/config/spring-ldap-2.0.xsd http\://www.springframework.org/schema/ldap/spring-ldap-2.1.xsd=org/springframework/ldap/config/spring-ldap-2.1.xsd http\://www.springframework.org/schema/ldap/spring-ldap-2.2.xsd=org/springframework/ldap/config/spring-ldap-2.2.xsd \ No newline at end of file diff --git a/core/src/main/resources/org/springframework/ldap/config/spring-ldap-4.0.xsd b/core/src/main/resources/org/springframework/ldap/config/spring-ldap-4.0.xsd new file mode 100644 index 0000000000..16919e283e --- /dev/null +++ b/core/src/main/resources/org/springframework/ldap/config/spring-ldap-4.0.xsd @@ -0,0 +1,669 @@ + + + + + + + + + + A bean identifier, used for referring to the bean elsewhere in the context. + "contextSource". + + + + + + + Defines whether read-only operations will be performed using an anonymous (unauthenticated) context. + + + + + + + Id of the AuthenticationSource instance to use. If not specified, a SimpleAuthenticationSource will + be used. + + + + + + + Id of the DirContextAuthenticationStrategy instance to use. If not specified, a SimpleDirContextAuthenticationStrategy + will be used. + + + + + + + The base DN. If configured, all LDAP operations on contexts retrieved from this ContextSource will + be relative to this DN. Default is an empty distinguished name (i.e. all operations will be + relative to the directory root). + + + + + + + The password to use for authentication. + + + + + + + Specify whether native Java LDAP connection pooling should be used. Default is false. + + + + + + + Defines the strategy to handle referrals, as described on https://docs.oracle.com/javase/jndi/tutorial/ldap/referral/jndi.html. + Default is null. + + + + + + + + + + + + + + URL of the LDAP server to use. If fail-over functionality is desired, more than one URL can + be specified, separated using comma (,). + + + + + + + The username (principal) to use for authentication. This will normally be the distinguished name + of an admin user. + + + + + + + Reference to a Map of custom environment properties that should supplied with the environment + sent to the DirContext on construction. + + + + + + + + + + The maximum number of active connections of each type (read-only|read-write) + that can be allocated from the pool at the same time, or non-positive for no limit. + Default is 8. + + + + + + + The overall maximum number of active connections (for all types) that can be allocated from + this pool at the same time, or non-positive for no limit. Default is -1 (no limit). + + + + + + + The maximum number of active connections of each type (read-only|read-write) that can remain idle in the pool, + without extra ones being released, or non-positive for no limit. Default is 8. + + + + + + + The minimum number of active connections of each type (read-only|read-write) that can remain + idle in the pool, without extra ones being created, or zero to create none. Default is 0. + + + + + + + The maximum number of milliseconds that the pool will wait (when there are no available connections) + for a connection to be returned before throwing an exception, or non-positive to wait indefinitely. + Default is -1. + + + + + + + Specifies the behaviour when the pool is exhausted. + + + + + + + + Throw a NoSuchElementException when the pool is exhausted + + + + + + + Wait until a new object is available. If max-wait is positive a NoSuchElementException + is thrown if no new object is available after the maxWait time expires. + + + + + + + Create and return a new object (essentially making maxActive meaningless). + + + + + + + + + + The indication of whether objects will be validated before being borrowed from the pool. + If the object fails to validate, it will be dropped from the pool, and an attempt to borrow another will be made. + Default is false. + + + + + + + The indication of whether objects will be validated before being returned to the pool. + Default is false. + + + + + + + The indication of whether objects will be validated by the idle object evictor (if any). + If an object fails to validate, it will be dropped from the pool. + Default is false. + + + + + + + The number of milliseconds to sleep between runs of the idle object evictor thread. When non-positive, + no idle object evictor thread will be run. Default is -1. + + + + + + + The number of objects to examine during each run of the idle object evictor thread (if any). + Default is 3. + + + + + + + The minimum amount of time an object may sit idle in the pool before it is eligible + for eviction by the idle object evictor (if any). Default is 1000 * 60 * 30. + + + + + + + The base dn to use for validation searches. Default is LdapUtils.emptyPath(). + + + + + + + The filter to use for validation queries. Default is (objectclass=*). + + + + + + + Id of the SearchControls instance to use for searches. Default is searchScope=OBJECT_SCOPE; + countLimit: 1; timeLimit: 500; returningAttributes: [objectclass]. + + + + + + + Id of the SearchControls instance to use for searches. Default is searchScope=OBJECT_SCOPE; + countLimit: 1; timeLimit: 500; returningAttributes: [objectclass]. + + + + + + + + + + The overall maximum number of active connections (for all types) that can be allocated from + this pool at the same time, or non-positive for no limit. Default is -1 (no limit). + + + + + + + The limit on the number of object instances allocated by the pool (checked out or idle), + per key. When the limit is reached, the sub-pool is said to be exhausted. A negative value + indicates no limit. Default is 8. + + + + + + + The maximum number of active connections per type (read-only|read-write) that can remain idle in the pool, + without extra ones being released, or non-positive for no limit. Default is 8. + + + + + + + The minimum number of active connections per type (read-only|read-write) that can remain + idle in the pool, without extra ones being created, or zero to create none. Default is 0. + + + + + + + The maximum number of milliseconds that the pool will wait (when there are no available connections) + for a connection to be returned before throwing an exception, or non-positive to wait indefinitely. + Default is -1. + + + + + + + Sets to wait until a new object is available. If max-wait is positive a NoSuchElementException + is thrown if no new object is available after the maxWait time expires. Default is true. + + + + + + + Sets whether objects created for the pool will be validated before borrowing. If the object + fails to validate, then borrowing will fail. Default is false. + + + + + + + The indication of whether objects will be validated before being borrowed from the pool. + If the object fails to validate, it will be dropped from the pool, and an attempt to borrow another will be made. + Default is false. + + + + + + + The indication of whether objects will be validated before being returned to the pool. + Default is false. + + + + + + + The indication of whether objects will be validated by the idle object evictor (if any). + If an object fails to validate, it will be dropped from the pool. + Default is false. + + + + + + + The number of milliseconds to sleep between runs of the idle object evictor thread. When non-positive, + no idle object evictor thread will be run. Default is -1. + + + + + + + The number of objects to examine during each run of the idle object evictor thread (if any). + Default is 3. + + + + + + + The minimum amount of time an object may sit idle in the pool before it is eligible + for eviction by the idle object evictor (if any). Default is 1000 * 60 * 30. + + + + + + + The minimum amount of time an object may sit idle in the pool before it is eligible for + eviction by the idle object evictor, with the extra condition that at least minimum number + of object instances per key remain in the pool. This settings is overridden by min-evictable-time-millis if + it is set to a positive value. Default is -1. + + + + + + + The name of the eviction policy implementation that is used by this pool. The Pool will + attempt to load the class using the thread context class loader. If that fails, the Pool + will attempt to load the class using the class loader that loaded this class. Default is + org.apache.commons.pool2.impl.DefaultEvictionPolicy. + + + + + + + Sets whether or not the pool serves threads waiting to borrow connections fairly. + True means that waiting threads are served as if waiting in a FIFO queue. Default is false. + + + + + + + Sets whether JMX will be enabled with the platform MBean server for the pool. Default + is true. + + + + + + + The value of the JMX name base that will be used as part of the name assigned + to JMX enabled pools. Default is null. + + + + + + + The value of the JMX name prefix that will be used as part of the name assigned + to JMX enabled pools. Default value is pool. + + + + + + + Sets whether the pool has LIFO (last in, first out) behaviour with + respect to idle objects - always returning the most recently used object + from the pool, or as a FIFO (first in, first out) queue, where the pool + always returns the oldest object in the idle object pool. Default is true. + + + + + + + The base dn to use for validation searches. Default is LdapUtils.emptyPath(). + + + + + + + The filter to use for validation queries. Default is (objectclass=*). + + + + + + + Id of the SearchControls instance to use for searches. Default is searchScope=OBJECT_SCOPE; + countLimit: 1; timeLimit: 500; returningAttributes: [objectclass]. + + + + + + + Id of the SearchControls instance to use for searches. Default is searchScope=OBJECT_SCOPE; + countLimit: 1; timeLimit: 500; returningAttributes: [objectclass]. + + + + + + + + + Creates a ContextSource instance to be used to get LdapContexts for communicating with an LDAP server. + + + + + + + + + Defines the settings to use for the Spring LDAP connection pooling support. + + + + + + + + + + + + Defines the settings to use for the Spring LDAP connection pooling support based on commons-pool2 library. + + + + + + + + + + + + + + + + + A bean identifier, used for referring to the bean elsewhere in the context. + Default is "ldapTemplate". + + + + + + + Id of the ContextSource instance to use. Default is "contextSource". + + + + + + + The default count limit for searches. Default is 0 (no limit). + + + + + + + The default time limit for searches. Default is 0 (no limit). + + + + + + + The default search scope for searches. Default is SUBTREE. + + + + + + + + + + + + + + Specifies whether NameNotFoundException should be ignored in searches. Setting this + attribute to true will cause errors caused by invalid search base to be silently swallowed. + Default is false. + + + + + + + Specifies whether PartialResultException should be ignored in searches. Some LDAP servers + have problems with referrals; these should normally be followed automatically, but if this + doesn't work it will manifest itself with a PartialResultException. Setting this attribute + to true presents a work-around to this problem. Default is false. + + + + + + + Id of the ObjectDirectoryMapper instance to use. Default is a default-configured DefaultObjectDirectoryMapper. + + + + + + + + + Creates an LdapTemplate instance. + + + + + + + + + + + + Id of this instance. Default is "transactionManager". + + + + + + + Id of the ContextSource instance to use. "contextSource". + + + + + + + + + Creates an ContextSourceTransactionManager + + + + + + + + The default (simplistic) TempEntryRenamingStrategy. Please note that this + strategy will not work for more advanced scenarios. See reference documentation + for details. + + + + + + + The default suffix that will be added to modified entries. + Default is "_temp". + + + + + + + + + TempEntryRenamingStrategy that moves the entry to a different subtree than + the original entry. + + + + + + + The subtree base where changed entries should be moved. + + + + + + + + + + + + + + + + + + The reference to an LdapTemplate. Will default to 'ldapTemplate'. + + + + + + + + diff --git a/core/src/test/java/org/springframework/ldap/NamingExceptionTests.java b/core/src/test/java/org/springframework/ldap/NamingExceptionTests.java index ff231a1b35..f7735f76de 100644 --- a/core/src/test/java/org/springframework/ldap/NamingExceptionTests.java +++ b/core/src/test/java/org/springframework/ldap/NamingExceptionTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,7 +24,7 @@ import javax.naming.directory.InitialDirContext; -import org.junit.Test; +import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; diff --git a/core/src/test/java/org/springframework/ldap/aot/hint/LdapCoreRuntimeHintsTests.java b/core/src/test/java/org/springframework/ldap/aot/hint/LdapCoreRuntimeHintsTests.java index 4ebbf12f28..0880c6c299 100644 --- a/core/src/test/java/org/springframework/ldap/aot/hint/LdapCoreRuntimeHintsTests.java +++ b/core/src/test/java/org/springframework/ldap/aot/hint/LdapCoreRuntimeHintsTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2023 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,8 +22,8 @@ import javax.naming.ldap.SortResponseControl; import javax.net.ssl.SSLSocketFactory; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.springframework.aot.hint.MemberCategory; import org.springframework.aot.hint.RuntimeHints; @@ -44,7 +44,7 @@ public class LdapCoreRuntimeHintsTests { private final RuntimeHints hints = new RuntimeHints(); - @Before + @BeforeEach public void setup() { SpringFactoriesLoader.forResourceLocation("META-INF/spring/aot.factories") .load(RuntimeHintsRegistrar.class) diff --git a/core/src/test/java/org/springframework/ldap/authentication/DefaultValuesAuthenticationSourceDecoratorTests.java b/core/src/test/java/org/springframework/ldap/authentication/DefaultValuesAuthenticationSourceDecoratorTests.java index a462368155..3409d8fbf2 100644 --- a/core/src/test/java/org/springframework/ldap/authentication/DefaultValuesAuthenticationSourceDecoratorTests.java +++ b/core/src/test/java/org/springframework/ldap/authentication/DefaultValuesAuthenticationSourceDecoratorTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,8 +16,8 @@ package org.springframework.ldap.authentication; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.springframework.ldap.core.AuthenticationSource; @@ -36,7 +36,7 @@ public class DefaultValuesAuthenticationSourceDecoratorTests { private AuthenticationSource authenticationSourceMock; - @Before + @BeforeEach public void setUp() throws Exception { this.authenticationSourceMock = mock(AuthenticationSource.class); this.tested = new DefaultValuesAuthenticationSourceDecorator(); diff --git a/core/src/test/java/org/springframework/ldap/config/DummyAuthenticationSource.java b/core/src/test/java/org/springframework/ldap/config/DummyAuthenticationSource.java index 849f0b36f9..8be654422d 100644 --- a/core/src/test/java/org/springframework/ldap/config/DummyAuthenticationSource.java +++ b/core/src/test/java/org/springframework/ldap/config/DummyAuthenticationSource.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/test/java/org/springframework/ldap/config/DummyAuthenticationStrategy.java b/core/src/test/java/org/springframework/ldap/config/DummyAuthenticationStrategy.java index 1fc6117459..b1037359a6 100644 --- a/core/src/test/java/org/springframework/ldap/config/DummyAuthenticationStrategy.java +++ b/core/src/test/java/org/springframework/ldap/config/DummyAuthenticationStrategy.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/test/java/org/springframework/ldap/config/LdapTemplateNamespaceHandlerTests.java b/core/src/test/java/org/springframework/ldap/config/LdapTemplateNamespaceHandlerTests.java index a645098dce..7632eeace4 100644 --- a/core/src/test/java/org/springframework/ldap/config/LdapTemplateNamespaceHandlerTests.java +++ b/core/src/test/java/org/springframework/ldap/config/LdapTemplateNamespaceHandlerTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,7 +28,7 @@ import org.apache.commons.pool.impl.GenericKeyedObjectPool; import org.apache.commons.pool2.impl.GenericKeyedObjectPoolConfig; -import org.junit.Test; +import org.junit.jupiter.api.Test; import org.springframework.beans.BeansException; import org.springframework.context.support.ClassPathXmlApplicationContext; @@ -42,7 +42,6 @@ import org.springframework.ldap.pool2.factory.PooledContextSource; import org.springframework.ldap.support.LdapUtils; import org.springframework.ldap.transaction.compensating.TempEntryRenamingStrategy; -import org.springframework.ldap.transaction.compensating.manager.ContextSourceAndDataSourceTransactionManager; import org.springframework.ldap.transaction.compensating.manager.ContextSourceTransactionManager; import org.springframework.ldap.transaction.compensating.manager.TransactionAwareContextSourceProxy; import org.springframework.ldap.transaction.compensating.support.DefaultTempEntryRenamingStrategy; @@ -51,6 +50,7 @@ import org.springframework.util.ReflectionUtils; import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatExceptionOfType; /** * @author Mattias Hellborg Arthursson @@ -97,19 +97,22 @@ public void verifyThatAnonymousReadOnlyContextWillNotBeWrappedInProxy() { assertThat(Boolean.TRUE).isEqualTo(getInternalState(contextSource, "anonymousReadOnly")); } - @Test(expected = BeansException.class) + @Test public void verifyThatAnonymousReadOnlyAndTransactionalThrowsException() { - new ClassPathXmlApplicationContext("/ldap-namespace-config-anonymous-read-only-and-transactions.xml"); + assertThatExceptionOfType(BeansException.class).isThrownBy(() -> new ClassPathXmlApplicationContext( + "/ldap-namespace-config-anonymous-read-only-and-transactions.xml")); } - @Test(expected = BeansException.class) + @Test public void verifyThatMissingUsernameThrowsException() { - new ClassPathXmlApplicationContext("/ldap-namespace-config-missing-username.xml"); + assertThatExceptionOfType(BeansException.class) + .isThrownBy(() -> new ClassPathXmlApplicationContext("/ldap-namespace-config-missing-username.xml")); } - @Test(expected = BeansException.class) + @Test public void verifyThatMissingPasswordThrowsException() { - new ClassPathXmlApplicationContext("/ldap-namespace-config-missing-password.xml"); + assertThatExceptionOfType(BeansException.class) + .isThrownBy(() -> new ClassPathXmlApplicationContext("/ldap-namespace-config-missing-password.xml")); } @Test @@ -238,11 +241,8 @@ public void verifyParseWithDefaultTransactions() { @Test public void verifyParseTransactionWithDataSource() { - ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext( - "/ldap-namespace-config-transactional-datasource.xml"); - PlatformTransactionManager transactionManager = ctx.getBean(PlatformTransactionManager.class); - - assertThat(transactionManager instanceof ContextSourceAndDataSourceTransactionManager).isTrue(); + assertThatExceptionOfType(BeansException.class).isThrownBy( + () -> new ClassPathXmlApplicationContext("/ldap-namespace-config-transactional-datasource.xml")); } @Test @@ -369,9 +369,10 @@ public void verifyParsePoolingValidationSet() { assertThat(nonTransientExceptions.contains(CannotProceedException.class)).isTrue(); } - @Test(expected = BeansException.class) + @Test public void verifyParseWithPoolingAndNativePoolingWillFail() { - new ClassPathXmlApplicationContext("/ldap-namespace-config-pooling-with-native.xml"); + assertThatExceptionOfType(BeansException.class) + .isThrownBy(() -> new ClassPathXmlApplicationContext("/ldap-namespace-config-pooling-with-native.xml")); } @Test @@ -497,14 +498,16 @@ public void verifyParsePool2ValidationSet() { assertThat(nonTransientExceptions.contains(CannotProceedException.class)).isTrue(); } - @Test(expected = BeansException.class) + @Test public void verifyParseWithPool2AndNativePoolingWillFail() { - new ClassPathXmlApplicationContext("/ldap-namespace-config-pool2-with-native.xml"); + assertThatExceptionOfType(BeansException.class) + .isThrownBy(() -> new ClassPathXmlApplicationContext("/ldap-namespace-config-pool2-with-native.xml")); } - @Test(expected = BeansException.class) + @Test public void verifyParseWithPool1AndPool2WillFail() { - new ClassPathXmlApplicationContext("/ldap-namespace-config-pool2-with-pool1.xml"); + assertThatExceptionOfType(BeansException.class) + .isThrownBy(() -> new ClassPathXmlApplicationContext("/ldap-namespace-config-pool2-with-pool1.xml")); } @Test diff --git a/core/src/test/java/org/springframework/ldap/config/MockFactoryBean.java b/core/src/test/java/org/springframework/ldap/config/MockFactoryBean.java index 6e1dabca4e..c7340f56de 100644 --- a/core/src/test/java/org/springframework/ldap/config/MockFactoryBean.java +++ b/core/src/test/java/org/springframework/ldap/config/MockFactoryBean.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/test/java/org/springframework/ldap/control/PagedResultTests.java b/core/src/test/java/org/springframework/ldap/control/PagedResultTests.java index 86766f4ac1..e1cd3fb3ae 100644 --- a/core/src/test/java/org/springframework/ldap/control/PagedResultTests.java +++ b/core/src/test/java/org/springframework/ldap/control/PagedResultTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,7 +22,7 @@ import javax.naming.ldap.PagedResultsControl; import com.gargoylesoftware.base.testing.EqualsTester; -import org.junit.Test; +import org.junit.jupiter.api.Test; /** * Unit tests for the PagedResult class. {@link PagedResultsControl} diff --git a/core/src/test/java/org/springframework/ldap/control/PagedResultsCookieTests.java b/core/src/test/java/org/springframework/ldap/control/PagedResultsCookieTests.java index ef9b19cde6..3c3e402815 100644 --- a/core/src/test/java/org/springframework/ldap/control/PagedResultsCookieTests.java +++ b/core/src/test/java/org/springframework/ldap/control/PagedResultsCookieTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,7 +17,7 @@ package org.springframework.ldap.control; import com.gargoylesoftware.base.testing.EqualsTester; -import org.junit.Test; +import org.junit.jupiter.api.Test; public class PagedResultsCookieTests { diff --git a/core/src/test/java/org/springframework/ldap/control/PagedResultsDirContextProcessorTests.java b/core/src/test/java/org/springframework/ldap/control/PagedResultsDirContextProcessorTests.java index 7bad249f85..45861dc597 100644 --- a/core/src/test/java/org/springframework/ldap/control/PagedResultsDirContextProcessorTests.java +++ b/core/src/test/java/org/springframework/ldap/control/PagedResultsDirContextProcessorTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,9 +27,9 @@ import com.sun.jndi.ldap.BerDecoder; import com.sun.jndi.ldap.BerEncoder; import com.sun.jndi.ldap.ctl.DirSyncResponseControl; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.BDDMockito.given; @@ -41,7 +41,7 @@ public class PagedResultsDirContextProcessorTests { private PagedResultsDirContextProcessor tested; - @Before + @BeforeEach public void setUp() throws Exception { this.tested = new PagedResultsDirContextProcessor(20); @@ -50,7 +50,7 @@ public void setUp() throws Exception { this.ldapContextMock = mock(LdapContext.class); } - @After + @AfterEach public void tearDown() throws Exception { this.tested = null; diff --git a/core/src/test/java/org/springframework/ldap/control/RequestControlDirContextProcessorTests.java b/core/src/test/java/org/springframework/ldap/control/RequestControlDirContextProcessorTests.java index d4c6a1b833..2f8dcd746e 100644 --- a/core/src/test/java/org/springframework/ldap/control/RequestControlDirContextProcessorTests.java +++ b/core/src/test/java/org/springframework/ldap/control/RequestControlDirContextProcessorTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,10 +22,11 @@ import javax.naming.ldap.LdapContext; import javax.naming.ldap.SortControl; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import static org.assertj.core.api.Assertions.assertThatExceptionOfType; import static org.mockito.BDDMockito.given; import static org.mockito.BDDMockito.mock; import static org.mockito.BDDMockito.verify; @@ -42,7 +43,7 @@ public class RequestControlDirContextProcessorTests { private DirContext dirContextMock; - @Before + @BeforeEach public void setUp() throws Exception { // Create requestControl mock this.requestControlMock = mock(Control.class); @@ -68,7 +69,7 @@ public void postProcess(DirContext ctx) throws NamingException { }; } - @After + @AfterEach public void tearDown() throws Exception { this.requestControlMock = null; this.requestControl2Mock = null; @@ -125,9 +126,10 @@ public void testPreProcessWithNullControlsShouldAdd() throws NamingException { verify(this.ldapContextMock).setRequestControls(new Control[] { this.requestControlMock }); } - @Test(expected = IllegalArgumentException.class) - public void testPreProcessWhenNotLdapContextShouldFail() throws Exception { - this.tested.preProcess(this.dirContextMock); + @Test + public void testPreProcessWhenNotLdapContextShouldFail() { + assertThatExceptionOfType(IllegalArgumentException.class) + .isThrownBy(() -> this.tested.preProcess(this.dirContextMock)); } } diff --git a/core/src/test/java/org/springframework/ldap/control/SortControlDirContextProcessorTests.java b/core/src/test/java/org/springframework/ldap/control/SortControlDirContextProcessorTests.java index 9c6ae6ae8e..e1341fe997 100644 --- a/core/src/test/java/org/springframework/ldap/control/SortControlDirContextProcessorTests.java +++ b/core/src/test/java/org/springframework/ldap/control/SortControlDirContextProcessorTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,8 +27,8 @@ import com.sun.jndi.ldap.BerDecoder; import com.sun.jndi.ldap.BerEncoder; import com.sun.jndi.ldap.ctl.DirSyncResponseControl; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.BDDMockito.given; @@ -45,7 +45,7 @@ public class SortControlDirContextProcessorTests { private SortControlDirContextProcessor tested; - @Before + @BeforeEach public void setUp() throws Exception { this.tested = new SortControlDirContextProcessor("key"); diff --git a/core/src/test/java/org/springframework/ldap/core/CollectingNameClassPairCallbackHandlerTests.java b/core/src/test/java/org/springframework/ldap/core/CollectingNameClassPairCallbackHandlerTests.java index f999df231e..0f493a9185 100644 --- a/core/src/test/java/org/springframework/ldap/core/CollectingNameClassPairCallbackHandlerTests.java +++ b/core/src/test/java/org/springframework/ldap/core/CollectingNameClassPairCallbackHandlerTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,8 +21,8 @@ import javax.naming.NameClassPair; import javax.naming.NamingException; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; @@ -34,7 +34,7 @@ public class CollectingNameClassPairCallbackHandlerTests { private NameClassPair expectedNameClassPair; - @Before + @BeforeEach public void setUp() throws Exception { this.expectedResult = new Object(); this.expectedNameClassPair = new NameClassPair(null, null); diff --git a/core/src/test/java/org/springframework/ldap/core/ContextMapperCallbackHandlerTests.java b/core/src/test/java/org/springframework/ldap/core/ContextMapperCallbackHandlerTests.java index 598b081ff4..c367ddeb13 100644 --- a/core/src/test/java/org/springframework/ldap/core/ContextMapperCallbackHandlerTests.java +++ b/core/src/test/java/org/springframework/ldap/core/ContextMapperCallbackHandlerTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,10 +19,11 @@ import javax.naming.Binding; import javax.naming.NamingException; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatExceptionOfType; import static org.mockito.BDDMockito.given; import static org.mockito.BDDMockito.mock; @@ -32,15 +33,16 @@ public class ContextMapperCallbackHandlerTests { private ContextMapperCallbackHandler tested; - @Before + @BeforeEach public void setUp() throws Exception { this.mapperMock = mock(ContextMapper.class); this.tested = new ContextMapperCallbackHandler(this.mapperMock); } - @Test(expected = IllegalArgumentException.class) + @Test public void testConstructorWithEmptyArgument() { - new ContextMapperCallbackHandler(null); + assertThatExceptionOfType(IllegalArgumentException.class) + .isThrownBy(() -> new ContextMapperCallbackHandler(null)); } @Test @@ -54,10 +56,12 @@ public void testGetObjectFromNameClassPair() throws NamingException { assertThat(actualResult).isEqualTo(expectedResult); } - @Test(expected = ObjectRetrievalException.class) - public void testGetObjectFromNameClassPairObjectRetrievalException() throws NamingException { - Binding expectedBinding = new Binding("some name", null); - this.tested.getObjectFromNameClassPair(expectedBinding); + @Test + public void testGetObjectFromNameClassPairObjectRetrievalException() { + assertThatExceptionOfType(ObjectRetrievalException.class).isThrownBy(() -> { + Binding expectedBinding = new Binding("some name", null); + this.tested.getObjectFromNameClassPair(expectedBinding); + }); } } diff --git a/core/src/test/java/org/springframework/ldap/core/DefaultLdapClientListTests.java b/core/src/test/java/org/springframework/ldap/core/DefaultLdapClientListTests.java index 5d82e7e28c..027106de40 100644 --- a/core/src/test/java/org/springframework/ldap/core/DefaultLdapClientListTests.java +++ b/core/src/test/java/org/springframework/ldap/core/DefaultLdapClientListTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2022 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,8 +28,8 @@ import javax.naming.directory.DirContext; import javax.naming.ldap.LdapContext; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.springframework.ldap.LimitExceededException; import org.springframework.ldap.PartialResultException; @@ -64,7 +64,7 @@ public class DefaultLdapClientListTests { private DefaultLdapClient tested; - @Before + @BeforeEach public void setUp() throws Exception { // Setup ContextSource mock this.contextSourceMock = mock(ContextSource.class); diff --git a/core/src/test/java/org/springframework/ldap/core/DefaultLdapClientLookupTests.java b/core/src/test/java/org/springframework/ldap/core/DefaultLdapClientLookupTests.java index 5108dff5de..32ff50ad03 100644 --- a/core/src/test/java/org/springframework/ldap/core/DefaultLdapClientLookupTests.java +++ b/core/src/test/java/org/springframework/ldap/core/DefaultLdapClientLookupTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2022 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,8 +27,8 @@ import javax.naming.directory.SearchResult; import javax.naming.ldap.LdapContext; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.mockito.BDDMockito; import org.springframework.LdapDataEntry; @@ -56,7 +56,7 @@ public class DefaultLdapClientLookupTests { private LdapClient tested; - @Before + @BeforeEach public void setUp() throws Exception { this.contextSourceMock = mock(ContextSource.class); this.dirContextMock = mock(LdapContext.class); diff --git a/core/src/test/java/org/springframework/ldap/core/DefaultLdapClientRenameTests.java b/core/src/test/java/org/springframework/ldap/core/DefaultLdapClientRenameTests.java index 678061a724..5e2dec8c9a 100644 --- a/core/src/test/java/org/springframework/ldap/core/DefaultLdapClientRenameTests.java +++ b/core/src/test/java/org/springframework/ldap/core/DefaultLdapClientRenameTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,8 +20,8 @@ import javax.naming.directory.DirContext; import javax.naming.ldap.LdapContext; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.springframework.ldap.NameAlreadyBoundException; import org.springframework.ldap.UncategorizedLdapException; @@ -51,7 +51,7 @@ public class DefaultLdapClientRenameTests { private LdapClient tested; - @Before + @BeforeEach public void setUp() throws Exception { // Setup ContextSource mock this.contextSourceMock = mock(ContextSource.class); diff --git a/core/src/test/java/org/springframework/ldap/core/DefaultLdapClientTests.java b/core/src/test/java/org/springframework/ldap/core/DefaultLdapClientTests.java index 82d8b52bd3..02cb1acd0b 100644 --- a/core/src/test/java/org/springframework/ldap/core/DefaultLdapClientTests.java +++ b/core/src/test/java/org/springframework/ldap/core/DefaultLdapClientTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2025 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -30,8 +30,8 @@ import javax.naming.ldap.LdapContext; import javax.naming.ldap.LdapName; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.mockito.ArgumentMatcher; import org.springframework.dao.EmptyResultDataAccessException; @@ -102,7 +102,7 @@ public class DefaultLdapClientTests { private AuthenticatedLdapEntryContextMapper authContextMapperMock; - @Before + @BeforeEach public void setUp() throws Exception { // Setup ContextSource mock diff --git a/core/src/test/java/org/springframework/ldap/core/DirContextAdapterBugTests.java b/core/src/test/java/org/springframework/ldap/core/DirContextAdapterBugTests.java index 32e7423fac..3e39238be0 100644 --- a/core/src/test/java/org/springframework/ldap/core/DirContextAdapterBugTests.java +++ b/core/src/test/java/org/springframework/ldap/core/DirContextAdapterBugTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,7 +20,7 @@ import javax.naming.directory.Attributes; import javax.naming.directory.BasicAttributes; -import org.junit.Test; +import org.junit.jupiter.api.Test; import org.springframework.ldap.support.LdapUtils; diff --git a/core/src/test/java/org/springframework/ldap/core/DirContextAdapterTests.java b/core/src/test/java/org/springframework/ldap/core/DirContextAdapterTests.java index f8ab26f3e8..7c57db372a 100644 --- a/core/src/test/java/org/springframework/ldap/core/DirContextAdapterTests.java +++ b/core/src/test/java/org/springframework/ldap/core/DirContextAdapterTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -30,8 +30,8 @@ import javax.naming.directory.ModificationItem; import javax.naming.ldap.LdapName; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.springframework.ldap.support.LdapUtils; @@ -53,7 +53,7 @@ public class DirContextAdapterTests { private DirContextAdapter tested; - @Before + @BeforeEach public void setUp() throws Exception { this.tested = new DirContextAdapter(); } diff --git a/core/src/test/java/org/springframework/ldap/core/DistinguishedNameEditorTests.java b/core/src/test/java/org/springframework/ldap/core/DistinguishedNameEditorTests.java index 74532b5d06..938e1e4ea2 100644 --- a/core/src/test/java/org/springframework/ldap/core/DistinguishedNameEditorTests.java +++ b/core/src/test/java/org/springframework/ldap/core/DistinguishedNameEditorTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,8 +16,8 @@ package org.springframework.ldap.core; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.fail; @@ -31,7 +31,7 @@ public class DistinguishedNameEditorTests { private DistinguishedNameEditor tested; - @Before + @BeforeEach public void setUp() throws Exception { this.tested = new DistinguishedNameEditor(); } diff --git a/core/src/test/java/org/springframework/ldap/core/DistinguishedNameTests.java b/core/src/test/java/org/springframework/ldap/core/DistinguishedNameTests.java index 6bc526d316..3c61e6f31f 100644 --- a/core/src/test/java/org/springframework/ldap/core/DistinguishedNameTests.java +++ b/core/src/test/java/org/springframework/ldap/core/DistinguishedNameTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,11 +23,12 @@ import javax.naming.Name; import com.gargoylesoftware.base.testing.EqualsTester; -import org.junit.Test; +import org.junit.jupiter.api.Test; import org.springframework.ldap.BadLdapGrammarException; import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatExceptionOfType; import static org.assertj.core.api.Assertions.fail; /** @@ -469,10 +470,12 @@ public void testGetLdapRdnForKey() throws Exception { assertThat(ldapRdn).isEqualTo(new LdapRdn("ou=Some company")); } - @Test(expected = IllegalArgumentException.class) - public void testGetLdapRdnForKeyNoMatchingKeyThrowsException() throws Exception { - DistinguishedName dn = new DistinguishedName("cn=john doe, ou=Some company, c=SE"); - dn.getLdapRdn("nosuchkey"); + @Test + public void testGetLdapRdnForKeyNoMatchingKeyThrowsException() { + assertThatExceptionOfType(IllegalArgumentException.class).isThrownBy(() -> { + DistinguishedName dn = new DistinguishedName("cn=john doe, ou=Some company, c=SE"); + dn.getLdapRdn("nosuchkey"); + }); } @Test @@ -482,10 +485,12 @@ public void testGetValue() throws Exception { assertThat(value).isEqualTo("Some company"); } - @Test(expected = IllegalArgumentException.class) - public void testGetValueNoMatchingKeyThrowsException() throws Exception { - DistinguishedName dn = new DistinguishedName("cn=john doe, ou=Some company, c=SE"); - dn.getValue("nosuchkey"); + @Test + public void testGetValueNoMatchingKeyThrowsException() { + assertThatExceptionOfType(IllegalArgumentException.class).isThrownBy(() -> { + DistinguishedName dn = new DistinguishedName("cn=john doe, ou=Some company, c=SE"); + dn.getValue("nosuchkey"); + }); } @Test @@ -515,9 +520,10 @@ public void testParseAtSign2() { /** * Test case to verify correct parsing for issue on forums. */ - @Test(expected = BadLdapGrammarException.class) + @Test public void testParseInvalidPlus() { - new DistinguishedName("cn=te+stname@example.com"); + assertThatExceptionOfType(BadLdapGrammarException.class) + .isThrownBy(() -> new DistinguishedName("cn=te+stname@example.com")); } /** @@ -537,34 +543,42 @@ public void testAppendChained() { assertThat(tested.toString()).isEqualTo("cn=john doe,ou=company1,dc=mycompany,dc=com"); } - @Test(expected = UnsupportedOperationException.class) - public void testUnmodifiableDistinguishedNameFailsToAddRdn() throws Exception { - DistinguishedName result = DistinguishedName.immutableDistinguishedName("cn=john doe"); - result.add(new LdapRdn("somekey", "somevalue")); + @Test + public void testUnmodifiableDistinguishedNameFailsToAddRdn() { + assertThatExceptionOfType(UnsupportedOperationException.class).isThrownBy(() -> { + DistinguishedName result = DistinguishedName.immutableDistinguishedName("cn=john doe"); + result.add(new LdapRdn("somekey", "somevalue")); + }); } - @Test(expected = UnsupportedOperationException.class) - public void testUnmodifiableDistinguishedNameFailsToModifyRdn() throws Exception { - DistinguishedName result = DistinguishedName.immutableDistinguishedName("cn=john doe"); - LdapRdn ldapRdn = result.getLdapRdn(0); + @Test + public void testUnmodifiableDistinguishedNameFailsToModifyRdn() { + assertThatExceptionOfType(UnsupportedOperationException.class).isThrownBy(() -> { + DistinguishedName result = DistinguishedName.immutableDistinguishedName("cn=john doe"); + LdapRdn ldapRdn = result.getLdapRdn(0); - ldapRdn.addComponent(new LdapRdnComponent("somekey", "somevalue")); + ldapRdn.addComponent(new LdapRdnComponent("somekey", "somevalue")); + }); } - @Test(expected = UnsupportedOperationException.class) - public void testUnmodifiableDistinguishedNameFailsToModifyRdnComponentKey() throws Exception { - DistinguishedName result = DistinguishedName.immutableDistinguishedName("cn=john doe"); - LdapRdnComponent component = result.getLdapRdn(0).getComponent(); + @Test + public void testUnmodifiableDistinguishedNameFailsToModifyRdnComponentKey() { + assertThatExceptionOfType(UnsupportedOperationException.class).isThrownBy(() -> { + DistinguishedName result = DistinguishedName.immutableDistinguishedName("cn=john doe"); + LdapRdnComponent component = result.getLdapRdn(0).getComponent(); - component.setKey("somekey"); + component.setKey("somekey"); + }); } - @Test(expected = UnsupportedOperationException.class) - public void testUnmodifiableDistinguishedNameFailsToModifyRdnComponentValue() throws Exception { - DistinguishedName result = DistinguishedName.immutableDistinguishedName("cn=john doe"); - LdapRdnComponent component = result.getLdapRdn(0).getComponent(); + @Test + public void testUnmodifiableDistinguishedNameFailsToModifyRdnComponentValue() { + assertThatExceptionOfType(UnsupportedOperationException.class).isThrownBy(() -> { + DistinguishedName result = DistinguishedName.immutableDistinguishedName("cn=john doe"); + LdapRdnComponent component = result.getLdapRdn(0).getComponent(); - component.setValue("somevalue"); + component.setValue("somevalue"); + }); } @Test diff --git a/core/src/test/java/org/springframework/ldap/core/LdapRdnComponentTests.java b/core/src/test/java/org/springframework/ldap/core/LdapRdnComponentTests.java index b1b2fc2533..83296f42d5 100644 --- a/core/src/test/java/org/springframework/ldap/core/LdapRdnComponentTests.java +++ b/core/src/test/java/org/springframework/ldap/core/LdapRdnComponentTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ package org.springframework.ldap.core; -import org.junit.Test; +import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; diff --git a/core/src/test/java/org/springframework/ldap/core/LdapRdnTests.java b/core/src/test/java/org/springframework/ldap/core/LdapRdnTests.java index 30beaf0d80..a44f69d958 100644 --- a/core/src/test/java/org/springframework/ldap/core/LdapRdnTests.java +++ b/core/src/test/java/org/springframework/ldap/core/LdapRdnTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,11 +17,12 @@ package org.springframework.ldap.core; import com.gargoylesoftware.base.testing.EqualsTester; -import org.junit.Test; +import org.junit.jupiter.api.Test; import org.springframework.ldap.BadLdapGrammarException; import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatExceptionOfType; /** * Unit test for the LdapRdn class. @@ -72,9 +73,9 @@ public void testLdapRdn_parse_hexEscape() { assertThat(rdn.getComponent().getLdapEncoded()).isEqualTo("foo=bar\\0Dfum"); } - @Test(expected = BadLdapGrammarException.class) + @Test public void testLdapRdn_parse_trailingBackslash() { - new LdapRdn("foo=bar\\"); + assertThatExceptionOfType(BadLdapGrammarException.class).isThrownBy(() -> new LdapRdn("foo=bar\\")); } @Test @@ -86,9 +87,9 @@ public void testLdapRdn_parse_spaces_escape() { assertThat(rdn.getComponent().getLdapEncoded()).isEqualTo("foo=\\ bar \\ "); } - @Test(expected = BadLdapGrammarException.class) + @Test public void testLdapRdn_parse_tooMuchTrim() { - new LdapRdn("foo=bar\\"); + assertThatExceptionOfType(BadLdapGrammarException.class).isThrownBy(() -> new LdapRdn("foo=bar\\")); } @Test @@ -100,9 +101,9 @@ public void testLdapRdn_parse_slash() { assertThat(rdn.getComponent().getLdapEncoded()).isEqualTo("ou=Clerical / Secretarial Staff"); } - @Test(expected = BadLdapGrammarException.class) + @Test public void testLdapRdn_parse_quoteInKey() { - new LdapRdn("\"umanroleid=2583"); + assertThatExceptionOfType(BadLdapGrammarException.class).isThrownBy(() -> new LdapRdn("\"umanroleid=2583")); } @Test @@ -147,16 +148,20 @@ public void testLdapRdn_Parse_MultipleComponents() { assertThat(rdn.getValue("sn")).isEqualTo("Doe"); } - @Test(expected = IllegalArgumentException.class) + @Test public void testGetValueNoKeyWithCorrectValue() { - LdapRdn tested = new LdapRdn("cn=john doe"); - tested.getValue("sn"); + assertThatExceptionOfType(IllegalArgumentException.class).isThrownBy(() -> { + LdapRdn tested = new LdapRdn("cn=john doe"); + tested.getValue("sn"); + }); } - @Test(expected = IllegalArgumentException.class) + @Test public void testGetValueNoComponents() { - LdapRdn tested = new LdapRdn(); - tested.getValue("sn"); + assertThatExceptionOfType(IllegalArgumentException.class).isThrownBy(() -> { + LdapRdn tested = new LdapRdn(); + tested.getValue("sn"); + }); } @Test diff --git a/core/src/test/java/org/springframework/ldap/core/LdapTemplateListTests.java b/core/src/test/java/org/springframework/ldap/core/LdapTemplateListTests.java index 374954796b..7f4118afec 100644 --- a/core/src/test/java/org/springframework/ldap/core/LdapTemplateListTests.java +++ b/core/src/test/java/org/springframework/ldap/core/LdapTemplateListTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,8 +26,8 @@ import javax.naming.directory.DirContext; import javax.naming.ldap.LdapContext; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.springframework.ldap.LimitExceededException; import org.springframework.ldap.PartialResultException; @@ -63,7 +63,7 @@ public class LdapTemplateListTests { private LdapTemplate tested; - @Before + @BeforeEach public void setUp() throws Exception { // Setup ContextSource mock this.contextSourceMock = mock(ContextSource.class); diff --git a/core/src/test/java/org/springframework/ldap/core/LdapTemplateLookupTests.java b/core/src/test/java/org/springframework/ldap/core/LdapTemplateLookupTests.java index 63528d6453..fa9b21e293 100644 --- a/core/src/test/java/org/springframework/ldap/core/LdapTemplateLookupTests.java +++ b/core/src/test/java/org/springframework/ldap/core/LdapTemplateLookupTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,8 +25,8 @@ import javax.naming.ldap.LdapContext; import javax.naming.ldap.LdapName; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.springframework.ldap.NameNotFoundException; import org.springframework.ldap.odm.core.ObjectDirectoryMapper; @@ -56,7 +56,7 @@ public class LdapTemplateLookupTests { private ObjectDirectoryMapper odmMock; - @Before + @BeforeEach public void setUp() throws Exception { // Setup ContextSource mock this.contextSourceMock = mock(ContextSource.class); diff --git a/core/src/test/java/org/springframework/ldap/core/LdapTemplateOdmTests.java b/core/src/test/java/org/springframework/ldap/core/LdapTemplateOdmTests.java index 2e3a7071ff..d3c6822483 100644 --- a/core/src/test/java/org/springframework/ldap/core/LdapTemplateOdmTests.java +++ b/core/src/test/java/org/springframework/ldap/core/LdapTemplateOdmTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2023 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,8 +16,8 @@ package org.springframework.ldap.core; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.springframework.ldap.odm.core.ObjectDirectoryMapper; @@ -34,7 +34,7 @@ public class LdapTemplateOdmTests { private ObjectDirectoryMapper odmMock; - @Before + @BeforeEach public void prepareTestedClass() { this.tested = mock(LdapTemplate.class); diff --git a/core/src/test/java/org/springframework/ldap/core/LdapTemplateRenameTests.java b/core/src/test/java/org/springframework/ldap/core/LdapTemplateRenameTests.java index bff64add03..ae88464d10 100644 --- a/core/src/test/java/org/springframework/ldap/core/LdapTemplateRenameTests.java +++ b/core/src/test/java/org/springframework/ldap/core/LdapTemplateRenameTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,8 +20,8 @@ import javax.naming.directory.DirContext; import javax.naming.ldap.LdapContext; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.springframework.ldap.NameAlreadyBoundException; import org.springframework.ldap.UncategorizedLdapException; @@ -50,7 +50,7 @@ public class LdapTemplateRenameTests { private LdapTemplate tested; - @Before + @BeforeEach public void setUp() throws Exception { // Setup ContextSource mock this.contextSourceMock = mock(ContextSource.class); diff --git a/core/src/test/java/org/springframework/ldap/core/LdapTemplateTests.java b/core/src/test/java/org/springframework/ldap/core/LdapTemplateTests.java index 213b497fcd..296bfb1c5b 100644 --- a/core/src/test/java/org/springframework/ldap/core/LdapTemplateTests.java +++ b/core/src/test/java/org/springframework/ldap/core/LdapTemplateTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -32,8 +32,8 @@ import javax.naming.ldap.LdapContext; import javax.naming.ldap.LdapName; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.mockito.ArgumentCaptor; import org.mockito.ArgumentMatcher; @@ -109,7 +109,7 @@ public class LdapTemplateTests { private AuthenticatedLdapEntryContextMapper authContextMapperMock; - @Before + @BeforeEach public void setUp() throws Exception { // Setup ContextSource mock diff --git a/core/src/test/java/org/springframework/ldap/core/MockDirContext.java b/core/src/test/java/org/springframework/ldap/core/MockDirContext.java index b888534d43..3d4928e1a2 100644 --- a/core/src/test/java/org/springframework/ldap/core/MockDirContext.java +++ b/core/src/test/java/org/springframework/ldap/core/MockDirContext.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2024 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/test/java/org/springframework/ldap/core/NameAwareAttributeTests.java b/core/src/test/java/org/springframework/ldap/core/NameAwareAttributeTests.java index 192b01a4cc..c92113e162 100644 --- a/core/src/test/java/org/springframework/ldap/core/NameAwareAttributeTests.java +++ b/core/src/test/java/org/springframework/ldap/core/NameAwareAttributeTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,7 +21,7 @@ import javax.naming.NamingException; import javax.naming.ldap.LdapName; -import org.junit.Test; +import org.junit.jupiter.api.Test; import org.springframework.ldap.support.LdapUtils; diff --git a/core/src/test/java/org/springframework/ldap/core/NameAwareAttributesTests.java b/core/src/test/java/org/springframework/ldap/core/NameAwareAttributesTests.java index a682cc1d6c..3851846bb8 100644 --- a/core/src/test/java/org/springframework/ldap/core/NameAwareAttributesTests.java +++ b/core/src/test/java/org/springframework/ldap/core/NameAwareAttributesTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2025 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,7 +19,7 @@ import java.util.List; import java.util.stream.StreamSupport; -import org.junit.Test; +import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; diff --git a/core/src/test/java/org/springframework/ldap/core/TestDirContextAdapters.java b/core/src/test/java/org/springframework/ldap/core/TestDirContextAdapters.java index 1b0a841947..42cadcc944 100644 --- a/core/src/test/java/org/springframework/ldap/core/TestDirContextAdapters.java +++ b/core/src/test/java/org/springframework/ldap/core/TestDirContextAdapters.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2024 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/test/java/org/springframework/ldap/core/TestModificationItems.java b/core/src/test/java/org/springframework/ldap/core/TestModificationItems.java index 66585abd83..87c6ac9820 100644 --- a/core/src/test/java/org/springframework/ldap/core/TestModificationItems.java +++ b/core/src/test/java/org/springframework/ldap/core/TestModificationItems.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2024 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/test/java/org/springframework/ldap/core/TestNameAwareAttributes.java b/core/src/test/java/org/springframework/ldap/core/TestNameAwareAttributes.java index 2189512a4a..adb7bc6004 100644 --- a/core/src/test/java/org/springframework/ldap/core/TestNameAwareAttributes.java +++ b/core/src/test/java/org/springframework/ldap/core/TestNameAwareAttributes.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2024 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/test/java/org/springframework/ldap/core/support/AbstractContextSourceTests.java b/core/src/test/java/org/springframework/ldap/core/support/AbstractContextSourceTests.java index d1988a4705..9cd3788826 100644 --- a/core/src/test/java/org/springframework/ldap/core/support/AbstractContextSourceTests.java +++ b/core/src/test/java/org/springframework/ldap/core/support/AbstractContextSourceTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,7 +19,7 @@ import javax.naming.InvalidNameException; import javax.naming.ldap.LdapName; -import org.junit.Test; +import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; diff --git a/core/src/test/java/org/springframework/ldap/core/support/AggregateDirContextProcessorTests.java b/core/src/test/java/org/springframework/ldap/core/support/AggregateDirContextProcessorTests.java index bc5d86decc..fd6c8a3805 100644 --- a/core/src/test/java/org/springframework/ldap/core/support/AggregateDirContextProcessorTests.java +++ b/core/src/test/java/org/springframework/ldap/core/support/AggregateDirContextProcessorTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,8 +18,8 @@ import javax.naming.NamingException; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.springframework.ldap.core.DirContextProcessor; @@ -34,7 +34,7 @@ public class AggregateDirContextProcessorTests { private AggregateDirContextProcessor tested; - @Before + @BeforeEach public void setUp() throws Exception { // Create processor1 mock this.processor1Mock = mock(DirContextProcessor.class); diff --git a/core/src/test/java/org/springframework/ldap/core/support/BaseLdapPathBeanPostProcessorTests.java b/core/src/test/java/org/springframework/ldap/core/support/BaseLdapPathBeanPostProcessorTests.java index 3009ae4471..8add4a6d16 100644 --- a/core/src/test/java/org/springframework/ldap/core/support/BaseLdapPathBeanPostProcessorTests.java +++ b/core/src/test/java/org/springframework/ldap/core/support/BaseLdapPathBeanPostProcessorTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2025 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,8 +18,8 @@ import java.util.HashMap; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.springframework.beans.factory.NoSuchBeanDefinitionException; import org.springframework.context.ApplicationContext; @@ -27,6 +27,7 @@ import org.springframework.ldap.support.LdapUtils; import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatExceptionOfType; import static org.mockito.BDDMockito.given; import static org.mockito.BDDMockito.mock; import static org.mockito.BDDMockito.verify; @@ -46,7 +47,7 @@ public class BaseLdapPathBeanPostProcessorTests { private BaseLdapNameAware ldapNameAwareMock; - @Before + @BeforeEach public void setUp() throws Exception { this.tested = new BaseLdapPathBeanPostProcessor(); @@ -138,18 +139,22 @@ public void testGetAbstractContextSourceFromApplicationContext() throws Exceptio assertThat(result).isSameAs(expectedContextSource); } - @Test(expected = NoSuchBeanDefinitionException.class) - public void testGetAbstractContextSourceFromApplicationContextNoContextSource() throws Exception { - given(this.applicationContextMock.getBeanNamesForType(BaseLdapPathSource.class)).willReturn(new String[0]); + @Test + public void testGetAbstractContextSourceFromApplicationContextNoContextSource() { + assertThatExceptionOfType(NoSuchBeanDefinitionException.class).isThrownBy(() -> { + given(this.applicationContextMock.getBeanNamesForType(BaseLdapPathSource.class)).willReturn(new String[0]); - this.tested.getBaseLdapPathSourceFromApplicationContext(); + this.tested.getBaseLdapPathSourceFromApplicationContext(); + }); } - @Test(expected = NoSuchBeanDefinitionException.class) - public void testGetAbstractContextSourceFromApplicationContextTwoContextSources() throws Exception { - given(this.applicationContextMock.getBeanNamesForType(BaseLdapPathSource.class)).willReturn(new String[2]); + @Test + public void testGetAbstractContextSourceFromApplicationContextTwoContextSources() { + assertThatExceptionOfType(NoSuchBeanDefinitionException.class).isThrownBy(() -> { + given(this.applicationContextMock.getBeanNamesForType(BaseLdapPathSource.class)).willReturn(new String[2]); - this.tested.getBaseLdapPathSourceFromApplicationContext(); + this.tested.getBaseLdapPathSourceFromApplicationContext(); + }); } @Test diff --git a/core/src/test/java/org/springframework/ldap/core/support/ContextMapperCallbackHandlerWithControlsTests.java b/core/src/test/java/org/springframework/ldap/core/support/ContextMapperCallbackHandlerWithControlsTests.java index 606755dec8..691ff8ca2f 100644 --- a/core/src/test/java/org/springframework/ldap/core/support/ContextMapperCallbackHandlerWithControlsTests.java +++ b/core/src/test/java/org/springframework/ldap/core/support/ContextMapperCallbackHandlerWithControlsTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2025 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,12 +21,13 @@ import javax.naming.ldap.Control; import javax.naming.ldap.HasControls; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.springframework.ldap.core.ObjectRetrievalException; import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatExceptionOfType; import static org.mockito.BDDMockito.given; import static org.mockito.BDDMockito.mock; @@ -41,15 +42,16 @@ public class ContextMapperCallbackHandlerWithControlsTests { private ContextMapperCallbackHandlerWithControls tested; @SuppressWarnings("unchecked") - @Before + @BeforeEach public void setUp() throws Exception { this.mapperMock = mock(ContextMapperWithControls.class); this.tested = new ContextMapperCallbackHandlerWithControls(this.mapperMock); } - @Test(expected = IllegalArgumentException.class) + @Test public void testConstructorWithEmptyArgument() { - new ContextMapperCallbackHandlerWithControls<>(null); + assertThatExceptionOfType(IllegalArgumentException.class) + .isThrownBy(() -> new ContextMapperCallbackHandlerWithControls<>(null)); } @Test @@ -78,11 +80,13 @@ public void testGetObjectFromNameClassPairImplementingHasControls() throws Namin assertThat(actualResult).isEqualTo(expectedResult); } - @Test(expected = ObjectRetrievalException.class) - public void testGetObjectFromNameClassPairObjectRetrievalException() throws NamingException { - Binding expectedBinding = new Binding("some name", null); + @Test + public void testGetObjectFromNameClassPairObjectRetrievalException() { + assertThatExceptionOfType(ObjectRetrievalException.class).isThrownBy(() -> { + Binding expectedBinding = new Binding("some name", null); - this.tested.getObjectFromNameClassPair(expectedBinding); + this.tested.getObjectFromNameClassPair(expectedBinding); + }); } private static class MyBindingThatHasControls extends Binding implements HasControls { diff --git a/core/src/test/java/org/springframework/ldap/core/support/CountNameClassPairResultCallbackHandlerTests.java b/core/src/test/java/org/springframework/ldap/core/support/CountNameClassPairResultCallbackHandlerTests.java index aef8fbcf77..fcf2476476 100644 --- a/core/src/test/java/org/springframework/ldap/core/support/CountNameClassPairResultCallbackHandlerTests.java +++ b/core/src/test/java/org/springframework/ldap/core/support/CountNameClassPairResultCallbackHandlerTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,8 +18,8 @@ import javax.naming.directory.SearchResult; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; @@ -27,7 +27,7 @@ public class CountNameClassPairResultCallbackHandlerTests { private CountNameClassPairCallbackHandler tested; - @Before + @BeforeEach public void setUp() throws Exception { this.tested = new CountNameClassPairCallbackHandler(); } diff --git a/core/src/test/java/org/springframework/ldap/core/support/DefaultDirObjectFactoryTests.java b/core/src/test/java/org/springframework/ldap/core/support/DefaultDirObjectFactoryTests.java index a0ea20bfbc..b3d0cfd48e 100644 --- a/core/src/test/java/org/springframework/ldap/core/support/DefaultDirObjectFactoryTests.java +++ b/core/src/test/java/org/springframework/ldap/core/support/DefaultDirObjectFactoryTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,8 +25,8 @@ import javax.naming.directory.Attributes; import javax.naming.directory.BasicAttributes; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.springframework.ldap.core.DirContextAdapter; import org.springframework.ldap.core.NameAwareAttributes; @@ -49,7 +49,7 @@ public class DefaultDirObjectFactoryTests { private Context contextMock2; - @Before + @BeforeEach public void setUp() throws Exception { this.contextMock = mock(Context.class); this.contextMock2 = mock(Context.class); diff --git a/core/src/test/java/org/springframework/ldap/core/support/DefaultIncrementalAttributesMapperTests.java b/core/src/test/java/org/springframework/ldap/core/support/DefaultIncrementalAttributesMapperTests.java index 56b27cb8b0..f7842aa4f4 100644 --- a/core/src/test/java/org/springframework/ldap/core/support/DefaultIncrementalAttributesMapperTests.java +++ b/core/src/test/java/org/springframework/ldap/core/support/DefaultIncrementalAttributesMapperTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,8 +21,8 @@ import javax.naming.directory.BasicAttribute; import javax.naming.directory.BasicAttributes; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; @@ -36,7 +36,7 @@ public class DefaultIncrementalAttributesMapperTests { private DefaultIncrementalAttributesMapper tested; - @Before + @BeforeEach public void setUp() throws Exception { this.tested = new DefaultIncrementalAttributesMapper("member"); } diff --git a/core/src/test/java/org/springframework/ldap/core/support/DefaultTlsDirContextAuthenticationStrategyTests.java b/core/src/test/java/org/springframework/ldap/core/support/DefaultTlsDirContextAuthenticationStrategyTests.java index a8928f0ac2..82a2763c79 100644 --- a/core/src/test/java/org/springframework/ldap/core/support/DefaultTlsDirContextAuthenticationStrategyTests.java +++ b/core/src/test/java/org/springframework/ldap/core/support/DefaultTlsDirContextAuthenticationStrategyTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2023 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,10 +18,12 @@ import javax.naming.ldap.LdapContext; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; +import org.mockito.junit.jupiter.MockitoSettings; +import org.mockito.quality.Strictness; import static org.mockito.Mockito.verify; @@ -29,7 +31,8 @@ * @author Rob Winch * @since 5.0 */ -@RunWith(MockitoJUnitRunner.class) +@MockitoSettings(strictness = Strictness.WARN) +@ExtendWith(MockitoExtension.class) public class DefaultTlsDirContextAuthenticationStrategyTests { @Mock diff --git a/core/src/test/java/org/springframework/ldap/core/support/LdapContextSourceTests.java b/core/src/test/java/org/springframework/ldap/core/support/LdapContextSourceTests.java index 51382623a2..521773483e 100644 --- a/core/src/test/java/org/springframework/ldap/core/support/LdapContextSourceTests.java +++ b/core/src/test/java/org/springframework/ldap/core/support/LdapContextSourceTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,12 +21,13 @@ import javax.naming.Context; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.springframework.ldap.support.LdapUtils; import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatExceptionOfType; /** * Unit tests for the LdapContextSource class. @@ -38,23 +39,25 @@ public class LdapContextSourceTests { private LdapContextSource tested; - @Before + @BeforeEach public void setUp() throws Exception { this.tested = new LdapContextSource(); } - @Test(expected = IllegalArgumentException.class) - public void testAfterPropertiesSet_NoUrl() throws Exception { - this.tested.afterPropertiesSet(); + @Test + public void testAfterPropertiesSet_NoUrl() { + assertThatExceptionOfType(IllegalArgumentException.class).isThrownBy(() -> this.tested.afterPropertiesSet()); } // gh-538 - @Test(expected = IllegalArgumentException.class) + @Test public void testAfterPropertiesSet_NullPassword() { - this.tested.setUrl("ldap://ldap.example.com:389"); - this.tested.setUserDn("value"); - this.tested.setPassword(null); - this.tested.afterPropertiesSet(); + assertThatExceptionOfType(IllegalArgumentException.class).isThrownBy(() -> { + this.tested.setUrl("ldap://ldap.example.com:389"); + this.tested.setUserDn("value"); + this.tested.setPassword(null); + this.tested.afterPropertiesSet(); + }); } @Test diff --git a/core/src/test/java/org/springframework/ldap/core/support/ObservationContextSourceTests.java b/core/src/test/java/org/springframework/ldap/core/support/ObservationContextSourceTests.java index 9bcefea33d..d57134be5a 100644 --- a/core/src/test/java/org/springframework/ldap/core/support/ObservationContextSourceTests.java +++ b/core/src/test/java/org/springframework/ldap/core/support/ObservationContextSourceTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2025 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/test/java/org/springframework/ldap/core/support/RangeOptionTests.java b/core/src/test/java/org/springframework/ldap/core/support/RangeOptionTests.java index 35295f3f48..684563b23e 100644 --- a/core/src/test/java/org/springframework/ldap/core/support/RangeOptionTests.java +++ b/core/src/test/java/org/springframework/ldap/core/support/RangeOptionTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ package org.springframework.ldap.core.support; -import org.junit.Test; +import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.fail; diff --git a/core/src/test/java/org/springframework/ldap/core/support/SimpleDirContextAuthenticationStrategyTests.java b/core/src/test/java/org/springframework/ldap/core/support/SimpleDirContextAuthenticationStrategyTests.java index db3ac0eee0..cd06e5f7be 100644 --- a/core/src/test/java/org/springframework/ldap/core/support/SimpleDirContextAuthenticationStrategyTests.java +++ b/core/src/test/java/org/springframework/ldap/core/support/SimpleDirContextAuthenticationStrategyTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,8 +20,8 @@ import javax.naming.Context; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; @@ -29,7 +29,7 @@ public class SimpleDirContextAuthenticationStrategyTests { private SimpleDirContextAuthenticationStrategy tested; - @Before + @BeforeEach public void setUp() throws Exception { this.tested = new SimpleDirContextAuthenticationStrategy(); } diff --git a/core/src/test/java/org/springframework/ldap/core/support/SingleContextSourceTests.java b/core/src/test/java/org/springframework/ldap/core/support/SingleContextSourceTests.java index 71c4082430..e61d9a96a2 100644 --- a/core/src/test/java/org/springframework/ldap/core/support/SingleContextSourceTests.java +++ b/core/src/test/java/org/springframework/ldap/core/support/SingleContextSourceTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2025 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,8 +22,8 @@ import javax.naming.NamingException; import javax.naming.directory.DirContext; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.springframework.ldap.core.ContextExecutor; import org.springframework.ldap.core.ContextSource; @@ -44,7 +44,7 @@ public class SingleContextSourceTests { private DirContext dirContextMock; - @Before + @BeforeEach public void prepareMocks() { this.contextSourceMock = mock(ContextSource.class); this.dirContextMock = mock(DirContext.class); diff --git a/core/src/test/java/org/springframework/ldap/core/support/ldap294/Ldap294Tests.java b/core/src/test/java/org/springframework/ldap/core/support/ldap294/Ldap294Tests.java index 6c14ccf835..0d9b4af325 100644 --- a/core/src/test/java/org/springframework/ldap/core/support/ldap294/Ldap294Tests.java +++ b/core/src/test/java/org/springframework/ldap/core/support/ldap294/Ldap294Tests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,7 +21,7 @@ import javax.naming.NamingException; import javax.naming.directory.DirContext; -import org.junit.Test; +import org.junit.jupiter.api.Test; import org.springframework.ldap.core.support.AbstractContextSource; diff --git a/core/src/test/java/org/springframework/ldap/filter/AbstractFilterTests.java b/core/src/test/java/org/springframework/ldap/filter/AbstractFilterTests.java index 2c074d21c7..2cba11370f 100644 --- a/core/src/test/java/org/springframework/ldap/filter/AbstractFilterTests.java +++ b/core/src/test/java/org/springframework/ldap/filter/AbstractFilterTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ package org.springframework.ldap.filter; -import org.junit.Test; +import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; diff --git a/core/src/test/java/org/springframework/ldap/filter/AndFilterTests.java b/core/src/test/java/org/springframework/ldap/filter/AndFilterTests.java index 357a485b44..ab5c507c70 100644 --- a/core/src/test/java/org/springframework/ldap/filter/AndFilterTests.java +++ b/core/src/test/java/org/springframework/ldap/filter/AndFilterTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,7 +17,7 @@ package org.springframework.ldap.filter; import com.gargoylesoftware.base.testing.EqualsTester; -import org.junit.Test; +import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; diff --git a/core/src/test/java/org/springframework/ldap/filter/EqualsFilterTests.java b/core/src/test/java/org/springframework/ldap/filter/EqualsFilterTests.java index 41283a11fc..350fc6512b 100644 --- a/core/src/test/java/org/springframework/ldap/filter/EqualsFilterTests.java +++ b/core/src/test/java/org/springframework/ldap/filter/EqualsFilterTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,7 +17,7 @@ package org.springframework.ldap.filter; import com.gargoylesoftware.base.testing.EqualsTester; -import org.junit.Test; +import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; diff --git a/core/src/test/java/org/springframework/ldap/filter/GreaterThanOrEqualsFilterTests.java b/core/src/test/java/org/springframework/ldap/filter/GreaterThanOrEqualsFilterTests.java index d84d7f145e..b6bea3709e 100644 --- a/core/src/test/java/org/springframework/ldap/filter/GreaterThanOrEqualsFilterTests.java +++ b/core/src/test/java/org/springframework/ldap/filter/GreaterThanOrEqualsFilterTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,7 +17,7 @@ package org.springframework.ldap.filter; import com.gargoylesoftware.base.testing.EqualsTester; -import org.junit.Test; +import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; diff --git a/core/src/test/java/org/springframework/ldap/filter/HardcodedFilterTests.java b/core/src/test/java/org/springframework/ldap/filter/HardcodedFilterTests.java index 4aa178df31..61810f7e3c 100644 --- a/core/src/test/java/org/springframework/ldap/filter/HardcodedFilterTests.java +++ b/core/src/test/java/org/springframework/ldap/filter/HardcodedFilterTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,7 +17,7 @@ package org.springframework.ldap.filter; import com.gargoylesoftware.base.testing.EqualsTester; -import org.junit.Test; +import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; diff --git a/core/src/test/java/org/springframework/ldap/filter/LessThanOrEqualsFilterTests.java b/core/src/test/java/org/springframework/ldap/filter/LessThanOrEqualsFilterTests.java index 2273f304fd..5f795561fc 100644 --- a/core/src/test/java/org/springframework/ldap/filter/LessThanOrEqualsFilterTests.java +++ b/core/src/test/java/org/springframework/ldap/filter/LessThanOrEqualsFilterTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,7 +17,7 @@ package org.springframework.ldap.filter; import com.gargoylesoftware.base.testing.EqualsTester; -import org.junit.Test; +import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; diff --git a/core/src/test/java/org/springframework/ldap/filter/LikeFilterTests.java b/core/src/test/java/org/springframework/ldap/filter/LikeFilterTests.java index caf82f6327..fc1384657f 100644 --- a/core/src/test/java/org/springframework/ldap/filter/LikeFilterTests.java +++ b/core/src/test/java/org/springframework/ldap/filter/LikeFilterTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,7 +17,7 @@ package org.springframework.ldap.filter; import com.gargoylesoftware.base.testing.EqualsTester; -import org.junit.Test; +import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; diff --git a/core/src/test/java/org/springframework/ldap/filter/NotFilterTests.java b/core/src/test/java/org/springframework/ldap/filter/NotFilterTests.java index e1af3b176b..50b624c167 100644 --- a/core/src/test/java/org/springframework/ldap/filter/NotFilterTests.java +++ b/core/src/test/java/org/springframework/ldap/filter/NotFilterTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,7 +17,7 @@ package org.springframework.ldap.filter; import com.gargoylesoftware.base.testing.EqualsTester; -import org.junit.Test; +import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; diff --git a/core/src/test/java/org/springframework/ldap/filter/NotPresentFilterTests.java b/core/src/test/java/org/springframework/ldap/filter/NotPresentFilterTests.java index d7929ceed6..daa2e4d8e8 100644 --- a/core/src/test/java/org/springframework/ldap/filter/NotPresentFilterTests.java +++ b/core/src/test/java/org/springframework/ldap/filter/NotPresentFilterTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,7 +17,7 @@ package org.springframework.ldap.filter; import com.gargoylesoftware.base.testing.EqualsTester; -import org.junit.Test; +import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; diff --git a/core/src/test/java/org/springframework/ldap/filter/OrFilterTests.java b/core/src/test/java/org/springframework/ldap/filter/OrFilterTests.java index c5b8442194..e9ee77e2a1 100644 --- a/core/src/test/java/org/springframework/ldap/filter/OrFilterTests.java +++ b/core/src/test/java/org/springframework/ldap/filter/OrFilterTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ package org.springframework.ldap.filter; -import org.junit.Test; +import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; diff --git a/core/src/test/java/org/springframework/ldap/filter/PresentFilterTests.java b/core/src/test/java/org/springframework/ldap/filter/PresentFilterTests.java index e7e22cc934..e87cad3254 100644 --- a/core/src/test/java/org/springframework/ldap/filter/PresentFilterTests.java +++ b/core/src/test/java/org/springframework/ldap/filter/PresentFilterTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,7 +17,7 @@ package org.springframework.ldap.filter; import com.gargoylesoftware.base.testing.EqualsTester; -import org.junit.Test; +import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; diff --git a/core/src/test/java/org/springframework/ldap/filter/ProximityFilterTests.java b/core/src/test/java/org/springframework/ldap/filter/ProximityFilterTests.java index b1842f76e1..3b31cca476 100644 --- a/core/src/test/java/org/springframework/ldap/filter/ProximityFilterTests.java +++ b/core/src/test/java/org/springframework/ldap/filter/ProximityFilterTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2025 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ package org.springframework.ldap.filter; -import org.junit.Test; +import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; diff --git a/core/src/test/java/org/springframework/ldap/filter/WhitespaceWildcardsFilterTests.java b/core/src/test/java/org/springframework/ldap/filter/WhitespaceWildcardsFilterTests.java index 8f7ec813c1..9b377b37e7 100644 --- a/core/src/test/java/org/springframework/ldap/filter/WhitespaceWildcardsFilterTests.java +++ b/core/src/test/java/org/springframework/ldap/filter/WhitespaceWildcardsFilterTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ package org.springframework.ldap.filter; -import org.junit.Test; +import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; diff --git a/core/src/test/java/org/springframework/ldap/odm/core/impl/BaseUnitTestPerson.java b/core/src/test/java/org/springframework/ldap/odm/core/impl/BaseUnitTestPerson.java index ae460256f5..a355df65b3 100644 --- a/core/src/test/java/org/springframework/ldap/odm/core/impl/BaseUnitTestPerson.java +++ b/core/src/test/java/org/springframework/ldap/odm/core/impl/BaseUnitTestPerson.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2015 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/test/java/org/springframework/ldap/odm/core/impl/DefaultObjectDirectoryMapperTests.java b/core/src/test/java/org/springframework/ldap/odm/core/impl/DefaultObjectDirectoryMapperTests.java index f2ea363b42..3a735b2894 100644 --- a/core/src/test/java/org/springframework/ldap/odm/core/impl/DefaultObjectDirectoryMapperTests.java +++ b/core/src/test/java/org/springframework/ldap/odm/core/impl/DefaultObjectDirectoryMapperTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2023 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,12 +21,14 @@ import javax.naming.Name; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.MockedStatic; import org.mockito.Mockito; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; +import org.mockito.junit.jupiter.MockitoSettings; +import org.mockito.quality.Strictness; import org.springframework.core.SpringVersion; import org.springframework.core.convert.ConversionService; @@ -38,6 +40,7 @@ import org.springframework.util.StringUtils; import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatExceptionOfType; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.spy; import static org.mockito.Mockito.verify; @@ -45,12 +48,13 @@ /** * @author Mattias Hellborg Arthursson */ -@RunWith(MockitoJUnitRunner.class) +@MockitoSettings(strictness = Strictness.WARN) +@ExtendWith(MockitoExtension.class) public class DefaultObjectDirectoryMapperTests { private DefaultObjectDirectoryMapper tested; - @Before + @BeforeEach public void prepareTestedInstance() { this.tested = new DefaultObjectDirectoryMapper(); } @@ -127,9 +131,10 @@ public void testIndexedDnAttributes() { assertThat(calculatedId).isEqualTo(LdapUtils.newLdapName("cn=Some Person, ou=Some Company, c=Sweden")); } - @Test(expected = MetaDataException.class) + @Test public void testIndexedDnAttributesRequiresThatAllAreIndexed() { - this.tested.manageClass(UnitTestPersonWithIndexedAndUnindexedDnAttributes.class); + assertThatExceptionOfType(MetaDataException.class) + .isThrownBy(() -> this.tested.manageClass(UnitTestPersonWithIndexedAndUnindexedDnAttributes.class)); } @Test @@ -143,6 +148,20 @@ public void mapToLdapDataEntryWhenCustomConversionServiceThenUses() { verify(conversionService).convert(any(), any(Class.class)); } + // gh-1101 + @Test + public void managerWhenEntityMapsLongThenConverts() { + this.tested.manageClass(UnitTestPersonWithIndexedDnAttributes.class); + UnitTestPersonWithIndexedDnAttributes testPerson = new UnitTestPersonWithIndexedDnAttributes(); + testPerson.setFullName("Some Person"); + testPerson.setAge(34L); + DirContextAdapter adapter = new DirContextAdapter("cn=Some Person, ou=Some Company, c=Sweden"); + this.tested.mapToLdapDataEntry(testPerson, adapter); + assertThat(adapter.getStringAttribute("age")).isEqualTo("34"); + testPerson = this.tested.mapFromLdapDataEntry(adapter, UnitTestPersonWithIndexedDnAttributes.class); + assertThat(testPerson.getAge()).isEqualTo(34L); + } + private void assertField(DefaultObjectDirectoryMapper.EntityData entityData, String fieldName, String expectedAttributeName, String expectedDnAttributeName, boolean expectedBinary, boolean expectedTransient, boolean expectedList, boolean expectedReadOnly) { diff --git a/core/src/test/java/org/springframework/ldap/odm/core/impl/UnitTestPerson.java b/core/src/test/java/org/springframework/ldap/odm/core/impl/UnitTestPerson.java index 0ff1b081c6..0418bf102e 100644 --- a/core/src/test/java/org/springframework/ldap/odm/core/impl/UnitTestPerson.java +++ b/core/src/test/java/org/springframework/ldap/odm/core/impl/UnitTestPerson.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/test/java/org/springframework/ldap/odm/core/impl/UnitTestPersonWithIndexedAndUnindexedDnAttributes.java b/core/src/test/java/org/springframework/ldap/odm/core/impl/UnitTestPersonWithIndexedAndUnindexedDnAttributes.java index 754fa2f236..910206124f 100644 --- a/core/src/test/java/org/springframework/ldap/odm/core/impl/UnitTestPersonWithIndexedAndUnindexedDnAttributes.java +++ b/core/src/test/java/org/springframework/ldap/odm/core/impl/UnitTestPersonWithIndexedAndUnindexedDnAttributes.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/test/java/org/springframework/ldap/odm/core/impl/UnitTestPersonWithIndexedDnAttributes.java b/core/src/test/java/org/springframework/ldap/odm/core/impl/UnitTestPersonWithIndexedDnAttributes.java index 4e82f0b869..143579b559 100644 --- a/core/src/test/java/org/springframework/ldap/odm/core/impl/UnitTestPersonWithIndexedDnAttributes.java +++ b/core/src/test/java/org/springframework/ldap/odm/core/impl/UnitTestPersonWithIndexedDnAttributes.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,6 +18,7 @@ import javax.naming.Name; +import org.springframework.ldap.odm.annotations.Attribute; import org.springframework.ldap.odm.annotations.DnAttribute; import org.springframework.ldap.odm.annotations.Entry; import org.springframework.ldap.odm.annotations.Id; @@ -40,6 +41,9 @@ public class UnitTestPersonWithIndexedDnAttributes { @DnAttribute(value = "c", index = 0) private String country; + @Attribute(name = "age") + private Long age; + public void setFullName(String fullName) { this.fullName = fullName; } @@ -52,4 +56,12 @@ public void setCountry(String country) { this.country = country; } + public Long getAge() { + return this.age; + } + + public void setAge(Long age) { + this.age = age; + } + } diff --git a/core/src/test/java/org/springframework/ldap/odm/core/impl/UnitTestPersonWithInvalidFieldType.java b/core/src/test/java/org/springframework/ldap/odm/core/impl/UnitTestPersonWithInvalidFieldType.java index bf01615310..53e1c555d9 100644 --- a/core/src/test/java/org/springframework/ldap/odm/core/impl/UnitTestPersonWithInvalidFieldType.java +++ b/core/src/test/java/org/springframework/ldap/odm/core/impl/UnitTestPersonWithInvalidFieldType.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/test/java/org/springframework/ldap/pool/AbstractPoolTestCase.java b/core/src/test/java/org/springframework/ldap/pool/AbstractPoolTestCase.java index 1239adbe86..fde3ce11ba 100644 --- a/core/src/test/java/org/springframework/ldap/pool/AbstractPoolTestCase.java +++ b/core/src/test/java/org/springframework/ldap/pool/AbstractPoolTestCase.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,7 +21,7 @@ import javax.naming.ldap.LdapContext; import org.apache.commons.pool.KeyedObjectPool; -import org.junit.Before; +import org.junit.jupiter.api.BeforeEach; import org.springframework.ldap.core.ContextSource; import org.springframework.ldap.pool.validation.DirContextValidator; @@ -47,7 +47,7 @@ public abstract class AbstractPoolTestCase { protected DirContextValidator dirContextValidatorMock; - @Before + @BeforeEach public void setUp() throws Exception { this.contextMock = mock(Context.class); this.dirContextMock = mock(DirContext.class); diff --git a/core/src/test/java/org/springframework/ldap/pool/DelegatingContextTests.java b/core/src/test/java/org/springframework/ldap/pool/DelegatingContextTests.java index ff22a6f075..1fed9cab69 100644 --- a/core/src/test/java/org/springframework/ldap/pool/DelegatingContextTests.java +++ b/core/src/test/java/org/springframework/ldap/pool/DelegatingContextTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,7 +21,7 @@ import javax.naming.NamingException; import org.apache.commons.pool.KeyedObjectPool; -import org.junit.Test; +import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.fail; diff --git a/core/src/test/java/org/springframework/ldap/pool/DelegatingDirContextTests.java b/core/src/test/java/org/springframework/ldap/pool/DelegatingDirContextTests.java index f174f78e22..dd664b7625 100644 --- a/core/src/test/java/org/springframework/ldap/pool/DelegatingDirContextTests.java +++ b/core/src/test/java/org/springframework/ldap/pool/DelegatingDirContextTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,7 +23,7 @@ import javax.naming.directory.DirContext; import org.apache.commons.pool.KeyedObjectPool; -import org.junit.Test; +import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.fail; diff --git a/core/src/test/java/org/springframework/ldap/pool/DelegatingLdapContextTests.java b/core/src/test/java/org/springframework/ldap/pool/DelegatingLdapContextTests.java index 028de096cf..a2367ad892 100644 --- a/core/src/test/java/org/springframework/ldap/pool/DelegatingLdapContextTests.java +++ b/core/src/test/java/org/springframework/ldap/pool/DelegatingLdapContextTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,7 +21,7 @@ import javax.naming.ldap.LdapContext; import org.apache.commons.pool.KeyedObjectPool; -import org.junit.Test; +import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.fail; diff --git a/core/src/test/java/org/springframework/ldap/pool/MutableDelegatingLdapContextTests.java b/core/src/test/java/org/springframework/ldap/pool/MutableDelegatingLdapContextTests.java index 30da15d5de..57f440e3fc 100644 --- a/core/src/test/java/org/springframework/ldap/pool/MutableDelegatingLdapContextTests.java +++ b/core/src/test/java/org/springframework/ldap/pool/MutableDelegatingLdapContextTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ package org.springframework.ldap.pool; -import org.junit.Test; +import org.junit.jupiter.api.Test; import static org.mockito.Mockito.verify; diff --git a/core/src/test/java/org/springframework/ldap/pool/factory/DirContextPoolableObjectFactoryTests.java b/core/src/test/java/org/springframework/ldap/pool/factory/DirContextPoolableObjectFactoryTests.java index 6ebc9474f5..813b4fcb41 100644 --- a/core/src/test/java/org/springframework/ldap/pool/factory/DirContextPoolableObjectFactoryTests.java +++ b/core/src/test/java/org/springframework/ldap/pool/factory/DirContextPoolableObjectFactoryTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,7 +22,7 @@ import javax.naming.directory.DirContext; -import org.junit.Test; +import org.junit.jupiter.api.Test; import org.mockito.Mockito; import org.springframework.ldap.core.ContextSource; diff --git a/core/src/test/java/org/springframework/ldap/pool/factory/MutablePoolingContextSourceTests.java b/core/src/test/java/org/springframework/ldap/pool/factory/MutablePoolingContextSourceTests.java index 7f82c0a700..2881961aef 100644 --- a/core/src/test/java/org/springframework/ldap/pool/factory/MutablePoolingContextSourceTests.java +++ b/core/src/test/java/org/springframework/ldap/pool/factory/MutablePoolingContextSourceTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,7 @@ import javax.naming.directory.DirContext; -import org.junit.Test; +import org.junit.jupiter.api.Test; import org.springframework.ldap.pool.AbstractPoolTestCase; import org.springframework.ldap.pool.MutableDelegatingLdapContext; diff --git a/core/src/test/java/org/springframework/ldap/pool/factory/PoolingContextSourceTests.java b/core/src/test/java/org/springframework/ldap/pool/factory/PoolingContextSourceTests.java index 4babbe585f..f1fdf847ff 100644 --- a/core/src/test/java/org/springframework/ldap/pool/factory/PoolingContextSourceTests.java +++ b/core/src/test/java/org/springframework/ldap/pool/factory/PoolingContextSourceTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,7 +20,7 @@ import javax.naming.ldap.LdapContext; import org.apache.commons.pool.impl.GenericKeyedObjectPool; -import org.junit.Test; +import org.junit.jupiter.api.Test; import org.springframework.dao.DataAccessResourceFailureException; import org.springframework.ldap.core.ContextSource; diff --git a/core/src/test/java/org/springframework/ldap/pool/validation/DefaultDirContextValidatorTests.java b/core/src/test/java/org/springframework/ldap/pool/validation/DefaultDirContextValidatorTests.java index 02979b085f..630312c58f 100644 --- a/core/src/test/java/org/springframework/ldap/pool/validation/DefaultDirContextValidatorTests.java +++ b/core/src/test/java/org/springframework/ldap/pool/validation/DefaultDirContextValidatorTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,8 +21,8 @@ import javax.naming.directory.DirContext; import javax.naming.directory.SearchControls; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.springframework.ldap.pool.DirContextType; @@ -41,7 +41,7 @@ public class DefaultDirContextValidatorTests { private DirContext dirContextMock; - @Before + @BeforeEach public void setUp() throws Exception { this.namingEnumerationMock = mock(NamingEnumeration.class); this.dirContextMock = mock(DirContext.class); diff --git a/core/src/test/java/org/springframework/ldap/pool2/AbstractPoolTestCase.java b/core/src/test/java/org/springframework/ldap/pool2/AbstractPoolTestCase.java index 1d71aa5457..4760a7a598 100644 --- a/core/src/test/java/org/springframework/ldap/pool2/AbstractPoolTestCase.java +++ b/core/src/test/java/org/springframework/ldap/pool2/AbstractPoolTestCase.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2015 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,7 +21,7 @@ import javax.naming.ldap.LdapContext; import org.apache.commons.pool2.KeyedObjectPool; -import org.junit.Before; +import org.junit.jupiter.api.BeforeEach; import org.springframework.ldap.core.ContextSource; import org.springframework.ldap.pool2.validation.DirContextValidator; @@ -47,7 +47,7 @@ public abstract class AbstractPoolTestCase { protected DirContextValidator dirContextValidatorMock; - @Before + @BeforeEach public void setUp() throws Exception { this.contextMock = mock(Context.class); this.dirContextMock = mock(DirContext.class); diff --git a/core/src/test/java/org/springframework/ldap/pool2/DelegatingContextTests.java b/core/src/test/java/org/springframework/ldap/pool2/DelegatingContextTests.java index 3833422c96..ffa95a2554 100644 --- a/core/src/test/java/org/springframework/ldap/pool2/DelegatingContextTests.java +++ b/core/src/test/java/org/springframework/ldap/pool2/DelegatingContextTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,7 +21,7 @@ import javax.naming.NamingException; import org.apache.commons.pool2.KeyedObjectPool; -import org.junit.Test; +import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.fail; diff --git a/core/src/test/java/org/springframework/ldap/pool2/DelegatingDirContextTests.java b/core/src/test/java/org/springframework/ldap/pool2/DelegatingDirContextTests.java index b6a9b442fa..519317656d 100644 --- a/core/src/test/java/org/springframework/ldap/pool2/DelegatingDirContextTests.java +++ b/core/src/test/java/org/springframework/ldap/pool2/DelegatingDirContextTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,7 +23,7 @@ import javax.naming.directory.DirContext; import org.apache.commons.pool2.KeyedObjectPool; -import org.junit.Test; +import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.fail; diff --git a/core/src/test/java/org/springframework/ldap/pool2/DelegatingLdapContextTests.java b/core/src/test/java/org/springframework/ldap/pool2/DelegatingLdapContextTests.java index 247795384c..d7fa796275 100644 --- a/core/src/test/java/org/springframework/ldap/pool2/DelegatingLdapContextTests.java +++ b/core/src/test/java/org/springframework/ldap/pool2/DelegatingLdapContextTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,7 +21,7 @@ import javax.naming.ldap.LdapContext; import org.apache.commons.pool2.KeyedObjectPool; -import org.junit.Test; +import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.fail; diff --git a/core/src/test/java/org/springframework/ldap/pool2/DummyEvictionPolicy.java b/core/src/test/java/org/springframework/ldap/pool2/DummyEvictionPolicy.java index 63a018528c..525e55074c 100644 --- a/core/src/test/java/org/springframework/ldap/pool2/DummyEvictionPolicy.java +++ b/core/src/test/java/org/springframework/ldap/pool2/DummyEvictionPolicy.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2015 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/src/test/java/org/springframework/ldap/pool2/MutableDelegatingLdapContextTests.java b/core/src/test/java/org/springframework/ldap/pool2/MutableDelegatingLdapContextTests.java index 4db7475e0c..6cd2ee0b03 100644 --- a/core/src/test/java/org/springframework/ldap/pool2/MutableDelegatingLdapContextTests.java +++ b/core/src/test/java/org/springframework/ldap/pool2/MutableDelegatingLdapContextTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2015 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ package org.springframework.ldap.pool2; -import org.junit.Test; +import org.junit.jupiter.api.Test; import static org.mockito.Mockito.verify; diff --git a/core/src/test/java/org/springframework/ldap/pool2/factory/DirContextPooledObjectFactoryTests.java b/core/src/test/java/org/springframework/ldap/pool2/factory/DirContextPooledObjectFactoryTests.java index 072a7a1423..c173983ba8 100644 --- a/core/src/test/java/org/springframework/ldap/pool2/factory/DirContextPooledObjectFactoryTests.java +++ b/core/src/test/java/org/springframework/ldap/pool2/factory/DirContextPooledObjectFactoryTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,7 +24,7 @@ import org.apache.commons.pool2.PooledObject; import org.apache.commons.pool2.impl.DefaultPooledObject; -import org.junit.Test; +import org.junit.jupiter.api.Test; import org.springframework.ldap.core.ContextSource; import org.springframework.ldap.pool2.AbstractPoolTestCase; diff --git a/core/src/test/java/org/springframework/ldap/pool2/factory/MutablePooledContextSourceTests.java b/core/src/test/java/org/springframework/ldap/pool2/factory/MutablePooledContextSourceTests.java index 2db1153983..ada6dc19ed 100644 --- a/core/src/test/java/org/springframework/ldap/pool2/factory/MutablePooledContextSourceTests.java +++ b/core/src/test/java/org/springframework/ldap/pool2/factory/MutablePooledContextSourceTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,7 @@ import javax.naming.directory.DirContext; -import org.junit.Test; +import org.junit.jupiter.api.Test; import org.springframework.ldap.pool2.AbstractPoolTestCase; import org.springframework.ldap.pool2.MutableDelegatingLdapContext; diff --git a/core/src/test/java/org/springframework/ldap/pool2/factory/PoolConfigTests.java b/core/src/test/java/org/springframework/ldap/pool2/factory/PoolConfigTests.java index 579d980225..df050b3503 100644 --- a/core/src/test/java/org/springframework/ldap/pool2/factory/PoolConfigTests.java +++ b/core/src/test/java/org/springframework/ldap/pool2/factory/PoolConfigTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,7 +17,7 @@ package org.springframework.ldap.pool2.factory; import org.apache.commons.pool2.impl.GenericKeyedObjectPoolConfig; -import org.junit.Test; +import org.junit.jupiter.api.Test; import org.springframework.ldap.pool2.AbstractPoolTestCase; diff --git a/core/src/test/java/org/springframework/ldap/pool2/factory/PooledContextSourceTests.java b/core/src/test/java/org/springframework/ldap/pool2/factory/PooledContextSourceTests.java index 185ddc7d68..a67ebc7a09 100644 --- a/core/src/test/java/org/springframework/ldap/pool2/factory/PooledContextSourceTests.java +++ b/core/src/test/java/org/springframework/ldap/pool2/factory/PooledContextSourceTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,7 +19,7 @@ import javax.naming.directory.DirContext; import javax.naming.ldap.LdapContext; -import org.junit.Test; +import org.junit.jupiter.api.Test; import org.springframework.dao.DataAccessResourceFailureException; import org.springframework.ldap.core.ContextSource; diff --git a/core/src/test/java/org/springframework/ldap/query/LdapQueryBuilderTests.java b/core/src/test/java/org/springframework/ldap/query/LdapQueryBuilderTests.java index ce4f076e39..0710e193ad 100644 --- a/core/src/test/java/org/springframework/ldap/query/LdapQueryBuilderTests.java +++ b/core/src/test/java/org/springframework/ldap/query/LdapQueryBuilderTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2025 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,12 +16,13 @@ package org.springframework.ldap.query; -import org.junit.Test; +import org.junit.jupiter.api.Test; import org.springframework.ldap.filter.ProximityFilter; import org.springframework.ldap.support.LdapUtils; import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatExceptionOfType; /** * @author Mattias Hellborg Arthursson @@ -88,18 +89,22 @@ public void buildHardcodedFilter() { assertThat(result.filter().encode()).isEqualTo("(cn=Person*)"); } - @Test(expected = IllegalStateException.class) + @Test public void verifyThatHardcodedFilterFailsIfFilterAlreadySpecified() { - LdapQueryBuilder query = LdapQueryBuilder.query(); - query.where("sn").is("Doe"); - query.filter("(cn=Person*)"); + assertThatExceptionOfType(IllegalStateException.class).isThrownBy(() -> { + LdapQueryBuilder query = LdapQueryBuilder.query(); + query.where("sn").is("Doe"); + query.filter("(cn=Person*)"); + }); } - @Test(expected = IllegalStateException.class) + @Test public void verifyThatFilterFormatFailsIfFilterAlreadySpecified() { - LdapQueryBuilder query = LdapQueryBuilder.query(); - query.where("sn").is("Doe"); - query.filter("(|(cn={0})(cn={1}))", "Person*", "Parson*"); + assertThatExceptionOfType(IllegalStateException.class).isThrownBy(() -> { + LdapQueryBuilder query = LdapQueryBuilder.query(); + query.where("sn").is("Doe"); + query.filter("(|(cn={0})(cn={1}))", "Person*", "Parson*"); + }); } @Test @@ -162,28 +167,38 @@ public void buildNestedAnd() { assertThat(result.filter().encode()).isEqualTo("(&(objectclass=person)(|(sn=Doe)(sn=Die)))"); } - @Test(expected = IllegalStateException.class) + @Test public void verifyEmptyFilterThrowsIllegalState() { - LdapQueryBuilder.query().filter(); + assertThatExceptionOfType(IllegalStateException.class).isThrownBy(() -> LdapQueryBuilder.query().filter()); } - @Test(expected = IllegalStateException.class) + @Test public void verifyThatNewAttemptToStartSpecifyingFilterThrowsIllegalState() { - LdapQueryBuilder query = LdapQueryBuilder.query(); - query.where("sn").is("Doe"); - query.where("cn").is("John Doe"); + assertThatExceptionOfType(IllegalStateException.class).isThrownBy(() -> { + LdapQueryBuilder query = LdapQueryBuilder.query(); + query.where("sn").is("Doe"); + query.where("cn").is("John Doe"); + }); } - @Test(expected = IllegalStateException.class) + @Test public void verifyThatAttemptToStartSpecifyingBasePropertiesThrowsIllegalStateWhenFilterStarted() { - LdapQueryBuilder query = LdapQueryBuilder.query(); - query.where("sn").is("Doe"); - query.base("dc=261consulting,dc=com"); + assertThatExceptionOfType(IllegalStateException.class).isThrownBy(() -> { + LdapQueryBuilder query = LdapQueryBuilder.query(); + query.where("sn").is("Doe"); + query.base("dc=261consulting,dc=com"); + }); } - @Test(expected = IllegalStateException.class) + @Test public void verifyThatOperatorChangeIsIllegal() { - LdapQueryBuilder.query().where("cn").is("John Doe").and("sn").is("Doe").or("objectclass").is("person"); + assertThatExceptionOfType(IllegalStateException.class).isThrownBy(() -> LdapQueryBuilder.query() + .where("cn") + .is("John Doe") + .and("sn") + .is("Doe") + .or("objectclass") + .is("person")); } } diff --git a/core/src/test/java/org/springframework/ldap/support/LdapEncoderTests.java b/core/src/test/java/org/springframework/ldap/support/LdapEncoderTests.java index abcd2e6f38..5cae8e5588 100644 --- a/core/src/test/java/org/springframework/ldap/support/LdapEncoderTests.java +++ b/core/src/test/java/org/springframework/ldap/support/LdapEncoderTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,11 +16,12 @@ package org.springframework.ldap.support; -import org.junit.Test; +import org.junit.jupiter.api.Test; import org.springframework.ldap.BadLdapGrammarException; import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatExceptionOfType; /** * Unit test for the LdapEncode class. @@ -52,9 +53,9 @@ public void testNameDecode() { assertThat(res).isEqualTo("# foo ,+\"\\<>; "); } - @Test(expected = BadLdapGrammarException.class) + @Test public void testNameDecode_slashlast() { - LdapEncoder.nameDecode("\\"); + assertThatExceptionOfType(BadLdapGrammarException.class).isThrownBy(() -> LdapEncoder.nameDecode("\\")); } // gh-413 diff --git a/core/src/test/java/org/springframework/ldap/support/LdapNameBuilderTests.java b/core/src/test/java/org/springframework/ldap/support/LdapNameBuilderTests.java index dde503da9c..04e282b55c 100644 --- a/core/src/test/java/org/springframework/ldap/support/LdapNameBuilderTests.java +++ b/core/src/test/java/org/springframework/ldap/support/LdapNameBuilderTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2023 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ package org.springframework.ldap.support; -import org.junit.Test; +import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; diff --git a/core/src/test/java/org/springframework/ldap/support/LdapUtilsTests.java b/core/src/test/java/org/springframework/ldap/support/LdapUtilsTests.java index 0037d70a34..8bb673815e 100644 --- a/core/src/test/java/org/springframework/ldap/support/LdapUtilsTests.java +++ b/core/src/test/java/org/springframework/ldap/support/LdapUtilsTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,8 +25,8 @@ import javax.naming.ldap.LdapName; import org.apache.commons.lang.ArrayUtils; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.springframework.ldap.NoSuchAttributeException; @@ -43,7 +43,7 @@ public class LdapUtilsTests { private AttributeValueCallbackHandler handlerMock; - @Before + @BeforeEach public void setUp() throws Exception { this.handlerMock = mock(AttributeValueCallbackHandler.class); } diff --git a/core/src/test/java/org/springframework/ldap/transaction/compensating/BindOperationExecutorTests.java b/core/src/test/java/org/springframework/ldap/transaction/compensating/BindOperationExecutorTests.java index b183b08afd..e068836a17 100644 --- a/core/src/test/java/org/springframework/ldap/transaction/compensating/BindOperationExecutorTests.java +++ b/core/src/test/java/org/springframework/ldap/transaction/compensating/BindOperationExecutorTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,8 +19,8 @@ import javax.naming.directory.BasicAttributes; import javax.naming.ldap.LdapName; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.springframework.ldap.core.LdapOperations; import org.springframework.ldap.support.LdapUtils; @@ -33,7 +33,7 @@ public class BindOperationExecutorTests { private LdapOperations ldapOperationsMock; - @Before + @BeforeEach public void setUp() throws Exception { this.ldapOperationsMock = mock(LdapOperations.class); } diff --git a/core/src/test/java/org/springframework/ldap/transaction/compensating/BindOperationRecorderTests.java b/core/src/test/java/org/springframework/ldap/transaction/compensating/BindOperationRecorderTests.java index b42e9c6be6..51fd20657f 100644 --- a/core/src/test/java/org/springframework/ldap/transaction/compensating/BindOperationRecorderTests.java +++ b/core/src/test/java/org/springframework/ldap/transaction/compensating/BindOperationRecorderTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,21 +19,22 @@ import javax.naming.directory.BasicAttributes; import javax.naming.ldap.LdapName; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.springframework.ldap.core.LdapOperations; import org.springframework.ldap.support.LdapUtils; import org.springframework.transaction.compensating.CompensatingTransactionOperationExecutor; import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatExceptionOfType; import static org.mockito.Mockito.mock; public class BindOperationRecorderTests { private LdapOperations ldapOperationsMock; - @Before + @BeforeEach public void setUp() throws Exception { this.ldapOperationsMock = mock(LdapOperations.class); @@ -75,13 +76,15 @@ public void testPerformOperation_String() { assertThat(rollbackOperation.getLdapOperations()).isSameAs(this.ldapOperationsMock); } - @Test(expected = IllegalArgumentException.class) + @Test public void testPerformOperation_Invalid() { - BindOperationRecorder tested = new BindOperationRecorder(this.ldapOperationsMock); - Object expectedDn = new Object(); + assertThatExceptionOfType(IllegalArgumentException.class).isThrownBy(() -> { + BindOperationRecorder tested = new BindOperationRecorder(this.ldapOperationsMock); + Object expectedDn = new Object(); - // Perform test. - tested.recordOperation(new Object[] { expectedDn }); + // Perform test. + tested.recordOperation(new Object[] { expectedDn }); + }); } } diff --git a/core/src/test/java/org/springframework/ldap/transaction/compensating/LdapCompensatingTransactionOperationFactoryTests.java b/core/src/test/java/org/springframework/ldap/transaction/compensating/LdapCompensatingTransactionOperationFactoryTests.java index f82e1becd8..77d547b1d8 100644 --- a/core/src/test/java/org/springframework/ldap/transaction/compensating/LdapCompensatingTransactionOperationFactoryTests.java +++ b/core/src/test/java/org/springframework/ldap/transaction/compensating/LdapCompensatingTransactionOperationFactoryTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,8 +18,8 @@ import javax.naming.directory.DirContext; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.springframework.ldap.core.LdapOperations; import org.springframework.transaction.compensating.CompensatingTransactionOperationRecorder; @@ -37,7 +37,7 @@ public class LdapCompensatingTransactionOperationFactoryTests { private LdapCompensatingTransactionOperationFactory tested; - @Before + @BeforeEach public void setUp() throws Exception { this.ldapOperationsMock = mock(LdapOperations.class); this.renamingStrategyMock = mock(TempEntryRenamingStrategy.class); diff --git a/core/src/test/java/org/springframework/ldap/transaction/compensating/LdapTransactionUtilsTests.java b/core/src/test/java/org/springframework/ldap/transaction/compensating/LdapTransactionUtilsTests.java index dcb396cc25..1092d45b4b 100644 --- a/core/src/test/java/org/springframework/ldap/transaction/compensating/LdapTransactionUtilsTests.java +++ b/core/src/test/java/org/springframework/ldap/transaction/compensating/LdapTransactionUtilsTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,8 +19,8 @@ import javax.naming.NamingException; import javax.naming.directory.DirContext; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.springframework.ldap.support.LdapUtils; import org.springframework.transaction.support.TransactionSynchronizationManager; @@ -33,7 +33,7 @@ public class LdapTransactionUtilsTests { private DirContext dirContextMock; - @Before + @BeforeEach public void setUp() throws Exception { this.dirContextMock = mock(DirContext.class); diff --git a/core/src/test/java/org/springframework/ldap/transaction/compensating/ModifyAttributesOperationExecutorTests.java b/core/src/test/java/org/springframework/ldap/transaction/compensating/ModifyAttributesOperationExecutorTests.java index 18c2254893..b362299247 100644 --- a/core/src/test/java/org/springframework/ldap/transaction/compensating/ModifyAttributesOperationExecutorTests.java +++ b/core/src/test/java/org/springframework/ldap/transaction/compensating/ModifyAttributesOperationExecutorTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,8 +19,8 @@ import javax.naming.Name; import javax.naming.directory.ModificationItem; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.springframework.ldap.core.LdapOperations; import org.springframework.ldap.support.LdapUtils; @@ -33,7 +33,7 @@ public class ModifyAttributesOperationExecutorTests { private LdapOperations ldapOperationsMock; - @Before + @BeforeEach public void setUp() throws Exception { this.ldapOperationsMock = mock(LdapOperations.class); } diff --git a/core/src/test/java/org/springframework/ldap/transaction/compensating/ModifyAttributesOperationRecorderTests.java b/core/src/test/java/org/springframework/ldap/transaction/compensating/ModifyAttributesOperationRecorderTests.java index 7e886309a4..52173dccda 100644 --- a/core/src/test/java/org/springframework/ldap/transaction/compensating/ModifyAttributesOperationRecorderTests.java +++ b/core/src/test/java/org/springframework/ldap/transaction/compensating/ModifyAttributesOperationRecorderTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,8 +25,8 @@ import javax.naming.directory.ModificationItem; import javax.naming.ldap.LdapName; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.springframework.ldap.core.IncrementalAttributesMapper; import org.springframework.ldap.core.LdapOperations; @@ -45,7 +45,7 @@ public class ModifyAttributesOperationRecorderTests { private ModifyAttributesOperationRecorder tested; - @Before + @BeforeEach public void setUp() throws Exception { this.ldapOperationsMock = mock(LdapOperations.class); this.attributesMapperMock = mock(IncrementalAttributesMapper.class); diff --git a/core/src/test/java/org/springframework/ldap/transaction/compensating/RebindOperationExecutorTests.java b/core/src/test/java/org/springframework/ldap/transaction/compensating/RebindOperationExecutorTests.java index bfab43c9b3..e8af089ecb 100644 --- a/core/src/test/java/org/springframework/ldap/transaction/compensating/RebindOperationExecutorTests.java +++ b/core/src/test/java/org/springframework/ldap/transaction/compensating/RebindOperationExecutorTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,8 +19,8 @@ import javax.naming.directory.BasicAttributes; import javax.naming.ldap.LdapName; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.springframework.ldap.core.LdapOperations; import org.springframework.ldap.support.LdapUtils; @@ -32,7 +32,7 @@ public class RebindOperationExecutorTests { private LdapOperations ldapOperationsMock; - @Before + @BeforeEach public void setUp() throws Exception { this.ldapOperationsMock = mock(LdapOperations.class); } diff --git a/core/src/test/java/org/springframework/ldap/transaction/compensating/RebindOperationRecorderTests.java b/core/src/test/java/org/springframework/ldap/transaction/compensating/RebindOperationRecorderTests.java index 6424e5f141..612a51978b 100644 --- a/core/src/test/java/org/springframework/ldap/transaction/compensating/RebindOperationRecorderTests.java +++ b/core/src/test/java/org/springframework/ldap/transaction/compensating/RebindOperationRecorderTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,8 +19,8 @@ import javax.naming.directory.BasicAttributes; import javax.naming.ldap.LdapName; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.springframework.ldap.core.LdapOperations; import org.springframework.ldap.support.LdapUtils; @@ -36,7 +36,7 @@ public class RebindOperationRecorderTests { private TempEntryRenamingStrategy renamingStrategyMock; - @Before + @BeforeEach public void setUp() throws Exception { this.ldapOperationsMock = mock(LdapOperations.class); this.renamingStrategyMock = mock(TempEntryRenamingStrategy.class); diff --git a/core/src/test/java/org/springframework/ldap/transaction/compensating/RenameOperationExecutorTests.java b/core/src/test/java/org/springframework/ldap/transaction/compensating/RenameOperationExecutorTests.java index d2118053b3..bad9e39b97 100644 --- a/core/src/test/java/org/springframework/ldap/transaction/compensating/RenameOperationExecutorTests.java +++ b/core/src/test/java/org/springframework/ldap/transaction/compensating/RenameOperationExecutorTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,8 +18,8 @@ import javax.naming.ldap.LdapName; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.springframework.ldap.core.LdapOperations; import org.springframework.ldap.support.LdapUtils; @@ -32,7 +32,7 @@ public class RenameOperationExecutorTests { private LdapOperations ldapOperationsMock; - @Before + @BeforeEach public void setUp() throws Exception { this.ldapOperationsMock = mock(LdapOperations.class); } diff --git a/core/src/test/java/org/springframework/ldap/transaction/compensating/RenameOperationRecorderTests.java b/core/src/test/java/org/springframework/ldap/transaction/compensating/RenameOperationRecorderTests.java index a89abf7bbc..f8e8133bfe 100644 --- a/core/src/test/java/org/springframework/ldap/transaction/compensating/RenameOperationRecorderTests.java +++ b/core/src/test/java/org/springframework/ldap/transaction/compensating/RenameOperationRecorderTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,8 +16,8 @@ package org.springframework.ldap.transaction.compensating; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.springframework.ldap.core.LdapOperations; import org.springframework.transaction.compensating.CompensatingTransactionOperationExecutor; @@ -29,7 +29,7 @@ public class RenameOperationRecorderTests { private LdapOperations ldapOperationsMock; - @Before + @BeforeEach public void setUp() throws Exception { this.ldapOperationsMock = mock(LdapOperations.class); } diff --git a/core/src/test/java/org/springframework/ldap/transaction/compensating/UnbindOperationExecutorTests.java b/core/src/test/java/org/springframework/ldap/transaction/compensating/UnbindOperationExecutorTests.java index 2dc956ca1a..d39995cc3b 100644 --- a/core/src/test/java/org/springframework/ldap/transaction/compensating/UnbindOperationExecutorTests.java +++ b/core/src/test/java/org/springframework/ldap/transaction/compensating/UnbindOperationExecutorTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,8 +18,8 @@ import javax.naming.ldap.LdapName; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.springframework.ldap.core.LdapOperations; import org.springframework.ldap.support.LdapUtils; @@ -31,7 +31,7 @@ public class UnbindOperationExecutorTests { private LdapOperations ldapOperationsMock; - @Before + @BeforeEach public void setUp() throws Exception { this.ldapOperationsMock = mock(LdapOperations.class); } diff --git a/core/src/test/java/org/springframework/ldap/transaction/compensating/UnbindOperationRecorderTests.java b/core/src/test/java/org/springframework/ldap/transaction/compensating/UnbindOperationRecorderTests.java index ef42f7a126..afa5290078 100644 --- a/core/src/test/java/org/springframework/ldap/transaction/compensating/UnbindOperationRecorderTests.java +++ b/core/src/test/java/org/springframework/ldap/transaction/compensating/UnbindOperationRecorderTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,8 +18,8 @@ import javax.naming.ldap.LdapName; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.springframework.ldap.core.LdapOperations; import org.springframework.ldap.support.LdapUtils; @@ -35,7 +35,7 @@ public class UnbindOperationRecorderTests { private TempEntryRenamingStrategy renamingStrategyMock; - @Before + @BeforeEach public void setUp() throws Exception { this.ldapOperationsMock = mock(LdapOperations.class); diff --git a/core/src/test/java/org/springframework/ldap/transaction/compensating/manager/CompensatingTransactionUtilsTests.java b/core/src/test/java/org/springframework/ldap/transaction/compensating/manager/CompensatingTransactionUtilsTests.java index e1443ae4ca..036711ef5e 100644 --- a/core/src/test/java/org/springframework/ldap/transaction/compensating/manager/CompensatingTransactionUtilsTests.java +++ b/core/src/test/java/org/springframework/ldap/transaction/compensating/manager/CompensatingTransactionUtilsTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,8 +20,8 @@ import javax.naming.directory.DirContext; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.springframework.ldap.core.ContextSource; import org.springframework.transaction.compensating.CompensatingTransactionOperationManager; @@ -40,7 +40,7 @@ public class CompensatingTransactionUtilsTests { private CompensatingTransactionOperationManager operationManagerMock; - @Before + @BeforeEach public void setUp() throws Exception { this.dirContextMock = mock(DirContext.class); this.contextSourceMock = mock(ContextSource.class); diff --git a/core/src/test/java/org/springframework/ldap/transaction/compensating/manager/ContextSourceTransactionManagerTests.java b/core/src/test/java/org/springframework/ldap/transaction/compensating/manager/ContextSourceTransactionManagerTests.java index f977107193..72bb26b770 100644 --- a/core/src/test/java/org/springframework/ldap/transaction/compensating/manager/ContextSourceTransactionManagerTests.java +++ b/core/src/test/java/org/springframework/ldap/transaction/compensating/manager/ContextSourceTransactionManagerTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,8 +21,8 @@ import javax.naming.directory.DirContext; import javax.sql.DataSource; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.springframework.jdbc.datasource.DataSourceTransactionManager; import org.springframework.ldap.UncategorizedLdapException; @@ -59,7 +59,7 @@ public class ContextSourceTransactionManagerTests { private TempEntryRenamingStrategy renamingStrategyMock; - @Before + @BeforeEach public void setUp() throws Exception { if (TransactionSynchronizationManager.isSynchronizationActive()) { TransactionSynchronizationManager.clearSynchronization(); @@ -114,7 +114,8 @@ public void testDoRollback() { CompensatingTransactionObject transactionObject = new CompensatingTransactionObject(null); transactionObject.setHolder(expectedContextHolder); - this.tested.doRollback(new DefaultTransactionStatus(transactionObject, false, false, false, false, null)); + this.tested.doRollback( + new DefaultTransactionStatus("name", transactionObject, false, false, false, false, false, null)); verify(this.transactionDataManagerMock).rollback(); } diff --git a/core/src/test/java/org/springframework/ldap/transaction/compensating/manager/TransactionAwareContextSourceProxyTests.java b/core/src/test/java/org/springframework/ldap/transaction/compensating/manager/TransactionAwareContextSourceProxyTests.java index d0033a7b54..65da6d29db 100644 --- a/core/src/test/java/org/springframework/ldap/transaction/compensating/manager/TransactionAwareContextSourceProxyTests.java +++ b/core/src/test/java/org/springframework/ldap/transaction/compensating/manager/TransactionAwareContextSourceProxyTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,8 +19,8 @@ import javax.naming.directory.DirContext; import javax.naming.ldap.LdapContext; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.springframework.ldap.core.ContextSource; import org.springframework.ldap.core.DirContextProxy; @@ -44,7 +44,7 @@ public class TransactionAwareContextSourceProxyTests { private DirContext dirContextMock; - @Before + @BeforeEach public void setUp() throws Exception { this.contextSourceMock = mock(ContextSource.class); this.ldapContextMock = mock(LdapContext.class); diff --git a/core/src/test/java/org/springframework/ldap/transaction/compensating/manager/TransactionAwareDirContextInvocationHandlerTests.java b/core/src/test/java/org/springframework/ldap/transaction/compensating/manager/TransactionAwareDirContextInvocationHandlerTests.java index 4c3b472d69..916a2d4eac 100644 --- a/core/src/test/java/org/springframework/ldap/transaction/compensating/manager/TransactionAwareDirContextInvocationHandlerTests.java +++ b/core/src/test/java/org/springframework/ldap/transaction/compensating/manager/TransactionAwareDirContextInvocationHandlerTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,8 +19,8 @@ import javax.naming.NamingException; import javax.naming.directory.DirContext; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.springframework.ldap.core.ContextSource; import org.springframework.transaction.support.TransactionSynchronizationManager; @@ -39,7 +39,7 @@ public class TransactionAwareDirContextInvocationHandlerTests { private DirContextHolder holder; - @Before + @BeforeEach public void setUp() throws Exception { this.dirContextMock = mock(DirContext.class); this.contextSourceMock = mock(ContextSource.class); diff --git a/core/src/test/java/org/springframework/ldap/transaction/compensating/support/DefaultTempEntryRenamingStrategyTests.java b/core/src/test/java/org/springframework/ldap/transaction/compensating/support/DefaultTempEntryRenamingStrategyTests.java index 3f85065cce..8b198967f6 100644 --- a/core/src/test/java/org/springframework/ldap/transaction/compensating/support/DefaultTempEntryRenamingStrategyTests.java +++ b/core/src/test/java/org/springframework/ldap/transaction/compensating/support/DefaultTempEntryRenamingStrategyTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,7 +19,7 @@ import javax.naming.Name; import javax.naming.ldap.LdapName; -import org.junit.Test; +import org.junit.jupiter.api.Test; import org.springframework.ldap.support.LdapUtils; diff --git a/core/src/test/java/org/springframework/ldap/transaction/compensating/support/DifferentSubtreeTempEntryRenamingStrategyTests.java b/core/src/test/java/org/springframework/ldap/transaction/compensating/support/DifferentSubtreeTempEntryRenamingStrategyTests.java index f71da758ba..ec0fba3cf4 100644 --- a/core/src/test/java/org/springframework/ldap/transaction/compensating/support/DifferentSubtreeTempEntryRenamingStrategyTests.java +++ b/core/src/test/java/org/springframework/ldap/transaction/compensating/support/DifferentSubtreeTempEntryRenamingStrategyTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,7 +19,7 @@ import javax.naming.Name; import javax.naming.ldap.LdapName; -import org.junit.Test; +import org.junit.jupiter.api.Test; import org.springframework.ldap.support.LdapUtils; diff --git a/core/src/test/java/org/springframework/ldap/util/ListComparatorTests.java b/core/src/test/java/org/springframework/ldap/util/ListComparatorTests.java index c53d2fc24b..1d3ebd764d 100644 --- a/core/src/test/java/org/springframework/ldap/util/ListComparatorTests.java +++ b/core/src/test/java/org/springframework/ldap/util/ListComparatorTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,8 +19,8 @@ import java.util.Arrays; import java.util.List; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.springframework.ldap.support.ListComparator; @@ -35,7 +35,7 @@ public class ListComparatorTests { private ListComparator tested; - @Before + @BeforeEach public void setUp() throws Exception { this.tested = new ListComparator(); } diff --git a/core/src/test/java/org/springframework/transaction/compensating/support/DefaultCompensatingTransactionOperationManagerTests.java b/core/src/test/java/org/springframework/transaction/compensating/support/DefaultCompensatingTransactionOperationManagerTests.java index c89f0f93df..ee66808bfd 100644 --- a/core/src/test/java/org/springframework/transaction/compensating/support/DefaultCompensatingTransactionOperationManagerTests.java +++ b/core/src/test/java/org/springframework/transaction/compensating/support/DefaultCompensatingTransactionOperationManagerTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2016 the original author or authors. + * Copyright 2006-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,8 +18,8 @@ import java.util.Stack; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.springframework.transaction.TransactionSystemException; import org.springframework.transaction.compensating.CompensatingTransactionOperationExecutor; @@ -27,6 +27,7 @@ import org.springframework.transaction.compensating.CompensatingTransactionOperationRecorder; import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatExceptionOfType; import static org.mockito.BDDMockito.given; import static org.mockito.BDDMockito.mock; import static org.mockito.BDDMockito.verify; @@ -40,7 +41,7 @@ public class DefaultCompensatingTransactionOperationManagerTests { private CompensatingTransactionOperationRecorder operationRecorderMock; - @Before + @BeforeEach public void setUp() throws Exception { this.operationExecutorMock = mock(CompensatingTransactionOperationExecutor.class); this.operationFactoryMock = mock(CompensatingTransactionOperationFactory.class); @@ -77,15 +78,17 @@ public void testRollback() { verify(this.operationExecutorMock).rollback(); } - @Test(expected = TransactionSystemException.class) + @Test public void testRollback_Exception() { - DefaultCompensatingTransactionOperationManager tested = new DefaultCompensatingTransactionOperationManager( - this.operationFactoryMock); - tested.getOperationExecutors().push(this.operationExecutorMock); + assertThatExceptionOfType(TransactionSystemException.class).isThrownBy(() -> { + DefaultCompensatingTransactionOperationManager tested = new DefaultCompensatingTransactionOperationManager( + this.operationFactoryMock); + tested.getOperationExecutors().push(this.operationExecutorMock); - willThrow(new RuntimeException()).given(this.operationExecutorMock).rollback(); + willThrow(new RuntimeException()).given(this.operationExecutorMock).rollback(); - tested.rollback(); + tested.rollback(); + }); } @Test @@ -98,15 +101,17 @@ public void testCommit() { verify(this.operationExecutorMock).commit(); } - @Test(expected = TransactionSystemException.class) + @Test public void testCommit_Exception() { - DefaultCompensatingTransactionOperationManager tested = new DefaultCompensatingTransactionOperationManager( - this.operationFactoryMock); - tested.getOperationExecutors().push(this.operationExecutorMock); + assertThatExceptionOfType(TransactionSystemException.class).isThrownBy(() -> { + DefaultCompensatingTransactionOperationManager tested = new DefaultCompensatingTransactionOperationManager( + this.operationFactoryMock); + tested.getOperationExecutors().push(this.operationExecutorMock); - willThrow(new RuntimeException()).given(this.operationExecutorMock).commit(); + willThrow(new RuntimeException()).given(this.operationExecutorMock).commit(); - tested.commit(); + tested.commit(); + }); } } diff --git a/core/src/test/resources/ldap-namespace-config-transactional-datasource.xml b/core/src/test/resources/ldap-namespace-config-transactional-datasource.xml index bf0aa55c5f..b92eb00042 100644 --- a/core/src/test/resources/ldap-namespace-config-transactional-datasource.xml +++ b/core/src/test/resources/ldap-namespace-config-transactional-datasource.xml @@ -1,6 +1,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/test/integration-tests/src/test/resources/conf/ldapAndJdbcTransactionTestContext.xml b/test/integration-tests/src/test/resources/conf/ldapAndJdbcTransactionTestContext.xml deleted file mode 100644 index 80f105c43c..0000000000 --- a/test/integration-tests/src/test/resources/conf/ldapAndJdbcTransactionTestContext.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/test/integration-tests/src/test/resources/conf/ldapTemplatePooledTestContext.xml b/test/integration-tests/src/test/resources/conf/ldapTemplatePooledTestContext.xml index 756afc8f56..e656af0db5 100644 --- a/test/integration-tests/src/test/resources/conf/ldapTemplatePooledTestContext.xml +++ b/test/integration-tests/src/test/resources/conf/ldapTemplatePooledTestContext.xml @@ -1,6 +1,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - conf/OrgPerson.hbm.xml - - - - - hibernate.dialect=org.hibernate.dialect.HSQLDialect - hibernate.hbm2ddl.auto=create - - - - - - - - - - - - - - - - - - - - - - - PROPAGATION_REQUIRES_NEW - - - - diff --git a/test/integration-tests/src/test/resources/conf/missingLdapAndJdbcTransactionTestContext.xml b/test/integration-tests/src/test/resources/conf/missingLdapAndJdbcTransactionTestContext.xml deleted file mode 100644 index deee2666f9..0000000000 --- a/test/integration-tests/src/test/resources/conf/missingLdapAndJdbcTransactionTestContext.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - PROPAGATION_REQUIRES_NEW - - - -