Skip to content

Commit 75544b2

Browse files
Changes from 6.x (#103)
* upgrade nexus-staging-maven-plugin (cherry picked from commit 0a71432) * #95 Supporting java.time.Instant type (#96) (cherry picked from commit fef1eed)
1 parent 654523e commit 75544b2

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
<plugin>
9292
<groupId>org.sonatype.plugins</groupId>
9393
<artifactId>nexus-staging-maven-plugin</artifactId>
94-
<version>1.6.7</version>
94+
<version>1.6.13</version>
9595
<extensions>true</extensions>
9696
<configuration>
9797
<serverId>ossrh</serverId>

rsql-common/src/main/java/io/github/perplexhub/rsql/RSQLVisitorBase.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
package io.github.perplexhub.rsql;
22

33
import java.lang.reflect.*;
4-
import java.time.LocalDate;
5-
import java.time.LocalDateTime;
6-
import java.time.OffsetDateTime;
7-
import java.time.ZonedDateTime;
4+
import java.time.*;
85
import java.time.format.DateTimeParseException;
96
import java.util.*;
107
import java.util.Map.Entry;
@@ -80,6 +77,8 @@ protected Object convert(String source, Class targetType) {
8077
object = Boolean.valueOf(source);
8178
} else if (targetType.isEnum()) {
8279
object = Enum.valueOf(targetType, source);
80+
} else if (targetType.equals(Instant.class)) {
81+
object = Instant.parse(source);
8382
} else {
8483
Constructor<?> cons = (Constructor<?>) targetType.getConstructor(new Class<?>[] { String.class });
8584
object = cons.newInstance(new Object[] { source });

0 commit comments

Comments
 (0)