Read only archive ; use https://github.com/JacORB/JacORB/issues for new issues
Bug 101 - Holder classes are generated and used incorrectly
Summary: Holder classes are generated and used incorrectly
Status: RESOLVED FIXED
Alias: None
Product: JacORB
Classification: Unclassified
Component: IDL compiler (show other bugs)
Version: 1.4 beta 2
Hardware: All other
: P2 normal
Assignee: Steve Osselton
URL:
Depends on:
Blocks:
 
Reported: 2002-02-25 13:13 UTC by Edward Scott
Modified: 2002-02-25 16:27 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.