Update of /cvsroot/openorb/PersistentStateService/src/main/org/openorb/pss/connector/memory In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26843/src/main/org/openorb/pss/connector/memory Modified Files: MemoryCatalog.java MemorySession.java MemoryWrapper.java Log Message: Renamed "enum" variables to allow compilation on JDK 1.5 Index: MemoryCatalog.java =================================================================== RCS file: /cvsroot/openorb/PersistentStateService/src/main/org/openorb/pss/connector/memory/MemoryCatalog.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- MemoryCatalog.java 10 Feb 2004 21:19:16 -0000 1.6 +++ MemoryCatalog.java 19 Nov 2004 22:40:29 -0000 1.7 @@ -144,7 +144,7 @@ public java.lang.Object find_by_pid( byte[] the_pid ) throws org.omg.CosPersistentState.NotFound { - java.util.Enumeration enum = _home_incarnations.elements(); + java.util.Enumeration enumeration = _home_incarnations.elements(); org.openorb.pss.connector.memory.PersistentObjectHome object_home = null; @@ -154,9 +154,9 @@ byte [] short_pid = org.openorb.pss.connector.memory.PIDFactory.pid_to_short_pid( the_pid ); - while ( enum.hasMoreElements() ) + while ( enumeration.hasMoreElements() ) { - object_home = ( org.openorb.pss.connector.memory.PersistentObjectHome ) enum.nextElement(); + object_home = ( org.openorb.pss.connector.memory.PersistentObjectHome ) enumeration.nextElement(); org.openorb.pss.connector.PID home_pid = object_home.getPID(); @@ -182,7 +182,7 @@ public org.omg.CosPersistentState.StorageObjectRef find_ref_by_pid( byte [] the_pid ) throws org.omg.CosPersistentState.NotFound { - java.util.Enumeration enum = _home_incarnations.elements(); + java.util.Enumeration enumeration = _home_incarnations.elements(); org.openorb.pss.connector.memory.PersistentObjectHome object_home = null; @@ -192,9 +192,9 @@ byte [] short_pid = org.openorb.pss.connector.memory.PIDFactory.pid_to_short_pid( the_pid ); - while ( enum.hasMoreElements() ) + while ( enumeration.hasMoreElements() ) { - object_home = ( org.openorb.pss.connector.memory.PersistentObjectHome ) enum.nextElement(); + object_home = ( org.openorb.pss.connector.memory.PersistentObjectHome ) enumeration.nextElement(); org.openorb.pss.connector.PID home_pid = object_home.getPID(); Index: MemorySession.java =================================================================== RCS file: /cvsroot/openorb/PersistentStateService/src/main/org/openorb/pss/connector/memory/MemorySession.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- MemorySession.java 10 Feb 2004 21:19:16 -0000 1.8 +++ MemorySession.java 19 Nov 2004 22:40:29 -0000 1.9 @@ -202,11 +202,11 @@ public org.omg.CosPersistentState.StorageHomeBase find_home_base( org.openorb.pss.connector.PID pid ) { org.openorb.pss.connector.PID p = null; - java.util.Enumeration enum = _home_incarnations.keys(); + java.util.Enumeration enumeration = _home_incarnations.keys(); - while ( enum.hasMoreElements() ) + while ( enumeration.hasMoreElements() ) { - p = ( org.openorb.pss.connector.PID ) enum.nextElement(); + p = ( org.openorb.pss.connector.PID ) enumeration.nextElement(); if ( p.is_same_catalog( pid.catalog_value() ) ) { Index: MemoryWrapper.java =================================================================== RCS file: /cvsroot/openorb/PersistentStateService/src/main/org/openorb/pss/connector/memory/MemoryWrapper.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- MemoryWrapper.java 10 Feb 2004 21:19:16 -0000 1.10 +++ MemoryWrapper.java 19 Nov 2004 22:40:29 -0000 1.11 @@ -768,9 +768,7 @@ public void map_storagehome( java.io.File into, org.openorb.pss.compiler.reflect.psdlStorageHome sh ) { java.io.PrintWriter file = org.openorb.compiler.idl.util.tools.createNewFile( into, sh.idlName() ); - java.util.Enumeration enum = null; org.openorb.pss.compiler.reflect.psdlStorageType st = sh.homeFor(); - org.openorb.pss.compiler.reflect.psdlState state = null; // File header @@ -1178,7 +1176,7 @@ private void map_factories( org.openorb.pss.compiler.reflect.psdlStorageHome sh, java.io.PrintWriter file ) { org.openorb.pss.compiler.reflect.psdlFactory [] factories = mappable_factories( sh ); - java.util.Enumeration enum = null; + java.util.Enumeration enumeration = null; org.openorb.pss.compiler.reflect.psdlState state = null; if ( factories.length != 0 ) @@ -1193,11 +1191,11 @@ file.print( " " + factories[ i ].idlName() + "( " ); boolean first = true; - enum = factories[ i ].content(); + enumeration = factories[ i ].content(); - while ( enum.hasMoreElements() ) + while ( enumeration.hasMoreElements() ) { - state = ( org.openorb.pss.compiler.reflect.psdlState ) enum.nextElement(); + state = ( org.openorb.pss.compiler.reflect.psdlState ) enumeration.nextElement(); if ( !first ) file.print( ", " ); @@ -1225,11 +1223,11 @@ file.println( " register_type_incarnation( obj );" ); - enum = factories[ i ].content(); + enumeration = factories[ i ].content(); - while ( enum.hasMoreElements() ) + while ( enumeration.hasMoreElements() ) { - state = ( org.openorb.pss.compiler.reflect.psdlState ) enum.nextElement(); + state = ( org.openorb.pss.compiler.reflect.psdlState ) enumeration.nextElement(); file.println( " obj." + state.idlName() + "( " + state.idlName() + " );" ); } @@ -1336,7 +1334,7 @@ private void map_keys( org.openorb.pss.compiler.reflect.psdlStorageHome sh, java.io.PrintWriter file ) { org.openorb.pss.compiler.reflect.psdlKey [] keys = mappable_keys( sh ); - java.util.Enumeration enum = null; + java.util.Enumeration enumeration = null; org.openorb.pss.compiler.reflect.psdlState state = null; if ( keys.length != 0 ) @@ -1350,17 +1348,17 @@ file.print( " find_by_" + keys[ i ].idlName() + "( " ); - enum = keys[ i ].content(); + enumeration = keys[ i ].content(); - while ( enum.hasMoreElements() ) + while ( enumeration.hasMoreElements() ) { - state = ( org.openorb.pss.compiler.reflect.psdlState ) enum.nextElement(); + state = ( org.openorb.pss.compiler.reflect.psdlState ) enumeration.nextElement(); tools.javaType( m_pcp, state.stateType(), file ); file.print( " " + state.idlName() ); - if ( enum.hasMoreElements() ) + if ( enumeration.hasMoreElements() ) file.print( ", " ); } @@ -1379,11 +1377,11 @@ tools.javaType( m_pcp, ( ( org.openorb.pss.compiler.reflect.psdlAbstractStorageHome ) keys[ i ].idlDefinedIn() ).managed(), file ); file.println( " ) it.next();" ); - enum = keys[ i ].content(); + enumeration = keys[ i ].content(); - while ( enum.hasMoreElements() ) + while ( enumeration.hasMoreElements() ) { - state = ( org.openorb.pss.compiler.reflect.psdlState ) enum.nextElement(); + state = ( org.openorb.pss.compiler.reflect.psdlState ) enumeration.nextElement(); file.print( " " ); tools.javaType( m_pcp, state.stateType(), file ); @@ -1412,17 +1410,17 @@ file.print( "Ref find_ref_by_" + keys[ i ].idlName() + "( " ); - enum = keys[ i ].content(); + enumeration = keys[ i ].content(); - while ( enum.hasMoreElements() ) + while ( enumeration.hasMoreElements() ) { - state = ( org.openorb.pss.compiler.reflect.psdlState ) enum.nextElement(); + state = ( org.openorb.pss.compiler.reflect.psdlState ) enumeration.nextElement(); tools.javaType( m_pcp, state.stateType(), file ); file.print( " " + state.idlName() ); - if ( enum.hasMoreElements() ) + if ( enumeration.hasMoreElements() ) file.print( ", " ); } @@ -1440,11 +1438,11 @@ tools.javaType( m_pcp, ( ( org.openorb.pss.compiler.reflect.psdlAbstractStorageHome ) keys[ i ].idlDefinedIn() ).managed(), file ); file.println( " ) it.next();" ); - enum = keys[ i ].content(); + enumeration = keys[ i ].content(); - while ( enum.hasMoreElements() ) + while ( enumeration.hasMoreElements() ) { - state = ( org.openorb.pss.compiler.reflect.psdlState ) enum.nextElement(); + state = ( org.openorb.pss.compiler.reflect.psdlState ) enumeration.nextElement(); file.print( " " ); tools.javaType( m_pcp, state.stateType(), file ); @@ -1548,15 +1546,15 @@ file.print( " if ( " ); - java.util.Enumeration enum = key.content(); + java.util.Enumeration enumeration = key.content(); - while ( enum.hasMoreElements() ) + while ( enumeration.hasMoreElements() ) { - state = ( org.openorb.pss.compiler.reflect.psdlState ) enum.nextElement(); + state = ( org.openorb.pss.compiler.reflect.psdlState ) enumeration.nextElement(); file.print( " ( " + map_condition( state.stateType(), "_tmp_" + state.idlName(), state.idlName() ) + " ) " ); - if ( enum.hasMoreElements() ) + if ( enumeration.hasMoreElements() ) file.print( "&& " ); } @@ -1569,7 +1567,7 @@ private String map_condition( org.openorb.compiler.idl.reflect.idlObject item, String tmp_name, String state_name ) { String condition = ""; - java.util.Enumeration enum = null; + java.util.Enumeration enumeration = null; switch ( item.idlType() ) { @@ -1586,15 +1584,15 @@ case idlType.STRUCT : org.openorb.compiler.idl.reflect.idlStruct st = ( org.openorb.compiler.idl.reflect.idlStruct ) item; - enum = st.members(); + enumeration = st.members(); - while ( enum.hasMoreElements() ) + while ( enumeration.hasMoreElements() ) { - org.openorb.compiler.idl.reflect.idlStructMember member = ( org.openorb.compiler.idl.reflect.idlStructMember ) enum.nextElement(); + org.openorb.compiler.idl.reflect.idlStructMember member = ( org.openorb.compiler.idl.reflect.idlStructMember ) enumeration.nextElement(); condition = condition + "(" + map_condition( member.internal(), tmp_name + "." + member.idlName(), state_name + "." + member.idlName() ) + " )"; - if ( enum.hasMoreElements() ) + if ( enumeration.hasMoreElements() ) condition = condition + " && "; } @@ -1602,12 +1600,12 @@ case idlType.VALUE : org.openorb.compiler.idl.reflect.idlValue val = ( org.openorb.compiler.idl.reflect.idlValue ) item; - enum = val.filter( org.openorb.compiler.idl.reflect.idlType.STATE ); + enumeration = val.filter( org.openorb.compiler.idl.reflect.idlType.STATE ); boolean first = true; - while ( enum.hasMoreElements() ) + while ( enumeration.hasMoreElements() ) { - org.openorb.compiler.idl.reflect.idlState state = ( org.openorb.compiler.idl.reflect.idlState ) enum.nextElement(); + org.openorb.compiler.idl.reflect.idlState state = ( org.openorb.compiler.idl.reflect.idlState ) enumeration.nextElement(); if ( state.isPublic() ) { |