Bug 605417

Summary: StringIndexOutOfBoundsException thrown if script contains the word 'function'
Product: [Fedora] Fedora Reporter: Jim Fischer <fischerjd>
Component: eclipse-shelledAssignee: Alexander Kurtakov <akurtako>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: low    
Version: 13CC: akurtako, mat.booth
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-07-22 11:28:06 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jim Fischer 2010-06-17 21:20:43 UTC
Description of problem:

Assume you have a shell script 'test.bash' that has the word 'function' in it, or any variation of the word function (e.g., functionality). If the shelled plugin is installed and you try to open 'test.bash' with Eclipse, the open fails; instead, Eclipse displays the error message "Could not open the editor: Editor could not be initialized." Clicking on the "Details" button shows that Java is throwing a out-of-bounds string index exception:

java.lang.StringIndexOutOfBoundsException: String index out of range: <-#>
   ...

If I uninstall the shelled plugin, Eclipse successfully opens the file 'test.bash' for editing in a text editor.


Version-Release number of selected component (if applicable):

eclipse-platform-3.5.2-1.fc13.i686
eclipse-shelled-2.0.0-0.M2.1.fc13.noarch


How reproducible:

100% of the time.


Steps to Reproduce:

1. Create a text file named 'test.bash' and place the word 'function' into that file (or any derivation of the word 'function', e.g., 'functionality'):

   $ echo function > test.bash

2. Install the eclipse-shelled plugin:

   # yum install eclipse-shelled

3. Start Eclipse and attempt to open the file 'try.bash'.

  
Actual results:

File open fails as described above in section "Description of problem".


Expected results:

File open succeeds; the file is opened for editing in a text editor.


Additional info:

None.

Comment 1 Jim Fischer 2010-06-17 21:24:36 UTC
Typo: Steps to Reproduce: Step #3: Change 'try.bash' to 'test.bash'.

Comment 2 Alexander Kurtakov 2010-07-22 11:28:06 UTC
This problem is fixed in rawhide with the new ShellEd milestone. But it requires new dltk 2.0 which also requires Eclipse 3.6 and all these are available in rawhide only.