Bug 605417 - StringIndexOutOfBoundsException thrown if script contains the word 'function'
StringIndexOutOfBoundsException thrown if script contains the word 'function'
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: eclipse-shelled (Show other bugs)
13
i686 Linux
low Severity high
: ---
: ---
Assigned To: Alexander Kurtakov
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-06-17 17:20 EDT by Jim Fischer
Modified: 2010-07-22 07:28 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-07-22 07:28:06 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jim Fischer 2010-06-17 17:20:43 EDT
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 17:24:36 EDT
Typo: Steps to Reproduce: Step #3: Change 'try.bash' to 'test.bash'.
Comment 2 Alexander Kurtakov 2010-07-22 07:28:06 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.