cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ntimof...@apache.org
Subject [27/32] cayenne git commit: Some fixes
Date Wed, 14 Nov 2018 14:27:58 GMT
Some fixes


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

Branch: refs/heads/master
Commit: 3225c39e18631e663395fea5a59b399d6fbc77d0
Parents: 397d29f
Author: Arseni Bulatski <ancarseni@gmail.com>
Authored: Tue Nov 13 17:20:53 2018 +0300
Committer: Arseni Bulatski <ancarseni@gmail.com>
Committed: Tue Nov 13 17:20:53 2018 +0300

----------------------------------------------------------------------
 .../java/org/apache/cayenne/modeler/CodeTemplateManager.java     | 2 +-
 .../apache/cayenne/modeler/editor/cgen/CustomModeController.java | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cayenne/blob/3225c39e/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/CodeTemplateManager.java
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/CodeTemplateManager.java
b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/CodeTemplateManager.java
index 7579d5d..a5d2fb6 100644
--- a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/CodeTemplateManager.java
+++ b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/CodeTemplateManager.java
@@ -169,7 +169,7 @@ public class CodeTemplateManager {
 	}
 
 	public String getNameByPath(String name, Path rootPath) {
-		String fullPath = rootPath.resolve(Paths.get(name)).toString();
+		String fullPath = rootPath.resolve(Paths.get(name)).normalize().toString();
 		if(reverseCustomTemplate.containsKey(fullPath)){
 			return reverseCustomTemplate.get(fullPath);
 		} else {

http://git-wip-us.apache.org/repos/asf/cayenne/blob/3225c39e/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/cgen/CustomModeController.java
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/cgen/CustomModeController.java
b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/cgen/CustomModeController.java
index a6be13b..07f7828 100644
--- a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/cgen/CustomModeController.java
+++ b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/cgen/CustomModeController.java
@@ -103,8 +103,8 @@ public class CustomModeController extends GeneratorController {
                 cgenConfiguration.getTemplate(), cgenConfiguration.getRootPath());
         String superTemplateName = getApplication().getCodeTemplateManager().getNameByPath(
                 cgenConfiguration.getSuperTemplate(), cgenConfiguration.getRootPath());
-        String path = cgenConfiguration.getRootPath().resolve(Paths.get(cgenConfiguration.getTemplate())).toString();
-        String superPath = cgenConfiguration.getRootPath().resolve(Paths.get(cgenConfiguration.getSuperTemplate())).toString();
+        String path = cgenConfiguration.getRootPath().resolve(Paths.get(cgenConfiguration.getTemplate())).normalize().toString();
+        String superPath = cgenConfiguration.getRootPath().resolve(Paths.get(cgenConfiguration.getSuperTemplate())).normalize().toString();
         if(templateName == null && superTemplateName == null) {
             view.getSubclassTemplate().setItem(null);
             view.getSuperclassTemplate().setItem(null);


Mime
View raw message