|
From: <caw...@us...> - 2007-02-26 13:08:21
|
Revision: 2037
http://svn.sourceforge.net/rubyeclipse/?rev=2037&view=rev
Author: cawilliams
Date: 2007-02-26 05:08:18 -0800 (Mon, 26 Feb 2007)
Log Message:
-----------
avoid outofboundsexception when the path is empty/doesn't produce any tokens in getTypesInImport
Modified Paths:
--------------
trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/codeassist/RubyElementRequestor.java
Modified: trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/codeassist/RubyElementRequestor.java
===================================================================
--- trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/codeassist/RubyElementRequestor.java 2007-02-26 12:19:47 UTC (rev 2036)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/codeassist/RubyElementRequestor.java 2007-02-26 13:08:18 UTC (rev 2037)
@@ -97,7 +97,8 @@
List<String> tokens = new ArrayList<String>();
while(tokenizer.hasMoreTokens()) {
tokens.add(tokenizer.nextToken());
- }
+ }
+ if (tokens.isEmpty()) return new ArrayList<IType>();
String name = tokens.remove(tokens.size() - 1) + RUBY_FILE_EXTENSION;
String[] pckgs = (String[]) tokens.toArray(new String[tokens.size()]);
ISourceFolder folder = root.getSourceFolder(pckgs);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|