Skip to content

Problem with closing RAMDictionary. #3

@Kleanthi

Description

@Kleanthi

Here is my code:

String wordNetFolder = System.getProperty("user.dir") + "/src/main/resources/wordnet/dict/";
File exFile = new File(wordNetFolder + "JWI_Export_.wn");
IRAMDictionary dictionary;
dictionary = new RAMDictionary(dictionaryFolder);
dictionary.setLoadPolicy(ILoadPolicy.IMMEDIATE_LOAD);
try {
    dictionary.open();
    dictionary.export(new FileOutputStream(exFile));
    dictionary.close();
} catch (IOException e1) {
    e1.printStackTrace();
}

When I do
assert(dictionary.isOpen() == false);

I get java.lang.AssertionError because the dictionary seems to still be open.
Why is this happening?

I am using the 2.4.0 version.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions