|
From: <caw...@us...> - 2007-06-12 16:18:46
|
Revision: 2605
http://svn.sourceforge.net/rubyeclipse/?rev=2605&view=rev
Author: cawilliams
Date: 2007-06-12 09:18:42 -0700 (Tue, 12 Jun 2007)
Log Message:
-----------
try to avoid null pointer
Modified Paths:
--------------
trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/util/CharOperation.java
Modified: trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/util/CharOperation.java
===================================================================
--- trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/util/CharOperation.java 2007-06-12 15:37:53 UTC (rev 2604)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/util/CharOperation.java 2007-06-12 16:18:42 UTC (rev 2605)
@@ -1495,6 +1495,7 @@
}
public static int lastIndexOf(String toBeFound, char[] typePart) {
+ if (typePart == null || typePart.length == 0) return -1;
return new String(typePart).lastIndexOf(toBeFound);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|