From c867b31b5db33091d96182cffe923e7f14e3be7e Mon Sep 17 00:00:00 2001 From: cascade Date: Mon, 9 Feb 2004 11:22:16 +0000 Subject: [PATCH] 5082,5083 Some corrections and improvements in WOK Java extractor.cdl,cxx,h,java,edl need wok modification --- src/CPPJini/CPPJini_Template.edl | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/CPPJini/CPPJini_Template.edl b/src/CPPJini/CPPJini_Template.edl index bc975ab..053850a 100755 --- a/src/CPPJini/CPPJini_Template.edl +++ b/src/CPPJini/CPPJini_Template.edl @@ -23,9 +23,9 @@ $ $ $package %Interface; $ -$import jcas.Object; +$import jcas.Transient; $ -$public class Standard_Transient extends jcas.Object { +$public class Standard_Transient extends jcas.Transient { $ $ static { $ System.loadLibrary("%LibName"); @@ -363,8 +363,12 @@ $ $%ClassName* the_%ArgName = (%ClassName*) jcas_GetHandle(env,%ArgName); $if ( the_%ArgName == NULL ) { $ -$ the_%ArgName = new %ClassName (); -$ jcas_SetHandle ( env, %ArgName, the_%ArgName ); +$ // The following assumes availability of the default constructor (what may not +$ // always be the case). Therefore explicit exception is thrown if the null +$ // object has been passed. +$ // the_%ArgName = new %ClassName (); +$ // jcas_SetHandle ( env, %ArgName, the_%ArgName ); +$ jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value"); $ $} // end if @end; -- 2.39.5