#177 java.lang.StringIndexOutOfBounds on a tricky file

closed-fixed
7
2003-05-23
2003-05-23
Anonymous
No

In drjava drjava-20030520-1527.jar
The problem arises when you try to open or save a file
that contains something like this:
--cut here-->
#import java.util.*;
#import java.io.*;

class bug interface<--end cut

The bug only occurs if the file ends with one of the
keywords the language uses to define classnames (ie in
java: class and interface) and no extra character after it.

The problem comes from
drjava.model.definitions.DefinitionsDocument.java and
it's an issue with how the classnames are detected in
getNextTopLevelClassName(DefinitionsDocument.java:2496).

In fact, it's not much of an issue since it doesn't
happen regularly and even a simple change (adding space
to the end) enables you to save the file.

--EBW.
eric.winnington@epfl.ch

Discussion

  • Nobody/Anonymous

    The file causing the error

     
  • Charles Reis

    Charles Reis - 2003-05-23
    • milestone: --> 5: Makes DrJ unstable
    • priority: 5 --> 7
    • assigned_to: nobody --> csreis
     
  • Charles Reis

    Charles Reis - 2003-05-23

    Logged In: YES
    user_id=429731

    Thanks, Eric-- we'll look at it right away.

    Charlie

     
  • Charles Reis

    Charles Reis - 2003-05-23
    • status: open --> closed
     
  • Charles Reis

    Charles Reis - 2003-05-23
    • status: closed --> closed-fixed
     
  • Charles Reis

    Charles Reis - 2003-05-23

    Logged In: YES
    user_id=429731

    This is fixed in the latest commit, and we'll include the
    fix in the next development release. Thanks for pointing it
    out.

    Charlie

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks