Revision: 3173
          http://vexi.svn.sourceforge.net/vexi/?rev=3173&view=rev
Author:   clrg
Date:     2008-11-05 21:47:00 +0000 (Wed, 05 Nov 2008)

Log Message:
-----------
Fix obvious NPE code

Modified Paths:
--------------
    trunk/core/org.ibex.js/src/org/ibex/js/JSRegexp.jpp
    trunk/core/org.ibex.js/src_dev/org/ibex/js/RunJS.java

Modified: trunk/core/org.ibex.js/src/org/ibex/js/JSRegexp.jpp
===================================================================
--- trunk/core/org.ibex.js/src/org/ibex/js/JSRegexp.jpp 2008-11-05 21:46:41 UTC 
(rev 3172)
+++ trunk/core/org.ibex.js/src/org/ibex/js/JSRegexp.jpp 2008-11-05 21:47:00 UTC 
(rev 3173)
@@ -60,7 +60,7 @@
                     int start = global ? lastIndex : 0;
                     if(start < 0 || start >= s.length()) { lastIndex = 0; 
return null; }
                     GnuRegexp.REMatch match = re.getMatch(s,start);
-                    lastIndex = match != null ? s.length() : 
match.getEndIndex();
+                    lastIndex = match != null ? match.getEndIndex() : 
s.length();
                     return JSU.B(match != null);
                 }
                 case "toString": return JSU.S(args[0].coerceToString());

Modified: trunk/core/org.ibex.js/src_dev/org/ibex/js/RunJS.java
===================================================================
--- trunk/core/org.ibex.js/src_dev/org/ibex/js/RunJS.java       2008-11-05 
21:46:41 UTC (rev 3172)
+++ trunk/core/org.ibex.js/src_dev/org/ibex/js/RunJS.java       2008-11-05 
21:47:00 UTC (rev 3173)
@@ -229,7 +229,7 @@
                                        String s = JSU.toString(key);
                                        try {
                                                Fountain f = 
getFountainForFile(s);
-                                               if(f==null) throw new JSExn("No 
such file '"+f.canonical()+"'");
+                                               if (f==null) throw new 
JSExn("No such file '"+s+"'");
                                                return f;
                                        } catch (FileNotFoundException e) {
                                                throw new JSExn(e);


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Vexi-svn mailing list
Vexi-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vexi-svn

Reply via email to