cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ntimof...@apache.org
Subject cayenne git commit: Cleanup
Date Mon, 12 Feb 2018 14:40:33 GMT
Repository: cayenne
Updated Branches:
  refs/heads/master b7189498d -> 8dd8b1d1a


Cleanup


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

Branch: refs/heads/master
Commit: 8dd8b1d1aa2cb4ad01762a6c1c4aec7029a577eb
Parents: b718949
Author: Nikita Timofeev <stariy95@gmail.com>
Authored: Mon Feb 12 17:40:26 2018 +0300
Committer: Nikita Timofeev <stariy95@gmail.com>
Committed: Mon Feb 12 17:40:26 2018 +0300

----------------------------------------------------------------------
 .../cayenne/configuration/server/DbAdapterFactory.java      | 3 +--
 .../configuration/server/DefaultDbAdapterFactory.java       | 9 ++-------
 .../java/org/apache/cayenne/dba/DefaultQuotingStrategy.java | 2 +-
 3 files changed, 4 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cayenne/blob/8dd8b1d1/cayenne-server/src/main/java/org/apache/cayenne/configuration/server/DbAdapterFactory.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/configuration/server/DbAdapterFactory.java
b/cayenne-server/src/main/java/org/apache/cayenne/configuration/server/DbAdapterFactory.java
index 6f6782c..ba3e7f1 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/configuration/server/DbAdapterFactory.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/configuration/server/DbAdapterFactory.java
@@ -32,6 +32,5 @@ public interface DbAdapterFactory {
      * Returns an instance of DbAdapter if the factory detects that it knows how to handle
      * the database.
      */
-    DbAdapter createAdapter(DataNodeDescriptor nodeDescriptor, DataSource dataSource)
-            throws Exception;
+    DbAdapter createAdapter(DataNodeDescriptor nodeDescriptor, DataSource dataSource) throws
Exception;
 }

http://git-wip-us.apache.org/repos/asf/cayenne/blob/8dd8b1d1/cayenne-server/src/main/java/org/apache/cayenne/configuration/server/DefaultDbAdapterFactory.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/configuration/server/DefaultDbAdapterFactory.java
b/cayenne-server/src/main/java/org/apache/cayenne/configuration/server/DefaultDbAdapterFactory.java
index 2287071..a95f3a9 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/configuration/server/DefaultDbAdapterFactory.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/configuration/server/DefaultDbAdapterFactory.java
@@ -64,7 +64,7 @@ public class DefaultDbAdapterFactory implements DbAdapterFactory {
 	}
 
 	@Override
-	public DbAdapter createAdapter(DataNodeDescriptor nodeDescriptor, final DataSource dataSource)
throws Exception {
+	public DbAdapter createAdapter(DataNodeDescriptor nodeDescriptor, final DataSource dataSource)
{
 
 		String adapterType = null;
 
@@ -82,12 +82,7 @@ public class DefaultDbAdapterFactory implements DbAdapterFactory {
 		if (adapterType != null) {
 			return objectFactory.newInstance(DbAdapter.class, adapterType);
 		} else {
-			return new AutoAdapter(new Provider<DbAdapter>() {
-
-				public DbAdapter get() {
-					return detectAdapter(dataSource);
-				}
-			}, jdbcEventLogger);
+			return new AutoAdapter(() -> detectAdapter(dataSource), jdbcEventLogger);
 		}
 	}
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/8dd8b1d1/cayenne-server/src/main/java/org/apache/cayenne/dba/DefaultQuotingStrategy.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/dba/DefaultQuotingStrategy.java
b/cayenne-server/src/main/java/org/apache/cayenne/dba/DefaultQuotingStrategy.java
index 93ccdcb..e961f07 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/dba/DefaultQuotingStrategy.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/dba/DefaultQuotingStrategy.java
@@ -86,7 +86,7 @@ public class DefaultQuotingStrategy implements QuotingStrategy {
             }
 
             if (buffer.length() > 0) {
-                buffer.append(".");
+                buffer.append('.');
             }
 
             buffer.append(startQuote).append(part).append(endQuote);


Mime
View raw message