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
1a87fce4
Commit
1a87fce4
authored
May 26, 2020
by
OrangeDog
Committed by
Stephane Nicoll
May 26, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish duration support javadoc
See gh-21579
parent
9cf44886
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
7 deletions
+9
-7
DurationStyle.java
.../java/org/springframework/boot/convert/DurationStyle.java
+3
-3
PeriodStyle.java
...in/java/org/springframework/boot/convert/PeriodStyle.java
+3
-3
PeriodToStringConverter.java
...springframework/boot/convert/PeriodToStringConverter.java
+2
-1
StringToPeriodConverter.java
...springframework/boot/convert/StringToPeriodConverter.java
+1
-0
No files found.
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/convert/DurationStyle.java
View file @
1a87fce4
...
...
@@ -134,7 +134,7 @@ 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 Illegal
State
Exception if the value is not a known style or cannot be parsed
* @throws Illegal
Argument
Exception if the value is not a known style or cannot be parsed
*/
public
static
Duration
detectAndParse
(
String
value
)
{
return
detectAndParse
(
value
,
null
);
...
...
@@ -146,7 +146,7 @@ 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 Illegal
State
Exception if the value is not a known style or cannot be parsed
* @throws Illegal
Argument
Exception 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
);
...
...
@@ -156,7 +156,7 @@ public enum DurationStyle {
* Detect the style from the given source value.
* @param value the source value
* @return the duration style
* @throws Illegal
State
Exception if the value is not a known style
* @throws Illegal
Argument
Exception if the value is not a known style
*/
public
static
DurationStyle
detect
(
String
value
)
{
Assert
.
notNull
(
value
,
"Value must not be null"
);
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/convert/PeriodStyle.java
View file @
1a87fce4
...
...
@@ -176,7 +176,7 @@ 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 Illegal
State
Exception if the value is not a known style or cannot be parsed
* @throws Illegal
Argument
Exception if the value is not a known style or cannot be parsed
*/
public
static
Period
detectAndParse
(
String
value
)
{
return
detectAndParse
(
value
,
null
);
...
...
@@ -188,7 +188,7 @@ 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 Illegal
State
Exception if the value is not a known style or cannot be parsed
* @throws Illegal
Argument
Exception 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
);
...
...
@@ -198,7 +198,7 @@ public enum PeriodStyle {
* Detect the style from the given source value.
* @param value the source value
* @return the period style
* @throws Illegal
State
Exception if the value is not a known style
* @throws Illegal
Argument
Exception if the value is not a known style
*/
public
static
PeriodStyle
detect
(
String
value
)
{
Assert
.
notNull
(
value
,
"Value must not be null"
);
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/convert/PeriodToStringConverter.java
View file @
1a87fce4
...
...
@@ -32,7 +32,8 @@ import org.springframework.util.ObjectUtils;
* @author Eddú Meléndez
* @author Edson Chávez
* @since 2.3.0
* @see Period
* @see PeriodFormat
* @see PeriodUnit
*/
public
class
PeriodToStringConverter
implements
GenericConverter
{
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/convert/StringToPeriodConverter.java
View file @
1a87fce4
...
...
@@ -33,6 +33,7 @@ import org.springframework.util.ObjectUtils;
* @author Eddú Meléndez
* @author Edson Chávez
* @since 2.3.0
* @see PeriodFormat
* @see PeriodUnit
*/
public
class
StringToPeriodConverter
implements
GenericConverter
{
...
...
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