corba/src/share/classes/com/sun/corba/se/impl/orbutil/ORBUtility.java
Print this page
rev 502 : 8000631: Restrict access to class constructor
Reviewed-by: alanb, ahgross
*** 1,7 ****
/*
! * Copyright (c) 2000, 2009, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 158,206 ****
}
return ORBUtility.readSystemException(in);
}
/**
! * Creates the correct ValueHandler for the given ORB,
! * querying ORBVersion information. If the ORB or
! * ORBVersion is null, gets the ValueHandler from
! * Util.createValueHandler.
*/
! public static ValueHandler createValueHandler(ORB orb) {
!
! if (orb == null)
! return Util.createValueHandler();
!
! ORBVersion version = orb.getORBVersion();
!
! if (version == null)
! return Util.createValueHandler();
!
! if (version.equals(ORBVersionFactory.getOLD()))
! return new ValueHandlerImpl_1_3();
! if (version.equals(ORBVersionFactory.getNEW()))
! return new ValueHandlerImpl_1_3_1();
!
return Util.createValueHandler();
}
/**
- * Returns true if the given ORB could accurately be determined to be a
- * Kestrel or earlier ORB. Note: If passed the ORBSingleton, this will return
- * false.
- */
- public static boolean isLegacyORB(ORB orb)
- {
- try {
- ORBVersion currentORB = orb.getORBVersion();
- return currentORB.equals( ORBVersionFactory.getOLD() ) ;
- } catch (SecurityException se) {
- return false;
- }
- }
-
- /**
* Returns true if it was accurately determined that the remote ORB is
* a foreign (non-JavaSoft) ORB. Note: If passed the ORBSingleton, this
* will return false.
*/
public static boolean isForeignORB(ORB orb)
--- 158,174 ----
}
return ORBUtility.readSystemException(in);
}
/**
! * Return default ValueHandler
*/
! public static ValueHandler createValueHandler() {
return Util.createValueHandler();
}
/**
* Returns true if it was accurately determined that the remote ORB is
* a foreign (non-JavaSoft) ORB. Note: If passed the ORBSingleton, this
* will return false.
*/
public static boolean isForeignORB(ORB orb)