Skip to content

Commit

Permalink
Simplify Revision.clone() implementation (#1106)
Browse files Browse the repository at this point in the history
* Used Objects.hash as a better practice

* Used String.format for better consistency

* Added additional check in release-drafter.yml github action file

* Operating systems with outdated OpenSSH are no longer supported (#1099)

List more operating systems so that web searches will find the page.

Link to the operating system end of life blog post.

Correct the name of Amazon Linux name.

Add the most important option, upgrade to a supported operating system.

* Bump org.jenkins-ci.plugins:plugin from 4.76 to 4.77 (#1098)

Bumps [org.jenkins-ci.plugins:plugin](https://github.com/jenkinsci/plugin-pom) from 4.76 to 4.77.
- [Release notes](https://github.com/jenkinsci/plugin-pom/releases)
- [Changelog](https://github.com/jenkinsci/plugin-pom/blob/master/CHANGELOG.md)
- [Commits](jenkinsci/plugin-pom@plugin-4.76...plugin-4.77)

---
updated-dependencies:
- dependency-name: org.jenkins-ci.plugins:plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Remove redundant spotbugs details from pom (#1101)

Included in parent pom 4.77

* Bump io.jenkins.tools.bom:bom-2.401.x (#1102)

* Bump org.jenkins-ci.plugins:plugin from 4.77 to 4.78 (#1105)

* made sh1 and branches private for better encapsulation and changed branches from collection to list for indexed access and specific order

* Converted List type back to Collection for branches variable

* ran mvn spotless:apply

* reverted priavte sha1 and branches variable

* Revert "ran mvn spotless:apply"

This reverts commit 4f2a151.

* made some changes

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Mark Waite <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Mar 9, 2024
1 parent fcdcb2d commit 52f1ab4
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/main/java/hudson/plugins/git/Revision.java
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,13 @@ public String toString() {

@Override
public Revision clone() {
Revision clone;
try {
clone = (Revision) super.clone();
Revision clone = (Revision) super.clone();
clone.branches = new ArrayList<>(branches);
return clone;
} catch (CloneNotSupportedException e) {
throw new RuntimeException("Error cloning Revision", e);
}
clone.branches = new ArrayList<>(branches);
return clone;
}

@Override
Expand Down

0 comments on commit 52f1ab4

Please sign in to comment.