From 62a9c4de6726bb5f84b7f40ab302c68b6de1ba19 Mon Sep 17 00:00:00 2001 From: evanchooly Date: Sun, 18 Aug 2024 23:29:17 -0400 Subject: [PATCH] remove duplicate class name --- .../dev/morphia/test/TestDiscriminatorLookup.java | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/core/src/test/java/dev/morphia/test/TestDiscriminatorLookup.java b/core/src/test/java/dev/morphia/test/TestDiscriminatorLookup.java index a25fc6763ca..fab295e02f2 100644 --- a/core/src/test/java/dev/morphia/test/TestDiscriminatorLookup.java +++ b/core/src/test/java/dev/morphia/test/TestDiscriminatorLookup.java @@ -1,6 +1,8 @@ package dev.morphia.test; import dev.morphia.annotations.Entity; +import dev.morphia.test.models.Shape; +import dev.morphia.test.models.Square; import dev.morphia.test.models.TestEntity; import org.testng.annotations.Test; @@ -14,14 +16,14 @@ public class TestDiscriminatorLookup extends TestBase { public void testLookup() { withConfig(buildConfig(SomeEntity.class), () -> { final SomeEntity entity = new SomeEntity(); - entity.setShape(new Shape.Square()); + entity.setShape(new Square()); getDs().save(entity); }); final SomeEntity entity = getDs().find(SomeEntity.class).first(); assertNotNull(entity); - assertTrue(Shape.Square.class.isInstance(entity.getShape())); + assertTrue(Square.class.isInstance(entity.getShape())); } @Entity @@ -36,11 +38,4 @@ public void setShape(Shape shape) { this.shape = shape; } } - - @Entity - public static abstract class Shape { - public static class Square extends Shape { - public double side; - } - } }