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
075d5e8d
Commit
075d5e8d
authored
May 13, 2016
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5936 from izeye:polish-20160513
* pr/5936: Polish
parents
0a124536
7a62b7d0
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
10 additions
and
13 deletions
+10
-13
AbstractSocialAutoConfigurationTests.java
...onfigure/social/AbstractSocialAutoConfigurationTests.java
+1
-1
AbstractDevToolsDataSourceAutoConfigurationTests.java
...ure/AbstractDevToolsDataSourceAutoConfigurationTests.java
+1
-1
DevToolsPooledDataSourceAutoConfigurationTests.java
...igure/DevToolsPooledDataSourceAutoConfigurationTests.java
+0
-3
SpyBean.java
...a/org/springframework/boot/test/mock/mockito/SpyBean.java
+5
-5
SpyBeanOnTestFieldForExistingBeanIntegrationTests.java
...to/SpyBeanOnTestFieldForExistingBeanIntegrationTests.java
+1
-1
SpringPhysicalNamingStrategy.java
.../boot/orm/jpa/hibernate/SpringPhysicalNamingStrategy.java
+2
-2
No files found.
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/social/AbstractSocialAutoConfigurationTests.java
View file @
075d5e8d
...
...
@@ -33,7 +33,7 @@ import static org.junit.Assert.fail;
*
* @author Craig Walls
*/
public
class
AbstractSocialAutoConfigurationTests
{
public
abstract
class
AbstractSocialAutoConfigurationTests
{
protected
AnnotationConfigWebApplicationContext
context
;
...
...
spring-boot-devtools/src/test/java/org/springframework/boot/devtools/autoconfigure/AbstractDevToolsDataSourceAutoConfigurationTests.java
View file @
075d5e8d
...
...
@@ -47,7 +47,7 @@ import static org.mockito.Mockito.verify;
*
* @author Andy Wilkinson
*/
public
class
AbstractDevToolsDataSourceAutoConfigurationTests
{
public
abstract
class
AbstractDevToolsDataSourceAutoConfigurationTests
{
@Test
public
void
singleManuallyConfiguredDataSourceIsNotClosed
()
throws
SQLException
{
...
...
spring-boot-devtools/src/test/java/org/springframework/boot/devtools/autoconfigure/DevToolsPooledDataSourceAutoConfigurationTests.java
View file @
075d5e8d
...
...
@@ -22,10 +22,8 @@ import java.sql.Statement;
import
javax.sql.DataSource
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
;
import
org.springframework.boot.testutil.FilteredClassPathRunner
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
static
org
.
mockito
.
Mockito
.
times
;
...
...
@@ -36,7 +34,6 @@ import static org.mockito.Mockito.verify;
*
* @author Andy Wilkinson
*/
@RunWith
(
FilteredClassPathRunner
.
class
)
public
class
DevToolsPooledDataSourceAutoConfigurationTests
extends
AbstractDevToolsDataSourceAutoConfigurationTests
{
...
...
spring-boot-test/src/main/java/org/springframework/boot/test/mock/mockito/SpyBean.java
View file @
075d5e8d
...
...
@@ -37,7 +37,7 @@ import org.springframework.test.context.junit4.SpringRunner;
* {@link RunWith @RunWith} the {@link SpringRunner}.
* <p>
* Spies can be applied by type or by {@link #name() bean name}. All beans in the context
* of the same type will be wrapped with the spy
, i
f no existing bean is defined a new one
* of the same type will be wrapped with the spy
. I
f no existing bean is defined a new one
* will be added.
* <p>
* When {@code @SpyBean} is used on a field, as well as being registered in the
...
...
@@ -69,7 +69,7 @@ import org.springframework.test.context.junit4.SpringRunner;
* </pre>
* <p>
* This annotation is {@code @Repeatable} and may be specified multiple times when working
* with Java 8 or contained within a
n
{@link SpyBeans @SpyBeans} annotation.
* with Java 8 or contained within a {@link SpyBeans @SpyBeans} annotation.
*
* @author Phillip Webb
* @since 1.4.0
...
...
@@ -91,7 +91,7 @@ public @interface SpyBean {
/**
* The classes to spy. This is an alias of {@link #classes()} which can be used for
* brevity if no other attributes are defined. See {@link #classes()} for details.
* @return the classes to
mock
* @return the classes to
spy
*/
@AliasFor
(
"classes"
)
Class
<?>[]
value
()
default
{};
...
...
@@ -100,12 +100,12 @@ public @interface SpyBean {
* The classes to spy. Each class specified here will result in a spy being applied.
* Classes can be omitted when the annotation is used on a field.
* <p>
* When {@code @
Mock
Bean} also defines a {@code name} this attribute can only contain
* When {@code @
Spy
Bean} also defines a {@code name} this attribute can only contain
* a single value.
* <p>
* If this is the only specified attribute consider using the {@code value} alias
* instead.
* @return the classes to
mock
* @return the classes to
spy
*/
@AliasFor
(
"value"
)
Class
<?>[]
classes
()
default
{};
...
...
spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/SpyBeanOnTestFieldForExistingBeanIntegrationTests.java
View file @
075d5e8d
...
...
@@ -35,7 +35,7 @@ import static org.mockito.Mockito.verify;
* @see SpyBeanOnTestFieldForExistingBeanCacheIntegrationTests
*/
@RunWith
(
SpringRunner
.
class
)
@ContextConfiguration
(
classes
=
Mock
BeanOnTestFieldForExistingBeanConfig
.
class
)
@ContextConfiguration
(
classes
=
Spy
BeanOnTestFieldForExistingBeanConfig
.
class
)
public
class
SpyBeanOnTestFieldForExistingBeanIntegrationTests
{
@SpyBean
...
...
spring-boot/src/main/java/org/springframework/boot/orm/jpa/hibernate/SpringPhysicalNamingStrategy.java
View file @
075d5e8d
...
...
@@ -67,14 +67,14 @@ public class SpringPhysicalNamingStrategy implements PhysicalNamingStrategy {
}
StringBuilder
text
=
new
StringBuilder
(
name
.
getText
().
replace
(
'.'
,
'_'
));
for
(
int
i
=
1
;
i
<
text
.
length
()
-
1
;
i
++)
{
if
(
is
Dash
Required
(
text
.
charAt
(
i
-
1
),
text
.
charAt
(
i
),
text
.
charAt
(
i
+
1
)))
{
if
(
is
Underscore
Required
(
text
.
charAt
(
i
-
1
),
text
.
charAt
(
i
),
text
.
charAt
(
i
+
1
)))
{
text
.
insert
(
i
++,
'_'
);
}
}
return
new
Identifier
(
text
.
toString
().
toLowerCase
(
Locale
.
ROOT
),
name
.
isQuoted
());
}
private
boolean
is
Dash
Required
(
char
before
,
char
current
,
char
after
)
{
private
boolean
is
Underscore
Required
(
char
before
,
char
current
,
char
after
)
{
return
Character
.
isLowerCase
(
before
)
&&
Character
.
isUpperCase
(
current
)
&&
Character
.
isLowerCase
(
after
);
}
...
...
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