2 Replies Latest reply on Apr 18, 2002 4:40 AM by 62967

    JAvTranslate falls over when query has multiple spaces

    62967
      The JAvTranslate function posted in the sample code section
      for Oracle text that converts standard web search syntax to
      Oracle text syntax is just what I have been looking for
      (after struggling somewhat trying to write my own).

      Trouble is, the JAvTranslate seems a little buggy. Use a
      search string with two adjacent spaces eg, "+dog -cat"
      and it falls over with;

      java.lang.StringIndexOutOfBoundsException: String index out of range: 0
      at java.lang.String.charAt(String.java:499)
      at AvQuery.processString(AvQuery:80)
      at AvQuery.translate(AvQuery:19)

      Can any java programmers suggest a quick fix?

      Harris.