[cayenne] branch master updated: CAY-2774 Overriding service ordering in DI List causes DIRuntimeException

2022-11-15 Thread ntimofeev
This is an automated email from the ASF dual-hosted git repository.

ntimofeev pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cayenne.git


The following commit(s) were added to refs/heads/master by this push:
 new 2d6d99428 CAY-2774 Overriding service ordering in DI List causes 
DIRuntimeException
2d6d99428 is described below

commit 2d6d99428954bd5b0181503fbd6b8728f88aed5d
Author: Nikita Timofeev 
AuthorDate: Tue Nov 15 17:53:24 2022 +0300

CAY-2774 Overriding service ordering in DI List causes DIRuntimeException
---
 cayenne-di/src/test/java/org/apache/cayenne/di/spi/DIGraphTest.java | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git 
a/cayenne-di/src/test/java/org/apache/cayenne/di/spi/DIGraphTest.java 
b/cayenne-di/src/test/java/org/apache/cayenne/di/spi/DIGraphTest.java
index 3874ad18a..d2558b698 100644
--- a/cayenne-di/src/test/java/org/apache/cayenne/di/spi/DIGraphTest.java
+++ b/cayenne-di/src/test/java/org/apache/cayenne/di/spi/DIGraphTest.java
@@ -39,13 +39,12 @@ public class DIGraphTest {
 assertEquals(asList("y", "a", "z", "x"), sorted);
 }
 
-@Test
+@Test(expected = DIRuntimeException.class)
 public void testTopSortDirectCycle() {
 DIGraph graph = new DIGraph<>();
 graph.add("x", "y");
 graph.add("y", "x");
-List sorted = graph.topSort();
-assertEquals(asList("x", "y"), sorted);
+graph.topSort();
 }
 
 @Test



[cayenne] branch master updated: CAY-2774 Overriding service ordering in DI List causes DIRuntimeException

2022-11-15 Thread ntimofeev
This is an automated email from the ASF dual-hosted git repository.

ntimofeev pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cayenne.git


The following commit(s) were added to refs/heads/master by this push:
 new 72ae13660 CAY-2774 Overriding service ordering in DI List causes 
DIRuntimeException
72ae13660 is described below

commit 72ae13660e9c99b4b8978bc111317b218424968c
Author: Nikita Timofeev 
AuthorDate: Tue Nov 15 17:50:29 2022 +0300

CAY-2774 Overriding service ordering in DI List causes DIRuntimeException
---
 cayenne-di/src/main/java/org/apache/cayenne/di/spi/DIGraph.java | 1 -
 1 file changed, 1 deletion(-)

diff --git a/cayenne-di/src/main/java/org/apache/cayenne/di/spi/DIGraph.java 
b/cayenne-di/src/main/java/org/apache/cayenne/di/spi/DIGraph.java
index 873047506..531ad03c6 100644
--- a/cayenne-di/src/main/java/org/apache/cayenne/di/spi/DIGraph.java
+++ b/cayenne-di/src/main/java/org/apache/cayenne/di/spi/DIGraph.java
@@ -68,7 +68,6 @@ class DIGraph {
public void add(V from, V to) {
this.add(from);
this.add(to);
-   neighbors.get(to).remove(from);
neighbors.get(from).add(to);
}