From: Julian R. <jro...@gm...> - 2021-07-16 07:42:14
|
Hello again, Please find a fix for this problem attached in the file PredChecker.java. More precisely this is the PredChecker.java found in .\code\typechecker\typechecker-z\src\main\java\net\sourceforge\czt\typecheck\z\. My solution is a try..catch block around the cast. I have tested this fix by building a new czt.jar and executing that with my original test input. Please see attached 'proof of fix.txt' which shows executions using both the release czt.jar (results in crash) and separately my own build (results in useful output). I have also re-attached my original test input - the content has errors which the tool should report. @Anthony: While I have downloaded the source files, I'm not sure how to build zwordtools. But you would need to include the new PredChecker.class file in cztinterface.jar I think you said you can't build czt currently (maybe my post to czt-devel last week helps with that), so I can send you the PredChecker.class file if you want to test it and can complete a build of zwt from there. There is a different unguarded cast in the typechecker-oz\PredChecker.java, and that should be tested. I think the typechecker-circus and typechecker-zeves versions of PredChecker.java do not have this problem. With thanks, julian |