You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by re...@apache.org on 2014/11/29 23:01:34 UTC

svn commit: r1642478 - /uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/jcasgen/Jg.java

Author: rec
Date: Sat Nov 29 22:01:33 2014
New Revision: 1642478

URL: http://svn.apache.org/r1642478
Log:
[UIMA-4131] Limiting JCasGen scope fails in some cases

Modified:
    uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/jcasgen/Jg.java

Modified: uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/jcasgen/Jg.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/jcasgen/Jg.java?rev=1642478&r1=1642477&r2=1642478&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/jcasgen/Jg.java (original)
+++ uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/jcasgen/Jg.java Sat Nov 29 22:01:33 2014
@@ -323,7 +323,8 @@ public class Jg {
 
     gui = new GUI(this);
     gui.addWindowListener(new WindowAdapter() {
-      public void windowClosing(WindowEvent e) {
+      @Override
+    public void windowClosing(WindowEvent e) {
         Prefs.set(gui);
         waiter.finished();
       }
@@ -741,6 +742,16 @@ public class Jg {
         resolvedProjectPath = projectDirPath;
     }
     
+    // UIMA-4131 - Make sure that paths end in a slash so that "/my/project1" is not considered
+    // to be in the scope of "/my/project"
+    if (!tdPath.endsWith("/")) {
+        tdPath += "/";
+    }
+
+    if (!resolvedProjectPath.endsWith("/")) {
+        resolvedProjectPath += "/";
+    }
+
     boolean r = !tdPath.startsWith(resolvedProjectPath);
     if (r) {
       return true;