Skip to content

Commit

Permalink
Merge branch '2.17'
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Feb 12, 2024
2 parents 11ecd87 + 80eaa25 commit 6014e01
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 5 deletions.
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
groups:
github-actions:
patterns:
- "*"
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
fail-fast: false
matrix:
java_version: ['8', '11', '17', '21']
joda_version: ['2.9', '2.10.14', '2.12.2']
joda_version: ['2.9', '2.10.14', '2.12.7']
os: ['ubuntu-20.04']
env:
JAVA_OPTS: "-XX:+TieredCompilation -XX:TieredStopAtLevel=1"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package tools.jackson.datatype.joda.cfg;

import java.util.Locale;
import java.util.Objects;
import java.util.TimeZone;

import org.joda.time.DateTimeZone;
Expand Down Expand Up @@ -131,8 +132,11 @@ public JacksonJodaDateFormat with(JsonFormat.Value ann) {
format = format.withFormat(ann.getPattern());
Boolean adjustTZ = ann.getFeature(JsonFormat.Feature.ADJUST_DATES_TO_CONTEXT_TIME_ZONE);
Boolean writeZoneId = ann.getFeature(JsonFormat.Feature.WRITE_DATES_WITH_ZONE_ID);
if ((adjustTZ != _adjustToContextTZOverride)
|| (writeZoneId != _writeZoneId)) {

// `null` means no override specified, so only apply if override exists...
// and changes current settings:
if (((adjustTZ != null) && !adjustTZ.equals(_adjustToContextTZOverride))
|| ((writeZoneId != null) && !writeZoneId.equals(_writeZoneId))) {
format = new JacksonJodaDateFormat(format, adjustTZ, writeZoneId);
}
return format;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ protected Interval _fromString(final JsonParser p, final DeserializationContext
if (hasSlash) {
result = Interval.parseWithOffset(value);
} else {
start = Long.valueOf(str);
start = Long.parseLong(str);
str = value.substring(index + 1);
end = Long.valueOf(str);
end = Long.parseLong(str);
result = new Interval(start, end);
}
} catch (NumberFormatException e) {
Expand Down

0 comments on commit 6014e01

Please sign in to comment.