Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
#36 Marke methods deprecated which will be removed after code refacto…
…ring

Signed-off-by: Sven Strittmatter <sven.strittmatter@iteratec.com>
  • Loading branch information
Weltraumschaf committed Sep 3, 2023
commit 35d185675c1f83cec40b6ddefda61a3bd132edf6
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ class DefaultImportScanService implements ImportScanService {
new FormHttpMessageConverter(),
new ResourceHttpMessageConverter(),
new MappingJackson2HttpMessageConverter());
@Deprecated
private final SystemPropertyFinder properties = new SystemPropertyFinder();
@Getter
private final String defectDojoUrl;
Expand Down Expand Up @@ -230,6 +231,7 @@ ClientHttpRequestFactory createRequestFactoryWithProxyAuthConfig() {
return factory;
}

@Deprecated
private static class SystemPropertyFinder {
private boolean hasProperty(@NonNull final ProxyConfigNames name) {
return System.getProperty(name.getLiterat()) != null;
Expand All @@ -244,6 +246,7 @@ private String getProperty(@NonNull final ProxyConfigNames name) {
}
}

@Deprecated
final static class MissingProxyAuthenticationConfig extends RuntimeException {
MissingProxyAuthenticationConfig(ProxyConfigNames name) {
super(String.format("Expected System property '%s' not set!", name.getLiterat()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ class ImportScanResponse {
* or none of them!
* </p>
*/
@Deprecated
enum ProxyConfigNames {
HTTP_PROXY_HOST("http.proxyHost"),
HTTP_PROXY_PORT("http.proxyPort"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ void shouldConfigureProxySettings_trueIfUserAndPasswordSet() {
}

@Test
@Deprecated
void createRequestFactoryWithProxyAuthConfig_throesExceptionIfUserNotSet() {
System.clearProperty(ProxyConfigNames.HTTP_PROXY_USER.getLiterat());
System.setProperty(ProxyConfigNames.HTTP_PROXY_PASSWORD.getLiterat(), "password");
Expand All @@ -121,6 +122,7 @@ void createRequestFactoryWithProxyAuthConfig_throesExceptionIfUserNotSet() {
}

@Test
@Deprecated
void createRequestFactoryWithProxyAuthConfig_throesExceptionIfPasswordNotSet() {
System.setProperty(ProxyConfigNames.HTTP_PROXY_USER.getLiterat(), "user");
System.clearProperty(ProxyConfigNames.HTTP_PROXY_PASSWORD.getLiterat());
Expand All @@ -135,6 +137,7 @@ void createRequestFactoryWithProxyAuthConfig_throesExceptionIfPasswordNotSet() {
}

@Test
@Deprecated
void createRequestFactoryWithProxyAuthConfig_throesExceptionIfHostNotSet() {
System.setProperty(ProxyConfigNames.HTTP_PROXY_USER.getLiterat(), "user");
System.setProperty(ProxyConfigNames.HTTP_PROXY_PASSWORD.getLiterat(), "password");
Expand All @@ -149,6 +152,7 @@ void createRequestFactoryWithProxyAuthConfig_throesExceptionIfHostNotSet() {
}

@Test
@Deprecated
void createRequestFactoryWithProxyAuthConfig_throesExceptionIfPortNotSet() {
System.setProperty(ProxyConfigNames.HTTP_PROXY_USER.getLiterat(), "user");
System.setProperty(ProxyConfigNames.HTTP_PROXY_PASSWORD.getLiterat(), "password");
Expand All @@ -163,6 +167,7 @@ void createRequestFactoryWithProxyAuthConfig_throesExceptionIfPortNotSet() {
}

@Test
@Deprecated
void createRequestFactoryWithProxyAuthConfig_throesExceptionIfPortIsNotInteger() {
System.setProperty(ProxyConfigNames.HTTP_PROXY_USER.getLiterat(), "user");
System.setProperty(ProxyConfigNames.HTTP_PROXY_PASSWORD.getLiterat(), "password");
Expand Down