cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ntimof...@apache.org
Subject [30/30] cayenne git commit: CAY-2377 Cleanup deprecated code - minor cleanup
Date Thu, 07 Dec 2017 10:09:59 GMT
CAY-2377 Cleanup deprecated code
 - minor cleanup


Project: http://git-wip-us.apache.org/repos/asf/cayenne/repo
Commit: http://git-wip-us.apache.org/repos/asf/cayenne/commit/f9560450
Tree: http://git-wip-us.apache.org/repos/asf/cayenne/tree/f9560450
Diff: http://git-wip-us.apache.org/repos/asf/cayenne/diff/f9560450

Branch: refs/heads/master
Commit: f95604505a132df947b7bdda5a822c2ff8c3edcb
Parents: 07111df
Author: Nikita Timofeev <stariy95@gmail.com>
Authored: Thu Dec 7 13:09:14 2017 +0300
Committer: Nikita Timofeev <stariy95@gmail.com>
Committed: Thu Dec 7 13:09:14 2017 +0300

----------------------------------------------------------------------
 .../configuration/rop/client/ClientRuntimeBuilder.java  |  2 +-
 .../main/java/org/apache/cayenne/cache/QueryCache.java  |  2 +-
 .../configuration/server/ServerRuntimeBuilder.java      |  7 -------
 .../configuration/server/ServerRuntimeBuilderIT.java    | 12 ++++++------
 .../configuration/server/ServerRuntimeBuilderTest.java  | 10 +++++-----
 .../src/main/java/org/apache/cayenne/modeler/Main.java  |  4 ++--
 .../cayenne/modeler/util/state/DisplayEventType.java    |  1 -
 7 files changed, 15 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cayenne/blob/f9560450/cayenne-client/src/main/java/org/apache/cayenne/configuration/rop/client/ClientRuntimeBuilder.java
----------------------------------------------------------------------
diff --git a/cayenne-client/src/main/java/org/apache/cayenne/configuration/rop/client/ClientRuntimeBuilder.java
b/cayenne-client/src/main/java/org/apache/cayenne/configuration/rop/client/ClientRuntimeBuilder.java
index ca826b1..def7070 100644
--- a/cayenne-client/src/main/java/org/apache/cayenne/configuration/rop/client/ClientRuntimeBuilder.java
+++ b/cayenne-client/src/main/java/org/apache/cayenne/configuration/rop/client/ClientRuntimeBuilder.java
@@ -53,7 +53,7 @@ public class ClientRuntimeBuilder {
     Injector serverInjector;
     private Map<String, String> properties;
 
-     ClientRuntimeBuilder() {
+    ClientRuntimeBuilder() {
         modules = new ArrayList<>();
         autoLoadModules = true;
         local = false;

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f9560450/cayenne-server/src/main/java/org/apache/cayenne/cache/QueryCache.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/cache/QueryCache.java b/cayenne-server/src/main/java/org/apache/cayenne/cache/QueryCache.java
index cdcf436..de74ea6 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/cache/QueryCache.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/cache/QueryCache.java
@@ -73,7 +73,7 @@ public interface QueryCache {
      *
      * @since 4.0
      */
-    void removeGroup(String grou3pKey, Class<?> keyType, Class<?> valueType);
+    void removeGroup(String groupKey, Class<?> keyType, Class<?> valueType);
 
     /**
      * Clears all cache entries.

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f9560450/cayenne-server/src/main/java/org/apache/cayenne/configuration/server/ServerRuntimeBuilder.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/configuration/server/ServerRuntimeBuilder.java
b/cayenne-server/src/main/java/org/apache/cayenne/configuration/server/ServerRuntimeBuilder.java
index 6bb1742..baae18a 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/configuration/server/ServerRuntimeBuilder.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/configuration/server/ServerRuntimeBuilder.java
@@ -60,13 +60,6 @@ public class ServerRuntimeBuilder {
     private boolean autoLoadModules;
 
     /**
-     * Creates an empty builder.
-     */
-    protected ServerRuntimeBuilder() {
-        this(null);
-    }
-
-    /**
      * Creates a builder with a fixed name of the DataDomain of the resulting
      * ServerRuntime. Specifying explicit name is often needed for consistency
      * in runtimes merged from multiple configs, each having its own name.

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f9560450/cayenne-server/src/test/java/org/apache/cayenne/configuration/server/ServerRuntimeBuilderIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/configuration/server/ServerRuntimeBuilderIT.java
b/cayenne-server/src/test/java/org/apache/cayenne/configuration/server/ServerRuntimeBuilderIT.java
index dc9fe1e..55a1037 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/configuration/server/ServerRuntimeBuilderIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/configuration/server/ServerRuntimeBuilderIT.java
@@ -82,7 +82,7 @@ public class ServerRuntimeBuilderIT extends ServerCase {
 	@Test
 	public void testConfigFree_WithDBParams() {
 
-		localRuntime = new ServerRuntimeBuilder().jdbcDriver(dsi.getJdbcDriver()).url(dsi.getDataSourceUrl())
+		localRuntime = new ServerRuntimeBuilder(null).jdbcDriver(dsi.getJdbcDriver()).url(dsi.getDataSourceUrl())
 				.password(dsi.getPassword()).user(dsi.getUserName()).minConnections(1).maxConnections(2).build();
 
 		List<DataRow> result = SQLSelect.dataRowQuery("SELECT * FROM ARTIST").select(localRuntime.newContext());
@@ -92,7 +92,7 @@ public class ServerRuntimeBuilderIT extends ServerCase {
 	@Test
 	public void tesConfigFree_WithDBParams() {
 
-		localRuntime = new ServerRuntimeBuilder().addConfig(CayenneProjects.TESTMAP_PROJECT)
+		localRuntime = new ServerRuntimeBuilder(null).addConfig(CayenneProjects.TESTMAP_PROJECT)
 				.jdbcDriver(dsi.getJdbcDriver()).url(dsi.getDataSourceUrl()).password(dsi.getPassword())
 				.user(dsi.getUserName()).minConnections(1).maxConnections(2).build();
 
@@ -109,7 +109,7 @@ public class ServerRuntimeBuilderIT extends ServerCase {
 	@Test
 	public void testConfigFree_WithDataSource() {
 
-		localRuntime = new ServerRuntimeBuilder().dataSource(dataSource).build();
+		localRuntime = new ServerRuntimeBuilder(null).dataSource(dataSource).build();
 
 		List<DataRow> result = SQLSelect.dataRowQuery("SELECT * FROM ARTIST").select(localRuntime.newContext());
 		assertEquals(2, result.size());
@@ -118,7 +118,7 @@ public class ServerRuntimeBuilderIT extends ServerCase {
 	@Test
 	public void testNoNodeConfig_WithDataSource() {
 
-		localRuntime = new ServerRuntimeBuilder().addConfig(CayenneProjects.TESTMAP_PROJECT).dataSource(dataSource)
+		localRuntime = new ServerRuntimeBuilder(null).addConfig(CayenneProjects.TESTMAP_PROJECT).dataSource(dataSource)
 				.build();
 
 		DataMap map = localRuntime.getDataDomain().getDataMap("testmap");
@@ -133,7 +133,7 @@ public class ServerRuntimeBuilderIT extends ServerCase {
 
 	@Test
 	public void test_UnnamedDomain_MultiLocation() {
-		localRuntime = new ServerRuntimeBuilder().addConfigs(CayenneProjects.TESTMAP_PROJECT,
+		localRuntime = new ServerRuntimeBuilder(null).addConfigs(CayenneProjects.TESTMAP_PROJECT,
 				CayenneProjects.EMBEDDABLE_PROJECT).build();
 
 		assertEquals("cayenne", localRuntime.getDataDomain().getName());
@@ -151,7 +151,7 @@ public class ServerRuntimeBuilderIT extends ServerCase {
 	 */
 	@Test
 	public void test_UnnamedDomain_CustomNameProjectFile() {
-		localRuntime = new ServerRuntimeBuilder().addConfigs(CayenneProjects.CUSTOM_NAME_PROJECT).build();
+		localRuntime = new ServerRuntimeBuilder(null).addConfigs(CayenneProjects.CUSTOM_NAME_PROJECT).build();
 		assertEquals("cayenne", localRuntime.getDataDomain().getName());
 
 		ObjectContext context = localRuntime.newContext();

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f9560450/cayenne-server/src/test/java/org/apache/cayenne/configuration/server/ServerRuntimeBuilderTest.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/configuration/server/ServerRuntimeBuilderTest.java
b/cayenne-server/src/test/java/org/apache/cayenne/configuration/server/ServerRuntimeBuilderTest.java
index f709894..1912339 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/configuration/server/ServerRuntimeBuilderTest.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/configuration/server/ServerRuntimeBuilderTest.java
@@ -52,7 +52,7 @@ public class ServerRuntimeBuilderTest {
 	public void test_NoLocation() {
 
 		// this is meaningless (no DataSource), but should work...
-		runtime = new ServerRuntimeBuilder().build();
+		runtime = new ServerRuntimeBuilder(null).build();
 
 		List<String> locations = runtime.getInjector().getInstance(
 				Key.getListOf(String.class, Constants.SERVER_PROJECT_LOCATIONS_LIST));
@@ -67,7 +67,7 @@ public class ServerRuntimeBuilderTest {
 	@Test
 	public void test_SingleLocation() {
 
-		runtime = new ServerRuntimeBuilder().addConfig("xxxx").build();
+		runtime = new ServerRuntimeBuilder(null).addConfig("xxxx").build();
 
 		List<String> locations = runtime.getInjector().getInstance(
 				Key.getListOf(String.class, Constants.SERVER_PROJECT_LOCATIONS_LIST));
@@ -83,7 +83,7 @@ public class ServerRuntimeBuilderTest {
 	@Test
 	public void test_MultipleLocations() {
 
-		runtime = new ServerRuntimeBuilder().addConfigs("xxxx", "yyyy").build();
+		runtime = new ServerRuntimeBuilder(null).addConfigs("xxxx", "yyyy").build();
 
 		List<String> locations = runtime.getInjector().getInstance(
 				Key.getListOf(String.class, Constants.SERVER_PROJECT_LOCATIONS_LIST));
@@ -100,7 +100,7 @@ public class ServerRuntimeBuilderTest {
 
 		Module m = mock(Module.class);
 
-		runtime = new ServerRuntimeBuilder().addModule(m).build();
+		runtime = new ServerRuntimeBuilder(null).addModule(m).build();
 
 		Collection<Module> modules = runtime.getModules();
 		assertEquals(3, modules.size());
@@ -111,7 +111,7 @@ public class ServerRuntimeBuilderTest {
 
 	@Test
 	public void test_UnnamedDomain_NoLocation() {
-		runtime = new ServerRuntimeBuilder().build();
+		runtime = new ServerRuntimeBuilder(null).build();
 		assertEquals("cayenne", runtime.getDataDomain().getName());
 	}
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f9560450/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/Main.java
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/Main.java b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/Main.java
index 34edece..5b2e5d2 100644
--- a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/Main.java
+++ b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/Main.java
@@ -105,8 +105,8 @@ public class Main {
     }
 
     protected Collection<Module> appendModules(Collection<Module> modules) {
-        // TODO: this is dirty... "CayenneModeler" is not a project name, and ServerModule
is out of place inside
-        // the Modeler... If we need ServerRuntime for certain operations, those should start
their own stack...
+        // TODO: this is dirty... ServerModule is out of place inside the Modeler...
+        // If we need ServerRuntime for certain operations, those should start their own
stack...
         modules.add(new ServerModule());
 
         modules.add(new ProjectModule());

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f9560450/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/util/state/DisplayEventType.java
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/util/state/DisplayEventType.java
b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/util/state/DisplayEventType.java
index 3821762..aa3ed61 100644
--- a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/util/state/DisplayEventType.java
+++ b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/util/state/DisplayEventType.java
@@ -27,7 +27,6 @@ import org.apache.cayenne.map.Embeddable;
 import org.apache.cayenne.map.QueryDescriptor;
 import org.apache.cayenne.modeler.ProjectController;
 import org.apache.cayenne.modeler.pref.ProjectStatePreferences;
-import org.apache.cayenne.query.Query;
 import org.apache.cayenne.util.CayenneMapEntry;
 
 public abstract class DisplayEventType {


Mime
View raw message