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
114d270c
Commit
114d270c
authored
Sep 18, 2017
by
Madhura Bhave
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use date that fails with the fallback formatter
Fixes gh-9975
parent
d1cf308b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
BinderTests.java
...ngframework/boot/context/properties/bind/BinderTests.java
+3
-3
No files found.
spring-boot/src/test/java/org/springframework/boot/context/properties/bind/BinderTests.java
View file @
114d270c
...
...
@@ -199,15 +199,15 @@ public class BinderTests {
@Test
public
void
bindWhenHasMalformedDateShouldThrowException
()
throws
Exception
{
this
.
thrown
.
expectCause
(
instanceOf
(
ConversionFailedException
.
class
));
this
.
sources
.
add
(
new
MockConfigurationPropertySource
(
"foo"
,
"2014-04-01"
));
this
.
sources
.
add
(
new
MockConfigurationPropertySource
(
"foo"
,
"2014-04-01
T01:30:00.000-05:00
"
));
this
.
binder
.
bind
(
"foo"
,
Bindable
.
of
(
LocalDate
.
class
));
}
@Test
public
void
bindWhenHasAnnotationsShouldChangeConvertedValue
()
throws
Exception
{
this
.
sources
.
add
(
new
MockConfigurationPropertySource
(
"foo"
,
"2014-04-01"
));
this
.
sources
.
add
(
new
MockConfigurationPropertySource
(
"foo"
,
"2014-04-01
T01:30:00.000-05:00
"
));
DateTimeFormat
annotation
=
AnnotationUtils
.
synthesizeAnnotation
(
Collections
.
singletonMap
(
"iso"
,
DateTimeFormat
.
ISO
.
DATE
),
Collections
.
singletonMap
(
"iso"
,
DateTimeFormat
.
ISO
.
DATE
_TIME
),
DateTimeFormat
.
class
,
null
);
LocalDate
result
=
this
.
binder
.
bind
(
"foo"
,
Bindable
.
of
(
LocalDate
.
class
).
withAnnotations
(
annotation
))
...
...
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