Read only archive ; use https://github.com/JacORB/JacORB/issues for new issues

Bug 101

Summary: Holder classes are generated and used incorrectly
Product: JacORB Reporter: Edward Scott <eas>
Component: IDL compilerAssignee: Steve Osselton <steve>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 1.4 beta 2   
Hardware: All   
OS: other   

Description Edward Scott 2002-02-25 13:13:26 UTC
The following interface from the FT IDL illustrates the problem.

   interface GenericFactory
   {
      typedef any FactoryCreationId;
      Object create_object(in TypeId type_id, in Criteria the_criteria, out
FactoryCreationId factory_creation_id) raises (NoFactory, ObjectNotCreated,
InvalidCriteria, InvalidProperty, CannotMeetCriteria);
      void delete_object(in FactoryCreationId factory_creation_id) raises
(ObjectNotFound);
   };

The above IDL generates a FactoryCreationIdHolder class and uses it in
the create_object method signature for the out parameter. The Java to
IDL spec states:

   Typedefs for types that are neither arrays nor sequences are "unwound"
   to their original type until a simple IDL type or user-defined IDL
   type (of the non typedef variety) is encountered.

   Holder classes are generated for sequence and array typedefs only. The
   "unwound" type s Holder class is used for the other cases.

Hence org.omg.CORBA.AnyHolder should be used in this case.
Comment 1 Steve Osselton 2002-02-25 16:27:04 UTC
Updated IDL compiler not to generate Holders for typedef'd anys and use
AnyHolder instead.