Skip to content
Open
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
2 changes: 1 addition & 1 deletion .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
*/
class CassandraHealthContributorConfigurations {



@Configuration(proxyBeanMethods = false)
@ConditionalOnBean(CqlSession.class)
static class CassandraDriverConfiguration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,7 @@ public CloudFoundryWebEndpointDiscoverer(ApplicationContext applicationContext,

@Override
protected boolean isExtensionTypeExposed(Class<?> extensionBeanType) {
if (isHealthEndpointExtension(extensionBeanType) && !isCloudFoundryHealthEndpointExtension(extensionBeanType)) {
// Filter regular health endpoint extensions so a CF version can replace them
return false;
}
return true;
return !(isHealthEndpointExtension(extensionBeanType) && !isCloudFoundryHealthEndpointExtension(extensionBeanType));
}

private boolean isHealthEndpointExtension(Class<?> extensionBeanType) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public CloudFoundryWebEndpointServletHandlerMapping cloudFoundryWebEndpointServl
allEndpoints.addAll(webEndpoints);
allEndpoints.addAll(servletEndpointsSupplier.getEndpoints());
allEndpoints.addAll(controllerEndpointsSupplier.getEndpoints());
return new CloudFoundryWebEndpointServletHandlerMapping(new EndpointMapping("/cloudfoundryapplication"),
return new CloudFoundryWebEndpointServletHandlerMapping(new EndpointMapping(BASE_PATH),
webEndpoints, endpointMediaTypes, getCorsConfiguration(), securityInterceptor, allEndpoints);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ private Class<?> getTarget(ConditionContext context, AnnotatedTypeMetadata metad
try {
return ClassUtils.forName(methodMetadata.getReturnTypeName(), context.getClassLoader());
}
catch (Throwable ex) {
catch (Exception ex) {
throw new IllegalStateException("Failed to extract endpoint id for "
+ methodMetadata.getDeclaringClassName() + "." + methodMetadata.getMethodName(), ex);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public ConditionOutcome getMatchOutcome(ConditionContext context, AnnotatedTypeM
.match("LoggerContext was an instance of org.apache.logging.log4j.core.LoggerContext");
}
}
catch (Throwable ex) {
catch (Exception ex) {
// Continue with no match
}
return ConditionOutcome
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ public Map<String, Boolean> getEnable() {

@Deprecated(since = "3.2.0", forRemoval = true)
@DeprecatedConfigurationProperty(replacement = "management.observations.key-values", since = "3.2.0")
/**
* @deprecated since 3.2.0
*/
public Map<String, String> getTags() {
return this.tags;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,17 @@ public void setAggregationTemporality(AggregationTemporality aggregationTemporal

@Deprecated(since = "3.2.0", forRemoval = true)
@DeprecatedConfigurationProperty(replacement = "management.opentelemetry.resource-attributes", since = "3.2.0")
/**
* @deprecated since 3.2.0
*/
public Map<String, String> getResourceAttributes() {
return this.resourceAttributes;
}

@Deprecated(since = "3.2.0", forRemoval = true)
/**
* @deprecated since 3.2.0
*/
public void setResourceAttributes(Map<String, String> resourceAttributes) {
this.resourceAttributes = resourceAttributes;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ public class BraveAutoConfiguration {
* Default value for application name if {@code spring.application.name} is not set.
*/
private static final String DEFAULT_APPLICATION_NAME = "application";
private static final String SPAN_JOINING = "management.tracing.brave.span-joining-supported";

@Bean
@ConditionalOnMissingBean
Expand All @@ -106,17 +107,17 @@ public Tracing braveTracing(Environment environment, TracingProperties propertie
if (properties.getPropagation().getType() != null
&& properties.getPropagation().getType().contains(PropagationType.W3C)) {
throw new IncompatibleConfigurationException("management.tracing.propagation.type",
"management.tracing.brave.span-joining-supported");
SPAN_JOINING);
}
if (properties.getPropagation().getType() == null
&& properties.getPropagation().getProduce().contains(PropagationType.W3C)) {
throw new IncompatibleConfigurationException("management.tracing.propagation.produce",
"management.tracing.brave.span-joining-supported");
SPAN_JOINING);
}
if (properties.getPropagation().getType() == null
&& properties.getPropagation().getConsume().contains(PropagationType.W3C)) {
throw new IncompatibleConfigurationException("management.tracing.propagation.consume",
"management.tracing.brave.span-joining-supported");
SPAN_JOINING);
}
}
String applicationName = environment.getProperty("spring.application.name", DEFAULT_APPLICATION_NAME);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ public ModelAndView handle(HttpServletRequest request, HttpServletResponse respo
@Override
@Deprecated(since = "2.4.9", forRemoval = false)
@SuppressWarnings("deprecation")
/**
* @deprecated since 2.4.9
*/
public long getLastModified(HttpServletRequest request, Object handler) {
Optional<HandlerAdapter> adapter = getAdapter(handler);
return adapter.map((handlerAdapter) -> handlerAdapter.getLastModified(request, handler)).orElse(0L);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ protected HotSpotDiagnosticMXBeanHeapDumper() {
this.dumpHeapMethod = ReflectionUtils.findMethod(diagnosticMXBeanClass, "dumpHeap", String.class,
Boolean.TYPE);
}
catch (Throwable ex) {
catch (Exception ex) {
throw new HeapDumperUnavailableException("Unable to locate HotSpotDiagnosticMXBean", ex);
}
}
Expand Down Expand Up @@ -202,7 +202,7 @@ private OpenJ9DiagnosticsMXBeanHeapDumper() {
this.dumpHeapMethod = ReflectionUtils.findMethod(mxBeanClass, "triggerDumpToFile", String.class,
String.class);
}
catch (Throwable ex) {
catch (Exception ex) {
throw new HeapDumperUnavailableException("Unable to locate OpenJ9DiagnosticsMXBean", ex);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ private void post() {
try {
this.pushGateway.pushAdd(this.registry, this.job, this.groupingKey);
}
catch (Throwable ex) {
catch (Exception ex) {
logger.warn("Unexpected exception thrown by POST of metrics to Prometheus Pushgateway", ex);
}
}
Expand All @@ -114,7 +114,7 @@ private void put() {
try {
this.pushGateway.push(this.registry, this.job, this.groupingKey);
}
catch (Throwable ex) {
catch (Exception ex) {
logger.warn("Unexpected exception thrown by PUT of metrics to Prometheus Pushgateway", ex);
}
}
Expand All @@ -123,7 +123,7 @@ private void delete() {
try {
this.pushGateway.delete(this.job, this.groupingKey);
}
catch (Throwable ex) {
catch (Exception ex) {
logger.warn("Unexpected exception thrown by DELETE of metrics from Prometheus Pushgateway", ex);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,7 @@ protected static class RabbitConnectionFactoryCreator {

private final RabbitProperties properties;

protected RabbitConnectionFactoryCreator(RabbitProperties properties,
ObjectProvider<RabbitConnectionDetails> connectionDetails) {
protected RabbitConnectionFactoryCreator(RabbitProperties properties) {
this.properties = properties;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,22 +186,18 @@ private boolean isRegisteredJob(String jobName) {

private void executeLocalJobs(JobParameters jobParameters) throws JobExecutionException {
for (Job job : this.jobs) {
if (StringUtils.hasText(this.jobName)) {
if (!this.jobName.equals(job.getName())) {
logger.debug(LogMessage.format("Skipped job: %s", job.getName()));
continue;
}
if (StringUtils.hasText(this.jobName) && !this.jobName.equals(job.getName())) {
logger.debug(LogMessage.format("Skipped job: %s", job.getName()));
continue;
}
execute(job, jobParameters);
}
}

private void executeRegisteredJobs(JobParameters jobParameters) throws JobExecutionException {
if (this.jobRegistry != null && StringUtils.hasText(this.jobName)) {
if (!isLocalJob(this.jobName)) {
Job job = this.jobRegistry.getJob(this.jobName);
execute(job, jobParameters);
}
if (this.jobRegistry != null && StringUtils.hasText(this.jobName) && !isLocalJob(this.jobName)) {
Job job = this.jobRegistry.getJob(this.jobName);
execute(job, jobParameters);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ protected ConditionOutcome getResourceOutcome(ConditionContext context, Annotate
List<String> found = new ArrayList<>();
for (String location : this.resourceLocations) {
Resource resource = context.getResourceLoader().getResource(location);
if (resource != null && resource.exists()) {
if (resource.exists()) {
found.add(location);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,11 +182,17 @@ public void setEnabled(Boolean enabled) {
@DeprecatedConfigurationProperty(
reason = "SSL bundle support with spring.ssl.bundle and spring.couchbase.env.ssl.bundle should be used instead",
since = "3.1.0")
/**
* @deprecated since 3.1.0
*/
public String getKeyStore() {
return this.keyStore;
}

@Deprecated(since = "3.1.0", forRemoval = true)
/**
* @deprecated since 3.1.0
*/
public void setKeyStore(String keyStore) {
this.keyStore = keyStore;
}
Expand All @@ -195,11 +201,17 @@ public void setKeyStore(String keyStore) {
@DeprecatedConfigurationProperty(
reason = "SSL bundle support with spring.ssl.bundle and spring.couchbase.env.ssl.bundle should be used instead",
since = "3.1.0")
/**
* @deprecated since 3.1.0
*/
public String getKeyStorePassword() {
return this.keyStorePassword;
}

@Deprecated(since = "3.1.0", forRemoval = true)
/**
* @deprecated since 3.1.0
*/
public void setKeyStorePassword(String keyStorePassword) {
this.keyStorePassword = keyStorePassword;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ class NoSuchBeanDefinitionFailureAnalyzer extends AbstractInjectionFailureAnalyz
private final MetadataReaderFactory metadataReaderFactory;

private final ConditionEvaluationReport report;
private final String FORMAT_PATTERN = "\t- %s%n";

NoSuchBeanDefinitionFailureAnalyzer(BeanFactory beanFactory) {
Assert.isInstanceOf(ConfigurableListableBeanFactory.class, beanFactory);
Expand All @@ -88,17 +89,17 @@ protected FailureAnalysis analyze(Throwable rootFailure, NoSuchBeanDefinitionExc
if (injectionAnnotations.length > 0) {
message.append(String.format("%nThe injection point has the following annotations:%n"));
for (Annotation injectionAnnotation : injectionAnnotations) {
message.append(String.format("\t- %s%n", injectionAnnotation));
message.append(String.format(FORMAT_PATTERN, injectionAnnotation));
}
}
}
if (!autoConfigurationResults.isEmpty() || !userConfigurationResults.isEmpty()) {
message.append(String.format("%nThe following candidates were found but could not be injected:%n"));
for (AutoConfigurationResult result : autoConfigurationResults) {
message.append(String.format("\t- %s%n", result));
message.append(String.format(FORMAT_PATTERN, result));
}
for (UserConfigurationResult result : userConfigurationResults) {
message.append(String.format("\t- %s%n", result));
message.append(String.format(FORMAT_PATTERN, result));
}
}
String action = String.format("Consider %s %s in your configuration.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -738,33 +738,51 @@ public void setLicenseKey(String licenseKey) {

@DeprecatedConfigurationProperty(replacement = "spring.flyway.oracle.sqlplus", since = "3.2.0")
@Deprecated(since = "3.2.0", forRemoval = true)
/**
* @deprecated since 3.2.0
*/
public Boolean getOracleSqlplus() {
return getOracle().getSqlplus();
}

@Deprecated(since = "3.2.0", forRemoval = true)
/**
* @deprecated since 3.2.0
*/
public void setOracleSqlplus(Boolean oracleSqlplus) {
getOracle().setSqlplus(oracleSqlplus);
}

@DeprecatedConfigurationProperty(replacement = "spring.flyway.oracle.sqlplus-warn", since = "3.2.0")
@Deprecated(since = "3.2.0", forRemoval = true)
/**
* @deprecated since 3.2.0
*/
public Boolean getOracleSqlplusWarn() {
return getOracle().getSqlplusWarn();
}

@Deprecated(since = "3.2.0", forRemoval = true)
/**
* @deprecated since 3.2.0
*/
public void setOracleSqlplusWarn(Boolean oracleSqlplusWarn) {
getOracle().setSqlplusWarn(oracleSqlplusWarn);
}

@DeprecatedConfigurationProperty(replacement = "spring.flyway.oracle.wallet-location", since = "3.2.0")
@Deprecated(since = "3.2.0", forRemoval = true)
/**
* @deprecated since 3.2.0
*/
public String getOracleWalletLocation() {
return getOracle().getWalletLocation();
}

@Deprecated(since = "3.2.0", forRemoval = true)
/**
* @deprecated since 3.2.0
*/
public void setOracleWalletLocation(String oracleWalletLocation) {
getOracle().setWalletLocation(oracleWalletLocation);
}
Expand Down Expand Up @@ -811,11 +829,17 @@ public void setKerberosConfigFile(String kerberosConfigFile) {

@DeprecatedConfigurationProperty(replacement = "spring.flyway.oracle.kerberos-cache-file", since = "3.2.0")
@Deprecated(since = "3.2.0", forRemoval = true)
/**
* @deprecated since 3.2.0
*/
public String getOracleKerberosCacheFile() {
return getOracle().getKerberosCacheFile();
}

@Deprecated(since = "3.2.0", forRemoval = true)
/**
* @deprecated since 3.2.0
*/
public void setOracleKerberosCacheFile(String oracleKerberosCacheFile) {
getOracle().setKerberosCacheFile(oracleKerberosCacheFile);
}
Expand All @@ -830,11 +854,17 @@ public void setOutputQueryResults(Boolean outputQueryResults) {

@DeprecatedConfigurationProperty(replacement = "spring.flyway.sqlserver.kerberos-login-file")
@Deprecated(since = "3.2.0", forRemoval = true)
/**
* @deprecated since 3.2.0
*/
public String getSqlServerKerberosLoginFile() {
return getSqlserver().getKerberosLoginFile();
}

@Deprecated(since = "3.2.0", forRemoval = true)
/**
* @deprecated since 3.2.0
*/
public void setSqlServerKerberosLoginFile(String sqlServerKerberosLoginFile) {
getSqlserver().setKerberosLoginFile(sqlServerKerberosLoginFile);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public class InfluxDbAutoConfiguration {
@ConditionalOnMissingBean
public InfluxDB influxDb(InfluxDbProperties properties, ObjectProvider<InfluxDbOkHttpClientBuilderProvider> builder,
ObjectProvider<InfluxDbCustomizer> customizers) {
InfluxDB influxDb = new InfluxDBImpl(properties.getUrl().toString(), properties.getUser(),
InfluxDB influxDb = new InfluxDBImpl(properties.getUrl(), properties.getUser(),
properties.getPassword(), determineBuilder(builder.getIfAvailable()));
customizers.orderedStream().forEach((customizer) -> customizer.customize(influxDb));
return influxDb;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -840,11 +840,17 @@ public void setBootstrapServers(List<String> bootstrapServers) {
@DeprecatedConfigurationProperty(replacement = "spring.kafka.streams.state-store-cache-max-size",
since = "3.1.0")
@Deprecated(since = "3.1.0", forRemoval = true)
/**
* @deprecated since 3.1.0
*/
public DataSize getCacheMaxSizeBuffering() {
return this.cacheMaxSizeBuffering;
}

@Deprecated(since = "3.1.0", forRemoval = true)
/**
* @deprecated since 3.1.0
*/
public void setCacheMaxSizeBuffering(DataSize cacheMaxSizeBuffering) {
this.cacheMaxSizeBuffering = cacheMaxSizeBuffering;
}
Expand Down
Loading