Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
* backend-core module to ensure proper communication.
*/
public class ProxyMiddlewareConstants {
private ProxyMiddlewareConstants() {
// Private constructor to prevent instantiation
}
private ProxyMiddlewareConstants() {}

/**
* Header name for authenticating proxy middleware requests to the backend configuration API. This
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,5 @@ public final class ProblemTypes {
public static final String PROXY_UPSTREAM_AUTHORIZATION_ERROR =
BASE_URI + "proxy-upstream-auth-error";

private ProblemTypes() {
// Prevent instantiation
}
private ProblemTypes() {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ private static OkHttpClient.Builder configureToIgnoreCertificate(OkHttpClient.Bu
log.warn("Ignore SSL Certificate");
try {

// Create a trust manager that does not validate certificate chains
final TrustManager[] trustAllCerts =
new TrustManager[] {
new X509TrustManager() {
Expand All @@ -89,10 +88,8 @@ public X509Certificate[] getAcceptedIssuers() {
}
};

// Install the all-trusting trust manager
final SSLContext sslContext = SSLContext.getInstance("SSL");
sslContext.init(null, trustAllCerts, new SecureRandom());
// Create a ssl socket factory with our all-trusting manager
final SSLSocketFactory sslSocketFactory = sslContext.getSocketFactory();

builder.sslSocketFactory(sslSocketFactory, (X509TrustManager) trustAllCerts[0]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import org.sitmun.proxy.middleware.decorator.RequestDecorator;
import org.springframework.stereotype.Component;

/** Decorator that appends security query parameters to the request URL. */
@Component
public class HttpRequestDecoratorAddQueryParamSecurity implements RequestDecorator {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
* Utility class for expanding URI templates using RFC 6570 standard. ONLY handles {variable} syntax
* for URIs.
*
* <p>This class provides methods to expand URI templates according to RFC 6570 specification using
* the Handy URI Templates library.
*
* @see <a href="https://tools.ietf.org/html/rfc6570">RFC 6570: URI Template</a>
*/
public final class UriTemplateExpander {
Expand Down Expand Up @@ -95,7 +92,6 @@ public static boolean hasTemplateVariables(String template) {
if (template == null || template.isEmpty()) {
return false;
}
// Simple check for {variable} pattern
return template.contains("{") && template.contains("}");
}

Expand Down
Loading