This commit is contained in:
Lee moon soo 2016-02-07 10:42:51 +09:00
parent 58e5f917a4
commit 1d1638c27e
2 changed files with 3 additions and 1 deletions

View file

@ -75,7 +75,7 @@ public class NoteInterpreterLoader {
}
private String getInterpreterGroupKey(InterpreterSetting setting) {
if (setting.getOption().isPerNoteSession()) {
if (!setting.getOption().isPerNoteSession()) {
return SHARED_SESSION;
} else {
return noteId;

View file

@ -101,10 +101,12 @@ public class NoteInterpreterLoaderTest {
NoteInterpreterLoader loaderA = new NoteInterpreterLoader(factory);
loaderA.setNoteId("noteA");
loaderA.setInterpreters(factory.getDefaultInterpreterSettingList());
loaderA.getInterpreterSettings().get(0).getOption().setPerNoteSession(true);
NoteInterpreterLoader loaderB = new NoteInterpreterLoader(factory);
loaderB.setNoteId("noteB");
loaderB.setInterpreters(factory.getDefaultInterpreterSettingList());
loaderB.getInterpreterSettings().get(0).getOption().setPerNoteSession(true);
// interpreters are not created before accessing it
assertNull(loaderA.getInterpreterSettings().get(0).getInterpreterGroup().get("noteA"));