public Boolean fetchGit(final Map obj) {
Boolean taskStatus = false;
new Thread(new Runnable() {
@Override
public void run() {
try {
fetchGitThread(obj);
} catch (Exception ex) {
Logger.getLogger(GitTask.class.getName()).log(Level.SEVERE, null, ex);
}
}
}).start();
return true;
}
Like in this code what if I caught an exemption. I'm not able to return anything form void run and can't use taskStatus variable. Please advice me here.