Harmonize style of igored exceptions across the codebase

This commit is contained in:
Moritz Halbritter
2024-02-12 10:09:29 +01:00
parent 831a98c83c
commit 8ffcfc9b77
51 changed files with 116 additions and 55 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 the original author or authors.
* Copyright 2012-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -124,6 +124,7 @@ class SharedMetadataReaderFactoryContextInitializer implements
registry.getBeanDefinition(AnnotationConfigUtils.CONFIGURATION_ANNOTATION_PROCESSOR_BEAN_NAME));
}
catch (NoSuchBeanDefinitionException ex) {
// Ignore
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2022 the original author or authors.
* Copyright 2012-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -56,6 +56,7 @@ class CacheCondition extends SpringBootCondition {
}
}
catch (BindException ex) {
// Ignore
}
return ConditionOutcome.noMatch(message.because("unknown cache type"));
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 the original author or authors.
* Copyright 2012-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -500,6 +500,7 @@ class OnBeanCondition extends FilteringSpringBootCondition implements Configurat
resolved.add(resolve(className, this.classLoader));
}
catch (ClassNotFoundException | NoClassDefFoundError ex) {
// Ignore
}
}
return resolved;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 the original author or authors.
* Copyright 2012-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -164,6 +164,7 @@ public class UndertowWebServerFactoryCustomizer
lookup.put(getCanonicalName(field.getName()), option);
}
catch (IllegalAccessException ex) {
// Ignore
}
}
});

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 the original author or authors.
* Copyright 2012-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -514,6 +514,7 @@ public class WebMvcAutoConfiguration {
}
}
catch (Exception ex) {
// Ignore
}
return null;
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2022 the original author or authors.
* Copyright 2012-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -126,6 +126,7 @@ public class DefaultErrorViewResolver implements ErrorViewResolver, Ordered {
}
}
catch (Exception ex) {
// Ignore
}
}
return null;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 the original author or authors.
* Copyright 2012-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -584,6 +584,7 @@ class BatchAutoConfigurationTests {
jobRegistry.register(getJobFactory());
}
catch (DuplicateJobException ex) {
// Ignore
}
}
return bean;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 the original author or authors.
* Copyright 2012-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -106,6 +106,7 @@ class SessionAutoConfigurationTests extends AbstractSessionAutoConfigurationTest
delegatingFilterProxy.doFilter(null, null, null);
}
catch (Exception ex) {
// Ignore
}
assertThat(delegatingFilterProxy).extracting("delegate")
.isSameAs(context.getBean(SessionRepositoryFilter.class));