From d47dd5ba1c1380ed10963dc9e467719e58467550 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 3 Feb 2022 19:15:02 +0100 Subject: [PATCH] Bump plugin from 4.18 to 4.33 (#185) * Bump plugin from 4.18 to 4.33 Bumps [plugin](https://github.com/jenkinsci/plugin-pom) from 4.18 to 4.33. - [Release notes](https://github.com/jenkinsci/plugin-pom/releases) - [Changelog](https://github.com/jenkinsci/plugin-pom/blob/master/CHANGELOG.md) - [Commits](https://github.com/jenkinsci/plugin-pom/compare/plugin-4.18...plugin-4.33) --- updated-dependencies: - dependency-name: org.jenkins-ci.plugins:plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Bump the Jenkins minimal version to 2.249.1 Fix issue spotted by Spotbug Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Clarck Robinson --- pom.xml | 11 +++++++++-- .../plugins/tuleap_oauth/helper/PluginHelperImpl.java | 3 ++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 56741254..31d4ecd5 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.jenkins-ci.plugins plugin - 4.18 + 4.33 io.jenkins.plugins @@ -15,7 +15,7 @@ 1.1.13 -SNAPSHOT jenkinsci/tuleap-oauth-plugin - 2.176.4 + 2.249.1 8 1.0.0 @@ -67,6 +67,13 @@ kotlin-stdlib-common 1.5.0 + + io.jenkins.tools.bom + bom-2.249.x + 984.vb5eaac999a7e + import + pom + diff --git a/src/main/java/io/jenkins/plugins/tuleap_oauth/helper/PluginHelperImpl.java b/src/main/java/io/jenkins/plugins/tuleap_oauth/helper/PluginHelperImpl.java index c3c3b014..1074a73e 100644 --- a/src/main/java/io/jenkins/plugins/tuleap_oauth/helper/PluginHelperImpl.java +++ b/src/main/java/io/jenkins/plugins/tuleap_oauth/helper/PluginHelperImpl.java @@ -24,6 +24,8 @@ public class PluginHelperImpl implements PluginHelper { private final static Integer RECOMMENDED_LENGTH = 32; + private static final SecureRandom secureRandom = new SecureRandom(); + public Jenkins getJenkinsInstance() { Jenkins jenkins = Jenkins.getInstanceOrNull(); if (jenkins == null) { @@ -40,7 +42,6 @@ public TuleapConfiguration getConfiguration() { @Override public String buildRandomBase64EncodedURLSafeString() { byte[] code = new byte[RECOMMENDED_LENGTH]; - SecureRandom secureRandom = new SecureRandom(); secureRandom.nextBytes(code); return Base64.encodeBase64URLSafeString(code); }