mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-02 11:35:57 +01:00
Reduce code smells (#2089)
Reduce code smells found by deepsource.io. We focused on the low-hanging fruits and not breaking any api.
This commit is contained in:
@@ -80,7 +80,7 @@ public class ScmFileTransferServlet extends HttpServlet {
|
||||
* Gson is used because the implementation was based on the jgit implementation. However the {@link LfsProtocolServlet} (which we do use in
|
||||
* {@link ScmLfsProtocolServlet}) also uses Gson, which currently ties us to Gson anyway.
|
||||
*/
|
||||
private static Gson gson = createGson();
|
||||
private static final Gson gson = createGson();
|
||||
|
||||
private final BlobStore blobStore;
|
||||
|
||||
|
||||
@@ -99,7 +99,7 @@ public class GitHookTagProviderTest {
|
||||
public void testGetCreatedTags() {
|
||||
try (MockedStatic<GitUtil> dummy = Mockito.mockStatic(GitUtil.class)) {
|
||||
String revision = REVISION_1;
|
||||
Long timestamp = 1339416344000L;
|
||||
long timestamp = 1339416344000L;
|
||||
String tagName = "1.0.0";
|
||||
String ref = "refs/tags/" + tagName;
|
||||
|
||||
@@ -121,7 +121,7 @@ public class GitHookTagProviderTest {
|
||||
public void testGetDeletedTags() {
|
||||
try (MockedStatic<GitUtil> dummy = Mockito.mockStatic(GitUtil.class)) {
|
||||
String revision = REVISION_1;
|
||||
Long timestamp = 1339416344000L;
|
||||
long timestamp = 1339416344000L;
|
||||
String tagName = "1.0.0";
|
||||
String ref = "refs/tags/" + tagName;
|
||||
|
||||
@@ -157,7 +157,7 @@ public class GitHookTagProviderTest {
|
||||
String oldRevision = REVISION_2;
|
||||
String newRevision = REVISION_1;
|
||||
|
||||
Long timestamp = 1339416344000L;
|
||||
long timestamp = 1339416344000L;
|
||||
String tagName = "1.0.0";
|
||||
String ref = "refs/tags/" + tagName;
|
||||
|
||||
@@ -183,7 +183,7 @@ public class GitHookTagProviderTest {
|
||||
String oldRevision = REVISION_2;
|
||||
String newRevision = REVISION_1;
|
||||
|
||||
Long timestamp = 1339416344000L;
|
||||
long timestamp = 1339416344000L;
|
||||
String tagName = "1.0.0";
|
||||
String ref = "refs/tags/" + tagName;
|
||||
|
||||
@@ -205,8 +205,8 @@ public class GitHookTagProviderTest {
|
||||
try (MockedStatic<GitUtil> dummy = Mockito.mockStatic(GitUtil.class)) {
|
||||
String revisionOfTag = REVISION_1;
|
||||
String revisionOfCommit = REVISION_2;
|
||||
Long timestampOfTag = 6666666000L;
|
||||
Long timestampOfCommit = 1339416344000L;
|
||||
long timestampOfTag = 6666666000L;
|
||||
long timestampOfCommit = 1339416344000L;
|
||||
String tagName = "1.0.0";
|
||||
String ref = "refs/tags/" + tagName;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user