-
Notifications
You must be signed in to change notification settings - Fork 302
#346 / #336 / #350: Drop Java 1.7 support / introduce a timeout for any native git command / replace almost every guava feature with Java 8 features #382
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ced with ArgumentMatchers
…s' that allows to specify a timeout for any call to the native binary in case of issues while fetching information
…ist what needs to be updated
… error prone to java9 and newer java versions (as a result now also rely on a single checkstyle 8.2 definition)
pom.xml
Outdated
<artifactId>annotations</artifactId> | ||
<version>12.0</version> | ||
<version>16.0.2</version> | ||
</dependency> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternatively we could use
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<version>3.0.2</version>
</dependency>
However, technically I don't see a huge benefit in changing this...the findbugs one might look more native
java like...
- replace com.google.common.base.Optional with java.util.Optional - replace com.google.common.base.Joiner with java.util.StringJoiner or String.join - replace com.google.common.base.MoreObjects with java.util.Optional - replace Preconditions.checkArgument(arg != null, ...) with java.util.Objects.requireNonNull(arg) - replace various com.google.common.base.{Function, Predicate, Predicates} code snippets with lambda expressions - replace com.google.common.io.Closeables with java's try-with-resources
…arname itself; use try-with-resources instead of closing resources with finally; lambda call simplifications)
…5 (annotations that come automatically with guava)
} | ||
return false; | ||
}) | ||
.map(tagRef -> tagRef.getName().replaceAll("refs/tags/", "")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not use trimFullTagName(tagRef.getName())
here?
This specific Method would use replaceFirst("refs/tags/", "")
instead of replaceAll
. However AFAIK we are expecting only the start to be refs/tags/...
. I think a replaceAll
would prevent us from using actual tags that are looking like refs/tags/...
(very unlikely that this ever happens). In practice I wouldn't assume it actually makes a difference.
…lt' variable declaration to set them directly inside the tests
…lates based on the circumstances - aka. one template for bugs, one for features and one general template (see https://help.github.com/articles/about-issue-and-pull-request-templates/)
This changing with this MR: