From 2c655c0d8750d92d4c8a3656ad81d4f3dae3f072 Mon Sep 17 00:00:00 2001 From: duandingyang <1621424380@qq.com> Date: Mon, 17 Oct 2016 15:56:00 +0800 Subject: [PATCH] remove scala.Option nullOption = scala.Option.apply(null); this cause error : NullPointException --- example/src/main/java/example/JavaOllieWrapper.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/example/src/main/java/example/JavaOllieWrapper.java b/example/src/main/java/example/JavaOllieWrapper.java index ca17439..311d215 100644 --- a/example/src/main/java/example/JavaOllieWrapper.java +++ b/example/src/main/java/example/JavaOllieWrapper.java @@ -22,8 +22,13 @@ public class JavaOllieWrapper { public JavaOllieWrapper() throws MalformedURLException { // initialize MaltParser - scala.Option nullOption = scala.Option.apply(null); - maltParser = new MaltParser(new File(MALT_PARSER_FILENAME).toURI().toURL(), nullOption); + // scala.Option nullOption = scala.Option.apply(null); + // maltParser = new MaltParser(new File(MALT_PARSER_FILENAME).toURI().toURL(), nullOption); + + // initialize Ollie + // ollie = new Ollie(); + // initialize MaltParser + maltParser = new MaltParser(new File(MALT_PARSER_FILENAME)); // initialize Ollie ollie = new Ollie();