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/11/07 10:18:24 UTC
[sling-org-apache-sling-testing-jcr-mock] annotated tag
org.apache.sling.testing.jcr-mock-1.1.12 created (now f59d408)
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a change to annotated tag org.apache.sling.testing.jcr-mock-1.1.12
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-jcr-mock.git.
at f59d408 (tag)
tagging b8675f9fea8fb4486fdacf27063fecbd65a2aa8c (commit)
by Stefan Seifert
on Fri Feb 5 22:24:58 2016 +0000
- Log -----------------------------------------------------------------
org.apache.sling.testing.jcr-mock-1.1.12
-----------------------------------------------------------------------
This annotated tag includes the following new commits:
new e697dd2 SLING-4042 Donate sling-mock, jcr-mock, osgi-mock implementation
new 59f3796 svn:ignore
new 53b9043 SLING-4042 mock documentation
new cf742dd SLING-4042 move all mock projects to mocks/ subdirectory
new 30f47ae SLING-4042 make sure JCR mock supports accessing data using multiple sessions
new d585caf SLING-4042 minor optimization
new 858def9 SLING-4042 add README files
new 95f9f5c add/update SCM urls
new a1e6d99 [maven-release-plugin] prepare release org.apache.sling.testing.jcr-mock-1.0.0
new 47927de [maven-release-plugin] prepare for next development iteration
new a61646c SLING-4090 Define package versions for Sling Mock, JCR Mock, OSGi Mock
new 43a8db7 SLING-4108 JCR/Sling/ResourceResolver Mock: Support providing authentication info
new 10fb560 SLING-4230 Add support for mocking queries and query results
new 5f38816 SLING-4230 Add support for mocking queries and query results
new 86f801a SLING-4230 Add support for mocking queries and query results
new 77fa4b5 [maven-release-plugin] prepare release org.apache.sling.testing.jcr-mock-1.1.0
new 237edcb [maven-release-plugin] prepare for next development iteration
new f47dab8 SLING-4237 - JCR Mock implementation should have "throws RepositoryException"
new 40be38a SLING-4237 - remove unused imports introduced in previous commit
new 422e276 SLING-4238 - Jcr Mock does not normalize paths
new 09e313a remove unused import
new ed1a43b SLING-4237 - JCR Mock implementation should have "throws RepositoryException" - add exceptions also to MockQuery* classes
new c0d5b79 [maven-release-plugin] prepare release org.apache.sling.testing.jcr-mock-1.1.2
new d4fe35a [maven-release-plugin] prepare for next development iteration
new 9d528c0 SLING-4362 make sure JCR namespaces are correctly registered in JCR mock on initialization through sling mock
new a6d7286 [maven-release-plugin] prepare release org.apache.sling.testing.jcr-mock-1.1.4
new 79cb9b2 [maven-release-plugin] prepare for next development iteration
new 6e98697 SLING-4548 workaround for setting jcr:created/jcr:createdBy and new state properly when creating nt:file nodes
new d82271f SLING-4695 - MockNode.getProperties() does not contain jcr:primaryType
new a5f4254 SLING-4695 - MockNode.getProperties() does not contain jcr:primaryType
new a08e2f6 SLING-4698 - Set parent.relativePath to empty for all modules
new 9f5e826 remove unused import
new 416d4ad [maven-release-plugin] prepare release org.apache.sling.testing.jcr-mock-1.1.6
new c0f7468 [maven-release-plugin] prepare for next development iteration
new 07d129d SLING-4802 JcrMock: Support Session close and isLive methods
new 6d0ab9f [maven-release-plugin] prepare release org.apache.sling.testing.jcr-mock-1.1.8
new ed55320 [maven-release-plugin] prepare for next development iteration
new 7110c38 Update to Sling Parent 23
new f936863 Testing: remove superflous sling.java.version=6 as it's the default now
new a6caf4f set parent version to 24 and add empty relativePath where missing
new 1dbd750 SLING-4962: getNodes() always returns empty iterator for root node
new df68dfc [maven-release-plugin] prepare release org.apache.sling.testing.jcr-mock-1.1.10
new 22c657e [maven-release-plugin] prepare for next development iteration
new 3280a49 Update the main reactor to parent 25
new 4b5d898 SLING-5257 MockProperty getType generates java.lang.ArrayIndexOutOfBoundsException when the underlying array value is empty
new 2c7832b SLING-5250 MockProperty getValues does not comply with JCR 2.0 API
new 33a8030 Switch to parent pom 26
new 1248126 [maven-release-plugin] prepare release org.apache.sling.testing.jcr-mock-1.1.12
new b8675f9 [maven-release-plugin] copy for tag org.apache.sling.testing.jcr-mock-1.1.12
The 49 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
--
To stop receiving notification emails like this one, please contact
['"commits@sling.apache.org" <co...@sling.apache.org>'].
[sling-org-apache-sling-testing-jcr-mock] 01/07:
[maven-release-plugin] prepare for next development iteration
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag org.apache.sling.testing.jcr-mock-1.1.12
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-jcr-mock.git
commit 22c657e029a0b5325ea17bb8bedd501a89b1b51c
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Mon Sep 7 21:39:11 2015 +0000
[maven-release-plugin] prepare for next development iteration
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/jcr-mock@1701700 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/pom.xml b/pom.xml
index ba3da30..d7e7091 100644
--- a/pom.xml
+++ b/pom.xml
@@ -28,16 +28,16 @@
</parent>
<artifactId>org.apache.sling.testing.jcr-mock</artifactId>
- <version>1.1.10</version>
+ <version>1.1.11-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>Apache Sling Testing JCR Mock</name>
<description>Mock implementation of selected JCR APIs.</description>
<scm>
- <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.testing.jcr-mock-1.1.10</connection>
- <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.testing.jcr-mock-1.1.10</developerConnection>
- <url>http://svn.apache.org/viewvc/sling/tags/org.apache.sling.testing.jcr-mock-1.1.10</url>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/testing/mocks/jcr-mock</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/jcr-mock</developerConnection>
+ <url>http://svn.apache.org/viewvc/sling/trunk/testing/mocks/jcr-mock</url>
</scm>
<dependencies>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-testing-jcr-mock] 05/07: Switch to parent
pom 26
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag org.apache.sling.testing.jcr-mock-1.1.12
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-jcr-mock.git
commit 33a803059eae2750b1bf1e3a0af07544018049f6
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Sun Jan 3 14:07:46 2016 +0000
Switch to parent pom 26
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/jcr-mock@1722720 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 45b623c..2015ce0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.sling</groupId>
<artifactId>sling</artifactId>
- <version>25</version>
+ <version>26</version>
<relativePath />
</parent>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-testing-jcr-mock] 06/07:
[maven-release-plugin] prepare release
org.apache.sling.testing.jcr-mock-1.1.12
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag org.apache.sling.testing.jcr-mock-1.1.12
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-jcr-mock.git
commit 12481267a79f933dced48ba15810440bf1617e30
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Fri Feb 5 22:24:45 2016 +0000
[maven-release-plugin] prepare release org.apache.sling.testing.jcr-mock-1.1.12
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/jcr-mock@1728749 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/pom.xml b/pom.xml
index 2015ce0..4d5fbef 100644
--- a/pom.xml
+++ b/pom.xml
@@ -28,16 +28,16 @@
</parent>
<artifactId>org.apache.sling.testing.jcr-mock</artifactId>
- <version>1.1.11-SNAPSHOT</version>
+ <version>1.1.12</version>
<packaging>bundle</packaging>
<name>Apache Sling Testing JCR Mock</name>
<description>Mock implementation of selected JCR APIs.</description>
<scm>
- <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/testing/mocks/jcr-mock</connection>
- <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/jcr-mock</developerConnection>
- <url>http://svn.apache.org/viewvc/sling/trunk/testing/mocks/jcr-mock</url>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.testing.jcr-mock-1.1.12</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.testing.jcr-mock-1.1.12</developerConnection>
+ <url>http://svn.apache.org/viewvc/sling/tags/org.apache.sling.testing.jcr-mock-1.1.12</url>
</scm>
<dependencies>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-testing-jcr-mock] 02/07: Update the main
reactor to parent 25
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag org.apache.sling.testing.jcr-mock-1.1.12
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-jcr-mock.git
commit 3280a491b2a3adb1a376bb27f4a470ac6f59f9a6
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Mon Oct 5 10:03:45 2015 +0000
Update the main reactor to parent 25
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/jcr-mock@1706780 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index d7e7091..45b623c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.sling</groupId>
<artifactId>sling</artifactId>
- <version>24</version>
+ <version>25</version>
<relativePath />
</parent>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-testing-jcr-mock] 03/07: SLING-5257
MockProperty getType generates java.lang.ArrayIndexOutOfBoundsException
when the underlying array value is empty
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag org.apache.sling.testing.jcr-mock-1.1.12
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-jcr-mock.git
commit 4b5d898ca545dee1ccd3d110a040218e901ce418
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Wed Nov 4 21:10:21 2015 +0000
SLING-5257 MockProperty getType generates java.lang.ArrayIndexOutOfBoundsException when the underlying array value is empty
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/jcr-mock@1712652 13f79535-47bb-0310-9956-ffa450edef68
---
.../java/org/apache/sling/testing/mock/jcr/MockProperty.java | 8 +++++++-
.../java/org/apache/sling/testing/mock/jcr/MockPropertyTest.java | 9 +++++++++
2 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/src/main/java/org/apache/sling/testing/mock/jcr/MockProperty.java b/src/main/java/org/apache/sling/testing/mock/jcr/MockProperty.java
index cd8b7d0..3eaa9ce 100644
--- a/src/main/java/org/apache/sling/testing/mock/jcr/MockProperty.java
+++ b/src/main/java/org/apache/sling/testing/mock/jcr/MockProperty.java
@@ -25,6 +25,7 @@ import java.util.Calendar;
import javax.jcr.Binary;
import javax.jcr.Node;
import javax.jcr.Property;
+import javax.jcr.PropertyType;
import javax.jcr.RepositoryException;
import javax.jcr.Session;
import javax.jcr.Value;
@@ -197,7 +198,12 @@ class MockProperty extends AbstractItem implements Property {
@Override
public int getType() throws RepositoryException {
- return this.itemData.getValues()[0].getType();
+ if (this.itemData.getValues().length > 0) {
+ return this.itemData.getValues()[0].getType();
+ }
+ else {
+ return PropertyType.UNDEFINED;
+ }
}
@Override
diff --git a/src/test/java/org/apache/sling/testing/mock/jcr/MockPropertyTest.java b/src/test/java/org/apache/sling/testing/mock/jcr/MockPropertyTest.java
index a8f30a4..14d59af 100644
--- a/src/test/java/org/apache/sling/testing/mock/jcr/MockPropertyTest.java
+++ b/src/test/java/org/apache/sling/testing/mock/jcr/MockPropertyTest.java
@@ -30,6 +30,7 @@ import java.util.Calendar;
import javax.jcr.Node;
import javax.jcr.Property;
+import javax.jcr.PropertyType;
import javax.jcr.RepositoryException;
import javax.jcr.Session;
import javax.jcr.Value;
@@ -237,4 +238,12 @@ public class MockPropertyTest {
assertArrayEquals(new long[] { 2 }, prop1.getLengths());
}
+ @Test
+ public void testEmptyArrayGetType() throws RepositoryException {
+ this.node1.setProperty("prop1", new Value[] {});
+ Property prop1 = this.node1.getProperty("prop1");
+ assertTrue(prop1.isMultiple());
+ assertEquals(PropertyType.UNDEFINED, prop1.getType());
+ }
+
}
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-testing-jcr-mock] 07/07:
[maven-release-plugin] copy for tag
org.apache.sling.testing.jcr-mock-1.1.12
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag org.apache.sling.testing.jcr-mock-1.1.12
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-jcr-mock.git
commit b8675f9fea8fb4486fdacf27063fecbd65a2aa8c
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Fri Feb 5 22:24:58 2016 +0000
[maven-release-plugin] copy for tag org.apache.sling.testing.jcr-mock-1.1.12
git-svn-id: https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.testing.jcr-mock-1.1.12@1728750 13f79535-47bb-0310-9956-ffa450edef68
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-testing-jcr-mock] 04/07: SLING-5250
MockProperty getValues does not comply with JCR 2.0 API
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag org.apache.sling.testing.jcr-mock-1.1.12
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-jcr-mock.git
commit 2c7832b166c8d597e7b400e6bf9ab5854f503eff
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Wed Nov 4 21:17:23 2015 +0000
SLING-5250 MockProperty getValues does not comply with JCR 2.0 API
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/jcr-mock@1712653 13f79535-47bb-0310-9956-ffa450edef68
---
.../java/org/apache/sling/testing/mock/jcr/MockProperty.java | 8 +++++++-
.../java/org/apache/sling/testing/mock/jcr/MockPropertyTest.java | 9 +++++++++
2 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/src/main/java/org/apache/sling/testing/mock/jcr/MockProperty.java b/src/main/java/org/apache/sling/testing/mock/jcr/MockProperty.java
index 3eaa9ce..3e10fda 100644
--- a/src/main/java/org/apache/sling/testing/mock/jcr/MockProperty.java
+++ b/src/main/java/org/apache/sling/testing/mock/jcr/MockProperty.java
@@ -53,7 +53,7 @@ class MockProperty extends AbstractItem implements Property {
}
private Value internalGetValue() throws RepositoryException {
- if (this.itemData.getValues().length > 1) {
+ if (this.itemData.isMultiple()) {
throw new ValueFormatException(this
+ " is a multi-valued property, so it's values can only be retrieved as an array");
} else {
@@ -68,6 +68,9 @@ class MockProperty extends AbstractItem implements Property {
@Override
public Value[] getValues() throws RepositoryException {
+ if (!this.itemData.isMultiple()) {
+ throw new ValueFormatException("Property is single-valued.");
+ }
Value[] valuesCopy = new Value[this.itemData.getValues().length];
for (int i = 0; i < this.itemData.getValues().length; i++) {
valuesCopy[i] = this.itemData.getValues()[i];
@@ -213,6 +216,9 @@ class MockProperty extends AbstractItem implements Property {
@Override
public long[] getLengths() throws RepositoryException {
+ if (!this.itemData.isMultiple()) {
+ throw new ValueFormatException("Property is single-valued.");
+ }
long[] lengths = new long[this.itemData.getValues().length];
for (int i = 0; i < this.itemData.getValues().length; i++) {
lengths[i] = this.itemData.getValues()[i].getString().length();
diff --git a/src/test/java/org/apache/sling/testing/mock/jcr/MockPropertyTest.java b/src/test/java/org/apache/sling/testing/mock/jcr/MockPropertyTest.java
index 14d59af..81eee32 100644
--- a/src/test/java/org/apache/sling/testing/mock/jcr/MockPropertyTest.java
+++ b/src/test/java/org/apache/sling/testing/mock/jcr/MockPropertyTest.java
@@ -34,6 +34,7 @@ import javax.jcr.PropertyType;
import javax.jcr.RepositoryException;
import javax.jcr.Session;
import javax.jcr.Value;
+import javax.jcr.ValueFormatException;
import org.apache.commons.io.IOUtils;
import org.apache.jackrabbit.value.BinaryValue;
@@ -246,4 +247,12 @@ public class MockPropertyTest {
assertEquals(PropertyType.UNDEFINED, prop1.getType());
}
+ @Test(expected=ValueFormatException.class)
+ public void testSingleValueAsValueArray() throws RepositoryException {
+ this.node1.setProperty("prop1", this.session.getValueFactory().createValue("value1"));
+ Property prop1 = this.node1.getProperty("prop1");
+ assertFalse(prop1.isMultiple());
+ assertEquals("value1", prop1.getValues()[0].getString());
+ }
+
}
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.