Skip to content

Defining aspell dictionary? #1

Description

@NinaMargrethe

Hi! First I must apologize if this is not a good way to contact you. I hope you can help me anyway. :)

Edited this issue, to not create a lot of issues.

I am getting a NullPointerException on

SpellChecker.checkCurrent() :217
SpellChecker.check() : 251
SpellChecker.checkSpell() : 148, 143
MessageModel.getMessage() : 1162

My MessageModel.getMessage() looks like this:

public Message getMessage(){
   if(message.getText()!=null && !message.getText().equals("")) {
        checker.checkSpell(message.getText());
    }
     return message;
}

And I define my dictionary like this:

private SpellDictionary dict;
private final SpellChecker checker = new SpellChecker(dict);
private void initDict() {
    try {
        dict = new OpenOfficeSpellDictionary(new ZipFile("aspell-nb-0.50.1-0.tar.bz2"));
    } catch (Exception e) {
        log.debug(e);
    }
}

I am wondering if it may be something wrong with initiating the dictionary that gives the NullPointerException, as I tried

checker.checkSpell("Hei foo");

with the same result.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions