You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2017/10/18 23:25:54 UTC
[sling-org-apache-sling-jcr-js-nodetypes] 03/05: SLING-6292
(jcr.js.nodetypes tests fail when run in a different timezone) fixed and
@override removed
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-js-nodetypes.git
commit a99b28749baf0968f14f3b82f6ccee09e685d47f
Author: Sandro Boehme <sb...@apache.org>
AuthorDate: Wed Nov 16 20:08:59 2016 +0000
SLING-6292 (jcr.js.nodetypes tests fail when run in a different timezone) fixed and @override removed
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1770054 13f79535-47bb-0310-9956-ffa450edef68
---
.../jcr/js/nodetypes/downloaddefaultbinary/AutoCreatedMatcher.java | 1 -
.../jcr/js/nodetypes/downloaddefaultbinary/MandatoryMatcher.java | 1 -
.../jcr/js/nodetypes/downloaddefaultbinary/MultipleMatcher.java | 1 -
.../js/nodetypes/downloaddefaultbinary/OnParentVersionMatcher.java | 1 -
.../js/nodetypes/downloaddefaultbinary/PropertyNameMatcher.java | 1 -
.../jcr/js/nodetypes/downloaddefaultbinary/ProtectedMatcher.java | 1 -
.../downloaddefaultbinary/RequiredPropertyTypeMatcher.java | 1 -
.../org/apache/sling/jcr/js/nodetypes/GenerationConstants.java | 7 ++++---
.../expectedNTJSON/testCompleteDatePropertyDefinition.json | 4 ++--
.../expectedNTJSON/testTwoResidualPropertyDefinitions.json | 4 ++--
10 files changed, 8 insertions(+), 14 deletions(-)
diff --git a/src/main/java/org/apache/sling/jcr/js/nodetypes/downloaddefaultbinary/AutoCreatedMatcher.java b/src/main/java/org/apache/sling/jcr/js/nodetypes/downloaddefaultbinary/AutoCreatedMatcher.java
index 8a3d6dd..622d6f8 100644
--- a/src/main/java/org/apache/sling/jcr/js/nodetypes/downloaddefaultbinary/AutoCreatedMatcher.java
+++ b/src/main/java/org/apache/sling/jcr/js/nodetypes/downloaddefaultbinary/AutoCreatedMatcher.java
@@ -27,7 +27,6 @@ public class AutoCreatedMatcher extends AbstractPropertyMatcher implements Prope
super.index = index;
}
- @Override
public boolean match(PropertyDefinition propertyDefinition) {
String arrayValue = super.getArrayValue(idFields, index);
if (arrayValue!=null){
diff --git a/src/main/java/org/apache/sling/jcr/js/nodetypes/downloaddefaultbinary/MandatoryMatcher.java b/src/main/java/org/apache/sling/jcr/js/nodetypes/downloaddefaultbinary/MandatoryMatcher.java
index 8497507..b81ce23 100644
--- a/src/main/java/org/apache/sling/jcr/js/nodetypes/downloaddefaultbinary/MandatoryMatcher.java
+++ b/src/main/java/org/apache/sling/jcr/js/nodetypes/downloaddefaultbinary/MandatoryMatcher.java
@@ -27,7 +27,6 @@ public class MandatoryMatcher extends AbstractPropertyMatcher implements Propert
super.index = index;
}
- @Override
public boolean match(PropertyDefinition propertyDefinition) {
String arrayValue = super.getArrayValue(idFields, index);
if (arrayValue!=null){
diff --git a/src/main/java/org/apache/sling/jcr/js/nodetypes/downloaddefaultbinary/MultipleMatcher.java b/src/main/java/org/apache/sling/jcr/js/nodetypes/downloaddefaultbinary/MultipleMatcher.java
index 4d74074..f8e6ba5 100644
--- a/src/main/java/org/apache/sling/jcr/js/nodetypes/downloaddefaultbinary/MultipleMatcher.java
+++ b/src/main/java/org/apache/sling/jcr/js/nodetypes/downloaddefaultbinary/MultipleMatcher.java
@@ -27,7 +27,6 @@ public class MultipleMatcher extends AbstractPropertyMatcher implements Property
super.index = index;
}
- @Override
public boolean match(PropertyDefinition propertyDefinition) {
String arrayValue = super.getArrayValue(idFields, index);
if (arrayValue!=null){
diff --git a/src/main/java/org/apache/sling/jcr/js/nodetypes/downloaddefaultbinary/OnParentVersionMatcher.java b/src/main/java/org/apache/sling/jcr/js/nodetypes/downloaddefaultbinary/OnParentVersionMatcher.java
index e40d044..66c3673 100644
--- a/src/main/java/org/apache/sling/jcr/js/nodetypes/downloaddefaultbinary/OnParentVersionMatcher.java
+++ b/src/main/java/org/apache/sling/jcr/js/nodetypes/downloaddefaultbinary/OnParentVersionMatcher.java
@@ -32,7 +32,6 @@ public class OnParentVersionMatcher extends AbstractPropertyMatcher implements P
super.index = index;
}
- @Override
public boolean match(PropertyDefinition propertyDefinition) {
String arrayValue = super.getArrayValue(idFields, index);
if (arrayValue!=null){
diff --git a/src/main/java/org/apache/sling/jcr/js/nodetypes/downloaddefaultbinary/PropertyNameMatcher.java b/src/main/java/org/apache/sling/jcr/js/nodetypes/downloaddefaultbinary/PropertyNameMatcher.java
index 48d9acb..27838ad 100644
--- a/src/main/java/org/apache/sling/jcr/js/nodetypes/downloaddefaultbinary/PropertyNameMatcher.java
+++ b/src/main/java/org/apache/sling/jcr/js/nodetypes/downloaddefaultbinary/PropertyNameMatcher.java
@@ -27,7 +27,6 @@ public class PropertyNameMatcher extends AbstractPropertyMatcher implements Prop
super.index = index;
}
- @Override
public boolean match(PropertyDefinition propertyDefinition) {
String arrayValue = super.getArrayValue(idFields, index);
if (arrayValue!=null){
diff --git a/src/main/java/org/apache/sling/jcr/js/nodetypes/downloaddefaultbinary/ProtectedMatcher.java b/src/main/java/org/apache/sling/jcr/js/nodetypes/downloaddefaultbinary/ProtectedMatcher.java
index 9caf408..f4d0648 100644
--- a/src/main/java/org/apache/sling/jcr/js/nodetypes/downloaddefaultbinary/ProtectedMatcher.java
+++ b/src/main/java/org/apache/sling/jcr/js/nodetypes/downloaddefaultbinary/ProtectedMatcher.java
@@ -27,7 +27,6 @@ public class ProtectedMatcher extends AbstractPropertyMatcher implements Propert
super.index = index;
}
- @Override
public boolean match(PropertyDefinition propertyDefinition) {
String arrayValue = super.getArrayValue(idFields, index);
if (arrayValue!=null){
diff --git a/src/main/java/org/apache/sling/jcr/js/nodetypes/downloaddefaultbinary/RequiredPropertyTypeMatcher.java b/src/main/java/org/apache/sling/jcr/js/nodetypes/downloaddefaultbinary/RequiredPropertyTypeMatcher.java
index dbe6282..6fa4b5a 100644
--- a/src/main/java/org/apache/sling/jcr/js/nodetypes/downloaddefaultbinary/RequiredPropertyTypeMatcher.java
+++ b/src/main/java/org/apache/sling/jcr/js/nodetypes/downloaddefaultbinary/RequiredPropertyTypeMatcher.java
@@ -32,7 +32,6 @@ public class RequiredPropertyTypeMatcher extends AbstractPropertyMatcher impleme
super.index = index;
}
- @Override
public boolean match(PropertyDefinition propertyDefinition) {
String arrayValue = super.getArrayValue(idFields, index);
if (arrayValue!=null){
diff --git a/src/test/java/org/apache/sling/jcr/js/nodetypes/GenerationConstants.java b/src/test/java/org/apache/sling/jcr/js/nodetypes/GenerationConstants.java
index 1f8e7d9..70d6ed9 100644
--- a/src/test/java/org/apache/sling/jcr/js/nodetypes/GenerationConstants.java
+++ b/src/test/java/org/apache/sling/jcr/js/nodetypes/GenerationConstants.java
@@ -21,6 +21,7 @@ package org.apache.sling.jcr.js.nodetypes;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;
+import java.util.TimeZone;
/**
* Used by generators to generate the right content and by the test cases to compare if the right content has been returned.
@@ -33,7 +34,7 @@ public class GenerationConstants {
private static Calendar maxDate = Calendar.getInstance();
static {
maxDate.clear();
- maxDate.set(2012, 03, 01);
+ maxDate.set(2014, 07, 11);
}
public static final String CONSTRAINT_DATE = df.format(maxDate.getTime());
public static final String CONSTRAINT_DOUBLE = "[,5]";
@@ -45,10 +46,10 @@ public class GenerationConstants {
public static final String CONSTRAINT_REFERENCE = "nt:unstructured";
- public static final Calendar DEFAULT_VALUE_CALENDAR = Calendar.getInstance();
+ public static final Calendar DEFAULT_VALUE_CALENDAR = Calendar.getInstance(TimeZone.getTimeZone("UTC"));
static {
DEFAULT_VALUE_CALENDAR.clear();
- DEFAULT_VALUE_CALENDAR.set(2012, 01, 01);
+ DEFAULT_VALUE_CALENDAR.set(2014, 7, 10); // 10.8.2014
}
public static final String DEFAULT_VALUE_BINARY = "/ntName/stringPropertyDef/Binary/true/true/true/true/VERSION/0.default_binary_value.bin";
public static final String DEFAULT_VALUE_STRING = "Default-String";
diff --git a/src/test/resources/expectedNTJSON/testCompleteDatePropertyDefinition.json b/src/test/resources/expectedNTJSON/testCompleteDatePropertyDefinition.json
index 05dbf98..244aeaf 100644
--- a/src/test/resources/expectedNTJSON/testCompleteDatePropertyDefinition.json
+++ b/src/test/resources/expectedNTJSON/testCompleteDatePropertyDefinition.json
@@ -4,13 +4,13 @@
{
"defaultValues": [
{
- "date": "2012-02-01T00:00:00.000+01:00",
+ "date": "2014-08-10T00:00:00.000Z",
"type": "Date"
}
],
"requiredType": "Date",
"valueConstraints": [
- "2012-04-01T00:00:00Z"
+ "2014-08-11T00:00:00Z"
],
"multiple": true,
"autoCreated": true,
diff --git a/src/test/resources/expectedNTJSON/testTwoResidualPropertyDefinitions.json b/src/test/resources/expectedNTJSON/testTwoResidualPropertyDefinitions.json
index 4854e55..1eba752 100644
--- a/src/test/resources/expectedNTJSON/testTwoResidualPropertyDefinitions.json
+++ b/src/test/resources/expectedNTJSON/testTwoResidualPropertyDefinitions.json
@@ -21,13 +21,13 @@
{
"defaultValues": [
{
- "date": "2012-02-01T00:00:00.000+01:00",
+ "date": "2014-08-10T00:00:00.000Z",
"type": "Date"
}
],
"requiredType": "Date",
"valueConstraints": [
- "2012-04-01T00:00:00Z"
+ "2014-08-11T00:00:00Z"
],
"multiple": true,
"autoCreated": true,
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.