Skip to content

Commit

Permalink
removing null pointer exception by setting client options issue zingg…
Browse files Browse the repository at this point in the history
  • Loading branch information
vikasgupta78 committed Apr 23, 2024
1 parent bd48ac9 commit 96477dd
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions common/client/src/main/java/zingg/common/client/Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -93,18 +93,20 @@ public IZinggFactory getZinggFactory() throws InstantiationException, IllegalAcc
public void setZingg(IArguments args, ClientOptions options) throws Exception{
IZinggFactory zf = getZinggFactory();
try{
setZingg(zf.get(ZinggOptions.getByValue(options.get(ClientOptions.PHASE).value.trim())));
setZingg(zf.get(ZinggOptions.getByValue(options.get(ClientOptions.PHASE).value.trim())),options);
}
catch(Exception e) {
e.printStackTrace();
//e.printStackTrace();
LOG.info("invoking python phase via peekModel");
//set default
setZingg(zf.get(ZinggOptions.getByValue(ZinggOptions.PEEK_MODEL.getName())));
setZingg(zf.get(ZinggOptions.getByValue(ZinggOptions.PEEK_MODEL.getName())),options);
}
}


public void setZingg(IZingg<S,D,R,C> zingg) {
public void setZingg(IZingg<S,D,R,C> zingg, ClientOptions options) {
this.zingg = zingg;
this.zingg.setClientOptions(options);
}

public void buildAndSetArguments(IArguments args, ClientOptions options) {
Expand Down

0 comments on commit 96477dd

Please sign in to comment.