Potential Bug ?

Komal
2005-12-08
2013-04-25
  • Komal
    Komal
    2005-12-08

    I was testing the Jazzy JTextComponentSpellCheckExample (Jazzy 0.5.2 as well as an earlier version).  When I delete the first character in the textpane and invoke the "Spell" buton, I get the following trace

    java.lang.NullPointerException
            at com.swabunga.spell.engine.DoubleMeta.transform(Unknown Source)
            at com.swabunga.spell.engine.SpellDictionaryASpell.getCode(Unknown Sourc
    e)
            at com.swabunga.spell.engine.SpellDictionaryHashMap.isCorrect(Unknown So
    urce)
            at com.swabunga.spell.event.SpellChecker.isCorrect(Unknown Source)
            at com.swabunga.spell.event.SpellChecker.checkSpelling(Unknown Source)
            at com.swabunga.spell.swing.JTextComponentSpellChecker.spellCheck(Unknow
    n Source)
            at com.swabunga.spell.examples.JTextComponentSpellCheckExample$SpellThre
    ad.run(Unknown Source)

    If I delete any other place, there are no errors and the spell check works like a charm.

    Please help

    Thanks
    Komal

     
    • Hi Komal.
      I've been investigating this problem and I have found the same problem. But I get another exception from the getNextWordStart in the DocumentWordTokenizer class are you sure your Exception is from the current 0.5.2 code?

      Anyway I have made an attempt to solve this problem in the current code and this fix is now in CVS. Please try it out to make sure I haven't stupidly broken anything else (I have ofcourse tested it myself but you never know).

      Hope this will help you
      Robert