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
d9ec48ef
Commit
d9ec48ef
authored
Feb 11, 2019
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '2.1.x'
parents
2cda3098
88fd84aa
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
13 additions
and
27 deletions
+13
-27
LocalDevToolsAutoConfiguration.java
...evtools/autoconfigure/LocalDevToolsAutoConfiguration.java
+2
-3
ExampleIdConverter.java
...oconfigure/web/reactive/webclient/ExampleIdConverter.java
+2
-4
SpringApplicationAdminMXBeanRegistrar.java
...ork/boot/admin/SpringApplicationAdminMXBeanRegistrar.java
+2
-3
ArrayToDelimitedStringConverter.java
...amework/boot/convert/ArrayToDelimitedStringConverter.java
+2
-4
DelimitedStringToArrayConverter.java
...amework/boot/convert/DelimitedStringToArrayConverter.java
+2
-4
DelimitedStringToCollectionConverter.java
...rk/boot/convert/DelimitedStringToCollectionConverter.java
+2
-4
ConfigurationPropertiesTests.java
...boot/context/properties/ConfigurationPropertiesTests.java
+1
-5
No files found.
spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/autoconfigure/LocalDevToolsAutoConfiguration.java
View file @
d9ec48ef
/*
/*
* Copyright 2012-201
8
the original author or authors.
* Copyright 2012-201
9
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
@@ -42,7 +42,6 @@ import org.springframework.context.annotation.Configuration;
...
@@ -42,7 +42,6 @@ import org.springframework.context.annotation.Configuration;
import
org.springframework.context.event.ContextRefreshedEvent
;
import
org.springframework.context.event.ContextRefreshedEvent
;
import
org.springframework.context.event.GenericApplicationListener
;
import
org.springframework.context.event.GenericApplicationListener
;
import
org.springframework.core.ResolvableType
;
import
org.springframework.core.ResolvableType
;
import
org.springframework.lang.Nullable
;
import
org.springframework.util.StringUtils
;
import
org.springframework.util.StringUtils
;
/**
/**
...
@@ -185,7 +184,7 @@ public class LocalDevToolsAutoConfiguration {
...
@@ -185,7 +184,7 @@ public class LocalDevToolsAutoConfiguration {
}
}
@Override
@Override
public
boolean
supportsSourceType
(
@Nullable
Class
<?>
sourceType
)
{
public
boolean
supportsSourceType
(
Class
<?>
sourceType
)
{
return
true
;
return
true
;
}
}
...
...
spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/web/reactive/webclient/ExampleIdConverter.java
View file @
d9ec48ef
/*
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
9
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
@@ -23,7 +23,6 @@ import java.util.UUID;
...
@@ -23,7 +23,6 @@ import java.util.UUID;
import
org.springframework.boot.test.autoconfigure.web.reactive.WebFluxTest
;
import
org.springframework.boot.test.autoconfigure.web.reactive.WebFluxTest
;
import
org.springframework.core.convert.TypeDescriptor
;
import
org.springframework.core.convert.TypeDescriptor
;
import
org.springframework.core.convert.converter.GenericConverter
;
import
org.springframework.core.convert.converter.GenericConverter
;
import
org.springframework.lang.Nullable
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
/**
/**
...
@@ -39,9 +38,8 @@ public class ExampleIdConverter implements GenericConverter {
...
@@ -39,9 +38,8 @@ public class ExampleIdConverter implements GenericConverter {
return
Collections
.
singleton
(
new
ConvertiblePair
(
String
.
class
,
ExampleId
.
class
));
return
Collections
.
singleton
(
new
ConvertiblePair
(
String
.
class
,
ExampleId
.
class
));
}
}
@Nullable
@Override
@Override
public
Object
convert
(
@Nullable
Object
source
,
TypeDescriptor
sourceType
,
public
Object
convert
(
Object
source
,
TypeDescriptor
sourceType
,
TypeDescriptor
targetType
)
{
TypeDescriptor
targetType
)
{
if
(
source
==
null
)
{
if
(
source
==
null
)
{
return
null
;
return
null
;
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/admin/SpringApplicationAdminMXBeanRegistrar.java
View file @
d9ec48ef
/*
/*
* Copyright 2012-201
8
the original author or authors.
* Copyright 2012-201
9
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
@@ -40,7 +40,6 @@ import org.springframework.core.Ordered;
...
@@ -40,7 +40,6 @@ import org.springframework.core.Ordered;
import
org.springframework.core.ResolvableType
;
import
org.springframework.core.ResolvableType
;
import
org.springframework.core.env.Environment
;
import
org.springframework.core.env.Environment
;
import
org.springframework.core.env.StandardEnvironment
;
import
org.springframework.core.env.StandardEnvironment
;
import
org.springframework.lang.Nullable
;
import
org.springframework.util.Assert
;
import
org.springframework.util.Assert
;
/**
/**
...
@@ -95,7 +94,7 @@ public class SpringApplicationAdminMXBeanRegistrar implements ApplicationContext
...
@@ -95,7 +94,7 @@ public class SpringApplicationAdminMXBeanRegistrar implements ApplicationContext
}
}
@Override
@Override
public
boolean
supportsSourceType
(
@Nullable
Class
<?>
sourceType
)
{
public
boolean
supportsSourceType
(
Class
<?>
sourceType
)
{
return
true
;
return
true
;
}
}
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/convert/ArrayToDelimitedStringConverter.java
View file @
d9ec48ef
/*
/*
* Copyright 2012-201
8
the original author or authors.
* Copyright 2012-201
9
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
@@ -24,7 +24,6 @@ import java.util.Set;
...
@@ -24,7 +24,6 @@ import java.util.Set;
import
org.springframework.core.convert.ConversionService
;
import
org.springframework.core.convert.ConversionService
;
import
org.springframework.core.convert.TypeDescriptor
;
import
org.springframework.core.convert.TypeDescriptor
;
import
org.springframework.core.convert.converter.ConditionalGenericConverter
;
import
org.springframework.core.convert.converter.ConditionalGenericConverter
;
import
org.springframework.lang.Nullable
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
/**
/**
...
@@ -51,8 +50,7 @@ final class ArrayToDelimitedStringConverter implements ConditionalGenericConvert
...
@@ -51,8 +50,7 @@ final class ArrayToDelimitedStringConverter implements ConditionalGenericConvert
}
}
@Override
@Override
@Nullable
public
Object
convert
(
Object
source
,
TypeDescriptor
sourceType
,
public
Object
convert
(
@Nullable
Object
source
,
TypeDescriptor
sourceType
,
TypeDescriptor
targetType
)
{
TypeDescriptor
targetType
)
{
List
<
Object
>
list
=
Arrays
.
asList
(
ObjectUtils
.
toObjectArray
(
source
));
List
<
Object
>
list
=
Arrays
.
asList
(
ObjectUtils
.
toObjectArray
(
source
));
return
this
.
delegate
.
convert
(
list
,
sourceType
,
targetType
);
return
this
.
delegate
.
convert
(
list
,
sourceType
,
targetType
);
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/convert/DelimitedStringToArrayConverter.java
View file @
d9ec48ef
/*
/*
* Copyright 2012-201
8
the original author or authors.
* Copyright 2012-201
9
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
@@ -23,7 +23,6 @@ import java.util.Set;
...
@@ -23,7 +23,6 @@ import java.util.Set;
import
org.springframework.core.convert.ConversionService
;
import
org.springframework.core.convert.ConversionService
;
import
org.springframework.core.convert.TypeDescriptor
;
import
org.springframework.core.convert.TypeDescriptor
;
import
org.springframework.core.convert.converter.ConditionalGenericConverter
;
import
org.springframework.core.convert.converter.ConditionalGenericConverter
;
import
org.springframework.lang.Nullable
;
import
org.springframework.util.Assert
;
import
org.springframework.util.Assert
;
import
org.springframework.util.StringUtils
;
import
org.springframework.util.StringUtils
;
...
@@ -53,8 +52,7 @@ final class DelimitedStringToArrayConverter implements ConditionalGenericConvert
...
@@ -53,8 +52,7 @@ final class DelimitedStringToArrayConverter implements ConditionalGenericConvert
}
}
@Override
@Override
@Nullable
public
Object
convert
(
Object
source
,
TypeDescriptor
sourceType
,
public
Object
convert
(
@Nullable
Object
source
,
TypeDescriptor
sourceType
,
TypeDescriptor
targetType
)
{
TypeDescriptor
targetType
)
{
if
(
source
==
null
)
{
if
(
source
==
null
)
{
return
null
;
return
null
;
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/convert/DelimitedStringToCollectionConverter.java
View file @
d9ec48ef
/*
/*
* Copyright 2012-201
8
the original author or authors.
* Copyright 2012-201
9
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
@@ -26,7 +26,6 @@ import org.springframework.core.CollectionFactory;
...
@@ -26,7 +26,6 @@ import org.springframework.core.CollectionFactory;
import
org.springframework.core.convert.ConversionService
;
import
org.springframework.core.convert.ConversionService
;
import
org.springframework.core.convert.TypeDescriptor
;
import
org.springframework.core.convert.TypeDescriptor
;
import
org.springframework.core.convert.converter.ConditionalGenericConverter
;
import
org.springframework.core.convert.converter.ConditionalGenericConverter
;
import
org.springframework.lang.Nullable
;
import
org.springframework.util.Assert
;
import
org.springframework.util.Assert
;
import
org.springframework.util.StringUtils
;
import
org.springframework.util.StringUtils
;
...
@@ -56,8 +55,7 @@ final class DelimitedStringToCollectionConverter implements ConditionalGenericCo
...
@@ -56,8 +55,7 @@ final class DelimitedStringToCollectionConverter implements ConditionalGenericCo
}
}
@Override
@Override
@Nullable
public
Object
convert
(
Object
source
,
TypeDescriptor
sourceType
,
public
Object
convert
(
@Nullable
Object
source
,
TypeDescriptor
sourceType
,
TypeDescriptor
targetType
)
{
TypeDescriptor
targetType
)
{
if
(
source
==
null
)
{
if
(
source
==
null
)
{
return
null
;
return
null
;
...
...
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/ConfigurationPropertiesTests.java
View file @
d9ec48ef
...
@@ -66,7 +66,6 @@ import org.springframework.core.io.ClassPathResource;
...
@@ -66,7 +66,6 @@ import org.springframework.core.io.ClassPathResource;
import
org.springframework.core.io.ProtocolResolver
;
import
org.springframework.core.io.ProtocolResolver
;
import
org.springframework.core.io.Resource
;
import
org.springframework.core.io.Resource
;
import
org.springframework.core.io.ResourceLoader
;
import
org.springframework.core.io.ResourceLoader
;
import
org.springframework.lang.Nullable
;
import
org.springframework.mock.env.MockEnvironment
;
import
org.springframework.mock.env.MockEnvironment
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
org.springframework.test.context.support.TestPropertySourceUtils
;
import
org.springframework.test.context.support.TestPropertySourceUtils
;
...
@@ -1785,7 +1784,6 @@ public class ConfigurationPropertiesTests {
...
@@ -1785,7 +1784,6 @@ public class ConfigurationPropertiesTests {
static
class
PersonConverter
implements
Converter
<
String
,
Person
>
{
static
class
PersonConverter
implements
Converter
<
String
,
Person
>
{
@Nullable
@Override
@Override
public
Person
convert
(
String
source
)
{
public
Person
convert
(
String
source
)
{
String
[]
content
=
StringUtils
.
split
(
source
,
" "
);
String
[]
content
=
StringUtils
.
split
(
source
,
" "
);
...
@@ -1796,15 +1794,13 @@ public class ConfigurationPropertiesTests {
...
@@ -1796,15 +1794,13 @@ public class ConfigurationPropertiesTests {
static
class
GenericPersonConverter
implements
GenericConverter
{
static
class
GenericPersonConverter
implements
GenericConverter
{
@Nullable
@Override
@Override
public
Set
<
ConvertiblePair
>
getConvertibleTypes
()
{
public
Set
<
ConvertiblePair
>
getConvertibleTypes
()
{
return
Collections
.
singleton
(
new
ConvertiblePair
(
String
.
class
,
Person
.
class
));
return
Collections
.
singleton
(
new
ConvertiblePair
(
String
.
class
,
Person
.
class
));
}
}
@Nullable
@Override
@Override
public
Object
convert
(
@Nullable
Object
source
,
TypeDescriptor
sourceType
,
public
Object
convert
(
Object
source
,
TypeDescriptor
sourceType
,
TypeDescriptor
targetType
)
{
TypeDescriptor
targetType
)
{
String
[]
content
=
StringUtils
.
split
((
String
)
source
,
" "
);
String
[]
content
=
StringUtils
.
split
((
String
)
source
,
" "
);
return
new
Person
(
content
[
0
],
content
[
1
]);
return
new
Person
(
content
[
0
],
content
[
1
]);
...
...
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