kwin commented on a change in pull request #143:
URL:
https://github.com/apache/jackrabbit-filevault/pull/143#discussion_r646715327
##########
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:
But based on this suggestion I clean up the impl in
https://github.com/apache/jackrabbit-filevault/pull/144. @stoerr @jsedding
Please have a look
##########
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:
But based on this suggestion I cleaned up the impl in
https://github.com/apache/jackrabbit-filevault/pull/144. @stoerr @jsedding
Please have a look
--
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]