Browse Source

Delete deprecated and unused Server#getDeployDir()

tags/6.7-RC1
Simon Brandhof 6 years ago
parent
commit
2bde31ecbf

+ 1
- 6
server/sonar-server/src/main/java/org/sonar/server/platform/ServerImpl.java View File

@@ -75,12 +75,7 @@ public class ServerImpl extends Server {
public File getRootDir() {
return fs.getHomeDir();
}

@Override
public File getDeployDir() {
return fs.getDeployDir();
}

@Override
public String getContextPath() {
return urlSettings.getContextPath();

+ 0
- 3
server/sonar-server/src/test/java/org/sonar/server/platform/ServerImplTest.java View File

@@ -67,10 +67,7 @@ public class ServerImplTest {
public void test_file_system_information() throws IOException {
File home = temp.newFolder();
when(fs.getHomeDir()).thenReturn(home);
File deploy = temp.newFolder();
when(fs.getDeployDir()).thenReturn(deploy);

assertThat(underTest.getDeployDir()).isEqualTo(deploy);
assertThat(underTest.getRootDir()).isEqualTo(home);
}


+ 0
- 7
server/sonar-server/src/test/java/org/sonar/server/platform/ServerLifecycleNotifierTest.java View File

@@ -21,7 +21,6 @@ package org.sonar.server.platform;

import java.io.File;
import java.util.Date;
import javax.annotation.CheckForNull;
import org.junit.Before;
import org.junit.Test;
import org.sonar.api.platform.Server;
@@ -107,12 +106,6 @@ class FakeServer extends Server {
return null;
}

@Override
@CheckForNull
public File getDeployDir() {
return null;
}

@Override
public String getContextPath() {
return null;

+ 0
- 5
server/sonar-server/src/test/java/org/sonar/server/platform/ws/StatusActionTest.java View File

@@ -191,11 +191,6 @@ public class StatusActionTest {
throw new UnsupportedOperationException();
}

@Override
public File getDeployDir() {
throw new UnsupportedOperationException();
}

@Override
public String getContextPath() {
throw new UnsupportedOperationException();

+ 0
- 6
server/sonar-server/src/test/java/org/sonar/server/telemetry/FakeServer.java View File

@@ -72,12 +72,6 @@ class FakeServer extends Server {
return null;
}

@CheckForNull
@Override
public File getDeployDir() {
return null;
}

@Override
public String getContextPath() {
return null;

+ 0
- 8
sonar-plugin-api/src/main/java/org/sonar/api/platform/Server.java View File

@@ -21,7 +21,6 @@ package org.sonar.api.platform;

import java.io.File;
import java.util.Date;
import javax.annotation.CheckForNull;
import org.sonar.api.batch.ScannerSide;
import org.sonar.api.ce.ComputeEngineSide;
import org.sonar.api.server.ServerSide;
@@ -77,13 +76,6 @@ public abstract class Server {
@Deprecated
public abstract File getRootDir();

/**
* @deprecated always {@code null} since version 6.0. No alternatives, as plugins do not have to touch this directory.
*/
@Deprecated
@CheckForNull
public abstract File getDeployDir();

/**
* Context path of web server. Value is blank {@code ""} by default. When defined by
* the property {@code sonar.web.context} of conf/sonar.properties, then value starts but does

+ 0
- 7
sonar-scanner-engine/src/main/java/org/sonar/scanner/platform/DefaultServer.java View File

@@ -21,7 +21,6 @@ package org.sonar.scanner.platform;

import java.io.File;
import java.util.Date;
import javax.annotation.CheckForNull;
import org.apache.commons.lang.StringUtils;
import org.sonar.api.CoreProperties;
import org.sonar.api.SonarRuntime;
@@ -67,12 +66,6 @@ public class DefaultServer extends Server {
return null;
}

@Override
@CheckForNull
public File getDeployDir() {
return null;
}

@Override
public String getContextPath() {
return null;

+ 0
- 1
sonar-scanner-engine/src/test/java/org/sonar/scanner/platform/DefaultServerTest.java View File

@@ -51,7 +51,6 @@ public class DefaultServerTest {
assertThat(metadata.getPermanentServerId()).isEqualTo("123");

assertThat(metadata.getRootDir()).isNull();
assertThat(metadata.getDeployDir()).isNull();
assertThat(metadata.getContextPath()).isNull();
assertThat(metadata.isDev()).isFalse();
assertThat(metadata.isSecured()).isFalse();

Loading…
Cancel
Save