kwin commented on a change in pull request #143:
URL:
https://github.com/apache/jackrabbit-filevault/pull/143#discussion_r646560097
##########
File path:
vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/impl/PackagePropertiesImpl.java
##########
@@ -211,22 +216,34 @@ public boolean requiresRestart() {
return dependenciesLocations;
}
}
-
+
/**
* {@inheritDoc}
*/
@Override
public Calendar getDateProperty(String name) {
+ Calendar result = null;
try {
// TODO: add timezone if not there?
String p = getProperty(name);
- return p == null
- ? null
- : ISO8601.parse(p);
+ if (p != null) {
+ result = ISO8601.parse(p);
+ if (result == null) {
+ // Perhaps this is due to unusual timezone format +02 or
+0200 that aren't supported by ISO8601.parse
+ // but sometimes produced by maven plugins, compare
https://issues.apache.org/jira/browse/JCRVLT-276
+ Matcher splittedDate = TIMEZONE_FIX_PATTERN.matcher(p);
Review comment:
According to
https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html#ISO_OFFSET_DATE_TIME
and
https://docs.oracle.com/javase/8/docs/api/java/time/ZoneOffset.html#getId--
`DateTimeFormatter.ISO_OFFSET_DATE_TIME` only supports the following timezone
patterns:
> Z - for UTC (ISO-8601)
> +hh:mm or -hh:mm - if the seconds are zero (ISO-8601)
> +hh:mm:ss or -hh:mm:ss - if the seconds are non-zero (not ISO-8601)
But not something like `+hhmm` or just `+hh` or am I missing something here?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]