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
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 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,