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
00a43d8f
Commit
00a43d8f
authored
May 11, 2018
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '2.0.x'
parents
c35cb1b6
6ddf1c27
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
25 additions
and
29 deletions
+25
-29
AutoConfigurationImportSelectorIntegrationTests.java
...gure/AutoConfigurationImportSelectorIntegrationTests.java
+2
-2
appendix-application-properties.adoc
...cs/src/main/asciidoc/appendix-application-properties.adoc
+2
-2
README.adoc
spring-boot-project/spring-boot-starters/README.adoc
+1
-1
RepackagerTests.java
...rg/springframework/boot/loader/tools/RepackagerTests.java
+10
-10
PropertiesLauncherTests.java
.../springframework/boot/loader/PropertiesLauncherTests.java
+0
-2
RunArguments.java
...ain/java/org/springframework/boot/maven/RunArguments.java
+1
-1
SpringConfigurationPropertySources.java
...properties/source/SpringConfigurationPropertySources.java
+3
-3
BindConverterTests.java
...work/boot/context/properties/bind/BindConverterTests.java
+2
-4
DelimitedStringToArrayConverterTests.java
...rk/boot/convert/DelimitedStringToArrayConverterTests.java
+1
-1
DelimitedStringToCollectionConverterTests.java
...ot/convert/DelimitedStringToCollectionConverterTests.java
+3
-3
No files found.
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/AutoConfigurationImportSelectorIntegrationTests.java
View file @
00a43d8f
...
...
@@ -51,14 +51,14 @@ public class AutoConfigurationImportSelectorIntegrationTests {
}
@Test
public
void
multipleSelectorShouldMergeAndSortCorrectly
()
{
public
void
multipleSelector
s
ShouldMergeAndSortCorrectly
()
{
this
.
contextRunner
.
withUserConfiguration
(
Config
.
class
,
AnotherConfig
.
class
)
.
run
((
context
)
->
assertThat
(
getImportedConfigBeans
(
context
))
.
containsExactly
(
"ConfigA"
,
"ConfigB"
,
"ConfigC"
,
"ConfigD"
));
}
@Test
public
void
multipleSelectorWithRedundantImportsShouldMergeAndSortCorrectly
()
{
public
void
multipleSelector
s
WithRedundantImportsShouldMergeAndSortCorrectly
()
{
this
.
contextRunner
.
withUserConfiguration
(
SingleConfig
.
class
,
Config
.
class
,
AnotherConfig
.
class
)
...
...
spring-boot-project/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc
View file @
00a43d8f
spring-boot-project/spring-boot-starters/README.adoc
View file @
00a43d8f
...
...
@@ -136,7 +136,7 @@ do as they were designed before this was clarified.
| https://www.mulesoft.com/platform/soa/mule-esb-open-source-esb[Mule ESB]
| https://github.com/denschu/mule-spring-boot-starter
| http://mybatis.org/mybatis-3/[My
b
atis]
| http://mybatis.org/mybatis-3/[My
B
atis]
| https://github.com/mybatis/mybatis-spring-boot
| https://github.com/facebook/nifty[Nifty] (Thrift on Netty)
...
...
spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/test/java/org/springframework/boot/loader/tools/RepackagerTests.java
View file @
00a43d8f
...
...
@@ -289,9 +289,9 @@ public class RepackagerTests {
public
void
libraries
()
throws
Exception
{
TestJarFile
libJar
=
new
TestJarFile
(
this
.
temporaryFolder
);
libJar
.
addClass
(
"a/b/C.class"
,
ClassWithoutMainMethod
.
class
,
JAN_1_1985
);
final
File
libJarFile
=
libJar
.
getFile
();
final
File
libJarFileToUnpack
=
libJar
.
getFile
();
final
File
libNonJarFile
=
this
.
temporaryFolder
.
newFile
();
File
libJarFile
=
libJar
.
getFile
();
File
libJarFileToUnpack
=
libJar
.
getFile
();
File
libNonJarFile
=
this
.
temporaryFolder
.
newFile
();
FileCopyUtils
.
copy
(
new
byte
[]
{
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
},
libNonJarFile
);
this
.
testJarFile
.
addClass
(
"a/b/C.class"
,
ClassWithMainMethod
.
class
);
this
.
testJarFile
.
addFile
(
"BOOT-INF/lib/"
+
libJarFileToUnpack
.
getName
(),
...
...
@@ -319,7 +319,7 @@ public class RepackagerTests {
public
void
duplicateLibraries
()
throws
Exception
{
TestJarFile
libJar
=
new
TestJarFile
(
this
.
temporaryFolder
);
libJar
.
addClass
(
"a/b/C.class"
,
ClassWithoutMainMethod
.
class
);
final
File
libJarFile
=
libJar
.
getFile
();
File
libJarFile
=
libJar
.
getFile
();
this
.
testJarFile
.
addClass
(
"a/b/C.class"
,
ClassWithMainMethod
.
class
);
File
file
=
this
.
testJarFile
.
getFile
();
Repackager
repackager
=
new
Repackager
(
file
);
...
...
@@ -335,12 +335,12 @@ public class RepackagerTests {
public
void
customLayout
()
throws
Exception
{
TestJarFile
libJar
=
new
TestJarFile
(
this
.
temporaryFolder
);
libJar
.
addClass
(
"a/b/C.class"
,
ClassWithoutMainMethod
.
class
);
final
File
libJarFile
=
libJar
.
getFile
();
File
libJarFile
=
libJar
.
getFile
();
this
.
testJarFile
.
addClass
(
"a/b/C.class"
,
ClassWithMainMethod
.
class
);
File
file
=
this
.
testJarFile
.
getFile
();
Repackager
repackager
=
new
Repackager
(
file
);
Layout
layout
=
mock
(
Layout
.
class
);
final
LibraryScope
scope
=
mock
(
LibraryScope
.
class
);
LibraryScope
scope
=
mock
(
LibraryScope
.
class
);
given
(
layout
.
getLauncherClassName
()).
willReturn
(
"testLauncher"
);
given
(
layout
.
getLibraryDestination
(
anyString
(),
eq
(
scope
))).
willReturn
(
"test/"
);
given
(
layout
.
getLibraryDestination
(
anyString
(),
eq
(
LibraryScope
.
COMPILE
)))
...
...
@@ -359,12 +359,12 @@ public class RepackagerTests {
public
void
customLayoutNoBootLib
()
throws
Exception
{
TestJarFile
libJar
=
new
TestJarFile
(
this
.
temporaryFolder
);
libJar
.
addClass
(
"a/b/C.class"
,
ClassWithoutMainMethod
.
class
);
final
File
libJarFile
=
libJar
.
getFile
();
File
libJarFile
=
libJar
.
getFile
();
this
.
testJarFile
.
addClass
(
"a/b/C.class"
,
ClassWithMainMethod
.
class
);
File
file
=
this
.
testJarFile
.
getFile
();
Repackager
repackager
=
new
Repackager
(
file
);
Layout
layout
=
mock
(
Layout
.
class
);
final
LibraryScope
scope
=
mock
(
LibraryScope
.
class
);
LibraryScope
scope
=
mock
(
LibraryScope
.
class
);
given
(
layout
.
getLauncherClassName
()).
willReturn
(
"testLauncher"
);
repackager
.
setLayout
(
layout
);
repackager
.
repackage
(
...
...
@@ -625,12 +625,12 @@ public class RepackagerTests {
public
void
layoutCanOmitLibraries
()
throws
IOException
{
TestJarFile
libJar
=
new
TestJarFile
(
this
.
temporaryFolder
);
libJar
.
addClass
(
"a/b/C.class"
,
ClassWithoutMainMethod
.
class
);
final
File
libJarFile
=
libJar
.
getFile
();
File
libJarFile
=
libJar
.
getFile
();
this
.
testJarFile
.
addClass
(
"a/b/C.class"
,
ClassWithMainMethod
.
class
);
File
file
=
this
.
testJarFile
.
getFile
();
Repackager
repackager
=
new
Repackager
(
file
);
Layout
layout
=
mock
(
Layout
.
class
);
final
LibraryScope
scope
=
mock
(
LibraryScope
.
class
);
LibraryScope
scope
=
mock
(
LibraryScope
.
class
);
repackager
.
setLayout
(
layout
);
repackager
.
repackage
(
(
callback
)
->
callback
.
library
(
new
Library
(
libJarFile
,
scope
)));
...
...
spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/PropertiesLauncherTests.java
View file @
00a43d8f
...
...
@@ -34,7 +34,6 @@ import org.junit.Rule;
import
org.junit.Test
;
import
org.junit.rules.ExpectedException
;
import
org.junit.rules.TemporaryFolder
;
import
org.mockito.MockitoAnnotations
;
import
org.springframework.boot.loader.archive.Archive
;
import
org.springframework.boot.loader.archive.ExplodedArchive
;
...
...
@@ -67,7 +66,6 @@ public class PropertiesLauncherTests {
@Before
public
void
setup
()
{
this
.
contextClassLoader
=
Thread
.
currentThread
().
getContextClassLoader
();
MockitoAnnotations
.
initMocks
(
this
);
System
.
setProperty
(
"loader.home"
,
new
File
(
"src/test/resources"
).
getAbsolutePath
());
}
...
...
spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/RunArguments.java
View file @
00a43d8f
...
...
@@ -33,7 +33,7 @@ class RunArguments {
private
static
final
String
[]
NO_ARGS
=
{};
private
final
LinkedList
<
String
>
args
=
new
LinkedList
<>();
private
final
Deque
<
String
>
args
=
new
LinkedList
<>();
RunArguments
(
String
arguments
)
{
this
(
parseArgs
(
arguments
));
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/source/SpringConfigurationPropertySources.java
View file @
00a43d8f
...
...
@@ -57,7 +57,7 @@ class SpringConfigurationPropertySources
private
ConfigurationPropertySource
adapt
(
PropertySource
<?>
source
)
{
ConfigurationPropertySource
result
=
this
.
cache
.
get
(
source
);
// Most PropertySource
test quality only using the source name,
we need to
// Most PropertySource
s test equality only using the source name, so
we need to
// check the actual source hasn't also changed.
if
(
result
!=
null
&&
result
.
getUnderlyingSource
()
==
source
)
{
return
result
;
...
...
@@ -70,7 +70,7 @@ class SpringConfigurationPropertySources
private
static
class
SourcesIterator
implements
Iterator
<
ConfigurationPropertySource
>
{
private
Deque
<
Iterator
<
PropertySource
<?>>>
iterators
;
private
final
Deque
<
Iterator
<
PropertySource
<?>>>
iterators
;
private
ConfigurationPropertySource
next
;
...
...
@@ -91,10 +91,10 @@ class SpringConfigurationPropertySources
@Override
public
ConfigurationPropertySource
next
()
{
ConfigurationPropertySource
next
=
fetchNext
();
this
.
next
=
null
;
if
(
next
==
null
)
{
throw
new
NoSuchElementException
();
}
this
.
next
=
null
;
return
next
;
}
...
...
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/BindConverterTests.java
View file @
00a43d8f
...
...
@@ -70,9 +70,8 @@ public class BindConverterTests {
@Test
public
void
createWhenPropertyEditorInitializerIsNullShouldCreate
()
{
BindConverter
bindConverter
=
new
BindConverter
(
new
BindConverter
(
ApplicationConversionService
.
getSharedInstance
(),
null
);
assertThat
(
bindConverter
).
isNotNull
();
}
@Test
...
...
@@ -142,7 +141,6 @@ public class BindConverterTests {
Class
<?>
converted
=
bindConverter
.
convert
(
"java.lang.RuntimeException"
,
ResolvableType
.
forClass
(
Class
.
class
));
assertThat
(
converted
).
isEqualTo
(
RuntimeException
.
class
);
}
@Test
...
...
@@ -168,7 +166,7 @@ public class BindConverterTests {
this
::
registerSampleTypeEditor
);
List
<
SampleType
>
converted
=
bindConverter
.
convert
(
"test"
,
ResolvableType
.
forClassWithGenerics
(
List
.
class
,
SampleType
.
class
));
assertThat
(
converted
).
isNotEmpty
(
);
assertThat
(
converted
).
hasSize
(
1
);
assertThat
(
converted
.
get
(
0
).
getText
()).
isEqualTo
(
"test"
);
}
...
...
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/convert/DelimitedStringToArrayConverterTests.java
View file @
00a43d8f
...
...
@@ -94,7 +94,7 @@ public class DelimitedStringToArrayConverterTests {
}
@Test
public
void
convertWhenHasDelimiterOfNoneShouldReturn
TrimmedStringElement
()
{
public
void
convertWhenHasDelimiterOfNoneShouldReturn
WholeString
()
{
TypeDescriptor
sourceType
=
TypeDescriptor
.
valueOf
(
String
.
class
);
TypeDescriptor
targetType
=
TypeDescriptor
.
nested
(
ReflectionUtils
.
findField
(
Values
.
class
,
"delimiterNone"
),
0
);
...
...
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/convert/DelimitedStringToCollectionConverterTests.java
View file @
00a43d8f
...
...
@@ -117,7 +117,7 @@ public class DelimitedStringToCollectionConverterTests {
@Test
@SuppressWarnings
(
"unchecked"
)
public
void
convertWhenHasDelimiterOfNoneShouldReturn
TrimmedStringElement
()
{
public
void
convertWhenHasDelimiterOfNoneShouldReturn
WholeString
()
{
TypeDescriptor
sourceType
=
TypeDescriptor
.
valueOf
(
String
.
class
);
TypeDescriptor
targetType
=
TypeDescriptor
.
nested
(
ReflectionUtils
.
findField
(
Values
.
class
,
"delimiterNone"
),
0
);
...
...
@@ -131,8 +131,8 @@ public class DelimitedStringToCollectionConverterTests {
TypeDescriptor
sourceType
=
TypeDescriptor
.
valueOf
(
String
.
class
);
TypeDescriptor
targetType
=
TypeDescriptor
.
nested
(
ReflectionUtils
.
findField
(
Values
.
class
,
"specificType"
),
0
);
Object
converted
=
this
.
conversionService
.
convert
(
"a*b"
,
sourceType
,
targetType
);
assertThat
(
converted
).
isInstanceOf
(
MyCustomList
.
class
);
MyCustomList
<
String
>
converted
=
(
MyCustomList
<
String
>)
this
.
conversionService
.
convert
(
"a*b"
,
sourceType
,
targetType
);
assertThat
(
converted
).
containsExactly
(
"a"
,
"b"
);
}
@Parameters
(
name
=
"{0}"
)
...
...
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