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
b21c0902
Commit
b21c0902
authored
May 26, 2020
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish "Polish duration support javadoc"
See gh-21579
parent
1a87fce4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
DurationStyle.java
.../java/org/springframework/boot/convert/DurationStyle.java
+4
-2
PeriodStyle.java
...in/java/org/springframework/boot/convert/PeriodStyle.java
+4
-2
No files found.
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/convert/DurationStyle.java
View file @
b21c0902
...
...
@@ -134,7 +134,8 @@ public enum DurationStyle {
* Detect the style then parse the value to return a duration.
* @param value the value to parse
* @return the parsed duration
* @throws IllegalArgumentException if the value is not a known style or cannot be parsed
* @throws IllegalArgumentException if the value is not a known style or cannot be
* parsed
*/
public
static
Duration
detectAndParse
(
String
value
)
{
return
detectAndParse
(
value
,
null
);
...
...
@@ -146,7 +147,8 @@ public enum DurationStyle {
* @param unit the duration unit to use if the value doesn't specify one ({@code null}
* will default to ms)
* @return the parsed duration
* @throws IllegalArgumentException if the value is not a known style or cannot be parsed
* @throws IllegalArgumentException if the value is not a known style or cannot be
* parsed
*/
public
static
Duration
detectAndParse
(
String
value
,
ChronoUnit
unit
)
{
return
detect
(
value
).
parse
(
value
,
unit
);
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/convert/PeriodStyle.java
View file @
b21c0902
...
...
@@ -176,7 +176,8 @@ public enum PeriodStyle {
* Detect the style then parse the value to return a period.
* @param value the value to parse
* @return the parsed period
* @throws IllegalArgumentException if the value is not a known style or cannot be parsed
* @throws IllegalArgumentException if the value is not a known style or cannot be
* parsed
*/
public
static
Period
detectAndParse
(
String
value
)
{
return
detectAndParse
(
value
,
null
);
...
...
@@ -188,7 +189,8 @@ public enum PeriodStyle {
* @param unit the period unit to use if the value doesn't specify one ({@code null}
* will default to ms)
* @return the parsed period
* @throws IllegalArgumentException if the value is not a known style or cannot be parsed
* @throws IllegalArgumentException if the value is not a known style or cannot be
* parsed
*/
public
static
Period
detectAndParse
(
String
value
,
ChronoUnit
unit
)
{
return
detect
(
value
).
parse
(
value
,
unit
);
...
...
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