logo       

Nice/src/nice/tools/doc comment.nice,1.6,1.7: msg#00067

Subject: Nice/src/nice/tools/doc comment.nice,1.6,1.7
Update of /cvsroot/nice/Nice/src/nice/tools/doc
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11524/src/nice/tools/doc

Modified Files:
        comment.nice 
Log Message:
Fixed a bug whereby an @tag alone on a line would cause an uncaught 
IndexArrayOutOfBounds exception.


Index: comment.nice
===================================================================
RCS file: /cvsroot/nice/Nice/src/nice/tools/doc/comment.nice,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** comment.nice        4 Aug 2004 14:54:21 -0000       1.6
--- comment.nice        23 Jan 2005 15:22:36 -0000      1.7
***************
*** 107,114 ****
              if(line.charAt(0) == '@') {
                  //find the first space - this tells us the range of the tag
                  int index = line.indexOf(' ');
!                 String tag = line.substring(1, index); //skip the '@'
!                 String comment = line.substring(index+1); //+1 because we 
need to skip the space
!     
                  Node n = new Node(value: (tag, comment));
                  root.insert(n);
--- 107,123 ----
              if(line.charAt(0) == '@') {
                  //find the first space - this tells us the range of the tag
+                 //alternatively, there might be no space
                  int index = line.indexOf(' ');
!                 String tag, comment;
!                 if(index != -1 && index + 1 <= line.length()) {
!                     //skip the '@'
!                     tag = line.substring(1, index);
!                     //+1 because we need to skip the space
!                     comment = line.substring(index+1);
!                 }
!                 else {
!                     tag = line;
!                     comment = "";
!                 }
                  Node n = new Node(value: (tag, comment));
                  root.insert(n);



-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
science.linguis...    culture.sf.lite...    video.mplayer.c...    yellowdog.gener...    ietf.rfc822/199...    emacs.help/2002...    redhat.release....    kernel.speakup/...    java.openejb.de...    debian.devel.gt...    xfree86.newbie/...    bug-tracking.ma...    pam/2003-05/msg...    games.devel.ope...    user-groups.lin...    music.pancham/2...    network.mq.deve...    web.html.genera...    arklinux.bugs/2...    linux.ecasound/...    qnx.openqnx.dev...    org.user-groups...    file-systems.sf...    trustix.contrib...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe