|
From: Richard G C. <pim...@us...> - 2004-09-10 16:56:49
|
Update of /cvsroot/openorb/OpenORB/src/main/org/openorb/orb/pi In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18089/OpenORB/src/main/org/openorb/orb/pi Modified Files: CurrentEntry.java Log Message: cleaned up code Index: CurrentEntry.java =================================================================== RCS file: /cvsroot/openorb/OpenORB/src/main/org/openorb/orb/pi/CurrentEntry.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- CurrentEntry.java 10 Feb 2004 21:02:51 -0000 1.4 +++ CurrentEntry.java 10 Sep 2004 16:56:29 -0000 1.5 @@ -9,6 +9,10 @@ package org.openorb.orb.pi; import org.omg.CORBA.Any; +import org.omg.CORBA.ORB; +import org.omg.CORBA.TCKind; +import org.omg.PortableInterceptor.CurrentOperations; +import org.omg.PortableInterceptor.InvalidSlot; /** * Slot table for PICurrent. @@ -16,25 +20,25 @@ * @author Chris Wood * @version $Revision$ $Date$ */ -class CurrentEntry - implements org.omg.PortableInterceptor.CurrentOperations, Cloneable +class CurrentEntry implements CurrentOperations, Cloneable { + /** The ORB object used by this table. */ + private final ORB m_orb; + /** The number of slots stored in this table. */ - private int m_slots; + private final int m_slots; /** The slot table. */ - private Any [] m_table = null; + private Any [] m_table; /** The invocation context object. */ - private Object m_invocation_ctx = null; + private Object m_invocation_ctx; - /** The ORB object used by this table. */ - private org.omg.CORBA.ORB m_orb; /** * Constructor. */ - CurrentEntry( int slots, org.omg.CORBA.ORB orb ) + CurrentEntry( final int slots, final ORB orb ) { m_slots = slots; m_orb = orb; @@ -43,7 +47,7 @@ /** * Copy constructor. */ - CurrentEntry( CurrentEntry from ) + CurrentEntry( final CurrentEntry from ) { m_slots = from.m_slots; @@ -60,12 +64,11 @@ * @param id The slot id. * @return The data attached to the slot. */ - public org.omg.CORBA.Any get_slot( int id ) - throws org.omg.PortableInterceptor.InvalidSlot + public Any get_slot( final int id ) throws InvalidSlot { if ( id < 0 || id >= m_slots ) { - throw new org.omg.PortableInterceptor.InvalidSlot(); + throw new InvalidSlot(); } if ( m_table == null ) { @@ -74,8 +77,7 @@ if ( m_table[ id ] == null ) { m_table[ id ] = m_orb.create_any(); - m_table[ id ].type ( m_orb.get_primitive_tc( - org.omg.CORBA.TCKind.tk_null ) ); + m_table[ id ].type ( m_orb.get_primitive_tc( TCKind.tk_null ) ); } return m_table[ id ]; @@ -86,12 +88,11 @@ * @param id The slot id. * @param data The data to attach to the slot. */ - public void set_slot( int id, org.omg.CORBA.Any data ) - throws org.omg.PortableInterceptor.InvalidSlot + public void set_slot( final int id, final Any data ) throws InvalidSlot { if ( id < 0 || id >= m_slots ) { - throw new org.omg.PortableInterceptor.InvalidSlot(); + throw new InvalidSlot(); } if ( m_table == null ) { @@ -113,7 +114,7 @@ * Set the invocation context. * @param invocation_ctx The invocation context object. */ - public void set_invocation_ctx( Object invocation_ctx ) + public void set_invocation_ctx( final Object invocation_ctx ) { m_invocation_ctx = invocation_ctx; } |