Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
883fd916
Commit
883fd916
authored
Nov 16, 2013
by
Phillip Webb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish
parent
127da15c
Changes
22
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
72 additions
and
88 deletions
+72
-88
CrshAutoConfiguration.java
...ork/boot/actuate/autoconfigure/CrshAutoConfiguration.java
+3
-3
SimpleHealthIndicator.java
...gframework/boot/actuate/health/SimpleHealthIndicator.java
+4
-4
CrshAutoConfigurationTests.java
...oot/actuate/autoconfigure/CrshAutoConfigurationTests.java
+9
-32
WebMvcAutoConfiguration.java
...ework/boot/autoconfigure/web/WebMvcAutoConfiguration.java
+2
-1
RabbitAutoconfigurationTests.java
...boot/autoconfigure/amqp/RabbitAutoconfigurationTests.java
+11
-7
UnsecureManagementSampleActuatorApplicationTests.java
...ops/UnsecureManagementSampleActuatorApplicationTests.java
+2
-2
SampleMongoApplicationTests.java
...k/boot/sample/data/mongo/SampleMongoApplicationTests.java
+2
-2
SnakeTimer.java
...ingframework/boot/samples/websocket/snake/SnakeTimer.java
+2
-2
WebApplicationInitializersConfiguration.java
...war/embedded/WebApplicationInitializersConfiguration.java
+2
-2
LaunchedURLClassLoader.java
...g/springframework/boot/loader/LaunchedURLClassLoader.java
+4
-2
PropertiesLauncher.java
...a/org/springframework/boot/loader/PropertiesLauncher.java
+1
-1
Archive.java
...java/org/springframework/boot/loader/archive/Archive.java
+1
-1
RunMojo.java
...src/main/java/org/springframework/boot/maven/RunMojo.java
+4
-4
AnsiOutput.java
...c/main/java/org/springframework/boot/ansi/AnsiOutput.java
+1
-1
PropertySourcesPropertyValues.java
...ingframework/boot/bind/PropertySourcesPropertyValues.java
+1
-1
EmbeddedWebApplicationContext.java
.../boot/context/embedded/EmbeddedWebApplicationContext.java
+6
-6
TomcatEmbeddedServletContainer.java
...ntext/embedded/tomcat/TomcatEmbeddedServletContainer.java
+4
-4
TomcatEmbeddedServletContainerFactory.java
...mbedded/tomcat/TomcatEmbeddedServletContainerFactory.java
+2
-2
TomcatEmbeddedWebappClassLoader.java
...text/embedded/tomcat/TomcatEmbeddedWebappClassLoader.java
+4
-4
VcapApplicationContextInitializer.java
...ontext/initializer/VcapApplicationContextInitializer.java
+4
-4
SimpleFormatter.java
...rg/springframework/boot/logging/java/SimpleFormatter.java
+1
-1
OutputCapture.java
...src/test/java/org/springframework/boot/OutputCapture.java
+2
-2
No files found.
spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/CrshAutoConfiguration.java
View file @
883fd916
...
...
@@ -239,7 +239,7 @@ public class CrshAutoConfiguration {
try
{
token
=
this
.
authenticationManager
.
authenticate
(
token
);
}
catch
(
AuthenticationException
ae
)
{
catch
(
AuthenticationException
ex
)
{
return
false
;
}
...
...
@@ -250,7 +250,7 @@ public class CrshAutoConfiguration {
this
.
accessDecisionManager
.
decide
(
token
,
this
,
SecurityConfig
.
createList
(
this
.
roles
));
}
catch
(
AccessDeniedException
e
)
{
catch
(
AccessDeniedException
e
x
)
{
return
false
;
}
}
...
...
@@ -440,7 +440,7 @@ public class CrshAutoConfiguration {
try
{
return
this
.
resource
.
lastModified
();
}
catch
(
IOException
e
)
{
catch
(
IOException
e
x
)
{
}
return
-
1
;
}
...
...
spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/SimpleHealthIndicator.java
View file @
883fd916
...
...
@@ -50,18 +50,18 @@ public class SimpleHealthIndicator implements HealthIndicator<Map<String, Object
map
.
put
(
"database"
,
this
.
dataSource
.
getConnection
().
getMetaData
()
.
getDatabaseProductName
());
}
catch
(
SQLException
e
)
{
catch
(
SQLException
e
x
)
{
map
.
put
(
"status"
,
"error"
);
map
.
put
(
"error"
,
e
.
getClass
().
getName
()
+
": "
+
e
.
getMessage
());
map
.
put
(
"error"
,
e
x
.
getClass
().
getName
()
+
": "
+
ex
.
getMessage
());
}
if
(
StringUtils
.
hasText
(
this
.
query
))
{
try
{
map
.
put
(
"hello"
,
this
.
jdbcTemplate
.
queryForObject
(
this
.
query
,
String
.
class
));
}
catch
(
Exception
e
)
{
catch
(
Exception
e
x
)
{
map
.
put
(
"status"
,
"error"
);
map
.
put
(
"error"
,
e
.
getClass
().
getName
()
+
": "
+
e
.
getMessage
());
map
.
put
(
"error"
,
e
x
.
getClass
().
getName
()
+
": "
+
ex
.
getMessage
());
}
}
}
...
...
spring-boot-actuator/src/test/java/org/springframework/boot/actuate/autoconfigure/CrshAutoConfigurationTests.java
View file @
883fd916
...
...
@@ -54,7 +54,6 @@ import static org.junit.Assert.assertFalse;
import
static
org
.
junit
.
Assert
.
assertNotNull
;
import
static
org
.
junit
.
Assert
.
assertNull
;
import
static
org
.
junit
.
Assert
.
assertTrue
;
import
static
org
.
junit
.
Assert
.
fail
;
/**
* Tests for {@link CrshAutoConfiguration}.
...
...
@@ -235,7 +234,7 @@ public class CrshAutoConfigurationTests {
}
@Test
public
void
testSimpleAuthenticationProvider
()
{
public
void
testSimpleAuthenticationProvider
()
throws
Exception
{
MockEnvironment
env
=
new
MockEnvironment
();
env
.
setProperty
(
"shell.auth"
,
"simple"
);
env
.
setProperty
(
"shell.auth.simple.username"
,
"user"
);
...
...
@@ -261,24 +260,13 @@ public class CrshAutoConfigurationTests {
}
}
assertNotNull
(
authenticationPlugin
);
try
{
assertTrue
(
authenticationPlugin
.
authenticate
(
"user"
,
"password"
));
}
catch
(
Exception
e
)
{
fail
();
}
try
{
assertFalse
(
authenticationPlugin
.
authenticate
(
UUID
.
randomUUID
().
toString
(),
"password"
));
}
catch
(
Exception
e
)
{
fail
();
}
assertTrue
(
authenticationPlugin
.
authenticate
(
"user"
,
"password"
));
assertFalse
(
authenticationPlugin
.
authenticate
(
UUID
.
randomUUID
().
toString
(),
"password"
));
}
@Test
public
void
testSpringAuthenticationProvider
()
{
public
void
testSpringAuthenticationProvider
()
throws
Exception
{
MockEnvironment
env
=
new
MockEnvironment
();
env
.
setProperty
(
"shell.auth"
,
"spring"
);
this
.
context
=
new
AnnotationConfigWebApplicationContext
();
...
...
@@ -300,22 +288,11 @@ public class CrshAutoConfigurationTests {
break
;
}
}
assertNotNull
(
authenticationPlugin
);
try
{
assertTrue
(
authenticationPlugin
.
authenticate
(
SecurityConfiguration
.
USERNAME
,
SecurityConfiguration
.
PASSWORD
));
}
catch
(
Exception
e
)
{
fail
();
}
assertTrue
(
authenticationPlugin
.
authenticate
(
SecurityConfiguration
.
USERNAME
,
SecurityConfiguration
.
PASSWORD
));
try
{
assertFalse
(
authenticationPlugin
.
authenticate
(
UUID
.
randomUUID
().
toString
(),
SecurityConfiguration
.
PASSWORD
));
}
catch
(
Exception
e
)
{
fail
();
}
assertFalse
(
authenticationPlugin
.
authenticate
(
UUID
.
randomUUID
().
toString
(),
SecurityConfiguration
.
PASSWORD
));
}
@Configuration
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/WebMvcAutoConfiguration.java
View file @
883fd916
...
...
@@ -197,7 +197,8 @@ public class WebMvcAutoConfiguration {
logger
.
info
(
"Adding welcome page: "
+
this
.
resourceLoader
.
getResource
(
resource
).
getURL
());
}
catch
(
IOException
e
)
{
catch
(
IOException
ex
)
{
// Ignore
}
registry
.
addViewController
(
"/"
).
setViewName
(
"/index.html"
);
return
;
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/amqp/RabbitAutoconfigurationTests.java
View file @
883fd916
...
...
@@ -16,12 +16,15 @@
package
org
.
springframework
.
boot
.
autoconfigure
.
amqp
;
import
org.junit.Rule
;
import
org.junit.Test
;
import
org.junit.rules.ExpectedException
;
import
org.springframework.amqp.core.AmqpAdmin
;
import
org.springframework.amqp.rabbit.connection.CachingConnectionFactory
;
import
org.springframework.amqp.rabbit.connection.ConnectionFactory
;
import
org.springframework.amqp.rabbit.core.RabbitAdmin
;
import
org.springframework.amqp.rabbit.core.RabbitTemplate
;
import
org.springframework.beans.factory.NoSuchBeanDefinitionException
;
import
org.springframework.boot.TestUtils
;
import
org.springframework.context.annotation.AnnotationConfigApplicationContext
;
import
org.springframework.context.annotation.Bean
;
...
...
@@ -29,7 +32,6 @@ import org.springframework.context.annotation.Configuration;
import
static
org
.
junit
.
Assert
.
assertEquals
;
import
static
org
.
junit
.
Assert
.
assertNotNull
;
import
static
org
.
junit
.
Assert
.
fail
;
/**
* Tests for {@link RabbitAutoConfiguration}.
...
...
@@ -40,6 +42,9 @@ public class RabbitAutoconfigurationTests {
private
AnnotationConfigApplicationContext
context
;
@Rule
public
ExpectedException
thrown
=
ExpectedException
.
none
();
@Test
public
void
testDefaultRabbitTemplate
()
{
this
.
context
=
new
AnnotationConfigApplicationContext
();
...
...
@@ -123,12 +128,11 @@ public class RabbitAutoconfigurationTests {
this
.
context
.
register
(
TestConfiguration
.
class
,
RabbitAutoConfiguration
.
class
);
TestUtils
.
addEnviroment
(
this
.
context
,
"spring.rabbitmq.dynamic:false"
);
this
.
context
.
refresh
();
try
{
this
.
context
.
getBean
(
AmqpAdmin
.
class
);
fail
(
"There should NOT be an AmqpAdmin bean when dynamic is switch to false"
);
}
catch
(
Exception
e
)
{
}
// There should NOT be an AmqpAdmin bean when dynamic is switch to false
this
.
thrown
.
expect
(
NoSuchBeanDefinitionException
.
class
);
this
.
thrown
.
expectMessage
(
"No qualifying bean of type "
+
"[org.springframework.amqp.core.AmqpAdmin] is defined"
);
this
.
context
.
getBean
(
AmqpAdmin
.
class
);
}
@Configuration
...
...
spring-boot-samples/spring-boot-sample-actuator/src/test/java/org/springframework/boot/sample/ops/UnsecureManagementSampleActuatorApplicationTests.java
View file @
883fd916
...
...
@@ -41,7 +41,7 @@ import org.springframework.web.client.RestTemplate;
/**
* Integration tests for unsecured service endpoints (even with Spring Security on
* classpath).
*
*
* @author Dave Syer
*/
public
class
UnsecureManagementSampleActuatorApplicationTests
{
...
...
@@ -87,7 +87,7 @@ public class UnsecureManagementSampleActuatorApplicationTests {
public
void
testMetrics
()
throws
Exception
{
try
{
testHomeIsSecure
();
// makes sure some requests have been made
}
catch
(
AssertionError
e
)
{
}
catch
(
AssertionError
e
x
)
{
// ignore;
}
@SuppressWarnings
(
"rawtypes"
)
...
...
spring-boot-samples/spring-boot-sample-data-mongodb/src/test/java/org/springframework/boot/sample/data/mongo/SampleMongoApplicationTests.java
View file @
883fd916
...
...
@@ -39,8 +39,8 @@ public class SampleMongoApplicationTests {
public
void
testDefaultSettings
()
throws
Exception
{
try
{
SampleMongoApplication
.
main
(
new
String
[
0
]);
}
catch
(
IllegalStateException
e
)
{
if
(
serverNotRunning
(
e
))
{
}
catch
(
IllegalStateException
e
x
)
{
if
(
serverNotRunning
(
e
x
))
{
return
;
}
}
...
...
spring-boot-samples/spring-boot-sample-websocket/src/main/java/org/springframework/boot/samples/websocket/snake/SnakeTimer.java
View file @
883fd916
...
...
@@ -94,8 +94,8 @@ public class SnakeTimer {
try
{
tick
();
}
catch
(
Throwable
e
)
{
log
.
error
(
"Caught to prevent timer from shutting down"
,
e
);
catch
(
Throwable
e
x
)
{
log
.
error
(
"Caught to prevent timer from shutting down"
,
e
x
);
}
}
},
TICK_DELAY
,
TICK_DELAY
);
...
...
spring-boot-tools/spring-boot-loader/src/it/executable-war/src/main/java/org/springframework/launcher/it/war/embedded/WebApplicationInitializersConfiguration.java
View file @
883fd916
...
...
@@ -60,8 +60,8 @@ public class WebApplicationInitializersConfiguration extends AbstractConfigurati
initializer
.
onStartup
(
sce
.
getServletContext
());
}
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
e
);
catch
(
Exception
e
x
)
{
throw
new
RuntimeException
(
e
x
);
}
}
...
...
spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/LaunchedURLClassLoader.java
View file @
883fd916
...
...
@@ -173,14 +173,16 @@ public class LaunchedURLClassLoader extends URLClassLoader {
}
}
catch
(
IOException
e
)
{
catch
(
IOException
ex
)
{
// Ignore
}
}
return
null
;
}
},
AccessController
.
getContext
());
}
catch
(
java
.
security
.
PrivilegedActionException
pae
)
{
catch
(
java
.
security
.
PrivilegedActionException
ex
)
{
// Ignore
}
}
}
spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/PropertiesLauncher.java
View file @
883fd916
...
...
@@ -308,7 +308,7 @@ public class PropertiesLauncher extends Launcher {
this
.
logger
.
info
(
"Main class from home directory manifest: "
+
mainClass
);
return
mainClass
;
}
catch
(
IllegalStateException
e
)
{
catch
(
IllegalStateException
e
x
)
{
// Otherwise try the parent archive
String
mainClass
=
createArchive
().
getMainClass
();
this
.
logger
.
info
(
"Main class from archive manifest: "
+
mainClass
);
...
...
spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/archive/Archive.java
View file @
883fd916
...
...
@@ -65,7 +65,7 @@ public abstract class Archive {
try
{
return
getUrl
().
toString
();
}
catch
(
Exception
e
)
{
catch
(
Exception
e
x
)
{
return
"archive"
;
}
}
...
...
spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/RunMojo.java
View file @
883fd916
...
...
@@ -44,7 +44,7 @@ import org.springframework.boot.loader.tools.MainClassFinder;
* @author Phillip Webb
*/
@Mojo
(
name
=
"run"
,
requiresProject
=
true
,
defaultPhase
=
LifecyclePhase
.
VALIDATE
,
requiresDependencyResolution
=
ResolutionScope
.
TEST
)
@Execute
(
phase
=
LifecyclePhase
.
TEST_COMPILE
)
@Execute
(
phase
=
LifecyclePhase
.
TEST_COMPILE
)
public
class
RunMojo
extends
AbstractMojo
{
/**
...
...
@@ -179,7 +179,7 @@ public class RunMojo extends AbstractMojo {
hasNonDaemonThreads
=
true
;
thread
.
join
();
}
catch
(
InterruptedException
e
)
{
catch
(
InterruptedException
e
x
)
{
Thread
.
currentThread
().
interrupt
();
}
}
...
...
@@ -249,8 +249,8 @@ public class RunMojo extends AbstractMojo {
+
"main method with appropriate signature."
,
ex
);
thread
.
getThreadGroup
().
uncaughtException
(
thread
,
wrappedEx
);
}
catch
(
Exception
e
)
{
thread
.
getThreadGroup
().
uncaughtException
(
thread
,
e
);
catch
(
Exception
e
x
)
{
thread
.
getThreadGroup
().
uncaughtException
(
thread
,
e
x
);
}
}
}
...
...
spring-boot/src/main/java/org/springframework/boot/ansi/AnsiOutput.java
View file @
883fd916
...
...
@@ -116,7 +116,7 @@ public abstract class AnsiOutput {
}
return
!(
OPERATING_SYSTEM_NAME
.
indexOf
(
"win"
)
>=
0
);
}
catch
(
Throwable
e
)
{
catch
(
Throwable
e
x
)
{
return
false
;
}
}
...
...
spring-boot/src/main/java/org/springframework/boot/bind/PropertySourcesPropertyValues.java
View file @
883fd916
...
...
@@ -59,7 +59,7 @@ public class PropertySourcesPropertyValues implements PropertyValues {
try
{
value
=
resolver
.
getProperty
(
propertyName
);
}
catch
(
RuntimeException
e
)
{
catch
(
RuntimeException
e
x
)
{
// Probably could not resolve placeholders, ignore it here
}
this
.
propertyValues
.
put
(
propertyName
,
new
PropertyValue
(
...
...
spring-boot/src/main/java/org/springframework/boot/context/embedded/EmbeddedWebApplicationContext.java
View file @
883fd916
...
...
@@ -121,9 +121,9 @@ public class EmbeddedWebApplicationContext extends GenericWebApplicationContext
try
{
super
.
refresh
();
}
catch
(
RuntimeException
e
)
{
catch
(
RuntimeException
e
x
)
{
stopAndReleaseEmbeddedServletContainer
();
throw
e
;
throw
e
x
;
}
}
...
...
@@ -340,11 +340,11 @@ public class EmbeddedWebApplicationContext extends GenericWebApplicationContext
WebApplicationContext
.
ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE
,
ex
);
throw
ex
;
}
catch
(
Error
e
rr
)
{
logger
.
error
(
"Context initialization failed"
,
e
rr
);
catch
(
Error
e
x
)
{
logger
.
error
(
"Context initialization failed"
,
e
x
);
servletContext
.
setAttribute
(
WebApplicationContext
.
ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE
,
e
rr
);
throw
e
rr
;
WebApplicationContext
.
ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE
,
e
x
);
throw
e
x
;
}
}
...
...
spring-boot/src/main/java/org/springframework/boot/context/embedded/tomcat/TomcatEmbeddedServletContainer.java
View file @
883fd916
...
...
@@ -74,8 +74,8 @@ public class TomcatEmbeddedServletContainer implements EmbeddedServletContainer
Connector
connector
=
this
.
tomcat
.
getConnector
();
connector
.
getProtocolHandler
().
stop
();
}
catch
(
Exception
e
)
{
this
.
logger
.
error
(
"Cannot pause connector: "
,
e
);
catch
(
Exception
e
x
)
{
this
.
logger
.
error
(
"Cannot pause connector: "
,
e
x
);
}
// Unlike Jetty, all Tomcat threads are daemon threads. We create a
// blocking non-daemon to stop immediate shutdown
...
...
@@ -105,8 +105,8 @@ public class TomcatEmbeddedServletContainer implements EmbeddedServletContainer
try
{
connector
.
getProtocolHandler
().
start
();
}
catch
(
Exception
e
)
{
this
.
logger
.
error
(
"Cannot start connector: "
,
e
);
catch
(
Exception
e
x
)
{
this
.
logger
.
error
(
"Cannot start connector: "
,
e
x
);
}
}
}
...
...
spring-boot/src/main/java/org/springframework/boot/context/embedded/tomcat/TomcatEmbeddedServletContainerFactory.java
View file @
883fd916
...
...
@@ -454,9 +454,9 @@ public class TomcatEmbeddedServletContainerFactory extends
}
}
}
catch
(
ClassNotFoundException
e
)
{
catch
(
ClassNotFoundException
e
x
)
{
}
catch
(
LinkageError
e
)
{
catch
(
LinkageError
e
x
)
{
}
return
nativePage
;
}
...
...
spring-boot/src/main/java/org/springframework/boot/context/embedded/tomcat/TomcatEmbeddedWebappClassLoader.java
View file @
883fd916
...
...
@@ -85,7 +85,7 @@ public class TomcatEmbeddedWebappClassLoader extends WebappClassLoader {
try
{
return
Class
.
forName
(
name
,
false
,
this
.
parent
);
}
catch
(
ClassNotFoundException
e
)
{
catch
(
ClassNotFoundException
e
x
)
{
return
null
;
}
}
...
...
@@ -94,7 +94,7 @@ public class TomcatEmbeddedWebappClassLoader extends WebappClassLoader {
try
{
return
findClass
(
name
);
}
catch
(
ClassNotFoundException
e
)
{
catch
(
ClassNotFoundException
e
x
)
{
return
null
;
}
}
...
...
@@ -105,9 +105,9 @@ public class TomcatEmbeddedWebappClassLoader extends WebappClassLoader {
this
.
securityManager
.
checkPackageAccess
(
name
.
substring
(
0
,
name
.
lastIndexOf
(
'.'
)));
}
catch
(
SecurityException
se
)
{
catch
(
SecurityException
ex
)
{
throw
new
ClassNotFoundException
(
"Security Violation, attempt to use "
+
"Restricted Class: "
+
name
,
se
);
+
"Restricted Class: "
+
name
,
ex
);
}
}
}
...
...
spring-boot/src/main/java/org/springframework/boot/context/initializer/VcapApplicationContextInitializer.java
View file @
883fd916
...
...
@@ -160,8 +160,8 @@ public class VcapApplicationContextInitializer implements
properties
.
putAll
(
map
);
}
}
catch
(
Exception
e
)
{
logger
.
error
(
"Could not parse VCAP_APPLICATION"
,
e
);
catch
(
Exception
e
x
)
{
logger
.
error
(
"Could not parse VCAP_APPLICATION"
,
e
x
);
}
return
properties
;
}
...
...
@@ -187,8 +187,8 @@ public class VcapApplicationContextInitializer implements
}
}
}
catch
(
Exception
e
)
{
logger
.
error
(
"Could not parse VCAP_APPLICATION"
,
e
);
catch
(
Exception
e
x
)
{
logger
.
error
(
"Could not parse VCAP_APPLICATION"
,
e
x
);
}
return
properties
;
}
...
...
spring-boot/src/main/java/org/springframework/boot/logging/java/SimpleFormatter.java
View file @
883fd916
...
...
@@ -71,7 +71,7 @@ public class SimpleFormatter extends Formatter {
try
{
value
=
System
.
getenv
(
key
);
}
catch
(
Exception
e
)
{
catch
(
Exception
e
x
)
{
// ignore
}
if
(
value
==
null
)
{
...
...
spring-boot/src/test/java/org/springframework/boot/OutputCapture.java
View file @
883fd916
...
...
@@ -77,7 +77,7 @@ public class OutputCapture implements TestRule {
this
.
captureOut
.
flush
();
this
.
captureErr
.
flush
();
}
catch
(
IOException
e
)
{
catch
(
IOException
e
x
)
{
// ignore
}
}
...
...
@@ -144,7 +144,7 @@ public class OutputCapture implements TestRule {
Class
.
forName
(
"org.springframework.boot.ansi.AnsiOutput"
);
return
new
AnsiPresentOutputControl
();
}
catch
(
ClassNotFoundException
e
)
{
catch
(
ClassNotFoundException
e
x
)
{
return
new
AnsiOutputControl
();
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment