mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-18 03:01:05 +01:00
Correct check for set UriInfo
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
package sonia.scm.repository.spi;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import sonia.scm.api.v2.resources.UriInfoStore;
|
||||
import sonia.scm.config.ScmConfiguration;
|
||||
import sonia.scm.repository.Repository;
|
||||
@@ -16,9 +14,6 @@ import java.io.IOException;
|
||||
|
||||
public abstract class InitializingHttpScmProtocolWrapper {
|
||||
|
||||
private static final Logger logger =
|
||||
LoggerFactory.getLogger(InitializingHttpScmProtocolWrapper.class);
|
||||
|
||||
private final Provider<? extends ScmProviderHttpServlet> delegateProvider;
|
||||
private final Provider<? extends PermissionFilter> permissionFilterProvider;
|
||||
private final Provider<UriInfoStore> uriInfoStore;
|
||||
@@ -43,7 +38,7 @@ public abstract class InitializingHttpScmProtocolWrapper {
|
||||
}
|
||||
|
||||
private String computeBasePath() {
|
||||
if (uriInfoStore.get() != null) {
|
||||
if (uriInfoStore.get() != null && uriInfoStore.get().get() != null) {
|
||||
return uriInfoStore.get().get().getBaseUri().resolve("../..").toASCIIString();
|
||||
} else {
|
||||
return scmConfiguration.getBaseUrl();
|
||||
|
||||
Reference in New Issue
Block a user