try{
class_mon.enter();
if ( platform_manager == null ){
try{
if ( getPlatformType() == PlatformManager.PT_WINDOWS ){
platform_manager = org.gudy.azureus2.platform.win32.PlatformManagerImpl.getSingleton();
}else if( getPlatformType() == PlatformManager.PT_MACOSX ){
platform_manager = org.gudy.azureus2.platform.macosx.PlatformManagerImpl.getSingleton();
}else if( getPlatformType() == PlatformManager.PT_UNIX ){
platform_manager = org.gudy.azureus2.platform.unix.PlatformManagerImpl.getSingleton();
}
}catch( PlatformManagerException e ){
// exception will already have been logged
}catch( Throwable e ){
Debug.printStackTrace(e);
}
}
if ( platform_manager == null ){
platform_manager = org.gudy.azureus2.platform.dummy.PlatformManagerImpl.getSingleton();
}
return( platform_manager );
}finally{
class_mon.exit();
}