From 3b3b8749b1d1e45d740674f1841a78f4ec78eb74 Mon Sep 17 00:00:00 2001 From: Konstantin Schaper Date: Tue, 1 Dec 2020 09:13:47 +0100 Subject: [PATCH] fix sonarlint issue --- .../src/main/java/sonia/scm/repository/spi/GitTagCommand.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitTagCommand.java b/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitTagCommand.java index 63515d2c2e..40805c881d 100644 --- a/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitTagCommand.java +++ b/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitTagCommand.java @@ -95,10 +95,6 @@ public class GitTagCommand extends AbstractGitCommand implements TagCommand { Tag tag = new Tag(request.getName(), revision, tagTime); - if (revObject == null) { - throw new InternalRepositoryException(repository, "could not create tag because revision does not exist"); - } - RepositoryHookEvent hookEvent = createTagHookEvent(TagHookContextProvider.createHookEvent(tag)); eventBus.post(new PreReceiveRepositoryHookEvent(hookEvent));