Merge
authorlana
Thu, 23 Oct 2014 13:44:28 -0700
changeset 27193 db6241373358
parent 27175 2c33a5c73a2e (current diff)
parent 27192 a16236cd61d7 (diff)
child 27194 48c1741d0f2a
Merge
jdk/src/bsd/doc/man/extcheck.1
jdk/src/bsd/doc/man/ja/extcheck.1
jdk/src/java.base/share/native/libjava/Compiler.c
jdk/src/jdk.dev/share/classes/com/sun/tools/extcheck/ExtCheck.java
jdk/src/jdk.dev/share/classes/com/sun/tools/extcheck/Main.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/BerDecoder.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/BerEncoder.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/BerException.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/EnumRowStatus.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/Enumerated.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/ASCII_CharStream.README
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/ASCII_CharStream.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/AclEntryImpl.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/AclImpl.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/GroupImpl.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/Host.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/JDMAccess.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/JDMAclBlock.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/JDMAclItem.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/JDMCommunities.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/JDMCommunity.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/JDMEnterprise.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/JDMHost.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/JDMHostInform.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/JDMHostName.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/JDMHostTrap.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/JDMInformBlock.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/JDMInformCommunity.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/JDMInformInterestedHost.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/JDMInformItem.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/JDMIpAddress.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/JDMIpMask.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/JDMIpV6Address.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/JDMManagers.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/JDMNetMask.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/JDMNetMaskV6.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/JDMSecurityDefs.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/JDMTrapBlock.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/JDMTrapCommunity.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/JDMTrapInterestedHost.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/JDMTrapItem.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/JDMTrapNum.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/JJTParserState.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/NetMaskImpl.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/Node.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/OwnerImpl.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/ParseError.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/ParseException.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/Parser.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/Parser.jj
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/Parser.jjt
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/ParserConstants.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/ParserTokenManager.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/ParserTreeConstants.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/PermissionImpl.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/PrincipalImpl.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/README.update
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/SimpleNode.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/SnmpAcl.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/Token.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/TokenMgrError.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/package.html
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/InetAddressAcl.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/ServiceName.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpAckPdu.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpBadSecurityLevelException.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpCounter.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpCounter64.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpEngine.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpEngineFactory.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpEngineId.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpEngineParameters.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpGauge.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpInt.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpIpAddress.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpMessage.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpMsg.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpNull.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpOpaque.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpParams.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpPdu.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpPduBulk.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpPduBulkType.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpPduFactory.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpPduFactoryBER.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpPduRequest.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpPduRequestType.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpPduTrap.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpScopedPduBulk.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpScopedPduPacket.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpScopedPduRequest.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpSecurityException.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpSecurityParameters.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpStatusException.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpString.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpStringFixed.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpTooBigException.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpUnknownAccContrModelException.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpUnknownModelException.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpUnknownModelLcdException.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpUnknownMsgProcModelException.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpUnknownSecModelException.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpUnknownSubSystemException.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpUnsignedInt.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpUsmKeyHandler.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpV3Message.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpValue.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/ThreadContext.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/UserAcl.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/agent/AcmChecker.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/agent/LongList.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/agent/SnmpEntryOid.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/agent/SnmpErrorHandlerAgent.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/agent/SnmpGenericMetaServer.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/agent/SnmpGenericObjectServer.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/agent/SnmpIndex.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/agent/SnmpMib.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/agent/SnmpMibAgent.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/agent/SnmpMibAgentMBean.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/agent/SnmpMibEntry.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/agent/SnmpMibGroup.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/agent/SnmpMibHandler.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/agent/SnmpMibNode.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/agent/SnmpMibOid.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/agent/SnmpMibRequest.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/agent/SnmpMibRequestImpl.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/agent/SnmpMibSubRequest.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/agent/SnmpMibTable.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/agent/SnmpRequestTree.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/agent/SnmpStandardMetaServer.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/agent/SnmpStandardObjectServer.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/agent/SnmpTableCallbackHandler.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/agent/SnmpTableEntryFactory.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/agent/SnmpTableEntryNotification.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/agent/SnmpTableSupport.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/agent/SnmpUserDataFactory.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/agent/package.html
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/daemon/ClientHandler.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/daemon/CommunicationException.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/daemon/CommunicatorServer.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/daemon/CommunicatorServerMBean.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/daemon/SnmpAdaptorServer.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/daemon/SnmpAdaptorServerMBean.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/daemon/SnmpInformHandler.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/daemon/SnmpMibTree.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/daemon/SnmpRequestHandler.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/daemon/SnmpSubBulkRequestHandler.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/daemon/SnmpSubNextRequestHandler.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/daemon/SnmpSubRequestHandler.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/daemon/package.html
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/defaults/DefaultPaths.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/defaults/SnmpProperties.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/defaults/package.html
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/internal/SnmpAccessControlModel.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/internal/SnmpAccessControlSubSystem.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/internal/SnmpDecryptedPdu.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/internal/SnmpEngineImpl.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/internal/SnmpIncomingRequest.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/internal/SnmpIncomingResponse.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/internal/SnmpLcd.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/internal/SnmpModel.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/internal/SnmpModelLcd.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/internal/SnmpMsgProcessingModel.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/internal/SnmpMsgProcessingSubSystem.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/internal/SnmpOutgoingRequest.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/internal/SnmpSecurityCache.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/internal/SnmpSecurityModel.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/internal/SnmpSecuritySubSystem.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/internal/SnmpSubSystem.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/internal/SnmpTools.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/internal/package.html
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/mpm/SnmpMsgTranslator.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/mpm/package.html
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/package.html
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/tasks/Task.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/tasks/TaskServer.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/tasks/ThreadService.java
jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/tasks/package.html
jdk/src/jdk.snmp/share/classes/sun/management/snmp/AdaptorBootstrap.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvminstr/JVM_MANAGEMENT_MIB_IMPL.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvminstr/JvmClassLoadingImpl.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvminstr/JvmCompilationImpl.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvminstr/JvmMemGCEntryImpl.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvminstr/JvmMemGCTableMetaImpl.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvminstr/JvmMemManagerEntryImpl.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvminstr/JvmMemManagerTableMetaImpl.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvminstr/JvmMemMgrPoolRelEntryImpl.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvminstr/JvmMemMgrPoolRelTableMetaImpl.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvminstr/JvmMemPoolEntryImpl.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvminstr/JvmMemPoolTableMetaImpl.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvminstr/JvmMemoryImpl.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvminstr/JvmMemoryMetaImpl.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvminstr/JvmOSImpl.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvminstr/JvmRTBootClassPathEntryImpl.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvminstr/JvmRTBootClassPathTableMetaImpl.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvminstr/JvmRTClassPathEntryImpl.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvminstr/JvmRTClassPathTableMetaImpl.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvminstr/JvmRTInputArgsEntryImpl.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvminstr/JvmRTInputArgsTableMetaImpl.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvminstr/JvmRTLibraryPathEntryImpl.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvminstr/JvmRTLibraryPathTableMetaImpl.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvminstr/JvmRuntimeImpl.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvminstr/JvmRuntimeMetaImpl.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvminstr/JvmThreadInstanceEntryImpl.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvminstr/JvmThreadInstanceTableMetaImpl.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvminstr/JvmThreadingImpl.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvminstr/JvmThreadingMetaImpl.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvminstr/NotificationTarget.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvminstr/NotificationTargetImpl.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvminstr/README
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvminstr/package.html
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/EnumJvmClassesVerboseLevel.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/EnumJvmJITCompilerTimeMonitoring.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/EnumJvmMemManagerState.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/EnumJvmMemPoolCollectThreshdSupport.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/EnumJvmMemPoolState.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/EnumJvmMemPoolThreshdSupport.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/EnumJvmMemPoolType.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/EnumJvmMemoryGCCall.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/EnumJvmMemoryGCVerboseLevel.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/EnumJvmRTBootClassPathSupport.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/EnumJvmThreadContentionMonitoring.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/EnumJvmThreadCpuTimeMonitoring.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JVM_MANAGEMENT_MIB.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JVM_MANAGEMENT_MIBOidTable.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmClassLoadingMBean.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmClassLoadingMeta.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmCompilationMBean.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmCompilationMeta.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmMemGCEntryMBean.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmMemGCEntryMeta.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmMemGCTableMeta.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmMemManagerEntryMBean.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmMemManagerEntryMeta.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmMemManagerTableMeta.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmMemMgrPoolRelEntryMBean.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmMemMgrPoolRelEntryMeta.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmMemMgrPoolRelTableMeta.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmMemPoolEntryMBean.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmMemPoolEntryMeta.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmMemPoolTableMeta.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmMemoryMBean.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmMemoryMeta.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmOSMBean.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmOSMeta.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmRTBootClassPathEntryMBean.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmRTBootClassPathEntryMeta.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmRTBootClassPathTableMeta.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmRTClassPathEntryMBean.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmRTClassPathEntryMeta.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmRTClassPathTableMeta.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmRTInputArgsEntryMBean.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmRTInputArgsEntryMeta.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmRTInputArgsTableMeta.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmRTLibraryPathEntryMBean.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmRTLibraryPathEntryMeta.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmRTLibraryPathTableMeta.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmRuntimeMBean.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmRuntimeMeta.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmThreadInstanceEntryMBean.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmThreadInstanceEntryMeta.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmThreadInstanceTableMeta.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmThreadingMBean.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmThreadingMeta.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/package.html
jdk/src/jdk.snmp/share/classes/sun/management/snmp/package.html
jdk/src/jdk.snmp/share/classes/sun/management/snmp/util/JvmContextFactory.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/util/MibLogger.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/util/SnmpCachedData.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/util/SnmpListTableCache.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/util/SnmpLoadedClassData.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/util/SnmpNamedListTableCache.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/util/SnmpTableCache.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/util/SnmpTableHandler.java
jdk/src/jdk.snmp/share/classes/sun/management/snmp/util/package.html
jdk/src/linux/doc/man/extcheck.1
jdk/src/linux/doc/man/ja/extcheck.1
jdk/src/solaris/doc/sun/man/man1/extcheck.1
jdk/src/solaris/doc/sun/man/man1/ja/extcheck.1
jdk/test/com/sun/jmx/snmp/SnmpOidHashCode.java
jdk/test/com/sun/jmx/snmp/TimeTicksWrapping.java
jdk/test/com/sun/tools/extcheck/TestExtcheckArgs.java
jdk/test/com/sun/tools/extcheck/TestExtcheckArgs.sh
--- a/jdk/make/CreateJars.gmk	Thu Oct 23 11:19:25 2014 -0700
+++ b/jdk/make/CreateJars.gmk	Thu Oct 23 13:44:28 2014 -0700
@@ -111,6 +111,7 @@
 # This value should exclude types destined for jars other than rt.jar and resources.jar.
 # When building a Profile this value augments the profile specific exclusions
 RT_JAR_EXCLUDES += \
+    com/oracle/security/ucrypto \
     com/sun/codemodel \
     com/sun/crypto/provider \
     com/sun/istack/internal/tools \
@@ -476,7 +477,6 @@
     com/sun/tools/doclint \
     com/sun/tools/example/debug/expr \
     com/sun/tools/example/debug/tty \
-    com/sun/tools/extcheck \
     com/sun/tools/hat \
     com/sun/tools/internal/jxc \
     com/sun/tools/internal/jxc/ap \
--- a/jdk/make/CreateSecurityJars.gmk	Thu Oct 23 11:19:25 2014 -0700
+++ b/jdk/make/CreateSecurityJars.gmk	Thu Oct 23 13:44:28 2014 -0700
@@ -169,27 +169,25 @@
 ##########################################################################################
 
 ifeq ($(OPENJDK_TARGET_OS), solaris)
-  ifndef OPENJDK
 
-    UCRYPTO_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/ucrypto.jar
-    UCRYPTO_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/jce/unsigned/ucrypto.jar
+  UCRYPTO_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/ucrypto.jar
+  UCRYPTO_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/jce/unsigned/ucrypto.jar
 
-    $(eval $(call SetupArchive,BUILD_UCRYPTO_JAR, , \
-        SRCS := $(JDK_OUTPUTDIR)/modules/jdk.crypto.ucrypto, \
-        SUFFIXES := .class, \
-        INCLUDES := com/oracle/security/ucrypto, \
-        JAR := $(UCRYPTO_JAR_UNSIGNED), \
-        MANIFEST := $(JCE_MANIFEST), \
-        SKIP_METAINF := true))
+  $(eval $(call SetupArchive,BUILD_UCRYPTO_JAR, , \
+      SRCS := $(JDK_OUTPUTDIR)/modules/jdk.crypto.ucrypto, \
+      SUFFIXES := .class, \
+      INCLUDES := com/oracle/security/ucrypto, \
+      JAR := $(UCRYPTO_JAR_UNSIGNED), \
+      MANIFEST := $(JCE_MANIFEST), \
+      SKIP_METAINF := true))
 
-    $(UCRYPTO_JAR_UNSIGNED): $(JCE_MANIFEST)
+  $(UCRYPTO_JAR_UNSIGNED): $(JCE_MANIFEST)
 
-    $(UCRYPTO_JAR_DST): $(UCRYPTO_JAR_UNSIGNED)
+  $(UCRYPTO_JAR_DST): $(UCRYPTO_JAR_UNSIGNED)
 	$(install-file)
 
-    TARGETS += $(UCRYPTO_JAR_UNSIGNED) $(UCRYPTO_JAR_DST)
+  TARGETS += $(UCRYPTO_JAR_UNSIGNED) $(UCRYPTO_JAR_DST)
 
-  endif
 endif
 
 all: $(TARGETS)
--- a/jdk/make/Images.gmk	Thu Oct 23 11:19:25 2014 -0700
+++ b/jdk/make/Images.gmk	Thu Oct 23 13:44:28 2014 -0700
@@ -94,7 +94,6 @@
 ifeq ($(PROFILE), )
   NOT_JRE_BIN_FILES := \
       appletviewer$(EXE_SUFFIX) \
-      extcheck$(EXE_SUFFIX) \
       idlj$(EXE_SUFFIX) \
       jar$(EXE_SUFFIX) \
       jarsigner$(EXE_SUFFIX) \
@@ -326,7 +325,6 @@
   JDK_MAN_PAGES = \
       $(JRE_MAN_PAGES) \
       appletviewer.1 \
-      extcheck.1 \
       idlj.1 \
       jar.1 \
       jarsigner.1 \
--- a/jdk/make/copy/Copy-java.base.gmk	Thu Oct 23 11:19:25 2014 -0700
+++ b/jdk/make/copy/Copy-java.base.gmk	Thu Oct 23 13:44:28 2014 -0700
@@ -170,10 +170,7 @@
 
 ifeq ($(OPENJDK_TARGET_OS), windows)
   POLICY_SRC_LIST += $(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/conf/security/java.policy
-endif
-ifndef OPENJDK
-  # if $(OPENJDK_TARGET_OS) is windows or solaris
-  ifneq ($(findstring $(OPENJDK_TARGET_OS), windows solaris), )
+  ifndef OPENJDK
     POLICY_SRC_LIST += $(JDK_TOPDIR)/src/closed/java.base/$(OPENJDK_TARGET_OS)/conf/security/java.policy
   endif
 endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/make/copy/Copy-jdk.crypto.ucrypto.gmk	Thu Oct 23 13:44:28 2014 -0700
@@ -0,0 +1,49 @@
+#
+# Copyright (c) 2014, 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
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+include CopyCommon.gmk
+
+################################################################################
+
+ifeq ($(OPENJDK_TARGET_OS), solaris)
+
+  UCRYPTO_CFG_SRC := $(JDK_TOPDIR)/src/jdk.crypto.ucrypto/solaris/conf/security/ucrypto-solaris.cfg
+  UCRYPTO_CFG_DST := $(JDK_OUTPUTDIR)/lib/security/ucrypto-solaris.cfg
+
+  $(UCRYPTO_CFG_DST): $(UCRYPTO_CFG_SRC)
+	$(call install-file)
+
+  SECURITY_UCRYPTO_CONF_FILES += $(UCRYPTO_CFG_DST)
+
+endif
+
+################################################################################
+
+jdk.crypto.ucrypto: $(SECURITY_UCRYPTO_CONF_FILES)
+
+all: jdk.crypto.ucrypto
+
+.PHONY: all jdk.crypto.ucrypto
+
--- a/jdk/make/launcher/Launcher-jdk.dev.gmk	Thu Oct 23 11:19:25 2014 -0700
+++ b/jdk/make/launcher/Launcher-jdk.dev.gmk	Thu Oct 23 13:44:28 2014 -0700
@@ -25,9 +25,6 @@
 
 include LauncherCommon.gmk
 
-$(eval $(call SetupLauncher,extcheck, \
-    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.extcheck.Main"$(COMMA) }'))
-
 $(eval $(call SetupLauncher,jar, \
     -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.jar.Main"$(COMMA) }'))
 
--- a/jdk/make/lib/CoreLibraries.gmk	Thu Oct 23 11:19:25 2014 -0700
+++ b/jdk/make/lib/CoreLibraries.gmk	Thu Oct 23 13:44:28 2014 -0700
@@ -169,6 +169,7 @@
         -framework Foundation \
         -framework Security -framework SystemConfiguration, \
     LDFLAGS_SUFFIX_windows := -export:winFileHandleOpen -export:handleLseek \
+        -export:getLastErrorString \
         jvm.lib $(BUILD_LIBFDLIBM) $(WIN_VERIFY_LIB) \
         shell32.lib delayimp.lib -DELAYLOAD:shell32.dll \
         advapi32.lib, \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/make/lib/Lib-jdk.crypto.ucrypto.gmk	Thu Oct 23 13:44:28 2014 -0700
@@ -0,0 +1,62 @@
+#
+# Copyright (c) 2014, 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
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+include $(SPEC)
+include $(JDK_TOPDIR)/make/lib/LibCommon.gmk
+
+################################################################################
+
+ifeq ($(OPENJDK_TARGET_OS), solaris)
+
+  LIBJ2UCRYPTO_SRC := $(JDK_TOPDIR)/src/jdk.crypto.ucrypto/solaris/native/libj2ucrypto
+
+  $(eval $(call SetupNativeCompilation,BUILD_LIBJ2UCRYPTO, \
+      LIBRARY := j2ucrypto, \
+      OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
+      SRC := $(LIBJ2UCRYPTO_SRC), \
+      LANG := C, \
+      OPTIMIZATION := LOW, \
+      CFLAGS := $(CFLAGS_JDKLIB) \
+          $(addprefix -I, $(LIBJ2UCRYPTO_SRC)), \
+      MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libj2ucrypto/mapfile-vers, \
+      LDFLAGS := $(LDFLAGS_JDKLIB), \
+      LDFLAGS_SUFFIX := $(LIBDL), \
+      LDFLAGS_SUFFIX_solaris := -lc, \
+      OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libj2ucrypto, \
+      DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+
+  $(BUILD_LIBJ2UCRYPTO): $(BUILD_LIBJAVA)
+
+  SECURITY_UCRYPTO_LIBRARIES += $(BUILD_LIBJ2UCRYPTO)
+
+endif
+
+################################################################################
+
+jdk.crypto.ucrypto: $(SECURITY_UCRYPTO_LIBRARIES)
+
+all: jdk.crypto.ucrypto
+
+.PHONY: all jdk.crypto.ucrypto
--- a/jdk/make/mapfiles/libjava/mapfile-vers	Thu Oct 23 11:19:25 2014 -0700
+++ b/jdk/make/mapfiles/libjava/mapfile-vers	Thu Oct 23 13:44:28 2014 -0700
@@ -129,13 +129,11 @@
 		Java_java_lang_ClassLoader_defineClass1;
 		Java_java_lang_ClassLoader_defineClass2;
 		Java_java_lang_ClassLoader_findLoadedClass0;
-		Java_java_lang_ClassLoader_resolveClass0;
 		Java_java_lang_ClassLoader_00024NativeLibrary_find;
 		Java_java_lang_ClassLoader_00024NativeLibrary_load;
 		Java_java_lang_ClassLoader_00024NativeLibrary_unload;
 		Java_java_lang_ClassLoader_00024NativeLibrary_findBuiltinLib;
 		Java_java_lang_ClassLoader_registerNatives;
-		Java_java_lang_Compiler_registerNatives;
 		Java_java_lang_Double_longBitsToDouble;
 		Java_java_lang_Double_doubleToRawLongBits;
 		Java_java_lang_reflect_Proxy_defineClass0;
@@ -196,8 +194,6 @@
 		Java_java_lang_Runtime_gc;
 		Java_java_lang_Runtime_runFinalization0;
 		Java_java_lang_Runtime_totalMemory;
-		Java_java_lang_Runtime_traceInstructions;
-		Java_java_lang_Runtime_traceMethodCalls;
                 Java_java_lang_Runtime_availableProcessors;
 		Java_java_lang_SecurityManager_classDepth;
 		Java_java_lang_SecurityManager_classLoaderDepth0;
@@ -280,6 +276,8 @@
 		
                 # ZipFile.c needs this one
 		throwFileNotFoundException;
+                # zip_util.c needs this one
+		getLastErrorString;
 
 	# Outcalls from libjvm done using dlsym().
 
--- a/jdk/make/mapfiles/libnet/mapfile-vers	Thu Oct 23 11:19:25 2014 -0700
+++ b/jdk/make/mapfiles/libnet/mapfile-vers	Thu Oct 23 13:44:28 2014 -0700
@@ -110,6 +110,8 @@
 		NET_Bind;
 		NET_MapSocketOption;
 		NET_Wait;
+		NET_EnableFastTcpLoopback;
+		NET_ThrowNew;
                 ipv6_available;
                 initInetAddressIDs;
 
--- a/jdk/src/bsd/doc/man/extcheck.1	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,91 +0,0 @@
-'\" t
-.\"  Copyright (c) 1998, 2013, 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.
-.\"
-.\" This code is distributed in the hope that it will be useful, but WITHOUT
-.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-.\" version 2 for more details (a copy is included in the LICENSE file that
-.\" accompanied this code).
-.\"
-.\" You should have received a copy of the GNU General Public License version
-.\" 2 along with this work; if not, write to the Free Software Foundation,
-.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-.\"
-.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-.\" or visit www.oracle.com if you need additional information or have any
-.\" questions.
-.\"
-.\"     Arch: generic
-.\"     Software: JDK 8
-.\"     Date: 21 November 2013
-.\"     SectDesc: Basic Tools
-.\"     Title: extcheck.1
-.\"
-.if n .pl 99999
-.TH extcheck 1 "21 November 2013" "JDK 8" "Basic Tools"
-.\" -----------------------------------------------------------------
-.\" * Define some portability stuff
-.\" -----------------------------------------------------------------
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.\" http://bugs.debian.org/507673
-.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.ie \n(.g .ds Aq \(aq
-.el       .ds Aq '
-.\" -----------------------------------------------------------------
-.\" * set default formatting
-.\" -----------------------------------------------------------------
-.\" disable hyphenation
-.nh
-.\" disable justification (adjust text to left margin only)
-.ad l
-.\" -----------------------------------------------------------------
-.\" * MAIN CONTENT STARTS HERE *
-.\" -----------------------------------------------------------------
-
-.SH NAME    
-extcheck \- Detects version conflicts between a target Java Archive (JAR) file and currently installed extension JAR files\&.
-.SH SYNOPSIS    
-.sp     
-.nf     
-
-\fBextcheck\fR [\fIoptions\fR] \fItargetfile\&.jar\fR
-.fi     
-.sp     
-.TP     
-\fIoptions\fR
-The command-line options\&. See Options\&.
-.TP     
-\fItargetfile\&.jar\fR
-The target JAR file against which the currently installed extension JAR files are compared to detect version conflicts\&.
-.SH DESCRIPTION    
-The \f3extcheck\fR command checks a specified JAR file for title and version conflicts with any extensions installed in the Java SE SDK\&. Before installing an extension, you can use this utility to see whether the same or a more recent version of the extension is already installed\&.
-.PP
-The \f3extcheck\fR command compares the Specification-title and Specification-version headers in the manifest of the \f3targetfile\&.jar\fR file against the corresponding headers in all JAR files currently installed in the extension directory\&. By default, the extension directory is \f3jre/lib/ext\fR on Oracle Solaris and \f3\ejre\elib\eext\fR on Windows\&. The \f3extcheck\fR command compares version numbers in the same way as the \f3java\&.lang\&.Package\&.isCompatibleWith\fR method\&.
-.PP
-If no conflict is detected, then the return code is 0\&.
-.PP
-If the manifest of any JAR file in the extensions directory has the same \f3Specification-title\fR and the same or a newer \f3Specification-version\fR number, then a non-zero error code is returned\&. A non-zero error code is also returned when \f3targetfile\&.jar\fR does not have the \f3Specification-title\fR or \f3Specification-version\fR attributes in its manifest file\&.
-.SH OPTIONS    
-.TP
--verbose
-.br
-Lists JAR files in the extension directory as they are checked\&. Additionally, manifest attributes of the target JAR file and any conflicting JAR files are also reported\&.
-.TP
--J\fIoption\fR
-.br
-Passes \fIoption\fR to the Java Virtual Machine (JVM), where option is one of the options described on the reference page for the Java launcher\&. For example, \f3-J-Xms48m\fR sets the startup memory to 48 MB\&. See java(1)\&.
-.SH SEE\ ALSO    
-.TP 0.2i    
-\(bu
-jar(1)
-.RE
-.br
-'pl 8.5i
-'bp
--- a/jdk/src/bsd/doc/man/ja/extcheck.1	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +0,0 @@
-." Copyright (c) 1998, 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.
-."
-." This code is distributed in the hope that it will be useful, but WITHOUT
-." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-." FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-." version 2 for more details (a copy is included in the LICENSE file that
-." accompanied this code).
-."
-." You should have received a copy of the GNU General Public License version
-." 2 along with this work; if not, write to the Free Software Foundation,
-." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-."
-." Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-." or visit www.oracle.com if you need additional information or have any
-." questions.
-."
-.TH extcheck 1 "07 May 2011"
-
-.LP
--- a/jdk/src/java.base/macosx/native/include/jvm_md.h	Thu Oct 23 11:19:25 2014 -0700
+++ b/jdk/src/java.base/macosx/native/include/jvm_md.h	Thu Oct 23 13:44:28 2014 -0700
@@ -70,7 +70,6 @@
 #define JVM_O_O_APPEND   O_APPEND
 #define JVM_O_EXCL       O_EXCL
 #define JVM_O_CREAT      O_CREAT
-#define JVM_O_DELETE     0x10000
 
 /* Signals */
 
--- a/jdk/src/java.base/share/classes/java/lang/ClassLoader.java	Thu Oct 23 11:19:25 2014 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/ClassLoader.java	Thu Oct 23 13:44:28 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2014 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
@@ -956,11 +956,11 @@
      * @see  #defineClass(String, byte[], int, int)
      */
     protected final void resolveClass(Class<?> c) {
-        resolveClass0(c);
+        if (c == null) {
+            throw new NullPointerException();
+        }
     }
 
-    private native void resolveClass0(Class<?> c);
-
     /**
      * Finds a class with the specified <a href="#name">binary name</a>,
      * loading it if necessary.
--- a/jdk/src/java.base/share/classes/java/lang/Compiler.java	Thu Oct 23 11:19:25 2014 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/Compiler.java	Thu Oct 23 13:44:28 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2014, 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
@@ -47,40 +47,6 @@
 public final class Compiler  {
     private Compiler() {}               // don't make instances
 
-    private static native void initialize();
-
-    private static native void registerNatives();
-
-    static {
-        registerNatives();
-        java.security.AccessController.doPrivileged(
-            new java.security.PrivilegedAction<Void>() {
-                public Void run() {
-                    boolean loaded = false;
-                    String jit = System.getProperty("java.compiler");
-                    if ((jit != null) && (!jit.equals("NONE")) &&
-                        (!jit.equals("")))
-                    {
-                        try {
-                            System.loadLibrary(jit);
-                            initialize();
-                            loaded = true;
-                        } catch (UnsatisfiedLinkError e) {
-                            System.err.println("Warning: JIT compiler \"" +
-                              jit + "\" not found. Will use interpreter.");
-                        }
-                    }
-                    String info = System.getProperty("java.vm.info");
-                    if (loaded) {
-                        System.setProperty("java.vm.info", info + ", " + jit);
-                    } else {
-                        System.setProperty("java.vm.info", info + ", nojit");
-                    }
-                    return null;
-                }
-            });
-    }
-
     /**
      * Compiles the specified class.
      *
@@ -93,7 +59,9 @@
      * @throws  NullPointerException
      *          If {@code clazz} is {@code null}
      */
-    public static native boolean compileClass(Class<?> clazz);
+    public static boolean compileClass(Class<?> clazz) {
+        return false;
+    }
 
     /**
      * Compiles all classes whose name matches the specified string.
@@ -107,7 +75,9 @@
      * @throws  NullPointerException
      *          If {@code string} is {@code null}
      */
-    public static native boolean compileClasses(String string);
+    public static boolean compileClasses(String string) {
+        return false;
+    }
 
     /**
      * Examines the argument type and its fields and perform some documented
@@ -122,15 +92,17 @@
      * @throws  NullPointerException
      *          If {@code any} is {@code null}
      */
-    public static native Object command(Object any);
+    public static Object command(Object any) {
+        return null;
+    }
 
     /**
      * Cause the Compiler to resume operation.
      */
-    public static native void enable();
+    public static void enable() { }
 
     /**
      * Cause the Compiler to cease operation.
      */
-    public static native void disable();
+    public static void disable() { }
 }
--- a/jdk/src/java.base/share/classes/java/lang/Runtime.java	Thu Oct 23 11:19:25 2014 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/Runtime.java	Thu Oct 23 13:44:28 2014 -0700
@@ -730,7 +730,7 @@
      * @param   on   <code>true</code> to enable instruction tracing;
      *               <code>false</code> to disable this feature.
      */
-    public native void traceInstructions(boolean on);
+    public void traceInstructions(boolean on) { }
 
     /**
      * Enables/Disables tracing of method calls.
@@ -748,7 +748,7 @@
      * @param   on   <code>true</code> to enable instruction tracing;
      *               <code>false</code> to disable this feature.
      */
-    public native void traceMethodCalls(boolean on);
+    public void traceMethodCalls(boolean on) { }
 
     /**
      * Loads the native library specified by the filename argument.  The filename
--- a/jdk/src/java.base/share/classes/java/security/ProtectionDomain.java	Thu Oct 23 11:19:25 2014 -0700
+++ b/jdk/src/java.base/share/classes/java/security/ProtectionDomain.java	Thu Oct 23 13:44:28 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -25,6 +25,7 @@
 
 package java.security;
 
+import java.lang.ref.WeakReference;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Enumeration;
@@ -447,24 +448,37 @@
     /**
      * Used for storing ProtectionDomains as keys in a Map.
      */
-    final class Key {}
+    final static class Key {}
+
+    // A cache of ProtectionDomains and their Permissions
+    private static class PDCache implements ProtectionDomainCache {
+        // We must wrap the PermissionCollection in a WeakReference as there
+        // are some PermissionCollections which contain strong references
+        // back to a ProtectionDomain and otherwise would never be removed
+        // from the WeakHashMap
+        private final Map<Key, WeakReference<PermissionCollection>>
+            map = new WeakHashMap<>();
+
+        @Override
+        public synchronized void put(ProtectionDomain pd,
+                                     PermissionCollection pc) {
+            map.put(pd == null ? null : pd.key, new WeakReference<>(pc));
+        }
+
+        @Override
+        public synchronized PermissionCollection get(ProtectionDomain pd) {
+            WeakReference<PermissionCollection> ref =
+                map.get(pd == null ? null : pd.key);
+            return ref == null ? null : ref.get();
+        }
+    }
 
     static {
         SharedSecrets.setJavaSecurityProtectionDomainAccess(
             new JavaSecurityProtectionDomainAccess() {
+                @Override
                 public ProtectionDomainCache getProtectionDomainCache() {
-                    return new ProtectionDomainCache() {
-                        private final Map<Key, PermissionCollection> map =
-                            Collections.synchronizedMap
-                                (new WeakHashMap<Key, PermissionCollection>());
-                        public void put(ProtectionDomain pd,
-                            PermissionCollection pc) {
-                            map.put((pd == null ? null : pd.key), pc);
-                        }
-                        public PermissionCollection get(ProtectionDomain pd) {
-                            return pd == null ? map.get(null) : map.get(pd.key);
-                        }
-                    };
+                    return new PDCache();
                 }
             });
     }
--- a/jdk/src/java.base/share/classes/sun/net/www/protocol/http/HttpURLConnection.java	Thu Oct 23 11:19:25 2014 -0700
+++ b/jdk/src/java.base/share/classes/sun/net/www/protocol/http/HttpURLConnection.java	Thu Oct 23 13:44:28 2014 -0700
@@ -1046,7 +1046,7 @@
             try {
                 URI uri = ParseUtil.toURI(url);
                 if (uri != null) {
-                    cachedResponse = cacheHandler.get(uri, getRequestMethod(), requests.getHeaders(EXCLUDE_HEADERS));
+                    cachedResponse = cacheHandler.get(uri, getRequestMethod(), getUserSetHeaders().getHeaders());
                     if ("https".equalsIgnoreCase(uri.getScheme())
                         && !(cachedResponse instanceof SecureCacheResponse)) {
                         cachedResponse = null;
--- a/jdk/src/java.base/share/classes/sun/nio/ch/Net.java	Thu Oct 23 11:19:25 2014 -0700
+++ b/jdk/src/java.base/share/classes/sun/nio/ch/Net.java	Thu Oct 23 13:44:28 2014 -0700
@@ -50,30 +50,8 @@
     // set to true if exclusive binding is on for Windows
     private static final boolean exclusiveBind;
 
-    static {
-        int availLevel = isExclusiveBindAvailable();
-        if (availLevel >= 0) {
-            String exclBindProp =
-                java.security.AccessController.doPrivileged(
-                    new PrivilegedAction<String>() {
-                        @Override
-                        public String run() {
-                            return System.getProperty(
-                                    "sun.net.useExclusiveBind");
-                        }
-                    });
-            if (exclBindProp != null) {
-                exclusiveBind = exclBindProp.length() == 0 ?
-                        true : Boolean.parseBoolean(exclBindProp);
-            } else if (availLevel == 1) {
-                exclusiveBind = true;
-            } else {
-                exclusiveBind = false;
-            }
-        } else {
-            exclusiveBind = false;
-        }
-    }
+    // set to true if the fast tcp loopback should be enabled on Windows
+    private static final boolean fastLoopback;
 
     // -- Miscellaneous utilities --
 
@@ -391,6 +369,23 @@
         }
     }
 
+    public static boolean isFastTcpLoopbackRequested() {
+        String loopbackProp = java.security.AccessController.doPrivileged(
+            new PrivilegedAction<String>() {
+                @Override
+                public String run() {
+                    return System.getProperty("jdk.net.useFastTcpLoopback");
+                }
+            });
+        boolean enable;
+        if ("".equals(loopbackProp)) {
+            enable = true;
+        } else {
+            enable = Boolean.parseBoolean(loopbackProp);
+        }
+        return enable;
+    }
+
     // -- Socket operations --
 
     private static native boolean isIPv6Available0();
@@ -413,15 +408,16 @@
         throws IOException {
         boolean preferIPv6 = isIPv6Available() &&
             (family != StandardProtocolFamily.INET);
-        return IOUtil.newFD(socket0(preferIPv6, stream, false));
+        return IOUtil.newFD(socket0(preferIPv6, stream, false, fastLoopback));
     }
 
     static FileDescriptor serverSocket(boolean stream) {
-        return IOUtil.newFD(socket0(isIPv6Available(), stream, true));
+        return IOUtil.newFD(socket0(isIPv6Available(), stream, true, fastLoopback));
     }
 
     // Due to oddities SO_REUSEADDR on windows reuse is ignored
-    private static native int socket0(boolean preferIPv6, boolean stream, boolean reuse);
+    private static native int socket0(boolean preferIPv6, boolean stream, boolean reuse,
+                                      boolean fastLoopback);
 
     public static void bind(FileDescriptor fd, InetAddress addr, int port)
         throws IOException
@@ -634,4 +630,30 @@
         POLLCONN   = pollconnValue();
     }
 
+    static {
+        int availLevel = isExclusiveBindAvailable();
+        if (availLevel >= 0) {
+            String exclBindProp =
+                java.security.AccessController.doPrivileged(
+                    new PrivilegedAction<String>() {
+                        @Override
+                        public String run() {
+                            return System.getProperty(
+                                    "sun.net.useExclusiveBind");
+                        }
+                    });
+            if (exclBindProp != null) {
+                exclusiveBind = exclBindProp.length() == 0 ?
+                        true : Boolean.parseBoolean(exclBindProp);
+            } else if (availLevel == 1) {
+                exclusiveBind = true;
+            } else {
+                exclusiveBind = false;
+            }
+        } else {
+            exclusiveBind = false;
+        }
+
+        fastLoopback = isFastTcpLoopbackRequested();
+    }
 }
--- a/jdk/src/java.base/share/conf/security/java.policy	Thu Oct 23 11:19:25 2014 -0700
+++ b/jdk/src/java.base/share/conf/security/java.policy	Thu Oct 23 13:44:28 2014 -0700
@@ -25,6 +25,18 @@
         permission java.security.AllPermission;
 };
 
+grant codeBase "file:${java.home}/lib/ext/ucrypto.jar" {
+        permission java.lang.RuntimePermission "accessClassInPackage.sun.security.*";
+        permission java.lang.RuntimePermission "accessClassInPackage.sun.nio.ch";
+        permission java.lang.RuntimePermission "loadLibrary.j2ucrypto";
+        // need "com.oracle.security.ucrypto.debug" for debugging
+        permission java.util.PropertyPermission "*", "read";
+        permission java.security.SecurityPermission "putProviderProperty.OracleUcrypto";
+        permission java.security.SecurityPermission "clearProviderProperties.OracleUcrypto";
+        permission java.security.SecurityPermission "removeProviderProperty.OracleUcrypto";
+        permission java.io.FilePermission "${java.home}/lib/security/ucrypto-solaris.cfg", "read";
+};
+
 grant codeBase "file:${java.home}/lib/ext/sunec.jar" {
         permission java.lang.RuntimePermission "accessClassInPackage.sun.security.*";
         permission java.lang.RuntimePermission "loadLibrary.sunec";
--- a/jdk/src/java.base/share/native/include/jvm.h	Thu Oct 23 11:19:25 2014 -0700
+++ b/jdk/src/java.base/share/native/include/jvm.h	Thu Oct 23 13:44:28 2014 -0700
@@ -111,19 +111,11 @@
 JNIEXPORT jobject JNICALL
 JVM_InitProperties(JNIEnv *env, jobject p);
 
-/*
- * java.io.File
- */
-JNIEXPORT void JNICALL
-JVM_OnExit(void (*func)(void));
 
 /*
  * java.lang.Runtime
  */
 JNIEXPORT void JNICALL
-JVM_Exit(jint code);
-
-JNIEXPORT void JNICALL
 JVM_Halt(jint code);
 
 JNIEXPORT void JNICALL
@@ -146,12 +138,6 @@
 JNIEXPORT jlong JNICALL
 JVM_MaxObjectInspectionAge(void);
 
-JNIEXPORT void JNICALL
-JVM_TraceInstructions(jboolean on);
-
-JNIEXPORT void JNICALL
-JVM_TraceMethodCalls(jboolean on);
-
 JNIEXPORT jlong JNICALL
 JVM_TotalMemory(void);
 
@@ -177,12 +163,6 @@
 JVM_IsSupportedJNIVersion(jint version);
 
 /*
- * java.lang.Float and java.lang.Double
- */
-JNIEXPORT jboolean JNICALL
-JVM_IsNaN(jdouble d);
-
-/*
  * java.lang.Throwable
  */
 JNIEXPORT void JNICALL
@@ -195,30 +175,6 @@
 JVM_GetStackTraceElement(JNIEnv *env, jobject throwable, jint index);
 
 /*
- * java.lang.Compiler
- */
-JNIEXPORT void JNICALL
-JVM_InitializeCompiler (JNIEnv *env, jclass compCls);
-
-JNIEXPORT jboolean JNICALL
-JVM_IsSilentCompiler(JNIEnv *env, jclass compCls);
-
-JNIEXPORT jboolean JNICALL
-JVM_CompileClass(JNIEnv *env, jclass compCls, jclass cls);
-
-JNIEXPORT jboolean JNICALL
-JVM_CompileClasses(JNIEnv *env, jclass cls, jstring jname);
-
-JNIEXPORT jobject JNICALL
-JVM_CompilerCommand(JNIEnv *env, jclass compCls, jobject arg);
-
-JNIEXPORT void JNICALL
-JVM_EnableCompiler(JNIEnv *env, jclass compCls);
-
-JNIEXPORT void JNICALL
-JVM_DisableCompiler(JNIEnv *env, jclass compCls);
-
-/*
  * java.lang.Thread
  */
 JNIEXPORT void JNICALL
@@ -304,25 +260,9 @@
  * java.io.ObjectInputStream
  */
 JNIEXPORT jobject JNICALL
-JVM_AllocateNewObject(JNIEnv *env, jobject obj, jclass currClass,
-                      jclass initClass);
-
-JNIEXPORT jobject JNICALL
-JVM_AllocateNewArray(JNIEnv *env, jobject obj, jclass currClass,
-                     jint length);
-
-JNIEXPORT jobject JNICALL
 JVM_LatestUserDefinedLoader(JNIEnv *env);
 
 /*
- * This function has been deprecated and should not be considered
- * part of the specified JVM interface.
- */
-JNIEXPORT jclass JNICALL
-JVM_LoadClass0(JNIEnv *env, jobject obj, jclass currClass,
-               jstring currClassName);
-
-/*
  * java.lang.reflect.Array
  */
 JNIEXPORT jint JNICALL
@@ -373,11 +313,6 @@
 JNIEXPORT jclass JNICALL
 JVM_FindPrimitiveClass(JNIEnv *env, const char *utf);
 
-/*
- * Link the class
- */
-JNIEXPORT void JNICALL
-JVM_ResolveClass(JNIEnv *env, jclass cls);
 
 /*
  * Find a class from a boot class loader. Returns NULL if class not found.
@@ -1101,43 +1036,6 @@
  PART 3: I/O and Network Support
  ************************************************************************/
 
-/* Note that the JVM IO functions are expected to return JVM_IO_ERR
- * when there is any kind of error. The caller can then use the
- * platform specific support (e.g., errno) to get the detailed
- * error info.  The JVM_GetLastErrorString procedure may also be used
- * to obtain a descriptive error string.
- */
-#define JVM_IO_ERR  (-1)
-
-/* For interruptible IO. Returning JVM_IO_INTR indicates that an IO
- * operation has been disrupted by Thread.interrupt. There are a
- * number of technical difficulties related to interruptible IO that
- * need to be solved. For example, most existing programs do not handle
- * InterruptedIOExceptions specially, they simply treat those as any
- * IOExceptions, which typically indicate fatal errors.
- *
- * There are also two modes of operation for interruptible IO. In the
- * resumption mode, an interrupted IO operation is guaranteed not to
- * have any side-effects, and can be restarted. In the termination mode,
- * an interrupted IO operation corrupts the underlying IO stream, so
- * that the only reasonable operation on an interrupted stream is to
- * close that stream. The resumption mode seems to be impossible to
- * implement on Win32 and Solaris. Implementing the termination mode is
- * easier, but it's not clear that's the right semantics.
- *
- * Interruptible IO is not supported on Win32.It can be enabled/disabled
- * using a compile-time flag on Solaris. Third-party JVM ports do not
- * need to implement interruptible IO.
- */
-#define JVM_IO_INTR (-2)
-
-/* Write a string into the given buffer, in the platform's local encoding,
- * that describes the most recent system-level error to occur in this thread.
- * Return the length of the string or zero if no error occurred.
- */
-JNIEXPORT jint JNICALL
-JVM_GetLastErrorString(char *buf, int len);
-
 /*
  * Convert a pathname into native format.  This function does syntactic
  * cleanup, such as removing redundant separator characters.  It modifies
@@ -1147,150 +1045,6 @@
 JVM_NativePath(char *);
 
 /*
- * JVM I/O error codes
- */
-#define JVM_EEXIST       -100
-
-/*
- * Open a file descriptor. This function returns a negative error code
- * on error, and a non-negative integer that is the file descriptor on
- * success.
- */
-JNIEXPORT jint JNICALL
-JVM_Open(const char *fname, jint flags, jint mode);
-
-/*
- * Close a file descriptor. This function returns -1 on error, and 0
- * on success.
- *
- * fd        the file descriptor to close.
- */
-JNIEXPORT jint JNICALL
-JVM_Close(jint fd);
-
-/*
- * Read data from a file decriptor into a char array.
- *
- * fd        the file descriptor to read from.
- * buf       the buffer where to put the read data.
- * nbytes    the number of bytes to read.
- *
- * This function returns -1 on error, and 0 on success.
- */
-JNIEXPORT jint JNICALL
-JVM_Read(jint fd, char *buf, jint nbytes);
-
-/*
- * Write data from a char array to a file decriptor.
- *
- * fd        the file descriptor to read from.
- * buf       the buffer from which to fetch the data.
- * nbytes    the number of bytes to write.
- *
- * This function returns -1 on error, and 0 on success.
- */
-JNIEXPORT jint JNICALL
-JVM_Write(jint fd, char *buf, jint nbytes);
-
-/*
- * Returns the number of bytes available for reading from a given file
- * descriptor
- */
-JNIEXPORT jint JNICALL
-JVM_Available(jint fd, jlong *pbytes);
-
-/*
- * Move the file descriptor pointer from whence by offset.
- *
- * fd        the file descriptor to move.
- * offset    the number of bytes to move it by.
- * whence    the start from where to move it.
- *
- * This function returns the resulting pointer location.
- */
-JNIEXPORT jlong JNICALL
-JVM_Lseek(jint fd, jlong offset, jint whence);
-
-/*
- * Set the length of the file associated with the given descriptor to the given
- * length.  If the new length is longer than the current length then the file
- * is extended; the contents of the extended portion are not defined.  The
- * value of the file pointer is undefined after this procedure returns.
- */
-JNIEXPORT jint JNICALL
-JVM_SetLength(jint fd, jlong length);
-
-/*
- * Synchronize the file descriptor's in memory state with that of the
- * physical device.  Return of -1 is an error, 0 is OK.
- */
-JNIEXPORT jint JNICALL
-JVM_Sync(jint fd);
-
-/*
- * Networking library support
- */
-
-JNIEXPORT jint JNICALL
-JVM_InitializeSocketLibrary(void);
-
-struct sockaddr;
-
-JNIEXPORT jint JNICALL
-JVM_Socket(jint domain, jint type, jint protocol);
-
-JNIEXPORT jint JNICALL
-JVM_SocketClose(jint fd);
-
-JNIEXPORT jint JNICALL
-JVM_SocketShutdown(jint fd, jint howto);
-
-JNIEXPORT jint JNICALL
-JVM_Recv(jint fd, char *buf, jint nBytes, jint flags);
-
-JNIEXPORT jint JNICALL
-JVM_Send(jint fd, char *buf, jint nBytes, jint flags);
-
-JNIEXPORT jint JNICALL
-JVM_Timeout(int fd, long timeout);
-
-JNIEXPORT jint JNICALL
-JVM_Listen(jint fd, jint count);
-
-JNIEXPORT jint JNICALL
-JVM_Connect(jint fd, struct sockaddr *him, jint len);
-
-JNIEXPORT jint JNICALL
-JVM_Bind(jint fd, struct sockaddr *him, jint len);
-
-JNIEXPORT jint JNICALL
-JVM_Accept(jint fd, struct sockaddr *him, jint *len);
-
-JNIEXPORT jint JNICALL
-JVM_RecvFrom(jint fd, char *buf, int nBytes,
-                  int flags, struct sockaddr *from, int *fromlen);
-
-JNIEXPORT jint JNICALL
-JVM_SendTo(jint fd, char *buf, int len,
-                int flags, struct sockaddr *to, int tolen);
-
-JNIEXPORT jint JNICALL
-JVM_SocketAvailable(jint fd, jint *result);
-
-
-JNIEXPORT jint JNICALL
-JVM_GetSockName(jint fd, struct sockaddr *him, int *len);
-
-JNIEXPORT jint JNICALL
-JVM_GetSockOpt(jint fd, int level, int optname, char *optval, int *optlen);
-
-JNIEXPORT jint JNICALL
-JVM_SetSockOpt(jint fd, int level, int optname, const char *optval, int optlen);
-
-JNIEXPORT int JNICALL
-JVM_GetHostName(char* name, int namelen);
-
-/*
  * The standard printing functions supported by the Java VM. (Should they
  * be renamed to JVM_* in the future?
  */
@@ -1355,39 +1109,6 @@
 JNIEXPORT jobjectArray JNICALL
 JVM_GetEnclosingMethodInfo(JNIEnv* env, jclass ofClass);
 
-/*
- * Java thread state support
- */
-enum {
-    JAVA_THREAD_STATE_NEW           = 0,
-    JAVA_THREAD_STATE_RUNNABLE      = 1,
-    JAVA_THREAD_STATE_BLOCKED       = 2,
-    JAVA_THREAD_STATE_WAITING       = 3,
-    JAVA_THREAD_STATE_TIMED_WAITING = 4,
-    JAVA_THREAD_STATE_TERMINATED    = 5,
-    JAVA_THREAD_STATE_COUNT         = 6
-};
-
-/*
- * Returns an array of the threadStatus values representing the
- * given Java thread state.  Returns NULL if the VM version is
- * incompatible with the JDK or doesn't support the given
- * Java thread state.
- */
-JNIEXPORT jintArray JNICALL
-JVM_GetThreadStateValues(JNIEnv* env, jint javaThreadState);
-
-/*
- * Returns an array of the substate names representing the
- * given Java thread state.  Returns NULL if the VM version is
- * incompatible with the JDK or the VM doesn't support
- * the given Java thread state.
- * values must be the jintArray returned from JVM_GetThreadStateValues
- * and javaThreadState.
- */
-JNIEXPORT jobjectArray JNICALL
-JVM_GetThreadStateNames(JNIEnv* env, jint javaThreadState, jintArray values);
-
 /* =========================================================================
  * The following defines a private JVM interface that the JDK can query
  * for the JVM version and capabilities.  sun.misc.Version defines
--- a/jdk/src/java.base/share/native/libjava/ClassLoader.c	Thu Oct 23 11:19:25 2014 -0700
+++ b/jdk/src/java.base/share/native/libjava/ClassLoader.c	Thu Oct 23 13:44:28 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2014, 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
@@ -224,18 +224,6 @@
     return result;
 }
 
-JNIEXPORT void JNICALL
-Java_java_lang_ClassLoader_resolveClass0(JNIEnv *env, jobject this,
-                                         jclass cls)
-{
-    if (cls == NULL) {
-        JNU_ThrowNullPointerException(env, 0);
-        return;
-    }
-
-    JVM_ResolveClass(env, cls);
-}
-
 /*
  * Returns NULL if class not found.
  */
--- a/jdk/src/java.base/share/native/libjava/Compiler.c	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 1995, 1999, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-#include "jvm.h"
-#include "jni.h"
-#include "java_lang_Compiler.h"
-
-static JNINativeMethod methods[] = {
-    {"compileClass",
-     "(Ljava/lang/Class;)Z",
-     (void *)&JVM_CompileClass},
-    {"compileClasses",
-     "(Ljava/lang/String;)Z",
-     (void *)&JVM_CompileClasses},
-    {"command",
-     "(Ljava/lang/Object;)Ljava/lang/Object;",
-     (void *)&JVM_CompilerCommand},
-    {"enable",
-     "()V",
-     (void *)&JVM_EnableCompiler},
-    {"disable",
-     "()V",
-     (void *)&JVM_DisableCompiler}
-};
-
-JNIEXPORT void JNICALL
-Java_java_lang_Compiler_registerNatives(JNIEnv *env, jclass compCls)
-{
-    (*env)->RegisterNatives(env, compCls, methods,
-                            sizeof methods / sizeof methods[0]);
-}
--- a/jdk/src/java.base/share/native/libjava/Runtime.c	Thu Oct 23 11:19:25 2014 -0700
+++ b/jdk/src/java.base/share/native/libjava/Runtime.c	Thu Oct 23 13:44:28 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1994, 2000, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1994, 2014, 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
@@ -66,18 +66,6 @@
 }
 
 JNIEXPORT void JNICALL
-Java_java_lang_Runtime_traceInstructions(JNIEnv *env, jobject this, jboolean on)
-{
-    JVM_TraceInstructions(on);
-}
-
-JNIEXPORT void JNICALL
-Java_java_lang_Runtime_traceMethodCalls(JNIEnv *env, jobject this, jboolean on)
-{
-    JVM_TraceMethodCalls(on);
-}
-
-JNIEXPORT void JNICALL
 Java_java_lang_Runtime_runFinalization0(JNIEnv *env, jobject this)
 {
     jclass cl;
--- a/jdk/src/java.base/share/native/libjava/io_util.h	Thu Oct 23 11:19:25 2014 -0700
+++ b/jdk/src/java.base/share/native/libjava/io_util.h	Thu Oct 23 13:44:28 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -54,7 +54,6 @@
                 jint len, jboolean append, jfieldID fid);
 void fileOpen(JNIEnv *env, jobject this, jstring path, jfieldID fid, int flags);
 void throwFileNotFoundException(JNIEnv *env, jstring path);
-size_t getLastErrorString(char *buf, size_t len);
 
 /*
  * Macros for managing platform strings.  The typical usage pattern is:
--- a/jdk/src/java.base/share/native/libjava/jni_util.c	Thu Oct 23 11:19:25 2014 -0700
+++ b/jdk/src/java.base/share/native/libjava/jni_util.c	Thu Oct 23 13:44:28 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -157,7 +157,7 @@
                              const char *defaultDetail)
 {
     char buf[256];
-    int n = JVM_GetLastErrorString(buf, sizeof(buf));
+    int n = getLastErrorString(buf, sizeof(buf));
 
     if (n > 0) {
         jstring s = JNU_NewStringPlatform(env, buf);
--- a/jdk/src/java.base/share/native/libjava/jni_util.h	Thu Oct 23 11:19:25 2014 -0700
+++ b/jdk/src/java.base/share/native/libjava/jni_util.h	Thu Oct 23 13:44:28 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -387,6 +387,7 @@
 void buildJniFunctionName(const char *sym, const char *cname,
                           char *jniEntryName);
 
+extern size_t getLastErrorString(char *buf, size_t len);
 #ifdef __cplusplus
 } /* extern "C" */
 #endif /* __cplusplus */
--- a/jdk/src/java.base/share/native/libnet/net_util.h	Thu Oct 23 11:19:25 2014 -0700
+++ b/jdk/src/java.base/share/native/libnet/net_util.h	Thu Oct 23 13:44:28 2014 -0700
@@ -184,9 +184,13 @@
 JNIEXPORT int JNICALL
 NET_MapSocketOptionV6(jint cmd, int *level, int *optname);
 
+JNIEXPORT jint JNICALL
+NET_EnableFastTcpLoopback(int fd);
+
 int getScopeID (struct sockaddr *);
 
 int cmpScopeID (unsigned int, struct sockaddr *);
 
 unsigned short in_cksum(unsigned short *addr, int len);
+
 #endif /* NET_UTILS_H */
--- a/jdk/src/java.base/share/native/libzip/ZipFile.c	Thu Oct 23 11:19:25 2014 -0700
+++ b/jdk/src/java.base/share/native/libzip/ZipFile.c	Thu Oct 23 13:44:28 2014 -0700
@@ -93,24 +93,27 @@
     jzfile *zip = 0;
 
     if (mode & OPEN_READ) flag |= O_RDONLY;
-    if (mode & OPEN_DELETE) flag |= JVM_O_DELETE;
 
     if (path != 0) {
         zip = ZIP_Get_From_Cache(path, &msg, lastModified);
         if (zip == 0 && msg == 0) {
             ZFILE zfd = 0;
 #ifdef WIN32
+            if (mode & OPEN_DELETE) flag |= O_TEMPORARY;
             zfd = winFileHandleOpen(env, name, flag);
             if (zfd == -1) {
                 /* Exception already pending. */
                 goto finally;
             }
 #else
-            zfd = JVM_Open(path, flag, 0);
+            zfd = open(path, flag, 0);
             if (zfd < 0) {
                 throwFileNotFoundException(env, name);
                 goto finally;
             }
+            if (mode & OPEN_DELETE) {
+                unlink(path);
+            }
 #endif
             zip = ZIP_Put_In_Cache0(path, zfd, &msg, lastModified, usemmap);
         }
--- a/jdk/src/java.base/share/native/libzip/zip_util.c	Thu Oct 23 11:19:25 2014 -0700
+++ b/jdk/src/java.base/share/native/libzip/zip_util.c	Thu Oct 23 13:44:28 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2014, 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
@@ -123,7 +123,7 @@
         flagsAndAttributes, /* flags and attributes */
         NULL);
 #else
-    return JVM_Open(fname, flags, 0);
+    return open(fname, flags, 0);
 #endif
 }
 
@@ -136,7 +136,7 @@
 #ifdef WIN32
     CloseHandle((HANDLE) zfd);
 #else
-    JVM_Close(zfd);
+    close(zfd);
 #endif
 }
 
@@ -145,14 +145,6 @@
 #ifdef WIN32
     return (int) IO_Read(zfd, buf, nbytes);
 #else
-    /*
-     * Calling JVM_Read will return JVM_IO_INTR when Thread.interrupt is called
-     * only on Solaris. Continue reading jar file in this case is the best
-     * thing to do since zip file reading is relatively fast and it is very onerous
-     * for a interrupted thread to deal with this kind of hidden I/O. However, handling
-     * JVM_IO_INTR is tricky and could cause undesired side effect. So we decided
-     * to simply call "read" on Solaris/Linux. See details in bug 6304463.
-     */
     return read(zfd, buf, nbytes);
 #endif
 }
@@ -198,9 +190,8 @@
         if (n > 0) {
             bp += n;
             len -= n;
-        } else if (n == JVM_IO_ERR && errno == EINTR) {
-          /* Retry after EINTR (interrupted by signal).
-             We depend on the fact that JVM_IO_ERR == -1. */
+        } else if (n == -1 && errno == EINTR) {
+          /* Retry after EINTR (interrupted by signal). */
             continue;
         } else { /* EOF or IO error */
             return -1;
@@ -828,7 +819,7 @@
     zip->lastModified = lastModified;
 
     if (zfd == -1) {
-        if (pmsg && JVM_GetLastErrorString(errbuf, sizeof(errbuf)) > 0)
+        if (pmsg && getLastErrorString(errbuf, sizeof(errbuf)) > 0)
             *pmsg = strdup(errbuf);
         freeZip(zip);
         return NULL;
@@ -849,7 +840,7 @@
                 *pmsg = strdup("zip file is empty");
             }
         } else { /* error */
-            if (pmsg && JVM_GetLastErrorString(errbuf, sizeof(errbuf)) > 0)
+            if (pmsg && getLastErrorString(errbuf, sizeof(errbuf)) > 0)
                 *pmsg = strdup(errbuf);
         }
         ZFILE_Close(zfd);
--- a/jdk/src/java.base/unix/native/include/jvm_md.h	Thu Oct 23 11:19:25 2014 -0700
+++ b/jdk/src/java.base/unix/native/include/jvm_md.h	Thu Oct 23 13:44:28 2014 -0700
@@ -75,7 +75,6 @@
 #define JVM_O_O_APPEND   O_APPEND
 #define JVM_O_EXCL       O_EXCL
 #define JVM_O_CREAT      O_CREAT
-#define JVM_O_DELETE     0x10000
 
 /* Signals */
 
--- a/jdk/src/java.base/unix/native/libjava/io_util_md.c	Thu Oct 23 11:19:25 2014 -0700
+++ b/jdk/src/java.base/unix/native/libjava/io_util_md.c	Thu Oct 23 13:44:28 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2014, 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
@@ -211,18 +211,3 @@
     RESTARTABLE(ftruncate64(fd, length), result);
     return result;
 }
-
-size_t
-getLastErrorString(char *buf, size_t len)
-{
-    if (errno == 0 || len < 1) return 0;
-
-    const char *err = strerror(errno);
-    size_t n = strlen(err);
-    if (n >= len)
-        n = len - 1;
-
-    strncpy(buf, err, n);
-    buf[n] = '\0';
-    return n;
-}
--- a/jdk/src/java.base/unix/native/libjava/jni_util_md.c	Thu Oct 23 11:19:25 2014 -0700
+++ b/jdk/src/java.base/unix/native/libjava/jni_util_md.c	Thu Oct 23 13:44:28 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2014, 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
@@ -23,6 +23,7 @@
  * questions.
  */
 
+#include <errno.h>
 #include <string.h>
 
 #include "jni.h"
@@ -51,3 +52,17 @@
     }
 }
 
+size_t
+getLastErrorString(char *buf, size_t len)
+{
+    if (errno == 0 || len < 1) return 0;
+
+    const char *err = strerror(errno);
+    size_t n = strlen(err);
+    if (n >= len)
+        n = len - 1;
+
+    strncpy(buf, err, n);
+    buf[n] = '\0';
+    return n;
+}
--- a/jdk/src/java.base/unix/native/libnet/net_util_md.c	Thu Oct 23 11:19:25 2014 -0700
+++ b/jdk/src/java.base/unix/native/libnet/net_util_md.c	Thu Oct 23 13:44:28 2014 -0700
@@ -790,6 +790,11 @@
 #endif
 }
 
+JNIEXPORT jint JNICALL
+NET_EnableFastTcpLoopback(int fd) {
+    return 0;
+}
+
 /* In the case of an IPv4 Inetaddress this method will return an
  * IPv4 mapped address where IPv6 is available and v4MappedAddress is TRUE.
  * Otherwise it will return a sockaddr_in structure for an IPv4 InetAddress.
--- a/jdk/src/java.base/unix/native/libnio/ch/Net.c	Thu Oct 23 11:19:25 2014 -0700
+++ b/jdk/src/java.base/unix/native/libnio/ch/Net.c	Thu Oct 23 13:44:28 2014 -0700
@@ -188,7 +188,7 @@
 
 JNIEXPORT int JNICALL
 Java_sun_nio_ch_Net_socket0(JNIEnv *env, jclass cl, jboolean preferIPv6,
-                            jboolean stream, jboolean reuse)
+                            jboolean stream, jboolean reuse, jboolean ignored)
 {
     int fd;
     int type = (stream ? SOCK_STREAM : SOCK_DGRAM);
--- a/jdk/src/java.base/windows/native/include/jvm_md.h	Thu Oct 23 11:19:25 2014 -0700
+++ b/jdk/src/java.base/windows/native/include/jvm_md.h	Thu Oct 23 13:44:28 2014 -0700
@@ -97,7 +97,6 @@
 #define JVM_O_O_APPEND   O_APPEND
 #define JVM_O_EXCL       O_EXCL
 #define JVM_O_CREAT      O_CREAT
-#define JVM_O_DELETE     O_TEMPORARY
 
 /* Signals */
 
--- a/jdk/src/java.base/windows/native/libjava/io_util_md.c	Thu Oct 23 11:19:25 2014 -0700
+++ b/jdk/src/java.base/windows/native/libjava/io_util_md.c	Thu Oct 23 13:44:28 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2014, 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
@@ -576,77 +576,3 @@
     }
     return long_to_jlong(pos.QuadPart);
 }
-
-size_t
-getLastErrorString(char *utf8_jvmErrorMsg, size_t cbErrorMsg)
-{
-    size_t n = 0;
-    if (cbErrorMsg > 0) {
-        BOOLEAN noError = FALSE;
-        WCHAR *utf16_osErrorMsg = (WCHAR *)malloc(cbErrorMsg*sizeof(WCHAR));
-        if (utf16_osErrorMsg == NULL) {
-            // OOM accident
-            strncpy(utf8_jvmErrorMsg, "Out of memory", cbErrorMsg);
-            // truncate if too long
-            utf8_jvmErrorMsg[cbErrorMsg - 1] = '\0';
-            n = strlen(utf8_jvmErrorMsg);
-        } else {
-            DWORD errval = GetLastError();
-            if (errval != 0) {
-                // WIN32 error
-                n = (size_t)FormatMessageW(
-                    FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_IGNORE_INSERTS,
-                    NULL,
-                    errval,
-                    0,
-                    utf16_osErrorMsg,
-                    (DWORD)cbErrorMsg,
-                    NULL);
-                if (n > 3) {
-                    // Drop final '.', CR, LF
-                    if (utf16_osErrorMsg[n - 1] == L'\n') --n;
-                    if (utf16_osErrorMsg[n - 1] == L'\r') --n;
-                    if (utf16_osErrorMsg[n - 1] == L'.') --n;
-                    utf16_osErrorMsg[n] = L'\0';
-                }
-            } else if (errno != 0) {
-                // C runtime error that has no corresponding WIN32 error code
-                const WCHAR *rtError = _wcserror(errno);
-                if (rtError != NULL) {
-                    wcsncpy(utf16_osErrorMsg, rtError, cbErrorMsg);
-                    // truncate if too long
-                    utf16_osErrorMsg[cbErrorMsg - 1] = L'\0';
-                    n = wcslen(utf16_osErrorMsg);
-                }
-            } else
-                noError = TRUE; //OS has no error to report
-
-            if (!noError) {
-                if (n > 0) {
-                    n = WideCharToMultiByte(
-                        CP_UTF8,
-                        0,
-                        utf16_osErrorMsg,
-                        n,
-                        utf8_jvmErrorMsg,
-                        cbErrorMsg,
-                        NULL,
-                        NULL);
-
-                    // no way to die
-                    if (n > 0)
-                        utf8_jvmErrorMsg[min(cbErrorMsg - 1, n)] = '\0';
-                }
-
-                if (n <= 0) {
-                    strncpy(utf8_jvmErrorMsg, "Secondary error while OS message extraction", cbErrorMsg);
-                    // truncate if too long
-                    utf8_jvmErrorMsg[cbErrorMsg - 1] = '\0';
-                    n = strlen(utf8_jvmErrorMsg);
-                }
-            }
-            free(utf16_osErrorMsg);
-        }
-    }
-    return n;
-}
--- a/jdk/src/java.base/windows/native/libjava/jni_util_md.c	Thu Oct 23 11:19:25 2014 -0700
+++ b/jdk/src/java.base/windows/native/libjava/jni_util_md.c	Thu Oct 23 13:44:28 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2014 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
@@ -73,3 +73,77 @@
     }
     return;
 }
+
+size_t
+getLastErrorString(char *utf8_jvmErrorMsg, size_t cbErrorMsg)
+{
+    size_t n = 0;
+    if (cbErrorMsg > 0) {
+        BOOLEAN noError = FALSE;
+        WCHAR *utf16_osErrorMsg = (WCHAR *)malloc(cbErrorMsg*sizeof(WCHAR));
+        if (utf16_osErrorMsg == NULL) {
+            // OOM accident
+            strncpy(utf8_jvmErrorMsg, "Out of memory", cbErrorMsg);
+            // truncate if too long
+            utf8_jvmErrorMsg[cbErrorMsg - 1] = '\0';
+            n = strlen(utf8_jvmErrorMsg);
+        } else {
+            DWORD errval = GetLastError();
+            if (errval != 0) {
+                // WIN32 error
+                n = (size_t)FormatMessageW(
+                    FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_IGNORE_INSERTS,
+                    NULL,
+                    errval,
+                    0,
+                    utf16_osErrorMsg,
+                    (DWORD)cbErrorMsg,
+                    NULL);
+                if (n > 3) {
+                    // Drop final '.', CR, LF
+                    if (utf16_osErrorMsg[n - 1] == L'\n') --n;
+                    if (utf16_osErrorMsg[n - 1] == L'\r') --n;
+                    if (utf16_osErrorMsg[n - 1] == L'.') --n;
+                    utf16_osErrorMsg[n] = L'\0';
+                }
+            } else if (errno != 0) {
+                // C runtime error that has no corresponding WIN32 error code
+                const WCHAR *rtError = _wcserror(errno);
+                if (rtError != NULL) {
+                    wcsncpy(utf16_osErrorMsg, rtError, cbErrorMsg);
+                    // truncate if too long
+                    utf16_osErrorMsg[cbErrorMsg - 1] = L'\0';
+                    n = wcslen(utf16_osErrorMsg);
+                }
+            } else
+                noError = TRUE; //OS has no error to report
+
+            if (!noError) {
+                if (n > 0) {
+                    n = WideCharToMultiByte(
+                        CP_UTF8,
+                        0,
+                        utf16_osErrorMsg,
+                        n,
+                        utf8_jvmErrorMsg,
+                        cbErrorMsg,
+                        NULL,
+                        NULL);
+
+                    // no way to die
+                    if (n > 0)
+                        utf8_jvmErrorMsg[min(cbErrorMsg - 1, n)] = '\0';
+                }
+
+                if (n <= 0) {
+                    strncpy(utf8_jvmErrorMsg, "Secondary error while OS message extraction", cbErrorMsg);
+                    // truncate if too long
+                    utf8_jvmErrorMsg[cbErrorMsg - 1] = '\0';
+                    n = strlen(utf8_jvmErrorMsg);
+                }
+            }
+            free(utf16_osErrorMsg);
+        }
+    }
+    return n;
+}
--- a/jdk/src/java.base/windows/native/libnet/net_util_md.c	Thu Oct 23 11:19:25 2014 -0700
+++ b/jdk/src/java.base/windows/native/libnet/net_util_md.c	Thu Oct 23 13:44:28 2014 -0700
@@ -29,6 +29,9 @@
 #include "net_util.h"
 #include "jni.h"
 
+// Taken from mstcpip.h in Windows SDK 8.0 or newer.
+#define SIO_LOOPBACK_FAST_PATH              _WSAIOW(IOC_VENDOR,16)
+
 #ifndef IPTOS_TOS_MASK
 #define IPTOS_TOS_MASK 0x1e
 #endif
@@ -844,6 +847,25 @@
     }
 }
 
+/**
+ * Enables SIO_LOOPBACK_FAST_PATH
+ */
+JNIEXPORT jint JNICALL
+NET_EnableFastTcpLoopback(int fd) {
+    int enabled = 1;
+    DWORD result_byte_count = -1;
+    int result = WSAIoctl(fd,
+                          SIO_LOOPBACK_FAST_PATH,
+                          &enabled,
+                          sizeof(enabled),
+                          NULL,
+                          0,
+                          &result_byte_count,
+                          NULL,
+                          NULL);
+    return result == SOCKET_ERROR ? WSAGetLastError() : 0;
+}
+
 /* If address types is IPv6, then IPv6 must be available. Otherwise
  * no address can be generated. In the case of an IPv4 Inetaddress this
  * method will return an IPv4 mapped address where IPv6 is available and
--- a/jdk/src/java.base/windows/native/libnio/ch/Net.c	Thu Oct 23 11:19:25 2014 -0700
+++ b/jdk/src/java.base/windows/native/libnio/ch/Net.c	Thu Oct 23 13:44:28 2014 -0700
@@ -127,7 +127,7 @@
 
 JNIEXPORT jint JNICALL
 Java_sun_nio_ch_Net_socket0(JNIEnv *env, jclass cl, jboolean preferIPv6,
-                            jboolean stream, jboolean reuse)
+                            jboolean stream, jboolean reuse, jboolean fastLoopback)
 {
     SOCKET s;
     int domain = (preferIPv6) ? AF_INET6 : AF_INET;
@@ -152,6 +152,20 @@
         NET_ThrowNew(env, WSAGetLastError(), "socket");
     }
 
+    if (stream && fastLoopback) {
+        static int loopback_available = 1;
+        if (loopback_available) {
+            int rv = NET_EnableFastTcpLoopback((jint)s);
+            if (rv) {
+                if (rv == WSAEOPNOTSUPP) {
+                    loopback_available = 0;
+                } else {
+                    NET_ThrowNew(env, rv, "fastLoopback");
+                }
+            }
+        }
+    }
+
     return (jint)s;
 }
 
--- a/jdk/src/java.logging/share/classes/java/util/logging/FileHandler.java	Thu Oct 23 11:19:25 2014 -0700
+++ b/jdk/src/java.logging/share/classes/java/util/logging/FileHandler.java	Thu Oct 23 13:44:28 2014 -0700
@@ -150,7 +150,7 @@
 public class FileHandler extends StreamHandler {
     private MeteredStream meter;
     private boolean append;
-    private int limit;       // zero => no limit.
+    private long limit;       // zero => no limit.
     private int count;
     private String pattern;
     private String lockFileName;
@@ -164,11 +164,11 @@
      * (a) forwards all its output to a target stream
      * (b) keeps track of how many bytes have been written
      */
-    private class MeteredStream extends OutputStream {
+    private static final class MeteredStream extends OutputStream {
         final OutputStream out;
-        int written;
+        long written;
 
-        MeteredStream(OutputStream out, int written) {
+        MeteredStream(OutputStream out, long written) {
             this.out = out;
             this.written = written;
         }
@@ -203,9 +203,9 @@
     }
 
     private void open(File fname, boolean append) throws IOException {
-        int len = 0;
+        long len = 0;
         if (append) {
-            len = (int)fname.length();
+            len = fname.length();
         }
         FileOutputStream fout = new FileOutputStream(fname.toString(), append);
         BufferedOutputStream bout = new BufferedOutputStream(fout);
@@ -223,7 +223,7 @@
         String cname = getClass().getName();
 
         pattern = manager.getStringProperty(cname + ".pattern", "%h/java%u.log");
-        limit = manager.getIntProperty(cname + ".limit", 0);
+        limit = manager.getLongProperty(cname + ".limit", 0);
         if (limit < 0) {
             limit = 0;
         }
@@ -395,6 +395,39 @@
      */
     public FileHandler(String pattern, int limit, int count, boolean append)
                                         throws IOException, SecurityException {
+        this(pattern, (long)limit, count, append);
+    }
+
+    /**
+     * Initialize a {@code FileHandler} to write to a set of files
+     * with optional append.  When (approximately) the given limit has
+     * been written to one file, another file will be opened.  The
+     * output will cycle through a set of count files.
+     * <p>
+     * The {@code FileHandler} is configured based on {@code LogManager}
+     * properties (or their default values) except that the given pattern
+     * argument is used as the filename pattern, the file limit is
+     * set to the limit argument, and the file count is set to the
+     * given count argument, and the append mode is set to the given
+     * {@code append} argument.
+     * <p>
+     * The count must be at least 1.
+     *
+     * @param pattern  the pattern for naming the output file
+     * @param limit  the maximum number of bytes to write to any one file
+     * @param count  the number of files to use
+     * @param append  specifies append mode
+     * @exception  IOException if there are IO problems opening the files.
+     * @exception  SecurityException  if a security manager exists and if
+     *             the caller does not have {@code LoggingPermission("control")}.
+     * @exception  IllegalArgumentException if {@code limit < 0}, or {@code count < 1}.
+     * @exception  IllegalArgumentException if pattern is an empty string
+     *
+     * @since 1.9
+     *
+     */
+    public FileHandler(String pattern, long limit, int count, boolean append)
+                                        throws IOException {
         if (limit < 0 || count < 1 || pattern.length() < 1) {
             throw new IllegalArgumentException();
         }
@@ -690,7 +723,7 @@
         }
         super.publish(record);
         flush();
-        if (limit > 0 && meter.written >= limit) {
+        if (limit > 0 && (meter.written >= limit || meter.written < 0)) {
             // We performed access checks in the "init" method to make sure
             // we are only initialized from trusted code.  So we assume
             // it is OK to write the target files, even if we are
--- a/jdk/src/java.logging/share/classes/java/util/logging/LogManager.java	Thu Oct 23 11:19:25 2014 -0700
+++ b/jdk/src/java.logging/share/classes/java/util/logging/LogManager.java	Thu Oct 23 13:44:28 2014 -0700
@@ -1387,6 +1387,21 @@
         }
     }
 
+    // Package private method to get a long property.
+    // If the property is not defined or cannot be parsed
+    // we return the given default value.
+    long getLongProperty(String name, long defaultValue) {
+        String val = getProperty(name);
+        if (val == null) {
+            return defaultValue;
+        }
+        try {
+            return Long.parseLong(val.trim());
+        } catch (Exception ex) {
+            return defaultValue;
+        }
+    }
+
     // Package private method to get a boolean property.
     // If the property is not defined or cannot be parsed
     // we return the given default value.
--- a/jdk/src/java.management/share/native/libmanagement/DiagnosticCommandImpl.c	Thu Oct 23 11:19:25 2014 -0700
+++ b/jdk/src/java.management/share/native/libmanagement/DiagnosticCommandImpl.c	Thu Oct 23 13:44:28 2014 -0700
@@ -65,6 +65,11 @@
                                                    dcmd_arg_info_array);
   dcmdArgInfoCls = (*env)->FindClass(env,
                                      "sun/management/DiagnosticCommandArgumentInfo");
+  if ((*env)->ExceptionCheck(env)) {
+    free(dcmd_arg_info_array);
+    return NULL;
+  }
+
   result = (*env)->NewObjectArray(env, num_arg, dcmdArgInfoCls, NULL);
   if (result == NULL) {
     free(dcmd_arg_info_array);
@@ -91,9 +96,16 @@
   }
   free(dcmd_arg_info_array);
   arraysCls = (*env)->FindClass(env, "java/util/Arrays");
+  if ((*env)->ExceptionCheck(env)) {
+    return NULL;
+  }
   mid = (*env)->GetStaticMethodID(env, arraysCls,
                                   "asList", "([Ljava/lang/Object;)Ljava/util/List;");
   resultList = (*env)->CallStaticObjectMethod(env, arraysCls, mid, result);
+  if ((*env)->ExceptionCheck(env)) {
+    // Make sure we return NULL in case of OOM inside Java
+    return NULL;
+  }
   return resultList;
 }
 
@@ -121,6 +133,10 @@
   num_commands = (*env)->GetArrayLength(env, commands);
   dcmdInfoCls = (*env)->FindClass(env,
                                   "sun/management/DiagnosticCommandInfo");
+  if ((*env)->ExceptionCheck(env)) {
+    return NULL;
+  }
+
   result = (*env)->NewObjectArray(env, num_commands, dcmdInfoCls, NULL);
   if (result == NULL) {
       JNU_ThrowOutOfMemoryError(env, 0);
--- a/jdk/src/java.sql.rowset/share/classes/javax/sql/rowset/RowSetWarning.java	Thu Oct 23 11:19:25 2014 -0700
+++ b/jdk/src/java.sql.rowset/share/classes/javax/sql/rowset/RowSetWarning.java	Thu Oct 23 13:44:28 2014 -0700
@@ -56,11 +56,6 @@
 public class RowSetWarning extends SQLException {
 
     /**
-     * RowSetWarning object handle.
-     */
-     private RowSetWarning rwarning;
-
-    /**
      * Constructs a <code>RowSetWarning</code> object
      * with the given value for the reason; SQLState defaults to null,
      * and vendorCode defaults to 0.
@@ -128,7 +123,15 @@
      * @see #setNextWarning
      */
     public RowSetWarning getNextWarning() {
-        return rwarning;
+        SQLException warning = getNextException();
+        if (  warning == null || warning instanceof RowSetWarning) {
+            return (RowSetWarning)warning;
+        } else {
+            // The chained value isn't a RowSetWarning.
+            // This is a programming error by whoever added it to
+            // the RowSetWarning chain.  We throw a Java "Error".
+            throw new Error("RowSetWarning chain holds value that is not a RowSetWarning: ");
+        }
     }
 
     /**
@@ -141,7 +144,7 @@
      * @see #getNextWarning
      */
     public void setNextWarning(RowSetWarning warning) {
-        rwarning = warning;
+        setNextException(warning);
     }
 
     static final long serialVersionUID = 6678332766434564774L;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/jdk.crypto.ucrypto/solaris/classes/com/oracle/security/ucrypto/CipherContextRef.java	Thu Oct 23 13:44:28 2014 -0700
@@ -0,0 +1,103 @@
+/*
+ * Copyright (c) 2014, 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
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.oracle.security.ucrypto;
+
+import java.nio.ByteBuffer;
+import java.util.Set;
+import java.util.Arrays;
+import java.util.concurrent.ConcurrentSkipListSet;
+import java.lang.ref.*;
+
+import java.security.*;
+import java.security.spec.*;
+import javax.crypto.*;
+
+import javax.crypto.spec.SecretKeySpec;
+import javax.crypto.spec.IvParameterSpec;
+
+/**
+ * Internal class for context resource clean up.
+ *
+ * @since 1.9
+ */
+final class CipherContextRef extends PhantomReference<NativeCipher>
+    implements Comparable<CipherContextRef> {
+
+    private static ReferenceQueue<NativeCipher> refQueue =
+        new ReferenceQueue<NativeCipher>();
+
+    // Needed to keep these references from being GC'ed until when their
+    // referents are GC'ed so we can do post-mortem processing
+    private static Set<CipherContextRef> refList =
+        new ConcurrentSkipListSet<CipherContextRef>();
+
+    final long id;
+    final boolean encrypt;
+
+    private static void drainRefQueueBounded() {
+        while (true) {
+            CipherContextRef next = (CipherContextRef) refQueue.poll();
+            if (next == null) break;
+            next.dispose(true);
+        }
+    }
+
+    CipherContextRef(NativeCipher nc, long id, boolean encrypt) {
+        super(nc, refQueue);
+        this.id = id;
+        this.encrypt = encrypt;
+        refList.add(this);
+        UcryptoProvider.debug("Resource: trace CipherCtxt " + this.id);
+        drainRefQueueBounded();
+    }
+
+    public int compareTo(CipherContextRef other) {
+        if (this.id == other.id) {
+            return 0;
+        } else {
+            return (this.id < other.id) ? -1 : 1;
+        }
+    }
+
+    void dispose(boolean doCancel) {
+        refList.remove(this);
+        try {
+            if (doCancel) {
+                UcryptoProvider.debug("Resource: cancel CipherCtxt " + id);
+                int k = NativeCipher.nativeFinal(id, encrypt, null, 0);
+                if (k < 0) {
+                    UcryptoProvider.debug
+                        ("Resource: error cancelling CipherCtxt " + id +
+                        " " + new UcryptoException(-k).getMessage());
+                }
+            } else {
+                UcryptoProvider.debug("Resource: untrace CipherCtxt " + id);
+            }
+        } finally {
+            this.clear();
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/jdk.crypto.ucrypto/solaris/classes/com/oracle/security/ucrypto/Config.java	Thu Oct 23 13:44:28 2014 -0700
@@ -0,0 +1,219 @@
+/*
+ * Copyright (c) 2014, 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
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.oracle.security.ucrypto;
+
+import java.io.*;
+import static java.io.StreamTokenizer.*;
+import java.math.BigInteger;
+import java.util.*;
+
+import java.security.*;
+
+import sun.security.action.GetPropertyAction;
+import sun.security.util.PropertyExpander;
+
+import sun.security.pkcs11.wrapper.*;
+
+/**
+ * Configuration container and file parsing.
+ *
+ * Currently, there is only one supported entry "disabledServices"
+ * for disabling crypto services. Its syntax is as follows:
+ *
+ * disabledServices = {
+ * <ServiceType>.<Algorithm>
+ * ...
+ * }
+ *
+ * where <Service> can be "MessageDigest", "Cipher", etc. and <Algorithm>
+ * reprepresents the value that's passed into the various getInstance() calls.
+ *
+ * @since   1.9
+ */
+final class Config {
+
+    // Reader and StringTokenizer used during parsing
+    private Reader reader;
+
+    private StreamTokenizer st;
+
+    private Set<String> parsedKeywords;
+
+    // set of disabled crypto services, e.g. MessageDigest.SHA1, or
+    // Cipher.AES/ECB/PKCS5Padding
+    private Set<String> disabledServices;
+
+    Config(String filename) throws IOException {
+        FileInputStream in = new FileInputStream(expand(filename));
+        reader = new BufferedReader(new InputStreamReader(in));
+        parsedKeywords = new HashSet<String>();
+        st = new StreamTokenizer(reader);
+        setupTokenizer();
+        parse();
+    }
+
+    String[] getDisabledServices() {
+        if (disabledServices != null) {
+            return disabledServices.toArray(new String[disabledServices.size()]);
+        } else {
+            return new String[0];
+        }
+    }
+
+    private static String expand(final String s) throws IOException {
+        try {
+            return PropertyExpander.expand(s);
+        } catch (Exception e) {
+            throw new RuntimeException(e.getMessage());
+        }
+    }
+
+    private void setupTokenizer() {
+        st.resetSyntax();
+        st.wordChars('a', 'z');
+        st.wordChars('A', 'Z');
+        st.wordChars('0', '9');
+        st.wordChars(':', ':');
+        st.wordChars('.', '.');
+        st.wordChars('_', '_');
+        st.wordChars('-', '-');
+        st.wordChars('/', '/');
+        st.wordChars('\\', '\\');
+        st.wordChars('$', '$');
+        st.wordChars('{', '{'); // need {} for property subst
+        st.wordChars('}', '}');
+        st.wordChars('*', '*');
+        st.wordChars('+', '+');
+        st.wordChars('~', '~');
+        // XXX check ASCII table and add all other characters except special
+
+        // special: #="(),
+        st.whitespaceChars(0, ' ');
+        st.commentChar('#');
+        st.eolIsSignificant(true);
+        st.quoteChar('\"');
+    }
+
+    private ConfigException excToken(String msg) {
+        return new ConfigException(msg + " " + st);
+    }
+
+    private ConfigException excLine(String msg) {
+        return new ConfigException(msg + ", line " + st.lineno());
+    }
+
+    private void parse() throws IOException {
+        while (true) {
+            int token = nextToken();
+            if (token == TT_EOF) {
+                break;
+            }
+            if (token == TT_EOL) {
+                continue;
+            }
+            if (token != TT_WORD) {
+                throw excToken("Unexpected token:");
+            }
+            String word = st.sval;
+            if (word.equals("disabledServices")) {
+                parseDisabledServices(word);
+            } else {
+                throw new ConfigException
+                        ("Unknown keyword '" + word + "', line " + st.lineno());
+            }
+            parsedKeywords.add(word);
+        }
+        reader.close();
+        reader = null;
+        st = null;
+        parsedKeywords = null;
+    }
+
+    //
+    // Parsing helper methods
+    //
+    private int nextToken() throws IOException {
+        int token = st.nextToken();
+        return token;
+    }
+
+    private void parseEquals() throws IOException {
+        int token = nextToken();
+        if (token != '=') {
+            throw excToken("Expected '=', read");
+        }
+    }
+
+    private void parseOpenBraces() throws IOException {
+        while (true) {
+            int token = nextToken();
+            if (token == TT_EOL) {
+                continue;
+            }
+            if ((token == TT_WORD) && st.sval.equals("{")) {
+                return;
+            }
+            throw excToken("Expected '{', read");
+        }
+    }
+
+    private boolean isCloseBraces(int token) {
+        return (token == TT_WORD) && st.sval.equals("}");
+    }
+
+    private void checkDup(String keyword) throws IOException {
+        if (parsedKeywords.contains(keyword)) {
+            throw excLine(keyword + " must only be specified once");
+        }
+    }
+
+    private void parseDisabledServices(String keyword) throws IOException {
+        checkDup(keyword);
+        disabledServices = new HashSet<String>();
+        parseEquals();
+        parseOpenBraces();
+        while (true) {
+            int token = nextToken();
+            if (isCloseBraces(token)) {
+                break;
+            }
+            if (token == TT_EOL) {
+                continue;
+            }
+            if (token != TT_WORD) {
+                throw excToken("Expected mechanism, read");
+            }
+            disabledServices.add(st.sval);
+        }
+    }
+}
+
+class ConfigException extends IOException {
+    private static final long serialVersionUID = 254492758127673194L;
+    ConfigException(String msg) {
+        super(msg);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/jdk.crypto.ucrypto/solaris/classes/com/oracle/security/ucrypto/GCMParameters.java	Thu Oct 23 13:44:28 2014 -0700
@@ -0,0 +1,130 @@
+/*
+ * Copyright (c) 2014, 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
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.oracle.security.ucrypto;
+
+import java.io.IOException;
+import java.util.Arrays;
+import java.security.AlgorithmParametersSpi;
+import java.security.spec.AlgorithmParameterSpec;
+import java.security.spec.InvalidParameterSpecException;
+import javax.crypto.spec.GCMParameterSpec;
+import sun.security.util.*;
+
+/**
+ * This class implements the parameter set used with GCM mode
+ * which is defined in RFC5084 as follows:
+ *
+ * <pre>
+ * GCMParameters ::= SEQUENCE {
+ *   aes-nonce        OCTET STRING, -- recommended size is 12 octets
+ *   aes-ICVlen       AES-GCM-ICVlen DEFAULT 12 }
+ *
+ * where
+ * AES-GCM-ICVlen ::= INTEGER (12 | 13 | 14 | 15 | 16)
+ * NOTE: however, NIST 800-38D also lists 4 (32bit) and 8 (64bit)
+ * as possible AES-GCM-ICVlen values, so we allow all 6 values.
+ * </pre>
+ *
+ * @since 1.9
+ */
+public final class GCMParameters extends AlgorithmParametersSpi {
+
+    private byte[] iv; // i.e. aes-nonce
+    private int tLen; // i.e. aes-ICVlen, in bytes
+
+    public GCMParameters() {}
+
+    private void setValues(byte[] iv, int tLen) throws IOException {
+        if (iv == null) {
+            throw new IOException("IV cannot be null");
+        }
+        if (tLen != 4 && tLen != 8 && (tLen < 12 || tLen > 16)) {
+            throw new IOException("Unsupported tag length: " + tLen);
+        }
+        this.iv = iv;
+        this.tLen = tLen;
+    }
+
+    protected byte[] engineGetEncoded() throws IOException {
+        DerOutputStream out = new DerOutputStream();
+        DerOutputStream bytes = new DerOutputStream();
+
+        bytes.putOctetString(iv);
+        bytes.putInteger(tLen);
+        out.write(DerValue.tag_Sequence, bytes);
+        return out.toByteArray();
+    }
+
+    protected byte[] engineGetEncoded(String format) throws IOException {
+        // ignore format for now
+        return engineGetEncoded();
+    }
+
+    protected <T extends AlgorithmParameterSpec>
+            T engineGetParameterSpec(Class<T> paramSpec)
+        throws InvalidParameterSpecException {
+        if (GCMParameterSpec.class.isAssignableFrom(paramSpec)) {
+            return paramSpec.cast(new GCMParameterSpec(tLen*8, iv.clone()));
+        } else {
+            throw new InvalidParameterSpecException
+                ("Inappropriate parameter specification");
+        }
+    }
+
+    protected void engineInit(AlgorithmParameterSpec paramSpec)
+        throws InvalidParameterSpecException {
+        if (!(paramSpec instanceof GCMParameterSpec)) {
+            throw new InvalidParameterSpecException
+                ("Inappropriate parameter specification");
+        }
+        GCMParameterSpec gcmSpec = (GCMParameterSpec) paramSpec;
+        try {
+            setValues(gcmSpec.getIV(), gcmSpec.getTLen()/8);
+        } catch (IOException ioe) {
+            throw new InvalidParameterSpecException(ioe.getMessage());
+        }
+    }
+
+    protected void engineInit(byte[] encoded) throws IOException {
+        DerValue val = new DerValue(encoded);
+        if (val.tag == DerValue.tag_Sequence) {
+            val.data.reset();
+            setValues(val.data.getOctetString(), val.data.getInteger());
+        } else {
+            throw new IOException("GCM parameter parsing error: SEQ tag expected");
+        }
+    }
+
+    protected void engineInit(byte[] encoded, String format)
+        throws IOException {
+        // ignore format for now
+        engineInit(encoded);
+    }
+
+    protected String engineToString() {
+        return ("IV=" + Arrays.toString(iv) + ", tLen=" + tLen * 8);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/jdk.crypto.ucrypto/solaris/classes/com/oracle/security/ucrypto/NativeCipher.java	Thu Oct 23 13:44:28 2014 -0700
@@ -0,0 +1,588 @@
+/*
+ * Copyright (c) 2014, 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
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.oracle.security.ucrypto;
+
+import java.nio.ByteBuffer;
+import java.util.Set;
+import java.util.Arrays;
+import java.util.concurrent.ConcurrentSkipListSet;
+import java.lang.ref.*;
+
+import java.security.*;
+import java.security.spec.*;
+import javax.crypto.*;
+
+import javax.crypto.spec.SecretKeySpec;
+import javax.crypto.spec.IvParameterSpec;
+
+/**
+ * Cipher wrapper class utilizing ucrypto APIs. This class currently supports
+ * - AES/ECB/NOPADDING
+ * - AES/CBC/NOPADDING
+ * - AES/CTR/NOPADDING
+ * - AES/CFB128/NOPADDING
+ * (Support for GCM mode is inside the child class NativeGCMCipher)
+ *
+ * @since 1.9
+ */
+class NativeCipher extends CipherSpi {
+
+    // public implementation classes
+    public static final class AesEcbNoPadding extends NativeCipher {
+        public AesEcbNoPadding() throws NoSuchAlgorithmException {
+            super(UcryptoMech.CRYPTO_AES_ECB);
+        }
+    }
+    public static final class AesCbcNoPadding extends NativeCipher {
+        public AesCbcNoPadding() throws NoSuchAlgorithmException {
+            super(UcryptoMech.CRYPTO_AES_CBC);
+        }
+    }
+    public static final class AesCtrNoPadding extends NativeCipher {
+        public AesCtrNoPadding() throws NoSuchAlgorithmException {
+            super(UcryptoMech.CRYPTO_AES_CTR);
+        }
+    }
+    public static final class AesCfb128NoPadding extends NativeCipher {
+        public AesCfb128NoPadding() throws NoSuchAlgorithmException {
+            super(UcryptoMech.CRYPTO_AES_CFB128);
+        }
+    }
+
+    // public implementation classes with fixed key sizes
+    public static final class Aes128EcbNoPadding extends NativeCipher {
+        public Aes128EcbNoPadding() throws NoSuchAlgorithmException {
+            super(UcryptoMech.CRYPTO_AES_ECB, 16);
+        }
+    }
+    public static final class Aes128CbcNoPadding extends NativeCipher {
+        public Aes128CbcNoPadding() throws NoSuchAlgorithmException {
+            super(UcryptoMech.CRYPTO_AES_CBC, 16);
+        }
+    }
+    public static final class Aes192EcbNoPadding extends NativeCipher {
+        public Aes192EcbNoPadding() throws NoSuchAlgorithmException {
+            super(UcryptoMech.CRYPTO_AES_ECB, 24);
+        }
+    }
+    public static final class Aes192CbcNoPadding extends NativeCipher {
+        public Aes192CbcNoPadding() throws NoSuchAlgorithmException {
+            super(UcryptoMech.CRYPTO_AES_CBC, 24);
+        }
+    }
+    public static final class Aes256EcbNoPadding extends NativeCipher {
+        public Aes256EcbNoPadding() throws NoSuchAlgorithmException {
+            super(UcryptoMech.CRYPTO_AES_ECB, 32);
+        }
+    }
+    public static final class Aes256CbcNoPadding extends NativeCipher {
+        public Aes256CbcNoPadding() throws NoSuchAlgorithmException {
+            super(UcryptoMech.CRYPTO_AES_CBC, 32);
+        }
+    }
+
+    // ok as constants since AES is all we support
+    public static final int AES_BLOCK_SIZE = 16;
+    public static final String AES_KEY_ALGO = "AES";
+
+    // fields set in constructor
+    protected final UcryptoMech mech;
+    protected String keyAlgo;
+    protected int blockSize;
+    protected int fixedKeySize;
+
+    //
+    // fields (re)set in every init()
+    //
+    protected CipherContextRef pCtxt = null;
+    protected byte[] keyValue = null;
+    protected byte[] iv = null;
+    protected boolean initialized = false;
+    protected boolean encrypt = true;
+    protected int bytesBuffered = 0;
+
+    // private utility methods for key re-construction
+    private static final PublicKey constructPublicKey(byte[] encodedKey,
+                                              String encodedKeyAlgorithm)
+        throws InvalidKeyException, NoSuchAlgorithmException {
+
+        PublicKey key = null;
+        try {
+            KeyFactory keyFactory =
+                KeyFactory.getInstance(encodedKeyAlgorithm);
+            X509EncodedKeySpec keySpec = new X509EncodedKeySpec(encodedKey);
+            key = keyFactory.generatePublic(keySpec);
+        } catch (NoSuchAlgorithmException nsae) {
+            throw new NoSuchAlgorithmException("No provider found for " +
+                                               encodedKeyAlgorithm +
+                                               " KeyFactory");
+        } catch (InvalidKeySpecException ikse) {
+            // Should never happen
+            throw new InvalidKeyException("Cannot construct public key", ikse);
+        }
+        return key;
+    }
+
+    private static final PrivateKey constructPrivateKey(byte[] encodedKey,
+                                                String encodedKeyAlgorithm)
+        throws InvalidKeyException, NoSuchAlgorithmException {
+
+        PrivateKey key = null;
+        try {
+            KeyFactory keyFactory =
+                KeyFactory.getInstance(encodedKeyAlgorithm);
+            PKCS8EncodedKeySpec keySpec = new PKCS8EncodedKeySpec(encodedKey);
+            key = keyFactory.generatePrivate(keySpec);
+        } catch (NoSuchAlgorithmException nsae) {
+            throw new NoSuchAlgorithmException("No provider found for " +
+                                               encodedKeyAlgorithm +
+                                               " KeyFactory");
+        } catch (InvalidKeySpecException ikse) {
+            // Should never happen
+            throw new InvalidKeyException("Cannot construct private key", ikse);
+        }
+        return key;
+    }
+
+    private static final SecretKey constructSecretKey(byte[] encodedKey,
+                                              String encodedKeyAlgorithm) {
+        return new SecretKeySpec(encodedKey, encodedKeyAlgorithm);
+    }
+
+    // package-private utility method for general key re-construction
+    static final Key constructKey(int keyType, byte[] encodedKey,
+                                  String encodedKeyAlgorithm)
+        throws InvalidKeyException, NoSuchAlgorithmException {
+        Key result = null;
+        switch (keyType) {
+        case Cipher.SECRET_KEY:
+            result = constructSecretKey(encodedKey,
+                                        encodedKeyAlgorithm);
+            break;
+        case Cipher.PRIVATE_KEY:
+            result = constructPrivateKey(encodedKey,
+                                         encodedKeyAlgorithm);
+            break;
+        case Cipher.PUBLIC_KEY:
+            result = constructPublicKey(encodedKey,
+                                        encodedKeyAlgorithm);
+            break;
+        }
+        return result;
+    }
+
+    NativeCipher(UcryptoMech mech, int fixedKeySize) throws NoSuchAlgorithmException {
+        this.mech = mech;
+        // defaults to AES - the only supported symmetric cipher algo
+        this.blockSize = AES_BLOCK_SIZE;
+        this.keyAlgo = AES_KEY_ALGO;
+        this.fixedKeySize = fixedKeySize;
+    }
+
+    NativeCipher(UcryptoMech mech) throws NoSuchAlgorithmException {
+        this(mech, -1);
+    }
+
+    @Override
+    protected void engineSetMode(String mode) throws NoSuchAlgorithmException {
+        // Disallow change of mode for now since currently it's explicitly
+        // defined in transformation strings
+        throw new NoSuchAlgorithmException("Unsupported mode " + mode);
+    }
+
+    // see JCE spec
+    @Override
+    protected void engineSetPadding(String padding)
+            throws NoSuchPaddingException {
+        // Disallow change of padding for now since currently it's explicitly
+        // defined in transformation strings
+        throw new NoSuchPaddingException("Unsupported padding " + padding);
+    }
+
+    // see JCE spec
+    @Override
+    protected int engineGetBlockSize() {
+        return blockSize;
+    }
+
+    // see JCE spec
+    @Override
+    protected synchronized int engineGetOutputSize(int inputLen) {
+        return getOutputSizeByOperation(inputLen, true);
+    }
+
+    // see JCE spec
+    @Override
+    protected synchronized byte[] engineGetIV() {
+        return (iv != null? iv.clone() : null);
+    }
+
+    // see JCE spec
+    @Override
+    protected synchronized AlgorithmParameters engineGetParameters() {
+        AlgorithmParameters params = null;
+        try {
+            if (iv != null) {
+                IvParameterSpec ivSpec = new IvParameterSpec(iv.clone());
+                params = AlgorithmParameters.getInstance(keyAlgo);
+                params.init(ivSpec);
+            }
+        } catch (GeneralSecurityException e) {
+            // NoSuchAlgorithmException, NoSuchProviderException
+            // InvalidParameterSpecException
+            throw new UcryptoException("Could not encode parameters", e);
+        }
+        return params;
+    }
+
+    @Override
+    protected int engineGetKeySize(Key key) throws InvalidKeyException {
+        return checkKey(key) * 8;
+    }
+
+    // see JCE spec
+    @Override
+    protected synchronized void engineInit(int opmode, Key key,
+            SecureRandom random) throws InvalidKeyException {
+        try {
+            engineInit(opmode, key, (AlgorithmParameterSpec)null, random);
+        } catch (InvalidAlgorithmParameterException e) {
+            throw new InvalidKeyException("init() failed", e);
+        }
+    }
+
+    // see JCE spec
+    @Override
+    protected synchronized void engineInit(int opmode, Key key,
+            AlgorithmParameterSpec params, SecureRandom random)
+            throws InvalidKeyException, InvalidAlgorithmParameterException {
+        checkKey(key);
+        if (opmode != Cipher.ENCRYPT_MODE &&
+            opmode != Cipher.DECRYPT_MODE &&
+            opmode != Cipher.WRAP_MODE &&
+            opmode != Cipher.UNWRAP_MODE) {
+            throw new InvalidAlgorithmParameterException
+                ("Unsupported mode: " + opmode);
+        }
+        boolean doEncrypt =
+                (opmode == Cipher.ENCRYPT_MODE || opmode == Cipher.WRAP_MODE);
+
+        byte[] ivBytes = null;
+        if (mech == UcryptoMech.CRYPTO_AES_ECB) {
+            if (params != null) {
+                throw new InvalidAlgorithmParameterException
+                        ("No Parameters for ECB mode");
+            }
+        } else {
+            if (params != null) {
+                if (!(params instanceof IvParameterSpec)) {
+                    throw new InvalidAlgorithmParameterException
+                            ("IvParameterSpec required");
+                } else {
+                    ivBytes = ((IvParameterSpec) params).getIV();
+                    if (ivBytes.length != blockSize) {
+                        throw new InvalidAlgorithmParameterException
+                             ("Wrong IV length: must be " + blockSize +
+                              " bytes long");
+                    }
+                }
+            } else {
+                if (encrypt) {
+                    // generate IV if none supplied for encryption
+                    ivBytes = new byte[blockSize];
+                    new SecureRandom().nextBytes(ivBytes);
+                } else {
+                    throw new InvalidAlgorithmParameterException
+                            ("Parameters required for decryption");
+                }
+            }
+        }
+        init(doEncrypt, key.getEncoded().clone(), ivBytes);
+    }
+
+    // see JCE spec
+    @Override
+    protected synchronized void engineInit(int opmode, Key key,
+            AlgorithmParameters params, SecureRandom random)
+            throws InvalidKeyException, InvalidAlgorithmParameterException {
+        AlgorithmParameterSpec spec = null;
+        if (params != null) {
+            try {
+                spec = params.getParameterSpec(IvParameterSpec.class);
+            } catch (InvalidParameterSpecException iaps) {
+                throw new InvalidAlgorithmParameterException(iaps);
+            }
+        }
+        engineInit(opmode, key, spec, random);
+    }
+
+    // see JCE spec
+    @Override
+    protected synchronized byte[] engineUpdate(byte[] in, int ofs, int len) {
+        byte[] out = new byte[getOutputSizeByOperation(len, false)];
+        int n = update(in, ofs, len, out, 0);
+        if (n == 0) {
+            return null;
+        } else if (out.length != n) {
+            out = Arrays.copyOf(out, n);
+        }
+        return out;
+    }
+
+    // see JCE spec
+    @Override
+    protected synchronized int engineUpdate(byte[] in, int inOfs, int inLen,
+        byte[] out, int outOfs) throws ShortBufferException {
+        int min = getOutputSizeByOperation(inLen, false);
+        if (out.length - outOfs < min) {
+            throw new ShortBufferException("min " + min + "-byte buffer needed");
+        }
+        return update(in, inOfs, inLen, out, outOfs);
+    }
+
+    // see JCE spec
+    @Override
+    protected synchronized void engineUpdateAAD(byte[] src, int ofs, int len)
+            throws IllegalStateException {
+        throw new IllegalStateException("No AAD can be supplied");
+    }
+
+    // see JCE spec
+    @Override
+    protected void engineUpdateAAD(ByteBuffer src)
+            throws IllegalStateException {
+        throw new IllegalStateException("No AAD can be supplied");
+    }
+
+    // see JCE spec
+    @Override
+    protected synchronized byte[] engineDoFinal(byte[] in, int ofs, int len)
+            throws IllegalBlockSizeException, BadPaddingException {
+        byte[] out = new byte[getOutputSizeByOperation(len, true)];
+        try {
+            // delegate to the other engineDoFinal(...) method
+            int k = engineDoFinal(in, ofs, len, out, 0);
+            if (out.length != k) {
+                out = Arrays.copyOf(out, k);
+            }
+            return out;
+        } catch (ShortBufferException e) {
+            throw new UcryptoException("Internal Error", e);
+        }
+    }
+
+    // see JCE spec
+    @Override
+    protected synchronized int engineDoFinal(byte[] in, int inOfs, int inLen,
+                                             byte[] out, int outOfs)
+            throws ShortBufferException, IllegalBlockSizeException,
+            BadPaddingException {
+        int k = 0;
+        int min = getOutputSizeByOperation(inLen, true);
+        if (out.length - outOfs < min) {
+            throw new ShortBufferException("min " + min + "-byte buffer needed");
+        }
+        if (inLen > 0) {
+            k = update(in, inOfs, inLen, out, outOfs);
+            outOfs += k;
+        }
+        k += doFinal(out, outOfs);
+        return k;
+    }
+
+
+    // see JCE spec
+    @Override
+    protected synchronized byte[] engineWrap(Key key)
+            throws IllegalBlockSizeException, InvalidKeyException {
+        byte[] result = null;
+        try {
+            byte[] encodedKey = key.getEncoded();
+            if ((encodedKey == null) || (encodedKey.length == 0)) {
+                throw new InvalidKeyException("Cannot get an encoding of " +
+                                              "the key to be wrapped");
+            }
+            result = engineDoFinal(encodedKey, 0, encodedKey.length);
+        } catch (BadPaddingException e) {
+            // Should never happen for key wrapping
+            throw new UcryptoException("Internal Error" , e);
+        }
+        return result;
+    }
+
+    // see JCE spec
+    @Override
+    protected synchronized Key engineUnwrap(byte[] wrappedKey,
+            String wrappedKeyAlgorithm, int wrappedKeyType)
+            throws InvalidKeyException, NoSuchAlgorithmException {
+
+        byte[] encodedKey;
+        Key result = null;
+        try {
+            encodedKey = engineDoFinal(wrappedKey, 0,
+                                       wrappedKey.length);
+        } catch (Exception e) {
+            throw (InvalidKeyException)
+                (new InvalidKeyException()).initCause(e);
+        }
+
+        return constructKey(wrappedKeyType, encodedKey, wrappedKeyAlgorithm);
+    }
+
+    final int checkKey(Key key) throws InvalidKeyException {
+        if (key == null || key.getEncoded() == null) {
+            throw new InvalidKeyException("Key cannot be null");
+        } else {
+            // check key algorithm and format
+            if (!keyAlgo.equalsIgnoreCase(key.getAlgorithm())) {
+                throw new InvalidKeyException("Key algorithm must be " +
+                    keyAlgo);
+            }
+            if (!"RAW".equalsIgnoreCase(key.getFormat())) {
+                throw new InvalidKeyException("Key format must be RAW");
+            }
+            int keyLen = key.getEncoded().length;
+            if (fixedKeySize == -1) {
+                // all 3 AES key lengths are allowed
+                if (keyLen != 16 && keyLen != 24 && keyLen != 32) {
+                    throw new InvalidKeyException("Key size is not valid");
+                }
+            } else {
+                if (keyLen != fixedKeySize) {
+                    throw new InvalidKeyException("Only " + fixedKeySize +
+                        "-byte keys are accepted");
+                }
+            }
+            // return the validated key length in bytes
+            return keyLen;
+        }
+    }
+
+    protected void reset(boolean doCancel) {
+        initialized = false;
+        bytesBuffered = 0;
+        if (pCtxt != null) {
+            pCtxt.dispose(doCancel);
+            pCtxt = null;
+        }
+    }
+
+    /**
+     * calls ucrypto_encrypt_init(...) or ucrypto_decrypt_init(...)
+     * @return pointer to the context
+     */
+    protected native static long nativeInit(int mech, boolean encrypt,
+                                            byte[] key, byte[] iv,
+                                            int tagLen, byte[] aad);
+
+    /**
+     * calls ucrypto_encrypt_update(...) or ucrypto_decrypt_update(...)
+     * @returns the length of output or if negative, an error status code
+     */
+    private native static int nativeUpdate(long pContext, boolean encrypt,
+                                           byte[] in, int inOfs, int inLen,
+                                           byte[] out, int outOfs);
+
+    /**
+     * calls ucrypto_encrypt_final(...) or ucrypto_decrypt_final(...)
+     * @returns the length of output or if negative, an error status code
+     */
+    native static int nativeFinal(long pContext, boolean encrypt,
+                                          byte[] out, int outOfs);
+
+    protected void ensureInitialized() {
+        if (!initialized) {
+            init(encrypt, keyValue, iv);
+            if (!initialized) {
+                throw new UcryptoException("Cannot initialize Cipher");
+            }
+        }
+    }
+
+    protected int getOutputSizeByOperation(int inLen, boolean isDoFinal) {
+        if (inLen <= 0) {
+            inLen = 0;
+        }
+        if (!isDoFinal && (inLen == 0)) {
+            return 0;
+        }
+        return inLen + bytesBuffered;
+    }
+
+    // actual init() implementation - caller should clone key and iv if needed
+    protected void init(boolean encrypt, byte[] keyVal, byte[] ivVal) {
+        reset(true);
+        this.encrypt = encrypt;
+        this.keyValue = keyVal;
+        this.iv = ivVal;
+        long pCtxtVal = nativeInit(mech.value(), encrypt, keyValue, iv, 0, null);
+        initialized = (pCtxtVal != 0L);
+        if (initialized) {
+            pCtxt = new CipherContextRef(this, pCtxtVal, encrypt);
+        } else {
+            throw new UcryptoException("Cannot initialize Cipher");
+        }
+    }
+
+    // Caller MUST check and ensure output buffer has enough capacity
+    private int update(byte[] in, int inOfs, int inLen, byte[] out, int outOfs) {
+        ensureInitialized();
+        if (inLen <= 0) { return 0; }
+
+        int k = nativeUpdate(pCtxt.id, encrypt, in, inOfs, inLen, out, outOfs);
+        if (k < 0) {
+            reset(false);
+            // cannot throw ShortBufferException here since it's too late
+            // native context is invalid upon any failure
+            throw new UcryptoException(-k);
+        }
+        bytesBuffered += (inLen - k);
+        return k;
+    }
+
+    // Caller MUST check and ensure output buffer has enough capacity
+    private int doFinal(byte[] out, int outOfs) throws IllegalBlockSizeException,
+            BadPaddingException {
+        try {
+            ensureInitialized();
+
+            int k = nativeFinal(pCtxt.id, encrypt, out, outOfs);
+            if (k < 0) {
+                String cause = UcryptoException.getErrorMessage(-k);
+                if (cause.endsWith("_LEN_RANGE")) {
+                    throw new IllegalBlockSizeException(cause);
+                } else if (cause.endsWith("_DATA_INVALID")) {
+                    throw new BadPaddingException(cause);
+                } else {
+                    throw new UcryptoException(-k);
+                }
+            }
+            return k;
+        } finally {
+            reset(false);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/jdk.crypto.ucrypto/solaris/classes/com/oracle/security/ucrypto/NativeCipherWithJavaPadding.java	Thu Oct 23 13:44:28 2014 -0700
@@ -0,0 +1,464 @@
+/*
+ * Copyright (c) 2014, 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
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.oracle.security.ucrypto;
+
+import java.nio.ByteBuffer;
+import java.util.Set;
+import java.util.Arrays;
+import java.util.concurrent.ConcurrentSkipListSet;
+import java.lang.ref.*;
+
+import java.security.AlgorithmParameters;
+import java.security.GeneralSecurityException;
+import java.security.InvalidAlgorithmParameterException;
+import java.security.InvalidKeyException;
+import java.security.Key;
+import java.security.NoSuchAlgorithmException;
+import java.security.SecureRandom;
+
+
+import java.security.spec.AlgorithmParameterSpec;
+import java.security.spec.InvalidParameterSpecException;
+
+import javax.crypto.BadPaddingException;
+import javax.crypto.Cipher;
+import javax.crypto.CipherSpi;
+import javax.crypto.IllegalBlockSizeException;
+import javax.crypto.NoSuchPaddingException;
+import javax.crypto.ShortBufferException;
+
+import javax.crypto.spec.IvParameterSpec;
+
+/**
+ * Wrapper class which uses NativeCipher class and Java impls of padding scheme.
+ * This class currently supports
+ * - AES/ECB/PKCS5PADDING
+ * - AES/CBC/PKCS5PADDING
+ * - AES/CFB128/PKCS5PADDING
+ *
+ * @since 1.9
+ */
+public class NativeCipherWithJavaPadding extends CipherSpi {
+
+    private static interface Padding {
+        // ENC: generate and return the necessary padding bytes
+        int getPadLen(int dataLen);
+
+        // ENC: generate and return the necessary padding bytes
+        byte[] getPaddingBytes(int dataLen);
+
+        // DEC: process the decrypted data and buffer up the potential padding
+        // bytes
+        byte[] bufferBytes(byte[] intermediateData);
+
+        // DEC: return the length of internally buffered pad bytes
+        int getBufferedLength();
+
+        // DEC: unpad and place the output in 'out', starting from outOfs
+        // and return the number of bytes unpadded into 'out'.
+        int unpad(byte[] paddedData, byte[] out, int outOfs)
+                throws BadPaddingException, IllegalBlockSizeException,
+                ShortBufferException;
+
+        // DEC: Clears the padding object to the initial state
+        void clear();
+    }
+
+    private static class PKCS5Padding implements Padding {
+        private final int blockSize;
+        // buffer for storing the the potential padding bytes
+        private ByteBuffer trailingBytes = null;
+
+        PKCS5Padding(int blockSize)
+            throws NoSuchPaddingException {
+            if (blockSize == 0) {
+                throw new NoSuchPaddingException
+                        ("PKCS#5 padding not supported with stream ciphers");
+            }
+            this.blockSize = blockSize;
+        }
+
+        public int getPadLen(int dataLen) {
+            return (blockSize - (dataLen & (blockSize - 1)));
+        }
+
+        public byte[] getPaddingBytes(int dataLen) {
+            byte padValue = (byte) getPadLen(dataLen);
+            byte[] paddingBytes = new byte[padValue];
+            Arrays.fill(paddingBytes, padValue);
+            return paddingBytes;
+        }
+
+        public byte[] bufferBytes(byte[] dataFromUpdate) {
+            if (dataFromUpdate == null || dataFromUpdate.length == 0) {
+                return null;
+            }
+            byte[] result = null;
+            if (trailingBytes == null) {
+                trailingBytes = ByteBuffer.wrap(new byte[blockSize]);
+            }
+            int tbSize = trailingBytes.position();
+            if (dataFromUpdate.length > trailingBytes.remaining()) {
+                int totalLen = dataFromUpdate.length + tbSize;
+                int newTBSize = totalLen % blockSize;
+                if (newTBSize == 0) {
+                    newTBSize = blockSize;
+                }
+                if (tbSize == 0) {
+                    result = Arrays.copyOf(dataFromUpdate, totalLen - newTBSize);
+                } else {
+                    // combine 'trailingBytes' and 'dataFromUpdate'
+                    result = Arrays.copyOf(trailingBytes.array(),
+                                           totalLen - newTBSize);
+                    if (result.length != tbSize) {
+                        System.arraycopy(dataFromUpdate, 0, result, tbSize,
+                                         result.length - tbSize);
+                    }
+                }
+                // update 'trailingBytes' w/ remaining bytes in 'dataFromUpdate'
+                trailingBytes.clear();
+                trailingBytes.put(dataFromUpdate,
+                                  dataFromUpdate.length - newTBSize, newTBSize);
+            } else {
+                trailingBytes.put(dataFromUpdate);
+            }
+            return result;
+        }
+
+        public int getBufferedLength() {
+            if (trailingBytes != null) {
+                return trailingBytes.position();
+            }
+            return 0;
+        }
+
+        public int unpad(byte[] lastData, byte[] out, int outOfs)
+                throws BadPaddingException, IllegalBlockSizeException,
+                ShortBufferException {
+            int tbSize = (trailingBytes == null? 0:trailingBytes.position());
+            int dataLen = tbSize + lastData.length;
+            // check total length
+            if ((dataLen < 1) || (dataLen % blockSize != 0)) {
+                UcryptoProvider.debug("PKCS5Padding: unpad, buffered " + tbSize +
+                                 " bytes, last block " + lastData.length + " bytes");
+
+                throw new IllegalBlockSizeException
+                    ("Input length must be multiples of " + blockSize);
+            }
+
+            // check padding bytes
+            if (lastData.length == 0) {
+                if (tbSize != 0) {
+                    // work on 'trailingBytes' directly
+                    lastData = Arrays.copyOf(trailingBytes.array(), tbSize);
+                    trailingBytes.clear();
+                    tbSize = 0;
+                } else {
+                    throw new BadPaddingException("No pad bytes found!");
+                }
+            }
+            byte padValue = lastData[lastData.length - 1];
+            if (padValue < 1 || padValue > blockSize) {
+                UcryptoProvider.debug("PKCS5Padding: unpad, lastData: " + Arrays.toString(lastData));
+                UcryptoProvider.debug("PKCS5Padding: unpad, padValue=" + padValue);
+                throw new BadPaddingException("Invalid pad value!");
+            }
+
+            // sanity check padding bytes
+            int padStartIndex = lastData.length - padValue;
+            for (int i = padStartIndex; i < lastData.length; i++) {
+                if (lastData[i] != padValue) {
+                    UcryptoProvider.debug("PKCS5Padding: unpad, lastData: " + Arrays.toString(lastData));
+                    UcryptoProvider.debug("PKCS5Padding: unpad, padValue=" + padValue);
+                    throw new BadPaddingException("Invalid padding bytes!");
+                }
+            }
+
+            int actualOutLen = dataLen - padValue;
+            // check output buffer capacity
+            if (out.length - outOfs < actualOutLen) {
+                throw new ShortBufferException("Output buffer too small, need " + actualOutLen +
+                    ", got " + (out.length - outOfs));
+            }
+            try {
+                if (tbSize != 0) {
+                    trailingBytes.rewind();
+                    if (tbSize < actualOutLen) {
+                        trailingBytes.get(out, outOfs, tbSize);
+                        outOfs += tbSize;
+                    } else {
+                        // copy from trailingBytes and we are done
+                        trailingBytes.get(out, outOfs, actualOutLen);
+                        return actualOutLen;
+                    }
+                }
+                if (lastData.length > padValue) {
+                    System.arraycopy(lastData, 0, out, outOfs,
+                                     lastData.length - padValue);
+                }
+                return actualOutLen;
+            } finally {
+                clear();
+            }
+        }
+
+        public void clear() {
+            if (trailingBytes != null) trailingBytes.clear();
+        }
+    }
+
+    public static final class AesEcbPKCS5 extends NativeCipherWithJavaPadding {
+        public AesEcbPKCS5() throws NoSuchAlgorithmException, NoSuchPaddingException {
+            super(new NativeCipher.AesEcbNoPadding(), "PKCS5Padding");
+        }
+    }
+
+    public static final class AesCbcPKCS5 extends NativeCipherWithJavaPadding {
+        public AesCbcPKCS5() throws NoSuchAlgorithmException, NoSuchPaddingException {
+            super(new NativeCipher.AesCbcNoPadding(), "PKCS5Padding");
+        }
+    }
+
+    public static final class AesCfb128PKCS5 extends NativeCipherWithJavaPadding {
+        public AesCfb128PKCS5() throws NoSuchAlgorithmException, NoSuchPaddingException {
+            super(new NativeCipher.AesCfb128NoPadding(), "PKCS5Padding");
+        }
+    }
+
+    // fields (re)set in every init()
+    private final NativeCipher nc;
+    private final Padding padding;
+    private final int blockSize;
+    private int lastBlockLen = 0;
+
+    // Only ECB, CBC, CTR, and CFB128 modes w/ NOPADDING for now
+    NativeCipherWithJavaPadding(NativeCipher nc, String paddingScheme)
+        throws NoSuchAlgorithmException, NoSuchPaddingException {
+        this.nc = nc;
+        this.blockSize = nc.engineGetBlockSize();
+        if (paddingScheme.toUpperCase().equals("PKCS5PADDING")) {
+            padding = new PKCS5Padding(blockSize);
+        } else {
+            throw new NoSuchAlgorithmException("Unsupported padding scheme: " + paddingScheme);
+        }
+    }
+
+    void reset() {
+        padding.clear();
+        lastBlockLen = 0;
+    }
+
+    @Override
+    protected synchronized void engineSetMode(String mode) throws NoSuchAlgorithmException {
+        nc.engineSetMode(mode);
+    }
+
+    // see JCE spec
+    @Override
+    protected void engineSetPadding(String padding)
+            throws NoSuchPaddingException {
+        // Disallow change of padding for now since currently it's explicitly
+        // defined in transformation strings
+        throw new NoSuchPaddingException("Unsupported padding " + padding);
+    }
+
+    // see JCE spec
+    @Override
+    protected int engineGetBlockSize() {
+        return blockSize;
+    }
+
+    // see JCE spec
+    @Override
+    protected synchronized int engineGetOutputSize(int inputLen) {
+        int result = nc.engineGetOutputSize(inputLen);
+        if (nc.encrypt) {
+            result += padding.getPadLen(result);
+        } else {
+            result += padding.getBufferedLength();
+        }
+        return result;
+    }
+
+    // see JCE spec
+    @Override
+    protected synchronized byte[] engineGetIV() {
+        return nc.engineGetIV();
+    }
+
+    // see JCE spec
+    @Override
+    protected synchronized AlgorithmParameters engineGetParameters() {
+        return nc.engineGetParameters();
+    }
+
+    @Override
+    protected int engineGetKeySize(Key key) throws InvalidKeyException {
+        return nc.engineGetKeySize(key);
+    }
+
+    // see JCE spec
+    @Override
+    protected synchronized void engineInit(int opmode, Key key, SecureRandom random)
+            throws InvalidKeyException {
+        reset();
+        nc.engineInit(opmode, key, random);
+    }
+
+    // see JCE spec
+    @Override
+    protected synchronized void engineInit(int opmode, Key key,
+            AlgorithmParameterSpec params, SecureRandom random)
+            throws InvalidKeyException, InvalidAlgorithmParameterException {
+        reset();
+        nc.engineInit(opmode, key, params, random);
+    }
+
+    // see JCE spec
+    @Override
+    protected synchronized void engineInit(int opmode, Key key, AlgorithmParameters params,
+            SecureRandom random)
+            throws InvalidKeyException, InvalidAlgorithmParameterException {
+        reset();
+        nc.engineInit(opmode, key, params, random);
+    }
+
+    // see JCE spec
+    @Override
+    protected synchronized byte[] engineUpdate(byte[] in, int inOfs, int inLen) {
+        if (nc.encrypt) {
+            lastBlockLen += inLen;
+            lastBlockLen &= (blockSize - 1);
+            return nc.engineUpdate(in, inOfs, inLen);
+        } else {
+            return padding.bufferBytes(nc.engineUpdate(in, inOfs, inLen));
+        }
+    }
+
+    // see JCE spec
+    @Override
+    protected synchronized int engineUpdate(byte[] in, int inOfs, int inLen, byte[] out,
+            int outOfs) throws ShortBufferException {
+        if (nc.encrypt) {
+            lastBlockLen += inLen;
+            lastBlockLen &= (blockSize - 1);
+            return nc.engineUpdate(in, inOfs, inLen, out, outOfs);
+        } else {
+            byte[] result = padding.bufferBytes(nc.engineUpdate(in, inOfs, inLen));
+            if (result != null) {
+                System.arraycopy(result, 0, out, outOfs, result.length);
+                return result.length;
+            } else return 0;
+        }
+    }
+
+    // see JCE spec
+    @Override
+    protected synchronized byte[] engineDoFinal(byte[] in, int inOfs, int inLen)
+            throws IllegalBlockSizeException, BadPaddingException {
+        int estimatedOutLen = engineGetOutputSize(inLen);
+        byte[] out = new byte[estimatedOutLen];
+        try {
+            int actualOut = this.engineDoFinal(in, inOfs, inLen, out, 0);
+            // truncate off extra bytes
+            if (actualOut != out.length) {
+                out = Arrays.copyOf(out, actualOut);
+            }
+        } catch (ShortBufferException sbe) {
+            throw new UcryptoException("Internal Error");
+        } finally {
+            reset();
+        }
+        return out;
+    }
+
+    // see JCE spec
+    @Override
+    protected synchronized int engineDoFinal(byte[] in, int inOfs, int inLen, byte[] out,
+                                             int outOfs)
+        throws ShortBufferException, IllegalBlockSizeException,
+               BadPaddingException {
+        int estimatedOutLen = engineGetOutputSize(inLen);
+
+        if (out.length - outOfs < estimatedOutLen) {
+            throw new ShortBufferException();
+        }
+        try {
+            if (nc.encrypt) {
+                int k = nc.engineUpdate(in, inOfs, inLen, out, outOfs);
+                lastBlockLen += inLen;
+                lastBlockLen &= (blockSize - 1);
+                byte[] padBytes = padding.getPaddingBytes(lastBlockLen);
+                k += nc.engineDoFinal(padBytes, 0, padBytes.length, out, (outOfs + k));
+                return k;
+            } else {
+                byte[] tempOut = nc.engineDoFinal(in, inOfs, inLen);
+                int len = padding.unpad(tempOut, out, outOfs);
+                return len;
+            }
+        } finally {
+            reset();
+        }
+    }
+
+    // see JCE spec
+    @Override
+    protected synchronized byte[] engineWrap(Key key) throws IllegalBlockSizeException,
+                                                InvalidKeyException {
+        byte[] result = null;
+        try {
+            byte[] encodedKey = key.getEncoded();
+            if ((encodedKey == null) || (encodedKey.length == 0)) {
+                throw new InvalidKeyException("Cannot get an encoding of " +
+                                              "the key to be wrapped");
+            }
+            result = engineDoFinal(encodedKey, 0, encodedKey.length);
+        } catch (BadPaddingException e) {
+            // Should never happen for key wrapping
+            throw new UcryptoException("Internal Error", e);
+        }
+        return result;
+    }
+
+    // see JCE spec
+    @Override
+    protected synchronized Key engineUnwrap(byte[] wrappedKey, String wrappedKeyAlgorithm,
+                               int wrappedKeyType)
+        throws InvalidKeyException, NoSuchAlgorithmException {
+
+        byte[] encodedKey;
+        try {
+            encodedKey = engineDoFinal(wrappedKey, 0,
+                                       wrappedKey.length);
+        } catch (Exception e) {
+            throw (InvalidKeyException)
+                (new InvalidKeyException()).initCause(e);
+        }
+
+        return NativeCipher.constructKey(wrappedKeyType, encodedKey,
+                                         wrappedKeyAlgorithm);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/jdk.crypto.ucrypto/solaris/classes/com/oracle/security/ucrypto/NativeDigest.java	Thu Oct 23 13:44:28 2014 -0700
@@ -0,0 +1,243 @@
+/*
+ * Copyright (c) 2014, 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
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.oracle.security.ucrypto;
+
+import java.lang.ref.*;
+
+import java.io.ByteArrayOutputStream;
+import java.util.*;
+import java.util.concurrent.ConcurrentSkipListSet;
+import java.security.*;
+
+/**
+ * MessageDigest implementation class. This class currently supports
+ * MD5, SHA1, SHA256, SHA384, and SHA512
+ *
+ * @since 1.9
+ */
+public abstract class NativeDigest extends MessageDigestSpi
+        implements Cloneable {
+
+    private static final int MECH_MD5 = 1;
+    private static final int MECH_SHA1 = 2;
+    private static final int MECH_SHA256 = 3;
+    private static final int MECH_SHA224 = 4;
+    private static final int MECH_SHA384 = 5;
+    private static final int MECH_SHA512 = 6;
+
+    private final int digestLen;
+    private final int mech;
+
+    // field for ensuring native memory is freed
+    private DigestContextRef pCtxt = null;
+
+    private static class DigestContextRef extends PhantomReference<NativeDigest>
+        implements Comparable<DigestContextRef> {
+
+        private static ReferenceQueue<NativeDigest> refQueue =
+            new ReferenceQueue<NativeDigest>();
+
+        // Needed to keep these references from being GC'ed until when their
+        // referents are GC'ed so we can do post-mortem processing
+        private static Set<DigestContextRef> refList =
+            new ConcurrentSkipListSet<DigestContextRef>();
+            //            Collections.synchronizedSortedSet(new TreeSet<DigestContextRef>());
+
+        private final long id;
+        private final int mech;
+
+        private static void drainRefQueueBounded() {
+            while (true) {
+                DigestContextRef next = (DigestContextRef) refQueue.poll();
+                if (next == null) break;
+                next.dispose(true);
+            }
+        }
+
+        DigestContextRef(NativeDigest nc, long id, int mech) {
+            super(nc, refQueue);
+            this.id = id;
+            this.mech = mech;
+            refList.add(this);
+            UcryptoProvider.debug("Resource: track Digest Ctxt " + this.id);
+            drainRefQueueBounded();
+        }
+
+        public int compareTo(DigestContextRef other) {
+            if (this.id == other.id) {
+                return 0;
+            } else {
+                return (this.id < other.id) ? -1 : 1;
+            }
+        }
+
+        void dispose(boolean needFree) {
+            refList.remove(this);
+            try {
+                if (needFree) {
+                    UcryptoProvider.debug("Resource: free Digest Ctxt " + this.id);
+                    NativeDigest.nativeFree(mech, id);
+                } else UcryptoProvider.debug("Resource: stop tracking Digest Ctxt " + this.id);
+            } finally {
+                this.clear();
+            }
+        }
+    }
+
+    NativeDigest(int mech, int digestLen) {
+        this.digestLen = digestLen;
+        this.mech = mech;
+    }
+
+    // see JCA spec
+    protected int engineGetDigestLength() {
+        return digestLen;
+    }
+
+    // see JCA spec
+    protected synchronized void engineReset() {
+        if (pCtxt != null) {
+            pCtxt.dispose(true);
+            pCtxt = null;
+        }
+    }
+
+    // see JCA spec
+    protected synchronized byte[] engineDigest() {
+        byte[] digest = new byte[digestLen];
+        try {
+            int len = engineDigest(digest, 0, digestLen);
+            if (len != digestLen) {
+                throw new UcryptoException("Digest length mismatch");
+            }
+            return digest;
+        } catch (DigestException de) {
+            throw new UcryptoException("Internal error", de);
+        }
+    }
+
+    // see JCA spec
+    protected synchronized int engineDigest(byte[] out, int ofs, int len)
+            throws DigestException {
+        if (len < digestLen) {
+            throw new DigestException("Output buffer must be at least " +
+                                      digestLen + " bytes long");
+        }
+        if ((ofs < 0) || (len < 0) || (ofs > out.length - len)) {
+            throw new DigestException("Buffer too short to store digest");
+        }
+
+        if (pCtxt == null) {
+            pCtxt = new DigestContextRef(this, nativeInit(mech), mech);
+        }
+        try {
+            int status = nativeDigest(mech, pCtxt.id, out, ofs, digestLen);
+            if (status != 0) {
+                throw new DigestException("Internal error: " + status);
+            }
+        } finally {
+            pCtxt.dispose(false);
+            pCtxt = null;
+        }
+        return digestLen;
+    }
+
+    // see JCA spec
+    protected synchronized void engineUpdate(byte in) {
+        byte[] temp = { in };
+        engineUpdate(temp, 0, 1);
+    }
+
+    // see JCA spec
+    protected synchronized void engineUpdate(byte[] in, int ofs, int len) {
+        if (len == 0) {
+            return;
+        }
+        if ((ofs < 0) || (len < 0) || (ofs > in.length - len)) {
+            throw new ArrayIndexOutOfBoundsException();
+        }
+        if (pCtxt == null) {
+            pCtxt = new DigestContextRef(this, nativeInit(mech), mech);
+        }
+        nativeUpdate(mech, pCtxt.id, in, ofs, len);
+    }
+
+    /**
+     * Clone this digest.
+     */
+    public synchronized Object clone() throws CloneNotSupportedException {
+        NativeDigest copy = (NativeDigest) super.clone();
+        // re-work the fields that cannot be copied over
+        if (pCtxt != null) {
+            copy.pCtxt = new DigestContextRef(this, nativeClone(mech, pCtxt.id), mech);
+        }
+        return copy;
+    }
+
+    // return pointer to the context
+    protected static native long nativeInit(int mech);
+    // return status code; always 0
+    protected static native int nativeUpdate(int mech, long pCtxt, byte[] in, int ofs, int inLen);
+    // return status code; always 0
+    protected static native int nativeDigest(int mech, long pCtxt, byte[] out, int ofs, int digestLen);
+    // return pointer to the duplicated context
+    protected static native long nativeClone(int mech, long pCtxt);
+    // free the specified context
+    private native static void nativeFree(int mech, long id);
+
+
+    public static final class MD5 extends NativeDigest {
+        public MD5() {
+            super(MECH_MD5, 16);
+        }
+    }
+
+    public static final class SHA1 extends NativeDigest {
+        public SHA1() {
+            super(MECH_SHA1, 20);
+        }
+    }
+
+    public static final class SHA256 extends NativeDigest {
+        public SHA256() {
+            super(MECH_SHA256, 32);
+        }
+    }
+
+
+    public static final class SHA384 extends NativeDigest {
+        public SHA384() {
+            super(MECH_SHA384, 48);
+        }
+    }
+
+
+    public static final class SHA512 extends NativeDigest {
+        public SHA512() {
+            super(MECH_SHA512, 64);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/jdk.crypto.ucrypto/solaris/classes/com/oracle/security/ucrypto/NativeGCMCipher.java	Thu Oct 23 13:44:28 2014 -0700
@@ -0,0 +1,422 @@
+/*
+ * Copyright (c) 2014, 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
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.oracle.security.ucrypto;
+
+import java.io.ByteArrayOutputStream;
+import java.nio.ByteBuffer;
+
+import java.util.Set;
+import java.util.Arrays;
+import java.security.*;
+import java.security.spec.*;
+import javax.crypto.*;
+import javax.crypto.spec.SecretKeySpec;
+import javax.crypto.spec.GCMParameterSpec;
+
+/**
+ * Cipher wrapper class utilizing ucrypto APIs. This class currently supports
+ * - AES/GCM/NoPADDING
+ *
+ * @since 1.9
+ */
+class NativeGCMCipher extends NativeCipher {
+
+    public static final class AesGcmNoPadding extends NativeGCMCipher {
+        public AesGcmNoPadding() throws NoSuchAlgorithmException {
+            super(-1);
+        }
+    }
+    public static final class Aes128GcmNoPadding extends NativeGCMCipher {
+        public Aes128GcmNoPadding() throws NoSuchAlgorithmException {
+            super(16);
+        }
+    }
+    public static final class Aes192GcmNoPadding extends NativeGCMCipher {
+        public Aes192GcmNoPadding() throws NoSuchAlgorithmException {
+            super(24);
+        }
+    }
+    public static final class Aes256GcmNoPadding extends NativeGCMCipher {
+        public Aes256GcmNoPadding() throws NoSuchAlgorithmException {
+            super(32);
+        }
+    }
+
+    private static final int DEFAULT_TAG_LEN = 128; // same as SunJCE provider
+
+    // buffer for storing AAD data; if null, meaning buffer content has been
+    // supplied to native context
+    private ByteArrayOutputStream aadBuffer = new ByteArrayOutputStream();
+
+    // buffer for storing input in decryption, not used for encryption
+    private ByteArrayOutputStream ibuffer = null;
+
+    private int tagLen = DEFAULT_TAG_LEN;
+
+    /*
+     * variables used for performing the GCM (key+iv) uniqueness check.
+     * To use GCM mode safely, the cipher object must be re-initialized
+     * with a different combination of key + iv values for each
+     * ENCRYPTION operation. However, checking all past key + iv values
+     * isn't feasible. Thus, we only do a per-instance check of the
+     * key + iv values used in previous encryption.
+     * For decryption operations, no checking is necessary.
+     */
+    private boolean requireReinit = false;
+    private byte[] lastEncKey = null;
+    private byte[] lastEncIv = null;
+
+    NativeGCMCipher(int fixedKeySize) throws NoSuchAlgorithmException {
+        super(UcryptoMech.CRYPTO_AES_GCM, fixedKeySize);
+    }
+
+    @Override
+    protected void ensureInitialized() {
+        if (!initialized) {
+            if (aadBuffer != null && aadBuffer.size() > 0) {
+                init(encrypt, keyValue, iv, tagLen, aadBuffer.toByteArray());
+                aadBuffer = null;
+            } else {
+                init(encrypt, keyValue, iv, tagLen, null);
+            }
+            if (!initialized) {
+                throw new UcryptoException("Cannot initialize Cipher");
+            }
+        }
+    }
+
+    @Override
+    protected int getOutputSizeByOperation(int inLen, boolean isDoFinal) {
+        if (inLen < 0) return 0;
+
+        if (!isDoFinal && (inLen == 0)) {
+            return 0;
+        }
+
+        int result = inLen + bytesBuffered;
+        if (encrypt) {
+            if (isDoFinal) {
+                result += tagLen/8;
+            }
+        } else {
+            if (ibuffer != null) {
+                result += ibuffer.size();
+            }
+            if (isDoFinal) {
+                result -= tagLen/8;
+            }
+        }
+        if (result < 0) {
+            result = 0;
+        }
+        return result;
+    }
+
+    @Override
+    protected void reset(boolean doCancel) {
+        super.reset(doCancel);
+        if (aadBuffer == null) {
+            aadBuffer = new ByteArrayOutputStream();
+        } else {
+            aadBuffer.reset();
+        }
+
+        if (ibuffer != null) {
+            ibuffer.reset();
+        }
+        if (!encrypt) requireReinit = false;
+    }
+
+    // actual init() implementation - caller should clone key and iv if needed
+    protected void init(boolean encrypt, byte[] keyVal, byte[] ivVal, int tLen, byte[] aad) {
+        reset(true);
+        this.encrypt = encrypt;
+        this.keyValue = keyVal;
+        this.iv = ivVal;
+        long pCtxtVal = NativeCipher.nativeInit(mech.value(), encrypt, keyValue, iv,
+            tLen, aad);
+        initialized = (pCtxtVal != 0L);
+        if (initialized) {
+            pCtxt = new CipherContextRef(this, pCtxtVal, encrypt);
+        } else {
+            throw new UcryptoException("Cannot initialize Cipher");
+        }
+    }
+
+    // see JCE spec
+    @Override
+    protected synchronized AlgorithmParameters engineGetParameters() {
+        AlgorithmParameters params = null;
+        try {
+            if (iv != null) {
+                GCMParameterSpec gcmSpec = new GCMParameterSpec(tagLen, iv.clone());
+                params = AlgorithmParameters.getInstance("GCM");
+                params.init(gcmSpec);
+            }
+        } catch (GeneralSecurityException e) {
+            // NoSuchAlgorithmException, NoSuchProviderException
+            // InvalidParameterSpecException
+            throw new UcryptoException("Could not encode parameters", e);
+        }
+        return params;
+    }
+
+    // see JCE spec
+    @Override
+    protected synchronized void engineInit(int opmode, Key key,
+            AlgorithmParameterSpec params, SecureRandom random)
+            throws InvalidKeyException, InvalidAlgorithmParameterException {
+        checkKey(key);
+        if (opmode != Cipher.ENCRYPT_MODE &&
+            opmode != Cipher.DECRYPT_MODE &&
+            opmode != Cipher.WRAP_MODE &&
+            opmode != Cipher.UNWRAP_MODE) {
+            throw new InvalidAlgorithmParameterException
+                ("Unsupported mode: " + opmode);
+        }
+        boolean doEncrypt = (opmode == Cipher.ENCRYPT_MODE || opmode == Cipher.WRAP_MODE);
+        byte[] keyBytes = key.getEncoded().clone();
+        byte[] ivBytes = null;
+        if (params != null) {
+            if (!(params instanceof GCMParameterSpec)) {
+                throw new InvalidAlgorithmParameterException("GCMParameterSpec required");
+            } else {
+                tagLen = ((GCMParameterSpec) params).getTLen();
+                ivBytes = ((GCMParameterSpec) params).getIV();
+            }
+        } else {
+            if (doEncrypt) {
+                tagLen = DEFAULT_TAG_LEN;
+
+                // generate IV if none supplied for encryption
+                ivBytes = new byte[blockSize];
+                new SecureRandom().nextBytes(ivBytes);
+            } else {
+                throw new InvalidAlgorithmParameterException("Parameters required for decryption");
+            }
+        }
+        if (doEncrypt) {
+            requireReinit = Arrays.equals(ivBytes, lastEncIv) &&
+                Arrays.equals(keyBytes, lastEncKey);
+            if (requireReinit) {
+                throw new InvalidAlgorithmParameterException
+                    ("Cannot reuse iv for GCM encryption");
+            }
+            lastEncIv = ivBytes;
+            lastEncKey = keyBytes;
+        } else {
+            requireReinit = false;
+            ibuffer = new ByteArrayOutputStream();
+        }
+        init(doEncrypt, keyBytes, ivBytes, tagLen, null);
+    }
+
+    // see JCE spec
+    @Override
+    protected synchronized void engineInit(int opmode, Key key, AlgorithmParameters params,
+            SecureRandom random)
+            throws InvalidKeyException, InvalidAlgorithmParameterException {
+        AlgorithmParameterSpec spec = null;
+        if (params != null) {
+            try {
+                // mech must be UcryptoMech.CRYPTO_AES_GCM
+                spec = params.getParameterSpec(GCMParameterSpec.class);
+            } catch (InvalidParameterSpecException iaps) {
+                throw new InvalidAlgorithmParameterException(iaps);
+            }
+        }
+        engineInit(opmode, key, spec, random);
+    }
+
+    // see JCE spec
+    @Override
+    protected synchronized byte[] engineUpdate(byte[] in, int inOfs, int inLen) {
+        if (aadBuffer != null && aadBuffer.size() > 0) {
+            // init again with AAD data
+            init(encrypt, keyValue, iv, tagLen, aadBuffer.toByteArray());
+            aadBuffer = null;
+        }
+        if (requireReinit) {
+            throw new IllegalStateException
+                ("Must use either different key or iv for GCM encryption");
+        }
+        if (inLen > 0) {
+            if (!encrypt) {
+                ibuffer.write(in, inOfs, inLen);
+                return null;
+            }
+            return super.engineUpdate(in, inOfs, inLen);
+        } else return null;
+    }
+
+    // see JCE spec
+    @Override
+    protected synchronized int engineUpdate(byte[] in, int inOfs, int inLen, byte[] out,
+            int outOfs) throws ShortBufferException {
+        int len = getOutputSizeByOperation(inLen, false);
+        if (out.length - outOfs < len) {
+            throw new ShortBufferException("Output buffer must be "
+                                           + "(at least) " + len
+                                           + " bytes long");
+        }
+        if (aadBuffer != null && aadBuffer.size() > 0) {
+            // init again with AAD data
+            init(encrypt, keyValue, iv, tagLen, aadBuffer.toByteArray());
+            aadBuffer = null;
+        }
+        if (requireReinit) {
+            throw new IllegalStateException
+                ("Must use either different key or iv for GCM encryption");
+        }
+        if (inLen > 0) {
+            if (!encrypt) {
+                ibuffer.write(in, inOfs, inLen);
+                return 0;
+            } else {
+                return super.engineUpdate(in, inOfs, inLen, out, outOfs);
+            }
+        }
+        return 0;
+    }
+
+    // see JCE spec
+    @Override
+    protected synchronized void engineUpdateAAD(byte[] src, int srcOfs, int srcLen)
+            throws IllegalStateException {
+
+        if ((src == null) || (srcOfs < 0) || (srcOfs + srcLen > src.length)) {
+            throw new IllegalArgumentException("Invalid AAD");
+        }
+        if (keyValue == null) {
+            throw new IllegalStateException("Need to initialize Cipher first");
+        }
+        if (requireReinit) {
+            throw new IllegalStateException
+                ("Must use either different key or iv for GCM encryption");
+        }
+        if (aadBuffer != null) {
+            aadBuffer.write(src, srcOfs, srcLen);
+        } else {
+            // update has already been called
+            throw new IllegalStateException
+                ("Update has been called; no more AAD data");
+        }
+    }
+
+    // see JCE spec
+    @Override
+    protected void engineUpdateAAD(ByteBuffer src)
+            throws IllegalStateException {
+        if (src == null) {
+            throw new IllegalArgumentException("Invalid AAD");
+        }
+        if (keyValue == null) {
+            throw new IllegalStateException("Need to initialize Cipher first");
+        }
+        if (requireReinit) {
+            throw new IllegalStateException
+                ("Must use either different key or iv for GCM encryption");
+        }
+        if (aadBuffer != null) {
+            if (src.hasRemaining()) {
+                byte[] srcBytes = new byte[src.remaining()];
+                src.get(srcBytes);
+                aadBuffer.write(srcBytes, 0, srcBytes.length);
+            }
+        } else {
+            // update has already been called
+            throw new IllegalStateException
+                ("Update has been called; no more AAD data");
+        }
+    }
+
+    // see JCE spec
+    @Override
+    protected synchronized byte[] engineDoFinal(byte[] in, int inOfs, int inLen)
+            throws IllegalBlockSizeException, BadPaddingException {
+        byte[] out = new byte[getOutputSizeByOperation(inLen, true)];
+        try {
+            // delegate to the other engineDoFinal(...) method
+            int k = engineDoFinal(in, inOfs, inLen, out, 0);
+            if (out.length != k) {
+                out = Arrays.copyOf(out, k);
+            }
+            return out;
+        } catch (ShortBufferException e) {
+            throw new UcryptoException("Internal Error", e);
+        }
+    }
+
+    // see JCE spec
+    @Override
+    protected synchronized int engineDoFinal(byte[] in, int inOfs, int inLen,
+                                             byte[] out, int outOfs)
+        throws ShortBufferException, IllegalBlockSizeException,
+               BadPaddingException {
+        int len = getOutputSizeByOperation(inLen, true);
+        if (out.length - outOfs < len) {
+            throw new ShortBufferException("Output buffer must be "
+                                           + "(at least) " + len
+                                           + " bytes long");
+        }
+        if (aadBuffer != null && aadBuffer.size() > 0) {
+            // init again with AAD data
+            init(encrypt, keyValue, iv, tagLen, aadBuffer.toByteArray());
+            aadBuffer = null;
+        }
+        if (requireReinit) {
+            throw new IllegalStateException
+                ("Must use either different key or iv for GCM encryption");
+        }
+        if (!encrypt) {
+            if (inLen > 0) {
+                ibuffer.write(in, inOfs, inLen);
+            }
+            inLen = ibuffer.size();
+            if (inLen < tagLen/8) {
+                // Otherwise, Solaris lib will error out w/ CRYPTO_BUFFER_TOO_SMALL
+                // when ucrypto_decrypt_final() is called
+                throw new AEADBadTagException("Input too short - need tag");
+            }
+            // refresh 'in' to all buffered-up bytes
+            in = ibuffer.toByteArray();
+            inOfs = 0;
+            ibuffer.reset();
+        }
+        try {
+            return super.engineDoFinal(in, inOfs, inLen, out, outOfs);
+        } catch (UcryptoException ue) {
+            if (ue.getMessage().equals("CRYPTO_INVALID_MAC")) {
+                throw new AEADBadTagException("Tag does not match");
+            } else {
+                // pass it up
+                throw ue;
+            }
+        } finally {
+            requireReinit = encrypt;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/jdk.crypto.ucrypto/solaris/classes/com/oracle/security/ucrypto/NativeKey.java	Thu Oct 23 13:44:28 2014 -0700
@@ -0,0 +1,230 @@
+/*
+ * Copyright (c) 2014, 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
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.oracle.security.ucrypto;
+
+import java.util.Set;
+import java.util.Arrays;
+import java.util.concurrent.ConcurrentSkipListSet;
+import java.lang.ref.*;
+
+import java.math.BigInteger;
+import java.security.InvalidKeyException;
+import java.security.NoSuchAlgorithmException;
+import java.security.Key;
+import java.security.PublicKey;
+import java.security.PrivateKey;
+import java.security.KeyFactorySpi;
+import java.security.interfaces.RSAPrivateCrtKey;
+import java.security.interfaces.RSAPublicKey;
+
+import java.security.spec.InvalidKeySpecException;
+import java.security.spec.KeySpec;
+import java.security.spec.RSAPrivateCrtKeySpec;
+import java.security.spec.RSAPublicKeySpec;
+
+/**
+ * Wrapper class for native keys needed for using ucrypto APIs.
+ * This class currently supports native RSA private/public keys.
+ *
+ * @since 1.9
+ */
+abstract class NativeKey implements Key {
+
+    private static final long serialVersionUID = 6812507588904302830L;
+
+    private final int numComponents;
+
+    NativeKey(int numComponents) {
+        this.numComponents = numComponents;
+    }
+
+    abstract long value();
+
+    int length() {
+        return numComponents;
+    }
+
+    public String getAlgorithm() { return "RSA"; }
+    public String getFormat() { return "RAW"; }
+    public byte[] getEncoded() {
+        // not used; so not generated
+        return null;
+    }
+
+    private native static void nativeFree(long id, int numComponents);
+
+    static byte[] getMagnitude(BigInteger bi) {
+        byte[] b = bi.toByteArray();
+        if ((b.length > 1) && (b[0] == 0)) {
+            int n = b.length - 1;
+            byte[] newarray = new byte[n];
+            System.arraycopy(b, 1, newarray, 0, n);
+            b = newarray;
+        }
+        return b;
+    }
+
+    static final class RSAPrivateCrt extends NativeKey implements RSAPrivateCrtKey {
+
+        private static final long serialVersionUID = 6812507588904302831L;
+
+        private final RSAPrivateCrtKeySpec keySpec;
+        private final long keyId;
+
+        RSAPrivateCrt(KeySpec keySpec) throws InvalidKeySpecException {
+            super(8);
+            long pKey = 0L;
+            if (keySpec instanceof RSAPrivateCrtKeySpec) {
+                RSAPrivateCrtKeySpec ks = (RSAPrivateCrtKeySpec) keySpec;
+                BigInteger mod = ks.getModulus();
+                BigInteger publicExp =  ks.getPublicExponent();
+                BigInteger privateExp =  ks.getPrivateExponent();
+                BigInteger primeP = ks.getPrimeP();
+                BigInteger primeQ = ks.getPrimeQ();
+                BigInteger primeExpP = ks.getPrimeExponentP();
+                BigInteger primeExpQ = ks.getPrimeExponentQ();
+                BigInteger crtCoeff = ks.getCrtCoefficient();
+                pKey = nativeInit(NativeKey.getMagnitude(mod),
+                                  NativeKey.getMagnitude(publicExp),
+                                  NativeKey.getMagnitude(privateExp),
+                                  NativeKey.getMagnitude(primeP),
+                                  NativeKey.getMagnitude(primeQ),
+                                  NativeKey.getMagnitude(primeExpP),
+                                  NativeKey.getMagnitude(primeExpQ),
+                                  NativeKey.getMagnitude(crtCoeff));
+            } else {
+                throw new InvalidKeySpecException("Only supports RSAPrivateCrtKeySpec");
+            }
+            if (pKey == 0L) {
+                throw new UcryptoException("Error constructing RSA PrivateKey");
+            }
+            // track native resource clean up
+            new KeyRef(this, pKey);
+            this.keySpec = (RSAPrivateCrtKeySpec) keySpec;
+            this.keyId = pKey;
+        }
+
+        long value() { return keyId; }
+        public BigInteger getModulus() { return keySpec.getModulus(); };
+        public BigInteger getPublicExponent() { return keySpec.getPublicExponent(); };
+        public BigInteger getPrivateExponent() { return keySpec.getPrivateExponent(); };
+        public BigInteger getPrimeP() { return keySpec.getPrimeP(); };
+        public BigInteger getPrimeQ() { return keySpec.getPrimeQ(); };
+        public BigInteger getPrimeExponentP() { return keySpec.getPrimeExponentP(); };
+        public BigInteger getPrimeExponentQ() { return keySpec.getPrimeExponentQ(); };
+        public BigInteger getCrtCoefficient() { return keySpec.getCrtCoefficient(); };
+
+        private native static long nativeInit(byte[] mod, byte[] pubExp, byte[] privExp,
+                                      byte[] p, byte[] q,
+                                      byte[] expP, byte[] expQ, byte[] crtCoeff);
+    }
+
+    static final class RSAPublic extends NativeKey implements RSAPublicKey {
+
+        private static final long serialVersionUID = 6812507588904302832L;
+
+        private final RSAPublicKeySpec keySpec;
+        private final long keyId;
+
+        RSAPublic(KeySpec keySpec) throws InvalidKeySpecException {
+            super(2);
+            long pKey = 0L;
+            if (keySpec instanceof RSAPublicKeySpec) {
+                RSAPublicKeySpec ks = (RSAPublicKeySpec) keySpec;
+                BigInteger mod = ks.getModulus();
+                BigInteger publicExp = ks.getPublicExponent();
+                pKey = nativeInit(NativeKey.getMagnitude(mod),
+                                  NativeKey.getMagnitude(publicExp));
+            } else {
+                throw new InvalidKeySpecException("Only supports RSAPublicKeySpec");
+            }
+            if (pKey == 0L) {
+                throw new UcryptoException("Error constructing RSA PublicKey");
+            }
+            // track native resource clean up
+            new KeyRef(this, pKey);
+            this.keySpec = (RSAPublicKeySpec) keySpec;
+            this.keyId = pKey;
+        }
+
+        long value() { return keyId; }
+        public BigInteger getModulus() { return keySpec.getModulus(); };
+        public BigInteger getPublicExponent() { return keySpec.getPublicExponent(); };
+
+        private native static long nativeInit(byte[] mod, byte[] pubExp);
+    }
+
+    // internal class for native resource cleanup
+    private static class KeyRef extends PhantomReference<NativeKey>
+        implements Comparable<KeyRef> {
+
+        private static ReferenceQueue<NativeKey> refQueue =
+            new ReferenceQueue<NativeKey>();
+
+        // Needed to keep these references from being GC'ed until when their
+        // referents are GC'ed so we can do post-mortem processing
+        private static Set<KeyRef> refList =
+            new ConcurrentSkipListSet<KeyRef>();
+
+        private final long id;
+        private final int length;
+
+        private static void drainRefQueueBounded() {
+            while (true) {
+                KeyRef next = (KeyRef) refQueue.poll();
+                if (next == null) break;
+                next.dispose();
+            }
+        }
+
+        KeyRef(NativeKey nk, long id) {
+            super(nk, refQueue);
+            this.id = id;
+            this.length = nk.length();
+            refList.add(this);
+            UcryptoProvider.debug("Resource: track NativeKey " + this.id);
+            drainRefQueueBounded();
+        }
+
+        public int compareTo(KeyRef other) {
+            if (this.id == other.id) {
+                return 0;
+            } else {
+                return (this.id < other.id) ? -1 : 1;
+            }
+        }
+
+        void dispose() {
+            refList.remove(this);
+            UcryptoProvider.debug("Resource: free NativeKey " + this.id);
+            try {
+                NativeKey.nativeFree(id, length);
+            } finally {
+                this.clear();
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/jdk.crypto.ucrypto/solaris/classes/com/oracle/security/ucrypto/NativeRSACipher.java	Thu Oct 23 13:44:28 2014 -0700
@@ -0,0 +1,448 @@
+/*
+ * Copyright (c) 2014, 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
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.oracle.security.ucrypto;
+
+import java.util.Arrays;
+import java.util.WeakHashMap;
+import java.util.Collections;
+import java.util.Map;
+
+import java.security.AlgorithmParameters;
+import java.security.InvalidAlgorithmParameterException;
+import java.security.InvalidKeyException;
+import java.security.Key;
+import java.security.PublicKey;
+import java.security.PrivateKey;
+import java.security.spec.RSAPrivateCrtKeySpec;
+import java.security.spec.RSAPublicKeySpec;
+import java.security.interfaces.RSAKey;
+import java.security.interfaces.RSAPrivateCrtKey;
+import java.security.interfaces.RSAPublicKey;
+
+import java.security.KeyFactory;
+import java.security.NoSuchAlgorithmException;
+import java.security.SecureRandom;
+
+import java.security.spec.AlgorithmParameterSpec;
+import java.security.spec.InvalidParameterSpecException;
+import java.security.spec.InvalidKeySpecException;
+
+import javax.crypto.BadPaddingException;
+import javax.crypto.Cipher;
+import javax.crypto.CipherSpi;
+import javax.crypto.SecretKey;
+import javax.crypto.IllegalBlockSizeException;
+import javax.crypto.NoSuchPaddingException;
+import javax.crypto.ShortBufferException;
+
+import javax.crypto.spec.SecretKeySpec;
+
+import sun.security.internal.spec.TlsRsaPremasterSecretParameterSpec;
+import sun.security.util.KeyUtil;
+
+/**
+ * Asymmetric Cipher wrapper class utilizing ucrypto APIs. This class
+ * currently supports
+ * - RSA/ECB/NOPADDING
+ * - RSA/ECB/PKCS1PADDING
+ *
+ * @since 1.9
+ */
+public class NativeRSACipher extends CipherSpi {
+    // fields set in constructor
+    private final UcryptoMech mech;
+    private final int padLen;
+    private final NativeRSAKeyFactory keyFactory;
+    private AlgorithmParameterSpec spec;
+    private SecureRandom random;
+
+    // Keep a cache of RSA keys and their RSA NativeKey for reuse.
+    // When the RSA key is gc'ed, we let NativeKey phatom references cleanup
+    // the native allocation
+    private static final Map<Key, NativeKey> keyList =
+            Collections.synchronizedMap(new WeakHashMap<Key, NativeKey>());
+
+    //
+    // fields (re)set in every init()
+    //
+    private NativeKey key = null;
+    private int outputSize = 0; // e.g. modulus size in bytes
+    private boolean encrypt = true;
+    private byte[] buffer;
+    private int bufOfs = 0;
+
+    // public implementation classes
+    public static final class NoPadding extends NativeRSACipher {
+        public NoPadding() throws NoSuchAlgorithmException {
+            super(UcryptoMech.CRYPTO_RSA_X_509, 0);
+        }
+    }
+
+    public static final class PKCS1Padding extends NativeRSACipher {
+        public PKCS1Padding() throws NoSuchAlgorithmException {
+            super(UcryptoMech.CRYPTO_RSA_PKCS, 11);
+        }
+    }
+
+    NativeRSACipher(UcryptoMech mech, int padLen)
+        throws NoSuchAlgorithmException {
+        this.mech = mech;
+        this.padLen = padLen;
+        this.keyFactory = new NativeRSAKeyFactory();
+    }
+
+    @Override
+    protected void engineSetMode(String mode) throws NoSuchAlgorithmException {
+        // Disallow change of mode for now since currently it's explicitly
+        // defined in transformation strings
+        throw new NoSuchAlgorithmException("Unsupported mode " + mode);
+    }
+
+    // see JCE spec
+    @Override
+    protected void engineSetPadding(String padding)
+            throws NoSuchPaddingException {
+        // Disallow change of padding for now since currently it's explicitly
+        // defined in transformation strings
+        throw new NoSuchPaddingException("Unsupported padding " + padding);
+    }
+
+    // see JCE spec
+    @Override
+    protected int engineGetBlockSize() {
+        return 0;
+    }
+
+    // see JCE spec
+    @Override
+    protected synchronized int engineGetOutputSize(int inputLen) {
+        return outputSize;
+    }
+
+    // see JCE spec
+    @Override
+    protected byte[] engineGetIV() {
+        return null;
+    }
+
+    // see JCE spec
+    @Override
+    protected AlgorithmParameters engineGetParameters() {
+        return null;
+    }
+
+    @Override
+    protected int engineGetKeySize(Key key) throws InvalidKeyException {
+        if (!(key instanceof RSAKey)) {
+            throw new InvalidKeyException("RSAKey required");
+        }
+        int n = ((RSAKey)key).getModulus().bitLength();
+        // strip off the leading extra 0x00 byte prefix
+        int realByteSize = (n + 7) >> 3;
+        return realByteSize * 8;
+    }
+
+    // see JCE spec
+    @Override
+    protected synchronized void engineInit(int opmode, Key key, SecureRandom random)
+            throws InvalidKeyException {
+        try {
+            engineInit(opmode, key, (AlgorithmParameterSpec)null, random);
+        } catch (InvalidAlgorithmParameterException e) {
+            throw new InvalidKeyException("init() failed", e);
+        }
+    }
+
+    // see JCE spec
+    @Override
+    protected synchronized void engineInit(int opmode, Key newKey,
+            AlgorithmParameterSpec params, SecureRandom random)
+            throws InvalidKeyException, InvalidAlgorithmParameterException {
+        if (newKey == null) {
+            throw new InvalidKeyException("Key cannot be null");
+        }
+        if (opmode != Cipher.ENCRYPT_MODE &&
+            opmode != Cipher.DECRYPT_MODE &&
+            opmode != Cipher.WRAP_MODE &&
+            opmode != Cipher.UNWRAP_MODE) {
+            throw new InvalidAlgorithmParameterException
+                ("Unsupported mode: " + opmode);
+        }
+        if (params != null) {
+            if (!(params instanceof TlsRsaPremasterSecretParameterSpec)) {
+                throw new InvalidAlgorithmParameterException(
+                        "No Parameters can be specified");
+            }
+            spec = params;
+            this.random = random;   // for TLS RSA premaster secret
+        }
+        boolean doEncrypt = (opmode == Cipher.ENCRYPT_MODE || opmode == Cipher.WRAP_MODE);
+
+        // Make sure the proper opmode uses the proper key
+        if (doEncrypt && (!(newKey instanceof RSAPublicKey))) {
+            throw new InvalidKeyException("RSAPublicKey required for encryption");
+        } else if (!doEncrypt && (!(newKey instanceof RSAPrivateCrtKey))) {
+            throw new InvalidKeyException("RSAPrivateCrtKey required for decryption");
+        }
+
+        NativeKey nativeKey = null;
+        // Check keyList cache for a nativeKey
+        nativeKey = keyList.get(newKey);
+        if (nativeKey == null) {
+            // With no existing nativeKey for this newKey, create one
+            if (doEncrypt) {
+                RSAPublicKey publicKey = (RSAPublicKey) newKey;
+                try {
+                    nativeKey = (NativeKey) keyFactory.engineGeneratePublic
+                        (new RSAPublicKeySpec(publicKey.getModulus(), publicKey.getPublicExponent()));
+                } catch (InvalidKeySpecException ikse) {
+                    throw new InvalidKeyException(ikse);
+                }
+            } else {
+                RSAPrivateCrtKey privateKey = (RSAPrivateCrtKey) newKey;
+                try {
+                    nativeKey = (NativeKey) keyFactory.engineGeneratePrivate
+                        (new RSAPrivateCrtKeySpec(privateKey.getModulus(),
+                                                  privateKey.getPublicExponent(),
+                                                  privateKey.getPrivateExponent(),
+                                                  privateKey.getPrimeP(),
+                                                  privateKey.getPrimeQ(),
+                                                  privateKey.getPrimeExponentP(),
+                                                  privateKey.getPrimeExponentQ(),
+                                                  privateKey.getCrtCoefficient()));
+                } catch (InvalidKeySpecException ikse) {
+                    throw new InvalidKeyException(ikse);
+                }
+            }
+
+            // Add nativeKey to keyList cache and associate it with newKey
+            keyList.put(newKey, nativeKey);
+        }
+
+        init(doEncrypt, nativeKey);
+    }
+
+    // see JCE spec
+    @Override
+    protected synchronized void engineInit(int opmode, Key key, AlgorithmParameters params,
+            SecureRandom random)
+            throws InvalidKeyException, InvalidAlgorithmParameterException {
+        if (params != null) {
+            throw new InvalidAlgorithmParameterException("No Parameters can be specified");
+        }
+        engineInit(opmode, key, (AlgorithmParameterSpec) null, random);
+    }
+
+    // see JCE spec
+    @Override
+    protected synchronized byte[] engineUpdate(byte[] in, int inOfs, int inLen) {
+        if (inLen > 0) {
+            update(in, inOfs, inLen);
+        }
+        return null;
+    }
+
+    // see JCE spec
+    @Override
+    protected synchronized int engineUpdate(byte[] in, int inOfs, int inLen, byte[] out,
+            int outOfs) throws ShortBufferException {
+        if (out.length - outOfs < outputSize) {
+            throw new ShortBufferException("Output buffer too small");
+        }
+        if (inLen > 0) {
+            update(in, inOfs, inLen);
+        }
+        return 0;
+    }
+
+    // see JCE spec
+    @Override
+    protected synchronized byte[] engineDoFinal(byte[] in, int inOfs, int inLen)
+            throws IllegalBlockSizeException, BadPaddingException {
+        byte[] out = new byte[outputSize];
+        try {
+            // delegate to the other engineDoFinal(...) method
+            int actualLen = engineDoFinal(in, inOfs, inLen, out, 0);
+            if (actualLen != outputSize) {
+                return Arrays.copyOf(out, actualLen);
+            } else {
+                return out;
+            }
+        } catch (ShortBufferException e) {
+            throw new UcryptoException("Internal Error", e);
+        }
+    }
+
+    // see JCE spec
+    @Override
+    protected synchronized int engineDoFinal(byte[] in, int inOfs, int inLen, byte[] out,
+                                             int outOfs)
+        throws ShortBufferException, IllegalBlockSizeException,
+               BadPaddingException {
+        if (inLen != 0) {
+            update(in, inOfs, inLen);
+        }
+        return doFinal(out, outOfs, out.length - outOfs);
+    }
+
+
+    // see JCE spec
+    @Override
+    protected synchronized byte[] engineWrap(Key key) throws IllegalBlockSizeException,
+                                                             InvalidKeyException {
+        try {
+            byte[] encodedKey = key.getEncoded();
+            if ((encodedKey == null) || (encodedKey.length == 0)) {
+                throw new InvalidKeyException("Cannot get an encoding of " +
+                                              "the key to be wrapped");
+            }
+            if (encodedKey.length > buffer.length) {
+                throw new InvalidKeyException("Key is too long for wrapping");
+            }
+            return engineDoFinal(encodedKey, 0, encodedKey.length);
+        } catch (BadPaddingException e) {
+            // Should never happen for key wrapping
+            throw new UcryptoException("Internal Error", e);
+        }
+    }
+
+    // see JCE spec
+    @Override
+    protected synchronized Key engineUnwrap(byte[] wrappedKey,
+            String wrappedKeyAlgorithm, int wrappedKeyType)
+            throws InvalidKeyException, NoSuchAlgorithmException {
+
+        if (wrappedKey.length > buffer.length) {
+            throw new InvalidKeyException("Key is too long for unwrapping");
+        }
+
+        boolean isTlsRsaPremasterSecret =
+                wrappedKeyAlgorithm.equals("TlsRsaPremasterSecret");
+        Exception failover = null;
+
+        byte[] encodedKey = null;
+        try {
+            encodedKey = engineDoFinal(wrappedKey, 0, wrappedKey.length);
+        } catch (BadPaddingException bpe) {
+            if (isTlsRsaPremasterSecret) {
+                failover = bpe;
+            } else {
+                throw new InvalidKeyException("Unwrapping failed", bpe);
+            }
+        } catch (Exception e) {
+            throw new InvalidKeyException("Unwrapping failed", e);
+        }
+
+        if (isTlsRsaPremasterSecret) {
+            if (!(spec instanceof TlsRsaPremasterSecretParameterSpec)) {
+                throw new IllegalStateException(
+                        "No TlsRsaPremasterSecretParameterSpec specified");
+            }
+
+            // polish the TLS premaster secret
+            encodedKey = KeyUtil.checkTlsPreMasterSecretKey(
+                ((TlsRsaPremasterSecretParameterSpec)spec).getClientVersion(),
+                ((TlsRsaPremasterSecretParameterSpec)spec).getServerVersion(),
+                random, encodedKey, (failover != null));
+        }
+
+        return NativeCipher.constructKey(wrappedKeyType,
+                encodedKey, wrappedKeyAlgorithm);
+    }
+
+    /**
+     * calls ucrypto_encrypt(...) or ucrypto_decrypt(...)
+     * @returns the length of output or an negative error status code
+     */
+    private native static int nativeAtomic(int mech, boolean encrypt,
+                                           long keyValue, int keyLength,
+                                           byte[] in, int inLen,
+                                           byte[] out, int ouOfs, int outLen);
+
+    // do actual initialization
+    private void init(boolean encrypt, NativeKey key) {
+        this.encrypt = encrypt;
+        this.key = key;
+        try {
+            this.outputSize = engineGetKeySize(key)/8;
+        } catch (InvalidKeyException ike) {
+            throw new UcryptoException("Internal Error", ike);
+        }
+        this.buffer = new byte[outputSize];
+        this.bufOfs = 0;
+    }
+
+    // store the specified input into the internal buffer
+    private void update(byte[] in, int inOfs, int inLen) {
+        if ((inLen <= 0) || (in == null)) {
+            return;
+        }
+        // buffer bytes internally until doFinal is called
+        if ((bufOfs + inLen + (encrypt? padLen:0)) > buffer.length) {
+            // lead to IllegalBlockSizeException when doFinal() is called
+            bufOfs = buffer.length + 1;
+            return;
+        }
+        System.arraycopy(in, inOfs, buffer, bufOfs, inLen);
+        bufOfs += inLen;
+    }
+
+    // return the actual non-negative output length
+    private int doFinal(byte[] out, int outOfs, int outLen)
+            throws ShortBufferException, IllegalBlockSizeException,
+            BadPaddingException {
+        if (bufOfs > buffer.length) {
+            throw new IllegalBlockSizeException(
+                "Data must not be longer than " +
+                (buffer.length - (encrypt ? padLen : 0)) + " bytes");
+        }
+        if (outLen < outputSize) {
+            throw new ShortBufferException();
+        }
+        try {
+            long keyValue = key.value();
+            int k = nativeAtomic(mech.value(), encrypt, keyValue,
+                                 key.length(), buffer, bufOfs,
+                                 out, outOfs, outLen);
+            if (k < 0) {
+                if ( k == -16 || k == -64) {
+                    // -16: CRYPTO_ENCRYPTED_DATA_INVALID
+                    // -64: CKR_ENCRYPTED_DATA_INVALID, see bug 17459266
+                    UcryptoException ue = new UcryptoException(16);
+                    BadPaddingException bpe =
+                        new BadPaddingException("Invalid encryption data");
+                    bpe.initCause(ue);
+                    throw bpe;
+                }
+                throw new UcryptoException(-k);
+            }
+
+            return k;
+        } finally {
+            bufOfs = 0;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/jdk.crypto.ucrypto/solaris/classes/com/oracle/security/ucrypto/NativeRSAKeyFactory.java	Thu Oct 23 13:44:28 2014 -0700
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2014, 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
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.oracle.security.ucrypto;
+
+import java.util.Set;
+import java.util.Arrays;
+import java.util.concurrent.ConcurrentSkipListSet;
+import java.lang.ref.*;
+
+import java.math.BigInteger;
+import java.security.InvalidKeyException;
+import java.security.NoSuchAlgorithmException;
+import java.security.Key;
+import java.security.PublicKey;
+import java.security.PrivateKey;
+import java.security.KeyFactorySpi;
+
+import java.security.spec.InvalidKeySpecException;
+import java.security.spec.KeySpec;
+import java.security.spec.RSAPrivateCrtKeySpec;
+import java.security.spec.RSAPublicKeySpec;
+
+/**
+ * Ucrypto-private KeyFactory class for generating native keys
+ * needed for using ucrypto APIs. Given that it's not used
+ * externally, it only needs to support RSAPrivateCrtKeySpec
+ * and RSAPublicKeySpec objects.
+ *
+ * @since 1.9
+ */
+public final class NativeRSAKeyFactory extends KeyFactorySpi {
+
+    @Override
+    protected PrivateKey engineGeneratePrivate(KeySpec keySpec)
+        throws InvalidKeySpecException {
+        return new NativeKey.RSAPrivateCrt(keySpec);
+    }
+
+    @Override
+    protected PublicKey engineGeneratePublic(KeySpec keySpec)
+        throws InvalidKeySpecException {
+        return new NativeKey.RSAPublic(keySpec);
+    }
+
+    @Override
+    protected <T extends KeySpec> T
+        engineGetKeySpec(Key key, Class<T> keySpec)
+            throws InvalidKeySpecException {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    protected Key engineTranslateKey(Key key) throws InvalidKeyException {
+        // no need to support this
+        throw new UnsupportedOperationException();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/jdk.crypto.ucrypto/solaris/classes/com/oracle/security/ucrypto/NativeRSASignature.java	Thu Oct 23 13:44:28 2014 -0700
@@ -0,0 +1,445 @@
+/*
+ * Copyright (c) 2014, 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
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.oracle.security.ucrypto;
+
+import java.util.Set;
+import java.util.Arrays;
+import java.util.concurrent.ConcurrentSkipListSet;
+import java.lang.ref.*;
+import java.math.BigInteger;
+import java.nio.ByteBuffer;
+
+import java.security.SignatureSpi;
+import java.security.NoSuchAlgorithmException;
+import java.security.InvalidParameterException;
+import java.security.InvalidKeyException;
+import java.security.SignatureException;
+import java.security.Key;
+import java.security.PrivateKey;
+import java.security.PublicKey;
+
+import java.security.*;
+import java.security.interfaces.*;
+import java.security.spec.RSAPrivateCrtKeySpec;
+import java.security.spec.RSAPublicKeySpec;
+import java.security.spec.InvalidKeySpecException;
+import sun.nio.ch.DirectBuffer;
+import java.nio.ByteBuffer;
+import sun.security.rsa.RSAPadding;
+
+/**
+ * Signature implementation class. This class currently supports the
+ * following algorithms:
+ *
+ * . RSA:
+ *   . MD5withRSA
+ *   . SHA1withRSA
+ *   . SHA256withRSA
+ *   . SHA384withRSA
+ *   . SHA512withRSA
+ *
+ * @since 1.9
+ */
+class NativeRSASignature extends SignatureSpi {
+
+    private static final int PKCS1PADDING_LEN = 11;
+
+    // fields set in constructor
+    private final UcryptoMech mech;
+    private final int encodedLen;
+
+    // field for ensuring native memory is freed
+    private SignatureContextRef pCtxt = null;
+
+    //
+    // fields (re)set in every init()
+    //
+    private boolean initialized = false;
+    private boolean sign = true;
+    private int sigLength;
+    private NativeKey key;
+    private NativeRSAKeyFactory keyFactory; // may need a more generic type later
+
+    // public implementation classes
+    public static final class MD5 extends NativeRSASignature {
+        public MD5() throws NoSuchAlgorithmException {
+            super(UcryptoMech.CRYPTO_MD5_RSA_PKCS, 34);
+        }
+    }
+
+    public static final class SHA1 extends NativeRSASignature {
+        public SHA1() throws NoSuchAlgorithmException {
+            super(UcryptoMech.CRYPTO_SHA1_RSA_PKCS, 35);
+        }
+    }
+
+    public static final class SHA256 extends NativeRSASignature {
+        public SHA256() throws NoSuchAlgorithmException {
+            super(UcryptoMech.CRYPTO_SHA256_RSA_PKCS, 51);
+        }
+    }
+
+    public static final class SHA384 extends NativeRSASignature {
+        public SHA384() throws NoSuchAlgorithmException {
+            super(UcryptoMech.CRYPTO_SHA384_RSA_PKCS, 67);
+        }
+    }
+
+    public static final class SHA512 extends NativeRSASignature {
+        public SHA512() throws NoSuchAlgorithmException {
+            super(UcryptoMech.CRYPTO_SHA512_RSA_PKCS, 83);
+        }
+    }
+
+    // internal class for native resource cleanup
+    private static class SignatureContextRef extends PhantomReference<NativeRSASignature>
+        implements Comparable<SignatureContextRef> {
+
+        private static ReferenceQueue<NativeRSASignature> refQueue =
+            new ReferenceQueue<NativeRSASignature>();
+
+        // Needed to keep these references from being GC'ed until when their
+        // referents are GC'ed so we can do post-mortem processing
+        private static Set<SignatureContextRef> refList =
+            new ConcurrentSkipListSet<SignatureContextRef>();
+        //           Collections.synchronizedSortedSet(new TreeSet<SignatureContextRef>());
+
+        private final long id;
+        private final boolean sign;
+
+        private static void drainRefQueueBounded() {
+            while (true) {
+                SignatureContextRef next = (SignatureContextRef) refQueue.poll();
+                if (next == null) break;
+                next.dispose(true);
+            }
+        }
+
+        SignatureContextRef(NativeRSASignature ns, long id, boolean sign) {
+            super(ns, refQueue);
+            this.id = id;
+            this.sign = sign;
+            refList.add(this);
+            UcryptoProvider.debug("Resource: track Signature Ctxt " + this.id);
+            drainRefQueueBounded();
+        }
+
+        public int compareTo(SignatureContextRef other) {
+            if (this.id == other.id) {
+                return 0;
+            } else {
+                return (this.id < other.id) ? -1 : 1;
+            }
+        }
+
+        void dispose(boolean doCancel) {
+            refList.remove(this);
+            try {
+                if (doCancel) {
+                    UcryptoProvider.debug("Resource: free Signature Ctxt " + this.id);
+                    NativeRSASignature.nativeFinal(id, sign, null, 0, 0);
+                } else {
+                    UcryptoProvider.debug("Resource: stop tracking Signature Ctxt " + this.id);
+                }
+            } finally {
+                this.clear();
+            }
+        }
+    }
+
+    NativeRSASignature(UcryptoMech mech, int encodedLen)
+        throws NoSuchAlgorithmException {
+        this.mech = mech;
+        this.encodedLen = encodedLen;
+        this.keyFactory = new NativeRSAKeyFactory();
+    }
+
+    // deprecated but abstract
+    @SuppressWarnings("deprecation")
+    protected Object engineGetParameter(String param) throws InvalidParameterException {
+        throw new UnsupportedOperationException("getParameter() not supported");
+    }
+
+    @Override
+    protected synchronized void engineInitSign(PrivateKey privateKey)
+            throws InvalidKeyException {
+        if (privateKey == null) {
+            throw new InvalidKeyException("Key must not be null");
+        }
+        NativeKey newKey = key;
+        int newSigLength = sigLength;
+        // Need to check RSA key length whenever a new private key is set
+        if (privateKey != key) {
+            if (privateKey instanceof RSAPrivateCrtKey) {
+                RSAPrivateCrtKey rsaPrivKey = (RSAPrivateCrtKey) privateKey;
+                BigInteger mod = rsaPrivKey.getModulus();
+                newSigLength = checkRSAKeyLength(mod);
+                try {
+                    newKey = (NativeKey) keyFactory.engineGeneratePrivate
+                        (new RSAPrivateCrtKeySpec(mod,
+                                                  rsaPrivKey.getPublicExponent(),
+                                                  rsaPrivKey.getPrivateExponent(),
+                                                  rsaPrivKey.getPrimeP(),
+                                                  rsaPrivKey.getPrimeQ(),
+                                                  rsaPrivKey.getPrimeExponentP(),
+                                                  rsaPrivKey.getPrimeExponentQ(),
+                                                  rsaPrivKey.getCrtCoefficient()));
+                } catch (InvalidKeySpecException ikse) {
+                    throw new InvalidKeyException(ikse);
+                }
+            } else {
+                throw new InvalidKeyException("RSAPrivateCrtKey required");
+            }
+        }
+        init(true, newKey, newSigLength);
+    }
+
+
+    @Override
+    protected synchronized void engineInitVerify(PublicKey publicKey)
+            throws InvalidKeyException {
+        if (publicKey == null) {
+            throw new InvalidKeyException("Key must not be null");
+        }
+        NativeKey newKey = key;
+        int newSigLength = sigLength;
+        // Need to check RSA key length whenever a new public key is set
+        if (publicKey != key) {
+            if (publicKey instanceof RSAPublicKey) {
+                BigInteger mod = ((RSAPublicKey) publicKey).getModulus();
+                newSigLength = checkRSAKeyLength(mod);
+                try {
+                    newKey = (NativeKey) keyFactory.engineGeneratePublic
+                        (new RSAPublicKeySpec(mod, ((RSAPublicKey) publicKey).getPublicExponent()));
+                } catch (InvalidKeySpecException ikse) {
+                    throw new InvalidKeyException(ikse);
+                }
+            } else {
+                throw new InvalidKeyException("RSAPublicKey required");
+            }
+        }
+        init(false, newKey, newSigLength);
+    }
+
+    // deprecated but abstract
+    @SuppressWarnings("deprecation")
+    protected void engineSetParameter(String param, Object value) throws InvalidParameterException {
+        throw new UnsupportedOperationException("setParameter() not supported");
+    }
+
+    @Override
+    protected synchronized byte[] engineSign() throws SignatureException {
+        byte[] sig = new byte[sigLength];
+        int rv = doFinal(sig, 0, sigLength);
+        if (rv < 0) {
+            throw new SignatureException(new UcryptoException(-rv));
+        }
+        return sig;
+    }
+
+    @Override
+    protected synchronized int engineSign(byte[] outbuf, int offset, int len)
+        throws SignatureException {
+        if (outbuf == null || (offset < 0) || (outbuf.length < (offset + sigLength))
+            || (len < sigLength)) {
+            throw new SignatureException("Invalid output buffer");
+        }
+        int rv = doFinal(outbuf, offset, sigLength);
+        if (rv < 0) {
+            throw new SignatureException(new UcryptoException(-rv));
+        }
+        return sigLength;
+    }
+
+    @Override
+    protected synchronized void engineUpdate(byte b) throws SignatureException {
+        byte[] in = { b };
+        int rv = update(in, 0, 1);
+        if (rv < 0) {
+            throw new SignatureException(new UcryptoException(-rv));
+        }
+    }
+
+    @Override
+    protected synchronized void engineUpdate(byte[] in, int inOfs, int inLen)
+            throws SignatureException {
+        if (in == null || inOfs < 0 || inLen == 0) return;
+
+        int rv = update(in, inOfs, inLen);
+        if (rv < 0) {
+            throw new SignatureException(new UcryptoException(-rv));
+        }
+    }
+
+    @Override
+    protected synchronized void engineUpdate(ByteBuffer in) {
+        if (in == null || in.remaining() == 0) return;
+
+        if (in instanceof DirectBuffer == false) {
+            // cannot do better than default impl
+            super.engineUpdate(in);
+            return;
+        }
+        long inAddr = ((DirectBuffer)in).address();
+        int inOfs = in.position();
+        int inLen = in.remaining();
+
+        int rv = update((inAddr + inOfs), inLen);
+        if (rv < 0) {
+            throw new UcryptoException(-rv);
+        }
+        in.position(inOfs + inLen);
+    }
+
+    @Override
+    protected synchronized boolean engineVerify(byte[] sigBytes) throws SignatureException {
+        return engineVerify(sigBytes, 0, sigBytes.length);
+    }
+
+    @Override
+    protected synchronized boolean engineVerify(byte[] sigBytes, int sigOfs, int sigLen)
+        throws SignatureException {
+        if (sigBytes == null || (sigOfs < 0) || (sigBytes.length < (sigOfs + this.sigLength))
+            || (sigLen < this.sigLength)) {
+            throw new SignatureException("Invalid signature buffer");
+        }
+
+        int rv = doFinal(sigBytes, sigOfs, sigLen);
+        if (rv == 0) {
+            return true;
+        } else {
+            UcryptoProvider.debug("Signature: " + mech + " verification error " +
+                             new UcryptoException(-rv).getMessage());
+            return false;
+        }
+    }
+
+    void reset(boolean doCancel) {
+        initialized = false;
+        if (pCtxt != null) {
+            pCtxt.dispose(doCancel);
+            pCtxt = null;
+        }
+    }
+
+    /**
+     * calls ucrypto_sign_init(...) or ucrypto_verify_init(...)
+     * @return pointer to the context
+     */
+    private native static long nativeInit(int mech, boolean sign,
+                                          long keyValue, int keyLength);
+
+    /**
+     * calls ucrypto_sign_update(...) or ucrypto_verify_update(...)
+     * @returns an error status code (0 means SUCCESS)
+     */
+    private native static int nativeUpdate(long pContext, boolean sign,
+                                           byte[] in, int inOfs, int inLen);
+    /**
+     * calls ucrypto_sign_update(...) or ucrypto_verify_update(...)
+     * @returns an error status code (0 means SUCCESS)
+     */
+    private native static int nativeUpdate(long pContext, boolean sign,
+                                           long pIn, int inLen);
+
+    /**
+     * calls ucrypto_sign_final(...) or ucrypto_verify_final(...)
+     * @returns the length of signature bytes or verification status.
+     * If negative, it indicates an error status code
+     */
+    private native static int nativeFinal(long pContext, boolean sign,
+                                          byte[] sig, int sigOfs, int sigLen);
+
+    // actual init() implementation - caller should clone key if needed
+    private void init(boolean sign, NativeKey key, int sigLength) {
+        reset(true);
+        this.sign = sign;
+        this.sigLength = sigLength;
+        this.key = key;
+        long pCtxtVal = nativeInit(mech.value(), sign, key.value(),
+                                   key.length());
+        initialized = (pCtxtVal != 0L);
+        if (initialized) {
+            pCtxt = new SignatureContextRef(this, pCtxtVal, sign);
+        } else {
+            throw new UcryptoException("Cannot initialize Signature");
+        }
+    }
+
+    private void ensureInitialized() {
+        if (!initialized) {
+            init(sign, key, sigLength);
+            if (!initialized) {
+                throw new UcryptoException("Cannot initialize Signature");
+            }
+        }
+    }
+
+    // returns 0 (success) or negative (ucrypto error occurred)
+    private int update(byte[] in, int inOfs, int inLen) {
+        if (inOfs < 0 || inOfs + inLen > in.length) {
+            throw new ArrayIndexOutOfBoundsException();
+        }
+        ensureInitialized();
+        int k = nativeUpdate(pCtxt.id, sign, in, inOfs, inLen);
+        if (k < 0) {
+            reset(false);
+        }
+        return k;
+    }
+
+    // returns 0 (success) or negative (ucrypto error occurred)
+    private int update(long pIn, int inLen) {
+        ensureInitialized();
+        int k = nativeUpdate(pCtxt.id, sign, pIn, inLen);
+        if (k < 0) {
+            reset(false);
+        }
+        return k;
+    }
+
+    // returns 0 (success) or negative (ucrypto error occurred)
+    private int doFinal(byte[] sigBytes, int sigOfs, int sigLen) {
+        try {
+            ensureInitialized();
+            int k = nativeFinal(pCtxt.id, sign, sigBytes, sigOfs, sigLen);
+            return k;
+        } finally {
+            reset(false);
+        }
+    }
+
+    // check and return RSA key size in number of bytes
+    private int checkRSAKeyLength(BigInteger mod) throws InvalidKeyException {
+        int keySize = (mod.bitLength() + 7) >> 3;
+        int maxDataSize = keySize - PKCS1PADDING_LEN;
+        if (maxDataSize < encodedLen) {
+            throw new InvalidKeyException
+                ("Key is too short for this signature algorithm");
+        }
+        return keySize;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/jdk.crypto.ucrypto/solaris/classes/com/oracle/security/ucrypto/UcryptoException.java	Thu Oct 23 13:44:28 2014 -0700
@@ -0,0 +1,179 @@
+/*
+ * Copyright (c) 2014, 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
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.oracle.security.ucrypto;
+
+import java.util.*;
+import java.security.ProviderException;
+
+/**
+ * The exception class used by SunUcrypto provider. An exception
+ * object of this class indicates that a function call to the underlying
+ * native calls returned a value not equal to CRYPTO_SUCCESS.
+ *
+ * @since 1.9
+ */
+public final class UcryptoException extends ProviderException {
+
+    private static final long serialVersionUID = -933864511110035746L;
+
+    // NOTE: check /usr/include/sys/crypto/common.h for updates
+    private static final String ERROR_MSG[] = {
+        "CRYPTO_SUCCESS",
+        "CRYPTO_CANCEL",
+        "CRYPTO_HOST_MEMORY",
+        "CRYPTO_GENERAL_ERROR",
+        "CRYPTO_FAILED",
+        "CRYPTO_ARGUMENTS_BAD",
+        "CRYPTO_ATTRIBUTE_READ_ONLY",
+        "CRYPTO_ATTRIBUTE_SENSITIVE",
+        "CRYPTO_ATTRIBUTE_TYPE_INVALID",
+        "CRYPTO_ATTRIBUTE_VALUE_INVALID",
+        "CRYPTO_CANCELED",
+        "CRYPTO_DATA_INVALID",
+        "CRYPTO_DATA_LEN_RANGE",
+        "CRYPTO_DEVICE_ERROR",
+        "CRYPTO_DEVICE_MEMORY",
+        "CRYPTO_DEVICE_REMOVED",
+        "CRYPTO_ENCRYPTED_DATA_INVALID",
+        "CRYPTO_ENCRYPTED_DATA_LEN_RANGE",
+        "CRYPTO_KEY_HANDLE_INVALID",
+        "CRYPTO_KEY_SIZE_RANGE",
+        "CRYPTO_KEY_TYPE_INCONSISTENT",
+        "CRYPTO_KEY_NOT_NEEDED",
+        "CRYPTO_KEY_CHANGED",
+        "CRYPTO_KEY_NEEDED",
+        "CRYPTO_KEY_INDIGESTIBLE",
+        "CRYPTO_KEY_FUNCTION_NOT_PERMITTED",
+        "CRYPTO_KEY_NOT_WRAPPABLE",
+        "CRYPTO_KEY_UNEXTRACTABLE",
+        "CRYPTO_MECHANISM_INVALID",
+        "CRYPTO_MECHANISM_PARAM_INVALID",
+        "CRYPTO_OBJECT_HANDLE_INVALID",
+        "CRYPTO_OPERATION_IS_ACTIVE",
+        "CRYPTO_OPERATION_NOT_INITIALIZED",
+        "CRYPTO_PIN_INCORRECT",
+        "CRYPTO_PIN_INVALID",
+        "CRYPTO_PIN_LEN_RANGE",
+        "CRYPTO_PIN_EXPIRED",
+        "CRYPTO_PIN_LOCKED",
+        "CRYPTO_SESSION_CLOSED",
+        "CRYPTO_SESSION_COUNT",
+        "CRYPTO_SESSION_HANDLE_INVALID",
+        "CRYPTO_SESSION_READ_ONLY",
+        "CRYPTO_SESSION_EXISTS",
+        "CRYPTO_SESSION_READ_ONLY_EXISTS",
+        "CRYPTO_SESSION_READ_WRITE_SO_EXISTS",
+        "CRYPTO_SIGNATURE_INVALID",
+        "CRYPTO_SIGNATURE_LEN_RANGE",
+        "CRYPTO_TEMPLATE_INCOMPLETE",
+        "CRYPTO_TEMPLATE_INCONSISTENT",
+        "CRYPTO_UNWRAPPING_KEY_HANDLE_INVALID",
+        "CRYPTO_UNWRAPPING_KEY_SIZE_RANGE",
+        "CRYPTO_UNWRAPPING_KEY_TYPE_INCONSISTENT",
+        "CRYPTO_USER_ALREADY_LOGGED_IN",
+        "CRYPTO_USER_NOT_LOGGED_IN",
+        "CRYPTO_USER_PIN_NOT_INITIALIZED",
+        "CRYPTO_USER_TYPE_INVALID",
+        "CRYPTO_USER_ANOTHER_ALREADY_LOGGED_IN",
+        "CRYPTO_USER_TOO_MANY_TYPES",
+        "CRYPTO_WRAPPED_KEY_INVALID",
+        "CRYPTO_WRAPPED_KEY_LEN_RANGE",
+        "CRYPTO_WRAPPING_KEY_HANDLE_INVALID",
+        "CRYPTO_WRAPPING_KEY_SIZE_RANGE",
+        "CRYPTO_WRAPPING_KEY_TYPE_INCONSISTENT",
+        "CRYPTO_RANDOM_SEED_NOT_SUPPORTED",
+        "CRYPTO_RANDOM_NO_RNG",
+        "CRYPTO_DOMAIN_PARAMS_INVALID",
+        "CRYPTO_BUFFER_TOO_SMALL",
+        "CRYPTO_INFORMATION_SENSITIVE",
+        "CRYPTO_NOT_SUPPORTED",
+        "CRYPTO_QUEUED",
+        "CRYPTO_BUFFER_TOO_BIG",
+        "CRYPTO_INVALID_CONTEXT",
+        "CRYPTO_INVALID_MAC",
+        "CRYPTO_MECH_NOT_SUPPORTED",
+        "CRYPTO_INCONSISTENT_ATTRIBUTE",
+        "CRYPTO_NO_PERMISSION",
+        "CRYPTO_INVALID_PROVIDER_ID",
+        "CRYPTO_VERSION_MISMATCH",
+        "CRYPTO_BUSY",
+        "CRYPTO_UNKNOWN_PROVIDER",
+        "CRYPTO_MODVERIFICATION_FAILED",
+        "CRYPTO_OLD_CTX_TEMPLATE",
+        "CRYPTO_WEAK_KEY",
+        "CRYPTO_FIPS140_ERROR"
+    };
+
+    /**
+     * The error code if this exception is triggered by a Ucrypto error.
+     */
+    private final int errorCode;
+
+    /**
+     * This method gets the corresponding text error message from a
+     * predefined mapping. If mapping is not found, then it returns the error
+     * code as a hex-string.
+     *
+     * @return The message or the error code; e.g. "CRYPTO_DATA_INVALID" or
+     *         "0x88".
+     */
+    static String getErrorMessage(int errorCode) {
+        String message;
+        if (errorCode < ERROR_MSG.length) {
+            message = ERROR_MSG[errorCode];
+        } else {
+            message = "0x" + Integer.toHexString(errorCode);
+        }
+        return message;
+    }
+
+    /**
+     * Constructor taking the error code as defined for the CRYPTO_* constants
+     */
+    public UcryptoException(int rv) {
+        super(getErrorMessage(rv));
+        this.errorCode = rv;
+    }
+
+    public UcryptoException(String message) {
+        super(message);
+        errorCode = -1;
+    }
+
+    public UcryptoException(String message, Throwable cause) {
+        super(message, cause);
+        errorCode = -1;
+    }
+
+    /**
+     * Returns the Ucrypto error code.
+     *
+     * @return The error code.
+     */
+    public int getErrorCode() {
+        return errorCode;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/jdk.crypto.ucrypto/solaris/classes/com/oracle/security/ucrypto/UcryptoMech.java	Thu Oct 23 13:44:28 2014 -0700
@@ -0,0 +1,119 @@
+/*
+ * Copyright (c) 2014, 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
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.oracle.security.ucrypto;
+
+import java.util.HashMap;
+
+/**
+ * Enum for representing the ucrypto mechanisms.
+ *
+ * @since 1.9
+ */
+// Check /usr/include/libsoftcrypto.h for updates
+public enum UcryptoMech {
+    CRYPTO_AES_ECB(1, new String[]
+        { "Cipher.AES/ECB/NoPadding;com.oracle.security.ucrypto.NativeCipher$AesEcbNoPadding",
+          "Cipher.AES/ECB/PKCS5Padding;com.oracle.security.ucrypto.NativeCipherWithJavaPadding$AesEcbPKCS5",
+          "Cipher.AES_128/ECB/NoPadding;com.oracle.security.ucrypto.NativeCipher$Aes128EcbNoPadding",
+          "Alg.Alias.Cipher.2.16.840.1.101.3.4.1.1;AES_128/ECB/NoPadding",
+          "Alg.Alias.Cipher.OID.2.16.840.1.101.3.4.1.1;AES_128/ECB/NoPadding",
+          "Cipher.AES_192/ECB/NoPadding;com.oracle.security.ucrypto.NativeCipher$Aes192EcbNoPadding",
+          "Alg.Alias.Cipher.2.16.840.1.101.3.4.1.21;AES_192/ECB/NoPadding",
+          "Alg.Alias.Cipher.OID.2.16.840.1.101.3.4.1.21;AES_192/ECB/NoPadding",
+          "Cipher.AES_256/ECB/NoPadding;com.oracle.security.ucrypto.NativeCipher$Aes256EcbNoPadding",
+          "Alg.Alias.Cipher.2.16.840.1.101.3.4.1.41;AES_256/ECB/NoPadding",
+          "Alg.Alias.Cipher.OID.2.16.840.1.101.3.4.1.41;AES_256/ECB/NoPadding"
+        }),
+    CRYPTO_AES_CBC(2, new String[]
+        { "Cipher.AES/CBC/NoPadding;com.oracle.security.ucrypto.NativeCipher$AesCbcNoPadding",
+          "Cipher.AES/CBC/PKCS5Padding;com.oracle.security.ucrypto.NativeCipherWithJavaPadding$AesCbcPKCS5",
+          "Cipher.AES_128/CBC/NoPadding;com.oracle.security.ucrypto.NativeCipher$Aes128CbcNoPadding",
+          "Alg.Alias.Cipher.2.16.840.1.101.3.4.1.2;AES_128/CBC/NoPadding",
+          "Alg.Alias.Cipher.OID.2.16.840.1.101.3.4.1.2;AES_128/CBC/NoPadding",
+          "Cipher.AES_192/CBC/NoPadding;com.oracle.security.ucrypto.NativeCipher$Aes192CbcNoPadding",
+          "Alg.Alias.Cipher.2.16.840.1.101.3.4.1.22;AES_192/CBC/NoPadding",
+          "Alg.Alias.Cipher.OID.2.16.840.1.101.3.4.1.22;AES_192/CBC/NoPadding",
+          "Cipher.AES_256/CBC/NoPadding;com.oracle.security.ucrypto.NativeCipher$Aes256CbcNoPadding",
+          "Alg.Alias.Cipher.2.16.840.1.101.3.4.1.42;AES_256/CBC/NoPadding",
+          "Alg.Alias.Cipher.OID.2.16.840.1.101.3.4.1.42;AES_256/CBC/NoPadding"
+        }),
+    CRYPTO_AES_CBC_PAD(3, null), // No support from Solaris yet
+    CRYPTO_AES_CTR(4, new String[]
+        { "Cipher.AES/CTR/NoPadding;com.oracle.security.ucrypto.NativeCipher$AesCtrNoPadding" }),
+    CRYPTO_AES_CCM(5, null), // Cannot support due to lack of Java API which corresponds to CK_AES_CCM_PARAMS
+    CRYPTO_AES_GCM(6, new String[]
+        { "Cipher.AES/GCM/NoPadding;com.oracle.security.ucrypto.NativeGCMCipher$AesGcmNoPadding",
+          "Cipher.AES_128/GCM/NoPadding;com.oracle.security.ucrypto.NativeGCMCipher$Aes128GcmNoPadding",
+          "Alg.Alias.Cipher.2.16.840.1.101.3.4.1.6;AES_128/GCM/NoPadding",
+          "Alg.Alias.Cipher.OID.2.16.840.1.101.3.4.1.6;AES_128/GCM/NoPadding",
+          "Cipher.AES_192/GCM/NoPadding;com.oracle.security.ucrypto.NativeGCMCipher$Aes192GcmNoPadding",
+          "Alg.Alias.Cipher.2.16.840.1.101.3.4.1.26;AES_192/GCM/NoPadding",
+          "Alg.Alias.Cipher.OID.2.16.840.1.101.3.4.1.26;AES_192/GCM/NoPadding",
+          "Cipher.AES_256/GCM/NoPadding;com.oracle.security.ucrypto.NativeGCMCipher$Aes256GcmNoPadding",
+          "Alg.Alias.Cipher.2.16.840.1.101.3.4.1.46;AES_256/GCM/NoPadding",
+          "Alg.Alias.Cipher.OID.2.16.840.1.101.3.4.1.46;AES_256/GCM/NoPadding",
+        }),
+    CRYPTO_AES_GMAC(7, null), // No support from Solaris yet
+    CRYPTO_AES_CFB128(8, new String[]
+        { "Cipher.AES/CFB128/NoPadding;com.oracle.security.ucrypto.NativeCipher$AesCfb128NoPadding",
+          "Cipher.AES/CFB128/PKCS5Padding;com.oracle.security.ucrypto.NativeCipherWithJavaPadding$AesCfb128PKCS5" }),
+    CRYPTO_RSA_PKCS(31, new String[]
+        { "Cipher.RSA/ECB/PKCS1Padding;com.oracle.security.ucrypto.NativeRSACipher$PKCS1Padding" }),
+    CRYPTO_RSA_X_509(32, new String[]
+        { "Cipher.RSA/ECB/NoPadding;com.oracle.security.ucrypto.NativeRSACipher$NoPadding" }),
+    CRYPTO_MD5_RSA_PKCS(33, new String[]
+        { "Signature.MD5withRSA;com.oracle.security.ucrypto.NativeRSASignature$MD5",
+          "Alg.Alias.Signature.1.2.840.113549.1.1.4;MD5withRSA",
+          "Alg.Alias.Signature.OID.1.2.840.113549.1.1.4;MD5withRSA" }),
+    CRYPTO_SHA1_RSA_PKCS(34, new String[]
+        { "Signature.SHA1withRSA;com.oracle.security.ucrypto.NativeRSASignature$SHA1",
+          "Alg.Alias.Signature.1.2.840.113549.1.1.5;SHA1withRSA",
+          "Alg.Alias.Signature.OID.1.2.840.113549.1.1.5;SHA1withRSA",
+          "Alg.Alias.Signature.1.3.14.3.2.29;SHA1withRSA" }),
+    CRYPTO_SHA256_RSA_PKCS(35, new String[]
+        { "Signature.SHA256withRSA;com.oracle.security.ucrypto.NativeRSASignature$SHA256",
+          "Alg.Alias.Signature.1.2.840.113549.1.1.11;SHA256withRSA",
+          "Alg.Alias.Signature.OID.1.2.840.113549.1.1.11;SHA256withRSA" }),
+    CRYPTO_SHA384_RSA_PKCS(36, new String[]
+        { "Signature.SHA384withRSA;com.oracle.security.ucrypto.NativeRSASignature$SHA384",
+          "Alg.Alias.Signature.1.2.840.113549.1.1.12;SHA384withRSA",
+          "Alg.Alias.Signature.OID.1.2.840.113549.1.1.12;SHA384withRSA" }),
+    CRYPTO_SHA512_RSA_PKCS(37, new String[]
+        { "Signature.SHA512withRSA;com.oracle.security.ucrypto.NativeRSASignature$SHA512",
+          "Alg.Alias.Signature.1.2.840.113549.1.1.13;SHA512withRSA",
+          "Alg.Alias.Signature.OID.1.2.840.113549.1.1.13;SHA512withRSA" });
+
+    private int mech;
+    private String[] jceProps;
+
+    UcryptoMech(int mech, String[] jceProps) {
+        this.mech = mech;
+        this.jceProps = jceProps;
+    }
+
+    public int value() { return mech; }
+    public String[] jceProperties() { return jceProps; }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/jdk.crypto.ucrypto/solaris/classes/com/oracle/security/ucrypto/UcryptoProvider.java	Thu Oct 23 13:44:28 2014 -0700
@@ -0,0 +1,179 @@
+/*
+ * Copyright (c) 2014, 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
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.oracle.security.ucrypto;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.StringTokenizer;
+import java.security.*;
+import sun.security.action.PutAllAction;
+import sun.security.action.GetPropertyAction;
+
+/**
+ * OracleUcrypto provider main class.
+ *
+ * @since 1.9
+ */
+public final class UcryptoProvider extends Provider {
+
+    private static final long serialVersionUID = 351251234302833L;
+
+    private static boolean DEBUG;
+    private static HashMap<String, String> provProp;
+
+    static {
+        try {
+            DEBUG = Boolean.parseBoolean(AccessController.doPrivileged
+                (new GetPropertyAction("com.oracle.security.ucrypto.debug")));
+
+            // cannot use LoadLibraryAction because that would make the native
+            // library available to the bootclassloader, but we run in the
+            // extension classloader.
+            provProp = AccessController.doPrivileged
+                (new PrivilegedAction<HashMap<String, String>>() {
+                    public HashMap<String, String> run() {
+                        try {
+                            System.loadLibrary("j2ucrypto");
+                            String osname = System.getProperty("os.name");
+                            if (osname.startsWith("SunOS")) {
+                                return new HashMap<String, String>();
+                            } else return null;
+                        } catch (Error err) {
+                            return null;
+                        } catch (SecurityException se) {
+                            return null;
+                        }
+                    }
+                });
+            if (provProp != null) {
+                boolean[] result = loadLibraries();
+                if (result.length == 2) {
+                    if (result[0]) { // successfully loaded libmd
+                        provProp.put("MessageDigest.MD5",
+                                     "com.oracle.security.ucrypto.NativeDigest$MD5");
+                        provProp.put("MessageDigest.SHA",
+                                     "com.oracle.security.ucrypto.NativeDigest$SHA1");
+                        provProp.put("Alg.Alias.MessageDigest.SHA-1", "SHA");
+                        provProp.put("Alg.Alias.MessageDigest.SHA1", "SHA");
+                        provProp.put("MessageDigest.SHA-256",
+                                     "com.oracle.security.ucrypto.NativeDigest$SHA256");
+                        provProp.put("Alg.Alias.MessageDigest.2.16.840.1.101.3.4.2.1", "SHA-256");
+                        provProp.put("Alg.Alias.MessageDigest.OID.2.16.840.1.101.3.4.2.1", "SHA-256");
+
+                        provProp.put("MessageDigest.SHA-384",
+                                     "com.oracle.security.ucrypto.NativeDigest$SHA384");
+                        provProp.put("Alg.Alias.MessageDigest.2.16.840.1.101.3.4.2.2", "SHA-384");
+                        provProp.put("Alg.Alias.MessageDigest.OID.2.16.840.1.101.3.4.2.2", "SHA-384");
+
+                        provProp.put("MessageDigest.SHA-512",
+                                     "com.oracle.security.ucrypto.NativeDigest$SHA512");
+                        provProp.put("Alg.Alias.MessageDigest.2.16.840.1.101.3.4.2.3", "SHA-512");
+                        provProp.put("Alg.Alias.MessageDigest.OID.2.16.840.1.101.3.4.2.3", "SHA-512");
+
+                    }
+                    if (result[1]) { // successfully loaded libsoftcrypto
+                        String supportedMechs = getMechList();
+                        debug("Prov: supported mechs = " + supportedMechs);
+                        for (UcryptoMech m : UcryptoMech.values()) {
+                            if (supportedMechs.indexOf(m.name() + ",") != -1) {
+                                String[] jceProps = m.jceProperties();
+                                // skip unsupported UcryptoMech
+                                if (jceProps == null) continue;
+                                for (int p = 0; p < jceProps.length; p++) {
+                                    StringTokenizer st =
+                                        new StringTokenizer(jceProps[p], ";");
+                                    if (st.countTokens() != 2) {
+                                        throw new RuntimeException("Wrong format: " + jceProps[p]);
+                                    }
+                                    provProp.put(st.nextToken(), st.nextToken());
+                                }
+                            }
+                        }
+                        // NOTE: GCM support is only available since jdk 7
+                        provProp.put("AlgorithmParameters.GCM",
+                                     "com.oracle.security.ucrypto.GCMParameters");
+                    }
+                } else {
+                    debug("Prov: unexpected ucrypto library loading error, got " + result.length);
+                }
+            }
+        } catch (AccessControlException ace) {
+            // disable Ucrypto provider
+            DEBUG = false;
+            provProp = null;
+        }
+    }
+
+    static Provider provider = null;
+    private static native boolean[] loadLibraries();
+    private static native String getMechList();
+
+    static void debug(String msg) {
+        if (DEBUG) {
+            System.out.println("UCrypto/" + msg);
+        }
+    }
+
+    public UcryptoProvider() {
+        super("OracleUcrypto", 1.9d, "Provider using Oracle Ucrypto API");
+        if (provProp != null) {
+            AccessController.doPrivileged(new PutAllAction(this, provProp));
+        }
+        if (provider == null) provider = this;
+    }
+
+    public UcryptoProvider(String configName) {
+        super("OracleUcrypto", 1.9d, "Provider using Oracle Ucrypto API");
+        try {
+            if (provProp != null) {
+                HashMap<String, String> customProvProp =
+                    new HashMap<String, String>(provProp);
+                Config c = new Config(configName);
+                String[] disabledServices = c.getDisabledServices();
+                for (int i = 0; i < disabledServices.length; i++) {
+                    if (customProvProp.remove(disabledServices[i]) != null) {
+                        debug("Prov: remove config-disabled service " + disabledServices[i]);
+                    } else {
+                        debug("Prov: ignore unsupported config-disabled service " +
+                              disabledServices[i]);
+                    }
+                }
+                AccessController.doPrivileged(new PutAllAction(this, customProvProp));
+            }
+        } catch (IOException ioe) { // thrown by Config
+            throw new UcryptoException("Error parsing Config", ioe);
+        }
+        if (provider == null) provider = this;
+    }
+
+    public boolean equals(Object obj) {
+        return this == obj;
+    }
+
+    public int hashCode() {
+        return System.identityHashCode(this);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/jdk.crypto.ucrypto/solaris/conf/security/ucrypto-solaris.cfg	Thu Oct 23 13:44:28 2014 -0700
@@ -0,0 +1,9 @@
+#
+# Configuration file for the OracleUcrypto provider
+#
+disabledServices = {
+  # disabled due to Solaris bug 7121679
+  Cipher.AES/CFB128/PKCS5Padding
+  Cipher.AES/CFB128/NoPadding
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/jdk.crypto.ucrypto/solaris/native/libj2ucrypto/nativeCrypto.c	Thu Oct 23 13:44:28 2014 -0700
@@ -0,0 +1,1250 @@
+/*
+ * Copyright (c) 2014, 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
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+#include <stdlib.h>
+#include <string.h>
+#include <strings.h>
+#include <jni.h>
+#include <libsoftcrypto.h>
+#include "nativeCrypto.h"
+#include "nativeFunc.h"
+
+/*
+ * Dumps out byte array in hex with and name and length info
+ */
+void printBytes(char* header, unsigned char* bytes, int len) {
+  int i;
+
+  printf("%s", header);
+  printf("len=%d {", len);
+  for (i = 0; i < len; i++) {
+    if (i > 0) printf(":");
+    printf("%02X", bytes[i]);
+  }
+  printf("}\n");
+}
+
+/*
+ * Throws java.lang.OutOfMemoryError
+ */
+void throwOutOfMemoryError(JNIEnv *env, const char *msg)
+{
+  jclass jExClass = (*env)->FindClass(env, "java/lang/OutOfMemoryError");
+  if (jExClass != 0) /* Otherwise an exception has already been thrown */ {
+    (*env)->ThrowNew(env, jExClass, msg);
+  }
+  /* free the local ref */
+  (*env)->DeleteLocalRef(env, jExClass);
+}
+
+JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *reserved) {
+    return JNI_VERSION_1_4;
+}
+
+/*
+ * Class:     com_oracle_security_ucrypto_UcryptoProvider
+ * Method:    loadLibraries
+ * Signature: ()[Z
+ */
+JNIEXPORT jbooleanArray JNICALL Java_com_oracle_security_ucrypto_UcryptoProvider_loadLibraries
+(JNIEnv *env, jclass jcls) {
+  jbooleanArray jResult;
+  jboolean *result;
+  jResult = (*env)->NewBooleanArray(env, 2);
+
+  if (jResult != NULL) {
+    result = loadNative();
+    (*env)->SetBooleanArrayRegion(env, jResult, 0, 2, result);
+    free(result);
+  }
+  return jResult;
+}
+
+/*
+ * Class:     com_oracle_security_ucrypto_UcryptoProvider
+ * Method:    getMechList
+ * Signature: ()Ljava/lang/String;
+ */
+JNIEXPORT jstring JNICALL Java_com_oracle_security_ucrypto_UcryptoProvider_getMechList
+(JNIEnv *env, jclass jcls) {
+  jstring jResult;
+  char* result;
+  int length;
+
+  jResult = NULL;
+  if (ftab->ucryptoVersion != NULL && ftab->ucryptoGetMechList != NULL) {
+      length = (*ftab->ucryptoGetMechList)(NULL);
+      if (DEBUG) printf("mech list length: %d\n", length);
+      result = malloc(length);
+      if (result == NULL) {
+        throwOutOfMemoryError(env, NULL);
+        return NULL;
+      }
+      length = (*ftab->ucryptoGetMechList)(result);
+      if (DEBUG) printf("mech list: %s\n", result);
+      jResult = (*env)->NewStringUTF(env, result);
+      free(result);
+  } else {
+      // version 0 on Solaris 10
+      result = "CRYPTO_AES_ECB,CRYPTO_AES_CBC,CRYPTO_AES_CFB128,";
+      jResult = (*env)->NewStringUTF(env, result);
+  }
+  return jResult;
+}
+
+/*
+ * Utility function for throwing a UcryptoException when rv is not CRYPTO_OK(0)
+ */
+void throwUCExceptionUsingRV(JNIEnv *env, int rv) {
+  jclass jExClass;
+  jmethodID jConstructor;
+  jthrowable jException;
+
+  if ((*env)->ExceptionCheck(env)) return;
+
+  jExClass = (*env)->FindClass(env, "com/oracle/security/ucrypto/UcryptoException");
+  /* if jExClass is NULL, an exception has already been thrown */
+  if (jExClass != NULL) {
+    jConstructor = (*env)->GetMethodID(env, jExClass, "<init>", "(I)V");
+    if (jConstructor != NULL) {
+      jException = (jthrowable) (*env)->NewObject(env, jExClass, jConstructor, rv);
+      if (jException != NULL) {
+        (*env)->Throw(env, jException);
+      }
+    }
+  }
+  /* free the local ref */
+  (*env)->DeleteLocalRef(env, jExClass);
+}
+
+/*
+ * Utility function for duplicating a byte array from jbyteArray
+ * If anything went wrong, no memory will be allocated.
+ * NOTE: caller is responsible for freeing the allocated memory
+ * once this method returned successfully.
+ */
+jbyte* getBytes(JNIEnv *env, jbyteArray bytes, int offset, int len) {
+  jbyte* result = NULL;
+
+  if (!(*env)->ExceptionCheck(env)) {
+    result = (jbyte*) calloc(len, sizeof(char));
+    if (result == NULL) {
+      throwOutOfMemoryError(env, NULL);
+      return NULL;
+    }
+    (*env)->GetByteArrayRegion(env, bytes, offset, len, result);
+    if ((*env)->ExceptionCheck(env)) {
+        // free allocated memory if error occurred
+        free(result);
+        return NULL;
+    }
+  }
+  return result;
+}
+
+
+int
+CipherInit(crypto_ctx_t *context, int encrypt, ucrypto_mech_t mech,
+           unsigned char *jKey, int jKeyLen, unsigned char *jIv, int jIvLen,
+           int tagLen, unsigned char *jAad, int jAadLen)
+
+{
+  int rv = 0;
+  void *iv;
+  size_t ivLen;
+
+  if (DEBUG) printf("CipherInit: mech %i, key %i(%i), iv %i(%i) tagLen %i, aad %i(%i)\n",
+                    mech, jKey, jKeyLen, jIv, jIvLen, tagLen, jAad, jAadLen);
+  if (mech == CRYPTO_AES_CTR) {
+    ivLen = sizeof(CK_AES_CTR_PARAMS);
+    iv = (CK_AES_CTR_PARAMS*) malloc(ivLen);
+    if (iv == NULL) return -1;
+
+    ((CK_AES_CTR_PARAMS*)iv)->ulCounterBits = 32;
+    memcpy(((CK_AES_CTR_PARAMS*)iv)->cb, jIv, 16);
+  } else if (mech == CRYPTO_AES_GCM) {
+    ivLen = sizeof(CK_AES_GCM_PARAMS);
+    iv = (CK_AES_GCM_PARAMS*) malloc(ivLen);
+    if (iv == NULL) return -1;
+
+    ((CK_AES_GCM_PARAMS*)iv)->pIv = (uchar_t *)jIv;
+    ((CK_AES_GCM_PARAMS*)iv)->ulIvLen = (ulong_t)jIvLen;
+    ((CK_AES_GCM_PARAMS*)iv)->ulIvBits = 96;
+    ((CK_AES_GCM_PARAMS*)iv)->pAAD = (uchar_t *)jAad;
+    ((CK_AES_GCM_PARAMS*)iv)->ulAADLen = (ulong_t)jAadLen;
+    ((CK_AES_GCM_PARAMS*)iv)->ulTagBits = (ulong_t)tagLen;
+  } else {
+    // normal bytes
+    iv = jIv;
+    ivLen = jIvLen;
+  }
+  if (encrypt) {
+    rv = (*ftab->ucryptoEncryptInit)(context, mech, jKey, (size_t)jKeyLen, iv, ivLen);
+    if (rv != 0 && DEBUG) printf("ucryptoEncryptInit: ret = 0x%x\n", rv);
+  } else {
+    rv =(*ftab->ucryptoDecryptInit)(context, mech, jKey, (size_t)jKeyLen, iv, ivLen);
+    if (rv != 0 && DEBUG) printf("ucryptoDecryptInit: ret = 0x%x\n", rv);
+  }
+
+  if (iv != jIv) {
+    if (mech == CRYPTO_AES_CTR) {
+      free((CK_AES_CTR_PARAMS*)iv);
+    } else {
+      free((CK_AES_GCM_PARAMS*)iv);
+    }
+  }
+
+  return rv;
+}
+
+int
+CipherUpdate(crypto_ctx_t *context, int encrypt, unsigned char *bufIn, int inOfs,
+             int inLen, unsigned char *bufOut, int outOfs, int *outLen)
+{
+  int rv = 0;
+  size_t outLength;
+
+  outLength = (size_t) *outLen;
+  if (DEBUG) {
+    printf("CipherUpdate: Inofs %i, InLen %i, OutOfs %i, OutLen %i\n", inOfs, inLen, outOfs, *outLen);
+    printBytes("BufIn=", (unsigned char*)(bufIn+inOfs), inLen);
+  }
+  if (encrypt) {
+    rv = (*ftab->ucryptoEncryptUpdate)(context, (unsigned char*)(bufIn+inOfs), (size_t)inLen, (unsigned char*)(bufOut+outOfs), &outLength);
+    if (rv != 0) {
+      if (DEBUG) printf("ucryptoEncryptUpdate: ret = 0x%x\n", rv);
+    } else {
+      *outLen = (int)outLength;
+    }
+  } else {
+    rv = (*ftab->ucryptoDecryptUpdate)(context, (unsigned char*)(bufIn+inOfs), (size_t)inLen, (unsigned char*)(bufOut+outOfs), &outLength);
+    if (rv != 0) {
+      if (DEBUG) printf("ucryptoDecryptUpdate: ret = 0x%x\n", rv);
+    } else {
+      if (DEBUG) printBytes("BufOut=", (unsigned char*)(bufOut+outOfs), outLength);
+      *outLen = (int)outLength;
+    }
+  }
+
+  return rv;
+}
+
+int
+CipherFinal(crypto_ctx_t *context, int encrypt, unsigned char *bufOut, int outOfs, int *outLen)
+{
+  int rv = 0;
+  size_t outLength;
+
+  outLength = (size_t)*outLen;
+
+  if (DEBUG) printf("CipherFinal: OutOfs %i, outLen %i\n", outOfs, *outLen);
+  if (encrypt) {
+    rv = (*ftab->ucryptoEncryptFinal)(context, (unsigned char*)(bufOut+outOfs), &outLength);
+    if (rv != 0) {
+      if (DEBUG) printf("ucryptoDecryptFinal: ret = 0x%x\n", rv);
+    } else {
+      if (DEBUG) printBytes("BufOut=", (unsigned char*)(bufOut+outOfs), outLength);
+      *outLen = (int)outLength;
+    }
+  } else {
+    rv = (*ftab->ucryptoDecryptFinal)(context, (unsigned char*)(bufOut+outOfs), &outLength);
+    if (rv != 0) {
+      if (DEBUG) printf("ucryptoDecryptFinal: ret = 0x%x\n", rv);
+    } else {
+      if (DEBUG) printBytes("BufOut=", (unsigned char*)(bufOut+outOfs), outLength);
+      *outLen = (int)outLength;
+    }
+  }
+  return rv;
+}
+
+////////////////////////////////////////////////////////
+// SPECIAL ENTRIES FOR JVM JNI-BYPASSING OPTIMIZATION
+////////////////////////////////////////////////////////
+jlong JavaCritical_com_oracle_security_ucrypto_NativeDigest_nativeInit(jint mech) {
+  void *pContext = NULL;
+
+  switch (mech) {
+  case com_oracle_security_ucrypto_NativeDigest_MECH_SHA1:
+    pContext = (SHA1_CTX *) malloc(sizeof(SHA1_CTX));
+    if (pContext != NULL) {
+      (*ftab->sha1Init)((SHA1_CTX *)pContext);
+    }
+    break;
+  case com_oracle_security_ucrypto_NativeDigest_MECH_MD5:
+    pContext = (MD5_CTX *) malloc(sizeof(MD5_CTX));
+    if (pContext != NULL) {
+      (*ftab->md5Init)((MD5_CTX *)pContext);
+    }
+    break;
+  case com_oracle_security_ucrypto_NativeDigest_MECH_SHA256:
+    pContext = (SHA2_CTX *) malloc(sizeof(SHA2_CTX));
+    if (pContext != NULL) {
+      (*ftab->sha2Init)(SHA256, (SHA2_CTX *)pContext);
+    }
+    break;
+  case com_oracle_security_ucrypto_NativeDigest_MECH_SHA384:
+    pContext = (SHA2_CTX *) malloc(sizeof(SHA2_CTX));
+    if (pContext != NULL) {
+      (*ftab->sha2Init)(SHA384, (SHA2_CTX *)pContext);
+    }
+    break;
+  case com_oracle_security_ucrypto_NativeDigest_MECH_SHA512:
+    pContext = (SHA2_CTX *) malloc(sizeof(SHA2_CTX));
+    if (pContext != NULL) {
+      (*ftab->sha2Init)(SHA512, (SHA2_CTX *)pContext);
+    }
+    break;
+  default:
+    if (DEBUG) printf("ERROR: Unsupported mech %i\n", mech);
+  }
+  return (jlong) pContext;
+}
+
+jint JavaCritical_com_oracle_security_ucrypto_NativeDigest_nativeUpdate
+  (jint mech, jlong pContext, int notUsed, unsigned char* in, jint ofs, jint len) {
+  if (mech == com_oracle_security_ucrypto_NativeDigest_MECH_SHA1) {
+    (*ftab->sha1Update)((SHA1_CTX*)pContext, (unsigned char*)(in+ofs), len);
+  } else if (mech == com_oracle_security_ucrypto_NativeDigest_MECH_MD5) {
+    (*ftab->md5Update)((MD5_CTX*)pContext, (unsigned char*)(in+ofs), len);
+  } else { // SHA-2 family
+    (*ftab->sha2Update)((SHA2_CTX*)pContext, (unsigned char*)(in+ofs), len);
+  }
+  return 0;
+}
+
+// Do digest and free the context immediately
+jint JavaCritical_com_oracle_security_ucrypto_NativeDigest_nativeDigest
+  (jint mech, jlong pContext, int notUsed, unsigned char* out, jint ofs, jint digestLen) {
+
+  if (mech == com_oracle_security_ucrypto_NativeDigest_MECH_SHA1) {
+    (*ftab->sha1Final)((unsigned char*)(out + ofs), (SHA1_CTX *)pContext);
+    free((SHA1_CTX *)pContext);
+  } else if (mech == com_oracle_security_ucrypto_NativeDigest_MECH_MD5) {
+    (*ftab->md5Final)((unsigned char*)(out + ofs), (MD5_CTX *)pContext);
+    free((MD5_CTX *)pContext);
+  } else { // SHA-2 family
+    (*ftab->sha2Final)((unsigned char*)(out + ofs), (SHA2_CTX *)pContext);
+    free((SHA2_CTX *)pContext);
+  }
+  return 0;
+}
+
+jlong JavaCritical_com_oracle_security_ucrypto_NativeDigest_nativeClone
+  (jint mech, jlong pContext) {
+  void *copy = NULL;
+  size_t len = 0;
+
+  if (mech == com_oracle_security_ucrypto_NativeDigest_MECH_SHA1) {
+    len = sizeof(SHA1_CTX);
+  } else if (mech == com_oracle_security_ucrypto_NativeDigest_MECH_MD5) {
+    len = sizeof(MD5_CTX);
+  } else { // SHA-2 family
+    len = sizeof(SHA2_CTX);
+  }
+  copy = (void*) malloc(len);
+  if (copy != NULL) {
+    bcopy((void *)pContext, copy, len);
+  }
+  return (jlong) copy;
+}
+
+void JavaCritical_com_oracle_security_ucrypto_NativeDigest_nativeFree
+  (jint mech, jlong pContext) {
+  if (mech == com_oracle_security_ucrypto_NativeDigest_MECH_SHA1) {
+    free((SHA1_CTX*) pContext);
+  } else if (mech == com_oracle_security_ucrypto_NativeDigest_MECH_MD5) {
+    free((MD5_CTX*) pContext);
+  } else { // SHA-2 family
+    free((SHA2_CTX*) pContext);
+  }
+}
+
+// AES
+jlong JavaCritical_com_oracle_security_ucrypto_NativeCipher_nativeInit
+  (jint mech, jboolean encrypt, int keyLen, unsigned char* bufKey,
+   int ivLen, unsigned char* bufIv, jint tagLen, int aadLen, unsigned char* bufAad) {
+  crypto_ctx_t *context = NULL;
+  int rv;
+
+  context = malloc(sizeof(crypto_ctx_t));
+  if (context != NULL) {
+    rv = CipherInit(context, encrypt, (ucrypto_mech_t) mech, bufKey, keyLen,
+                    bufIv, ivLen, tagLen, bufAad, aadLen);
+    if (rv) {
+      free(context);
+      return 0L;
+    }
+  }
+  return (jlong)context;
+}
+
+/*
+ * Class:     com_oracle_security_ucrypto_NativeCipher
+ * Method:    nativeUpdate
+ * Signature: (JZ[BII[BI)I
+ */
+jint JavaCritical_com_oracle_security_ucrypto_NativeCipher_nativeUpdate
+  (jlong pContext, jboolean encrypt, int notUsed, jbyte* bufIn, jint inOfs, jint inLen,
+   int outCapacity, jbyte* bufOut, jint outOfs) {
+  crypto_ctx_t *context;
+  int rv = 0;
+  int outLen = outCapacity - outOfs; // recalculate the real out length
+
+  context = (crypto_ctx_t *) pContext;
+  rv = CipherUpdate(context, encrypt, (unsigned char*)bufIn, inOfs, inLen, (unsigned char*)bufOut, outOfs, &outLen);
+  if (rv) {
+    free(context);
+    context = 0;
+    return -rv; // use negative value to indicate error!
+  }
+
+  return outLen;
+}
+
+/*
+ * Class:     com_oracle_security_ucrypto_NativeCipher
+ * Method:    nativeFinal
+ * Signature: (JZ[BI)I
+ */
+jint JavaCritical_com_oracle_security_ucrypto_NativeCipher_nativeFinal
+  (jlong pContext, jboolean encrypt, int outLen, jbyte* bufOut, jint outOfs) {
+  crypto_ctx_t *context;
+  int rv = 0;
+
+  context = (crypto_ctx_t *) pContext;
+  rv = CipherFinal(context, encrypt, (unsigned char*)bufOut, outOfs, &outLen);
+  free(context);
+  if (rv) {
+     return -rv; // use negative value to indicate error!
+  }
+
+  return outLen;
+}
+
+
+
+/*
+ * Class:     com_oracle_security_ucrypto_NativeDigest
+ * Method:    nativeInit
+ * Signature: (I)J
+ */
+JNIEXPORT jlong JNICALL Java_com_oracle_security_ucrypto_NativeDigest_nativeInit
+  (JNIEnv *env, jclass jcls, jint mech) {
+  jlong result = JavaCritical_com_oracle_security_ucrypto_NativeDigest_nativeInit(mech);
+  if (result == NULL) {
+     throwOutOfMemoryError(env, NULL);
+  }
+  return result;
+}
+
+/*
+ * Class:     com_oracle_security_ucrypto_NativeDigest
+ * Method:    nativeUpdate
+ * Signature: (IJ[BII)I
+ */
+JNIEXPORT jint JNICALL Java_com_oracle_security_ucrypto_NativeDigest_nativeUpdate
+  (JNIEnv *env, jclass jcls, jint mech, jlong pContext, jbyteArray jIn, jint jOfs, jint jLen) {
+  unsigned char *bufIn;
+
+  bufIn = (unsigned char *) getBytes(env, jIn, jOfs, jLen);
+  if (!(*env)->ExceptionCheck(env)) {
+    JavaCritical_com_oracle_security_ucrypto_NativeDigest_nativeUpdate(mech, pContext, jLen, bufIn, 0, jLen);
+    free(bufIn);
+  }
+  return 0;
+}
+
+/*
+ * Class:     com_oracle_security_ucrypto_NativeDigest
+ * Method:    nativeDigest
+ * Signature: (IJ[BII)I
+ */
+JNIEXPORT jint JNICALL Java_com_oracle_security_ucrypto_NativeDigest_nativeDigest
+  (JNIEnv *env, jclass jcls, jint mech, jlong pContext, jbyteArray jOut, jint jOutOfs, jint digestLen) {
+  unsigned char *bufOut;
+
+  bufOut = (unsigned char *) malloc(digestLen);
+  if (bufOut == NULL) {
+    throwOutOfMemoryError(env, NULL);
+    return 0;
+  }
+
+  JavaCritical_com_oracle_security_ucrypto_NativeDigest_nativeDigest(mech, pContext, digestLen, bufOut, 0, digestLen);
+
+  (*env)->SetByteArrayRegion(env, jOut, jOutOfs, digestLen, (jbyte *) bufOut);
+  free(bufOut);
+  return 0;
+}
+
+/*
+ * Class:     com_oracle_security_ucrypto_NativeDigest
+ * Method:    nativeClone
+ * Signature: (IJ)J
+ */
+JNIEXPORT jlong JNICALL Java_com_oracle_security_ucrypto_NativeDigest_nativeClone
+  (JNIEnv *env, jclass jcls, jint mech, jlong pContext) {
+  return JavaCritical_com_oracle_security_ucrypto_NativeDigest_nativeClone(mech, pContext);
+}
+
+/*
+ * Class:     com_oracle_security_ucrypto_NativeDigest
+ * Method:    nativeFree
+ * Signature: (IJ)V
+ */
+JNIEXPORT void JNICALL Java_com_oracle_security_ucrypto_NativeDigest_nativeFree
+  (JNIEnv *env, jclass jcls, jint mech, jlong pContext) {
+  JavaCritical_com_oracle_security_ucrypto_NativeDigest_nativeFree(mech, pContext);
+}
+
+/*
+ * Class:     com_oracle_security_ucrypto_NativeCipher
+ * Method:    nativeInit
+ * Signature: (IZ[B[BI[B)J
+ */
+JNIEXPORT jlong JNICALL Java_com_oracle_security_ucrypto_NativeCipher_nativeInit
+(JNIEnv *env, jclass jcls, jint mech, jboolean encrypt, jbyteArray jKey,
+ jbyteArray jIv, jint tagLen, jbyteArray jAad) {
+
+  crypto_ctx_t *context;
+  unsigned char *bufKey;
+  unsigned char *bufIv;
+  unsigned char *bufAad;
+  int keyLen, ivLen, aadLen, rv = 0;
+  jlong result = 0L;
+
+  bufKey = bufIv = bufAad = NULL;
+  keyLen = ivLen = aadLen = 0;
+  context = malloc(sizeof(crypto_ctx_t));
+  if (context == NULL) {
+    throwOutOfMemoryError(env, NULL);
+    return 0L;
+  }
+
+  // jKey MUST NOT BE NULL;
+  keyLen = (*env)->GetArrayLength(env, jKey);
+  bufKey = (unsigned char *) (*env)->GetByteArrayElements(env, jKey, NULL);
+  if (bufKey == NULL) {
+    goto cleanup;
+  }
+
+  if (jIv != NULL) {
+    ivLen = (*env)->GetArrayLength(env, jIv);
+    bufIv = (unsigned char *) (*env)->GetByteArrayElements(env, jIv, NULL);
+    if (bufIv == NULL) {
+      goto cleanup;
+    }
+  }
+
+  if (jAad != NULL) {
+    aadLen = (*env)->GetArrayLength(env, jAad);
+    bufAad = (unsigned char *) (*env)->GetByteArrayElements(env, jAad, NULL);
+    if (bufAad == NULL) {
+      goto cleanup;
+    }
+  }
+
+  rv = CipherInit(context, encrypt, mech, bufKey, keyLen, bufIv, ivLen, tagLen, bufAad, aadLen);
+  if (rv != 0) {
+    throwUCExceptionUsingRV(env, rv);
+  } else {
+     result = (jlong) context;
+  }
+
+cleanup:
+  if ((result == 0L) && (context != NULL)) {
+    free(context);
+  }
+  if (bufKey != NULL) {
+    (*env)->ReleaseByteArrayElements(env, jKey, (jbyte *)bufKey, 0);
+  }
+  if (bufIv != NULL) {
+    (*env)->ReleaseByteArrayElements(env, jIv, (jbyte *)bufIv, 0);
+  }
+  if (bufAad != NULL) {
+    (*env)->ReleaseByteArrayElements(env, jAad, (jbyte *)bufAad, 0);
+  }
+
+  return result;
+}
+
+/*
+ * Class:     com_oracle_security_ucrypto_NativeCipher
+ * Method:    nativeUpdate
+ * Signature: (JZ[BII[BI)I
+ */
+JNIEXPORT jint JNICALL Java_com_oracle_security_ucrypto_NativeCipher_nativeUpdate
+  (JNIEnv *env, jclass jcls, jlong contextID, jboolean encrypt,
+    jbyteArray jIn, jint inOfs, jint inLen, jbyteArray jOut, jint outOfs) {
+  crypto_ctx_t *context;
+  unsigned char *bufIn;
+  unsigned char *bufOut;
+  int outLen, rv = 0;
+
+  context = (crypto_ctx_t *) contextID;
+  bufIn = (unsigned char *) getBytes(env, jIn, inOfs, inLen);
+  if ((*env)->ExceptionCheck(env)) {
+    return 0;
+  }
+
+  outLen = (*env)->GetArrayLength(env, jOut) - outOfs;
+  bufOut = calloc(outLen, sizeof(char));
+  if (bufOut == NULL) {
+    free(bufIn);
+    throwOutOfMemoryError(env, NULL);
+    return 0;
+  }
+
+  rv = CipherUpdate(context, encrypt, bufIn, 0, inLen, bufOut, 0, &outLen);
+  if (rv) {
+    free(context);
+    free(bufIn);
+    free(bufOut);
+    return -rv;
+  } else {
+    (*env)->SetByteArrayRegion(env, jOut, outOfs, outLen, (jbyte *)bufOut);
+    free(bufIn);
+    free(bufOut);
+    return outLen;
+  }
+}
+
+/*
+ * Class:     com_oracle_security_ucrypto_NativeCipher
+ * Method:    nativeFinal
+ * Signature: (JZ[BI)I
+ */
+JNIEXPORT jint JNICALL Java_com_oracle_security_ucrypto_NativeCipher_nativeFinal
+  (JNIEnv *env, jclass jCls, jlong contextID, jboolean encrypt,
+   jbyteArray out, jint outOfs) {
+  crypto_ctx_t *context;
+  unsigned char *bufIn;
+  unsigned char *bufOut;
+  int outLen, rv = 0;
+
+  context = (crypto_ctx_t *) contextID;
+
+  // out is null when nativeFinal() is called solely for resource clean up
+  if (out == NULL) {
+    bufOut = NULL;
+    outLen = 0;
+  } else {
+    outLen = (*env)->GetArrayLength(env, out) - outOfs;
+    bufOut = calloc(outLen, sizeof(char));
+    if (bufOut == NULL) {
+      throwOutOfMemoryError(env, NULL);
+      return 0;
+    }
+  }
+  rv = CipherFinal(context, encrypt, bufOut, 0, &outLen);
+  if (rv) {
+    free(context);
+    free(bufOut);
+    return -rv;
+  } else {
+    if (bufOut != NULL) {
+      (*env)->SetByteArrayRegion(env, out, outOfs, outLen, (jbyte *)bufOut);
+      free(bufOut);
+    }
+    free(context);
+    return outLen;
+  }
+}
+
+
+/*
+ * Class:     com_oracle_security_ucrypto_NativeKey
+ * Method:    nativeFree
+ * Signature: (JI)V
+ */
+void JavaCritical_com_oracle_security_ucrypto_NativeKey_nativeFree
+  (jlong id, jint numOfComponents) {
+  crypto_object_attribute_t* pKey;
+  int i;
+
+  pKey = (crypto_object_attribute_t*) id;
+  for (i = 0; i < numOfComponents; i++) {
+    free(pKey[i].oa_value);
+  }
+  free(pKey);
+}
+
+JNIEXPORT void JNICALL Java_com_oracle_security_ucrypto_NativeKey_nativeFree
+  (JNIEnv *env, jclass jCls, jlong id, jint numOfComponents) {
+  JavaCritical_com_oracle_security_ucrypto_NativeKey_nativeFree(id, numOfComponents);
+}
+
+/*
+ * Class:     com_oracle_security_ucrypto_NativeKey_RSAPrivateCrt
+ * Method:    nativeInit
+ * Signature: ([B[B[B[B[B[B[B[B)J
+ */
+jlong JavaCritical_com_oracle_security_ucrypto_NativeKey_00024RSAPrivateCrt_nativeInit
+(int modLen, jbyte* jMod, int pubLen, jbyte* jPub, int privLen, jbyte* jPriv,
+ int pLen, jbyte* jP, int qLen, jbyte* jQ, int expPLen, jbyte* jExpP,
+ int expQLen, jbyte* jExpQ, int crtCoeffLen, jbyte* jCrtCoeff) {
+
+  unsigned char *mod, *pub, *priv, *p, *q, *expP, *expQ, *crtCoeff;
+  crypto_object_attribute_t* pKey = NULL;
+
+  pKey = calloc(8, sizeof(crypto_object_attribute_t));
+  if (pKey == NULL) {
+    return 0L;
+  }
+  mod = pub = priv = p = q = expP = expQ = crtCoeff = NULL;
+  mod = malloc(modLen);
+  pub = malloc(pubLen);
+  priv = malloc(privLen);
+  p = malloc(pLen);
+  q = malloc(qLen);
+  expP = malloc(expPLen);
+  expQ = malloc(expQLen);
+  crtCoeff = malloc(crtCoeffLen);
+  if (mod == NULL || pub == NULL || priv == NULL || p == NULL ||
+      q == NULL || expP == NULL || expQ == NULL || crtCoeff == NULL) {
+    free(pKey);
+    free(mod);
+    free(pub);
+    free(priv);
+    free(p);
+    free(q);
+    free(expP);
+    free(expQ);
+    free(crtCoeff);
+    return 0L;
+  } else {
+    memcpy(mod, jMod, modLen);
+    memcpy(pub, jPub, pubLen);
+    memcpy(priv, jPriv, privLen);
+    memcpy(p, jP, pLen);
+    memcpy(q, jQ, qLen);
+    memcpy(expP, jExpP, expPLen);
+    memcpy(expQ, jExpQ, expQLen);
+    memcpy(crtCoeff, jCrtCoeff, crtCoeffLen);
+  }
+
+  // NOTE: numOfComponents should be 8
+  pKey[0].oa_type = SUN_CKA_MODULUS;
+  pKey[0].oa_value = (char*) mod;
+  pKey[0].oa_value_len = (size_t) modLen;
+  pKey[1].oa_type = SUN_CKA_PUBLIC_EXPONENT;
+  pKey[1].oa_value = (char*) pub;
+  pKey[1].oa_value_len = (size_t) pubLen;
+  pKey[2].oa_type = SUN_CKA_PRIVATE_EXPONENT;
+  pKey[2].oa_value = (char*) priv;
+  pKey[2].oa_value_len = (size_t) privLen;
+  pKey[3].oa_type = SUN_CKA_PRIME_1;
+  pKey[3].oa_value = (char*) p;
+  pKey[3].oa_value_len = (size_t) pLen;
+  pKey[4].oa_type = SUN_CKA_PRIME_2;
+  pKey[4].oa_value = (char*) q;
+  pKey[4].oa_value_len = (size_t) qLen;
+  pKey[5].oa_type = SUN_CKA_EXPONENT_1;
+  pKey[5].oa_value = (char*) expP;
+  pKey[5].oa_value_len = (size_t) expPLen;
+  pKey[6].oa_type = SUN_CKA_EXPONENT_2;
+  pKey[6].oa_value = (char*) expQ;
+  pKey[6].oa_value_len = (size_t) expQLen;
+  pKey[7].oa_type = SUN_CKA_COEFFICIENT;
+  pKey[7].oa_value = (char*) crtCoeff;
+  pKey[7].oa_value_len = (size_t) crtCoeffLen;
+
+  return (jlong) pKey;
+}
+
+
+JNIEXPORT jlong JNICALL
+Java_com_oracle_security_ucrypto_NativeKey_00024RSAPrivateCrt_nativeInit
+  (JNIEnv *env, jclass jCls, jbyteArray jMod, jbyteArray jPub, jbyteArray jPriv,
+   jbyteArray jP, jbyteArray jQ, jbyteArray jExpP, jbyteArray jExpQ,
+   jbyteArray jCrtCoeff) {
+
+  int modLen, pubLen, privLen, pLen, qLen, expPLen, expQLen, crtCoeffLen;
+  jbyte *bufMod, *bufPub, *bufPriv, *bufP, *bufQ, *bufExpP, *bufExpQ, *bufCrtCoeff;
+  crypto_object_attribute_t* pKey = NULL;
+
+  bufMod = bufPub = bufPriv = bufP = bufQ = bufExpP = bufExpQ = bufCrtCoeff = NULL;
+
+  modLen = (*env)->GetArrayLength(env, jMod);
+  bufMod = getBytes(env, jMod, 0, modLen);
+  if ((*env)->ExceptionCheck(env)) goto cleanup;
+
+  pubLen = (*env)->GetArrayLength(env, jPub);
+  bufPub = getBytes(env, jPub, 0, pubLen);
+  if ((*env)->ExceptionCheck(env)) goto cleanup;
+
+  privLen = (*env)->GetArrayLength(env, jPriv);
+  bufPriv = getBytes(env, jPriv, 0, privLen);
+  if ((*env)->ExceptionCheck(env)) goto cleanup;
+
+  pLen = (*env)->GetArrayLength(env, jP);
+  bufP = getBytes(env, jP, 0, pLen);
+  if ((*env)->ExceptionCheck(env)) goto cleanup;
+
+  qLen = (*env)->GetArrayLength(env, jQ);
+  bufQ = getBytes(env, jQ, 0, qLen);
+  if ((*env)->ExceptionCheck(env)) goto cleanup;
+
+  expPLen = (*env)->GetArrayLength(env, jExpP);
+  bufExpP = getBytes(env, jExpP, 0, expPLen);
+  if ((*env)->ExceptionCheck(env)) goto cleanup;
+
+  expQLen = (*env)->GetArrayLength(env, jExpQ);
+  bufExpQ = getBytes(env, jExpQ, 0, expQLen);
+  if ((*env)->ExceptionCheck(env)) goto cleanup;
+
+  crtCoeffLen = (*env)->GetArrayLength(env, jCrtCoeff);
+  bufCrtCoeff = getBytes(env, jCrtCoeff, 0, crtCoeffLen);
+  if ((*env)->ExceptionCheck(env)) goto cleanup;
+
+  // proceed if no error; otherwise free allocated memory
+  pKey = calloc(8, sizeof(crypto_object_attribute_t));
+  if (pKey == NULL) {
+    throwOutOfMemoryError(env, NULL);
+    goto cleanup;
+  }
+
+  // NOTE: numOfComponents should be 8
+  pKey[0].oa_type = SUN_CKA_MODULUS;
+  pKey[0].oa_value = (char*) bufMod;
+  pKey[0].oa_value_len = (size_t) modLen;
+  pKey[1].oa_type = SUN_CKA_PUBLIC_EXPONENT;
+  pKey[1].oa_value = (char*) bufPub;
+  pKey[1].oa_value_len = (size_t) pubLen;
+  pKey[2].oa_type = SUN_CKA_PRIVATE_EXPONENT;
+  pKey[2].oa_value = (char*) bufPriv;
+  pKey[2].oa_value_len = (size_t) privLen;
+  pKey[3].oa_type = SUN_CKA_PRIME_1;
+  pKey[3].oa_value = (char*) bufP;
+  pKey[3].oa_value_len = (size_t) pLen;
+  pKey[4].oa_type = SUN_CKA_PRIME_2;
+  pKey[4].oa_value = (char*) bufQ;
+  pKey[4].oa_value_len = (size_t) qLen;
+  pKey[5].oa_type = SUN_CKA_EXPONENT_1;
+  pKey[5].oa_value = (char*) bufExpP;
+  pKey[5].oa_value_len = (size_t) expPLen;
+  pKey[6].oa_type = SUN_CKA_EXPONENT_2;
+  pKey[6].oa_value = (char*) bufExpQ;
+  pKey[6].oa_value_len = (size_t) expQLen;
+  pKey[7].oa_type = SUN_CKA_COEFFICIENT;
+  pKey[7].oa_value = (char*) bufCrtCoeff;
+  pKey[7].oa_value_len = (size_t) crtCoeffLen;
+  return (jlong) pKey;
+
+cleanup:
+  free(bufMod);
+  free(bufPub);
+  free(bufPriv);
+  free(bufP);
+  free(bufQ);
+  free(bufExpP);
+  free(bufExpQ);
+  free(bufCrtCoeff);
+
+  return 0L;
+}
+
+/*
+ * Class:     com_oracle_security_ucrypto_NativeKey_RSAPublic
+ * Method:    nativeInit
+ * Signature: ([B[B)J
+ */
+
+jlong JavaCritical_com_oracle_security_ucrypto_NativeKey_00024RSAPublic_nativeInit
+(int modLen, jbyte* jMod, int pubLen, jbyte* jPub) {
+  unsigned char *mod, *pub;
+  crypto_object_attribute_t* pKey = NULL;
+
+  pKey = calloc(2, sizeof(crypto_object_attribute_t));
+  if (pKey == NULL) {
+    return 0L;
+  }
+  mod = pub = NULL;
+  mod = malloc(modLen);
+  pub = malloc(pubLen);
+  if (mod == NULL || pub == NULL) {
+    free(pKey);
+    free(mod);
+    free(pub);
+    return 0L;
+  } else {
+    memcpy(mod, jMod, modLen);
+    memcpy(pub, jPub, pubLen);
+  }
+
+  if (DEBUG) {
+    printf("RSAPublicKey Init: keyValue=%ld, keyLen=2\n", pKey);
+    printBytes("RSA PublicKey mod: ", (unsigned char*) mod, modLen);
+    printBytes("RSA PublicKey pubExp: ", (unsigned char*) pub, pubLen);
+  }
+
+  pKey[0].oa_type = SUN_CKA_MODULUS;
+  pKey[0].oa_value = (char*) mod;
+  pKey[0].oa_value_len = (size_t) modLen;
+  pKey[1].oa_type = SUN_CKA_PUBLIC_EXPONENT;
+  pKey[1].oa_value = (char*) pub;
+  pKey[1].oa_value_len = (size_t) pubLen;
+
+  return (jlong) pKey;
+}
+
+JNIEXPORT jlong JNICALL
+Java_com_oracle_security_ucrypto_NativeKey_00024RSAPublic_nativeInit
+(JNIEnv *env, jclass jCls, jbyteArray jMod, jbyteArray jPub) {
+  int modLen, pubLen;
+  jbyte *bufMod, *bufPub;
+  crypto_object_attribute_t* pKey = NULL;
+
+  bufMod = bufPub = NULL;
+
+  modLen = (*env)->GetArrayLength(env, jMod);
+  bufMod = getBytes(env, jMod, 0, modLen);
+  if ((*env)->ExceptionCheck(env)) {
+    return 0L;
+  }
+
+  pubLen = (*env)->GetArrayLength(env, jPub);
+  bufPub = getBytes(env, jPub, 0, pubLen);
+  if ((*env)->ExceptionCheck(env)) {
+    free(bufMod);
+    return 0L;
+  }
+
+  // proceed if no error; otherwise free allocated memory
+  pKey = calloc(2, sizeof(crypto_object_attribute_t));
+  if (pKey != NULL) {
+    // NOTE: numOfComponents should be 2
+    pKey[0].oa_type = SUN_CKA_MODULUS;
+    pKey[0].oa_value = (char*) bufMod;
+    pKey[0].oa_value_len = (size_t) modLen;
+    pKey[1].oa_type = SUN_CKA_PUBLIC_EXPONENT;
+    pKey[1].oa_value = (char*) bufPub;
+    pKey[1].oa_value_len = (size_t) pubLen;
+    return (jlong) pKey;
+  } else {
+    free(bufMod);
+    free(bufPub);
+    throwOutOfMemoryError(env, NULL);
+    return 0L;
+  }
+}
+
+////////////////////////
+// NativeRSASignature
+////////////////////////
+
+int
+SignatureInit(crypto_ctx_t *context, jint mechVal, jboolean sign,
+              uchar_t *pKey, size_t keyLength) {
+  ucrypto_mech_t mech;
+  int rv = 0;
+
+  mech = (ucrypto_mech_t) mechVal;
+
+  if (sign) {
+    rv = (*ftab->ucryptoSignInit)(context, mech, pKey, keyLength,
+                                  NULL, 0);
+  } else {
+    rv = (*ftab->ucryptoVerifyInit)(context, mech, pKey, keyLength,
+                                    NULL, 0);
+  }
+  if (DEBUG) {
+    printf("SignatureInit: context=%ld, mech=%d, sign=%d, keyValue=%ld, keyLength=%d\n",
+           context, mech, sign, pKey, keyLength);
+    printf("SignatureInit, ret =>  0x%x\n", rv);
+  }
+  return rv;
+}
+
+/*
+ * Class:     com_oracle_security_ucrypto_NativeRSASignature
+ * Method:    nativeInit
+ * Signature: (IZJI[B)J
+ */
+jlong JavaCritical_com_oracle_security_ucrypto_NativeRSASignature_nativeInit
+(jint mech, jboolean sign, jlong jKey, jint keyLength) {
+  crypto_ctx_t *context;
+  int rv;
+  uchar_t *pKey;
+
+  context = malloc(sizeof(crypto_ctx_t));
+  if (context != NULL) {
+    pKey = (uchar_t *) jKey;
+    rv = SignatureInit(context, mech, sign, pKey, (size_t)keyLength);
+    if (rv) {
+      free(context);
+      return 0L;
+    }
+  }
+  return (jlong)context;
+}
+
+JNIEXPORT jlong JNICALL Java_com_oracle_security_ucrypto_NativeRSASignature_nativeInit
+(JNIEnv *env, jclass jCls, jint mech, jboolean sign, jlong jKey, jint keyLength) {
+  crypto_ctx_t *context;
+  int rv = 0;
+  uchar_t *pKey;
+
+  context = malloc(sizeof(crypto_ctx_t));
+  if (context == NULL) {
+    throwOutOfMemoryError(env, NULL);
+    return 0L;
+  }
+
+  pKey = (uchar_t *) jKey;
+  rv = SignatureInit(context, mech, sign, pKey, (size_t)keyLength);
+  if (rv) {
+    free(context);
+    throwUCExceptionUsingRV(env, rv);
+    return 0L;
+  }
+
+  return (jlong)context;
+}
+
+/*
+ * Class:     com_oracle_security_ucrypto_NativeRSASignature
+ * Method:    nativeUpdate
+ * Signature: (JZ[BII)I
+ */
+jint JavaCritical_com_oracle_security_ucrypto_NativeRSASignature_nativeUpdate__JZ_3BII
+(jlong pCtxt, jboolean sign, int notUsed, jbyte* jIn, jint jInOfs, jint jInLen) {
+  crypto_ctx_t *context;
+  int rv = 0;
+
+  context = (crypto_ctx_t *) pCtxt;
+  if (DEBUG) {
+    printf("Signature update: context=%ld, sign=%d, jIn=%ld, jInOfs=%d, jInLen=%d\n",
+           context, sign, jIn, jInOfs, jInLen);
+  }
+  if (sign) {
+    rv = (*ftab->ucryptoSignUpdate)(context, (uchar_t *) (jIn + jInOfs), (size_t) jInLen);
+  } else {
+    rv = (*ftab->ucryptoVerifyUpdate)(context, (uchar_t *) (jIn + jInOfs), (size_t) jInLen);
+  }
+  if (DEBUG) printf("Signature update, ret =>  0x%x\n", rv);
+  if (rv) {
+    free(context);
+    return -rv; // use negative value to indicate error!
+  }
+
+  return 0;
+}
+
+JNIEXPORT jint JNICALL Java_com_oracle_security_ucrypto_NativeRSASignature_nativeUpdate__JZ_3BII
+(JNIEnv *env, jclass jCls, jlong pCtxt, jboolean sign, jbyteArray jIn, jint inOfs, jint inLen) {
+  int rv = 0;
+  jbyte* bufIn;
+
+  bufIn = getBytes(env, jIn, inOfs, inLen);
+  if ((*env)->ExceptionCheck(env)) {
+    return -1; // use negative value to indicate error!
+  }
+
+  if (DEBUG) printBytes("Update w/ data: ", (unsigned char*)bufIn, (size_t) inLen);
+
+  rv = JavaCritical_com_oracle_security_ucrypto_NativeRSASignature_nativeUpdate__JZ_3BII
+    (pCtxt, sign, inLen, bufIn, 0, inLen);
+
+  free(bufIn);
+  return rv;
+}
+
+/*
+ * Class:     com_oracle_security_ucrypto_NativeRSASignature
+ * Method:    nativeUpdate
+ * Signature: (JZJI)I
+ */
+jint JavaCritical_com_oracle_security_ucrypto_NativeRSASignature_nativeUpdate__JZJI
+(jlong pCtxt, jboolean sign, jlong inAddr, jint inLen) {
+
+  return JavaCritical_com_oracle_security_ucrypto_NativeRSASignature_nativeUpdate__JZ_3BII
+    (pCtxt, sign, inLen, (jbyte*)inAddr, 0, inLen);
+}
+
+JNIEXPORT jint JNICALL Java_com_oracle_security_ucrypto_NativeRSASignature_nativeUpdate__JZJI
+(JNIEnv *env, jclass jCls, jlong pCtxt, jboolean sign, jlong inAddr, jint inLen) {
+
+  return JavaCritical_com_oracle_security_ucrypto_NativeRSASignature_nativeUpdate__JZ_3BII
+    (pCtxt, sign, inLen, (jbyte*)inAddr, 0, inLen);
+}
+
+/*
+ * Class:     com_oracle_security_ucrypto_NativeRSASignature
+ * Method:    nativeFinal
+ * Signature: (JZ[BII)I
+ */
+jint JavaCritical_com_oracle_security_ucrypto_NativeRSASignature_nativeFinal
+(jlong pCtxt, jboolean sign, int notUsed, jbyte* bufSig, jint sigOfs, jint jSigLen) {
+
+  crypto_ctx_t *context;
+  int rv = 0;
+  size_t sigLength = (size_t) jSigLen;
+
+  context = (crypto_ctx_t *) pCtxt;
+  if (DEBUG) {
+      printf("Signature final: context=%ld, sign=%d, bufSig=%ld, sigOfs=%d, sigLen=%d\n",
+             context, sign, bufSig, sigOfs, jSigLen);
+      printBytes("Before Final: SigBytes ", (unsigned char*) (bufSig + sigOfs), jSigLen);
+  }
+  if (sign) {
+    rv = (*ftab->ucryptoSignFinal)(context, (uchar_t *) (bufSig + sigOfs), &sigLength);
+  } else {
+    rv = (*ftab->ucryptoVerifyFinal)(context, (uchar_t *) (bufSig + sigOfs), &sigLength);
+  }
+
+  if (DEBUG) {
+    printf("Signature nativeFinal, ret =>  0x%x\n", rv);
+    if (sigLength != jSigLen) {
+      printf("SIG actual output len=%d\n", sigLength);
+    }
+    if (sign) {
+      printBytes("After nativeFinal: ", (unsigned char*) (bufSig + sigOfs), jSigLen);
+    }
+  }
+
+  free(context);
+  if (rv) {
+    return -rv;
+  } else return 0;
+}
+
+JNIEXPORT jint JNICALL Java_com_oracle_security_ucrypto_NativeRSASignature_nativeFinal
+(JNIEnv *env, jclass jCls, jlong pCtxt, jboolean sign, jbyteArray jSig, jint jSigOfs, jint jSigLen) {
+  int rv = 0;
+  jbyte* bufSig = NULL;
+
+  if (jSigLen != 0) {
+    bufSig = calloc(jSigLen, sizeof(char));
+    if (bufSig == NULL) {
+      throwOutOfMemoryError(env, NULL);
+      return 0;
+    }
+    if (!sign) {
+      // need to copy over the to-be-verified signature bytes
+      (*env)->GetByteArrayRegion(env, jSig, jSigOfs, jSigLen, (jbyte *)bufSig);
+    }
+  }
+
+  if (!(*env)->ExceptionCheck(env)) {
+    // Frees context + converts rv to negative if error occurred
+    rv = JavaCritical_com_oracle_security_ucrypto_NativeRSASignature_nativeFinal
+      (pCtxt, sign, jSigLen, bufSig, 0, jSigLen);
+
+    if (rv == 0 && sign) {
+      // need to copy the generated signature bytes to the java bytearray
+      (*env)->SetByteArrayRegion(env, jSig, jSigOfs, jSigLen, (jbyte *)bufSig);
+    }
+  } else {
+    // set rv to negative to indicate error
+    rv = -1;
+  }
+
+  free(bufSig);
+
+  return rv;
+}
+
+/*
+ * Class:     com_oracle_security_ucrypto_NativeRSACipher
+ * Method:    nativeAtomic
+ * Signature: (IZJI[BI[BII)I
+ */
+jint JavaCritical_com_oracle_security_ucrypto_NativeRSACipher_nativeAtomic
+  (jint mech, jboolean encrypt, jlong keyValue, jint keyLength,
+   int notUsed1, jbyte* bufIn, jint jInLen,
+   int notUsed2, jbyte* bufOut, jint jOutOfs, jint jOutLen) {
+
+  uchar_t *pKey;
+  crypto_object_attribute_t* pKey2;
+  int rv = 0;
+  size_t outLength = (size_t) jOutLen;
+
+  pKey = (uchar_t *) keyValue;
+  if (DEBUG) {
+    printf("Cipher nativeAtomic: mech=%d, encrypt=%d, pKey=%ld, keyLength=%d\n",
+           mech, encrypt, pKey, keyLength);
+    printBytes("Before nativeAtomic: in: ", (unsigned char*) bufIn, jInLen);
+    printBytes("Before nativeAtomic: out: ", (unsigned char*) (bufOut + jOutOfs), jOutLen);
+  }
+
+  if (encrypt) {
+    rv = (*ftab->ucryptoEncrypt)((ucrypto_mech_t)mech, pKey, (size_t)keyLength,
+      NULL, 0, (uchar_t *)bufIn, (size_t)jInLen,
+      (uchar_t *)(bufOut + jOutOfs), &outLength);
+  } else {
+    rv = (*ftab->ucryptoDecrypt)((ucrypto_mech_t)mech, pKey, (size_t)keyLength,
+      NULL, 0, (uchar_t *)bufIn, (size_t)jInLen,
+      (uchar_t *)(bufOut + jOutOfs), &outLength);
+  }
+  if (DEBUG) {
+    printf("Cipher nativeAtomic, ret =>  0x%x\n", rv);
+    if (outLength != jOutLen) {
+      printf("CIP actual output len=%d\n", outLength);
+    }
+    printBytes("After nativeAtomic: ", (unsigned char*) (bufOut + jOutOfs), outLength);
+  }
+
+  if (rv) {
+    return -rv;
+  } else return outLength;
+}
+
+JNIEXPORT jint JNICALL Java_com_oracle_security_ucrypto_NativeRSACipher_nativeAtomic
+  (JNIEnv *env, jclass jCls, jint mech, jboolean encrypt,
+   jlong keyValue, jint keyLength, jbyteArray jIn, jint jInLen,
+   jbyteArray jOut, jint jOutOfs, jint jOutLen) {
+  int rv = 0;
+  jbyte *bufIn = NULL;
+  jbyte *bufOut = NULL;
+
+  if (jInLen != 0) {
+    bufIn = (*env)->GetByteArrayElements(env, jIn, NULL);
+    if (bufIn == NULL) {
+      return 0;
+    }
+  }
+  bufOut = calloc(jOutLen, sizeof(jbyte));
+  if (bufOut == NULL) {
+    (*env)->ReleaseByteArrayElements(env, jIn, bufIn, 0);
+    throwOutOfMemoryError(env, NULL);
+    return 0;
+  }
+
+  // rv: output length or error code (if negative)
+  rv = JavaCritical_com_oracle_security_ucrypto_NativeRSACipher_nativeAtomic
+    (mech, encrypt, keyValue, keyLength, jInLen, bufIn, jInLen,
+     jOutLen, bufOut, 0, jOutLen);
+
+  if (rv > 0) {
+    (*env)->SetByteArrayRegion(env, jOut, jOutOfs, rv, (jbyte *)bufOut);
+  }
+
+  if (bufIn != NULL) {
+    (*env)->ReleaseByteArrayElements(env, jIn, bufIn, 0);
+  }
+  free(bufOut);
+  return rv;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/jdk.crypto.ucrypto/solaris/native/libj2ucrypto/nativeCrypto.h	Thu Oct 23 13:44:28 2014 -0700
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2014, 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
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+#ifndef _Included_com_oracle_security_ucrypto_NativeCrypto
+#define _Included_com_oracle_security_ucrypto_NativeCrypto
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#undef com_oracle_security_ucrypto_NativeDigest_MECH_MD5
+#define com_oracle_security_ucrypto_NativeDigest_MECH_MD5 1L
+#undef com_oracle_security_ucrypto_NativeDigest_MECH_SHA1
+#define com_oracle_security_ucrypto_NativeDigest_MECH_SHA1 2L
+#undef com_oracle_security_ucrypto_NativeDigest_MECH_SHA256
+#define com_oracle_security_ucrypto_NativeDigest_MECH_SHA256 3L
+#undef com_oracle_security_ucrypto_NativeDigest_MECH_SHA224
+#define com_oracle_security_ucrypto_NativeDigest_MECH_SHA224 4L
+#undef com_oracle_security_ucrypto_NativeDigest_MECH_SHA384
+#define com_oracle_security_ucrypto_NativeDigest_MECH_SHA384 5L
+#undef com_oracle_security_ucrypto_NativeDigest_MECH_SHA512
+#define com_oracle_security_ucrypto_NativeDigest_MECH_SHA512 6L
+
+#define DEBUG 0
+
+#ifdef __cplusplus
+}
+#endif
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/jdk.crypto.ucrypto/solaris/native/libj2ucrypto/nativeFunc.c	Thu Oct 23 13:44:28 2014 -0700
@@ -0,0 +1,153 @@
+/*
+ * Copyright (c) 2014, 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
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+#include <jni.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <dlfcn.h>
+#include <link.h>
+#include "nativeFunc.h"
+
+/* standard md5/md/softcrypto method names (ordering is from mapfile) */
+static const char MD5_INIT[]                     = "MD5Init";
+static const char MD5_UPDATE[]                   = "MD5Update";
+static const char MD5_FINAL[]                    = "MD5Final";
+static const char SHA1_INIT[]                    = "SHA1Init";
+static const char SHA1_UPDATE[]                  = "SHA1Update";
+static const char SHA1_FINAL[]                   = "SHA1Final";
+static const char SHA2_INIT[]                    = "SHA2Init";
+static const char SHA2_UPDATE[]                  = "SHA2Update";
+static const char SHA2_FINAL[]                   = "SHA2Final";
+static const char UCRYPTO_VERSION[]              = "ucrypto_version";
+static const char UCRYPTO_GET_MECHLIST[]         = "ucrypto_get_mechlist";
+static const char UCRYPTO_ENCRYPT_INIT[]         = "ucrypto_encrypt_init";
+static const char UCRYPTO_ENCRYPT_UPDATE[]       = "ucrypto_encrypt_update";
+static const char UCRYPTO_ENCRYPT_FINAL[]        = "ucrypto_encrypt_final";
+static const char UCRYPTO_ENCRYPT[]              = "ucrypto_encrypt";
+static const char UCRYPTO_DECRYPT_INIT[]         = "ucrypto_decrypt_init";
+static const char UCRYPTO_DECRYPT_UPDATE[]       = "ucrypto_decrypt_update";
+static const char UCRYPTO_DECRYPT_FINAL[]        = "ucrypto_decrypt_final";
+static const char UCRYPTO_DECRYPT[]              = "ucrypto_decrypt";
+static const char UCRYPTO_SIGN_INIT[]            = "ucrypto_sign_init";
+static const char UCRYPTO_SIGN_UPDATE[]          = "ucrypto_sign_update";
+static const char UCRYPTO_SIGN_FINAL[]           = "ucrypto_sign_final";
+static const char UCRYPTO_VERIFY_INIT[]          = "ucrypto_verify_init";
+static const char UCRYPTO_VERIFY_UPDATE[]        = "ucrypto_verify_update";
+static const char UCRYPTO_VERIFY_FINAL[]         = "ucrypto_verify_final";
+
+/**
+ * Initialize native T4 crypto function pointers
+ */
+jboolean* loadNative() {
+
+  jboolean* buf;
+  void *lib;
+
+  buf = malloc(2 * sizeof(jboolean));
+  buf[0] = buf[1] = JNI_FALSE;
+  ftab = (T4CRYPTO_FUNCTION_TABLE_PTR) calloc(1, sizeof(T4CRYPTO_FUNCTION_TABLE));
+  if (ftab == NULL) {
+    free(buf);
+    return NULL;
+  }
+
+  lib = dlopen("libmd.so", RTLD_NOW);
+  if (lib != NULL) {
+    ftab->md5Init = (MD5INIT_FN_PTR) dlsym(lib, MD5_INIT);
+    ftab->md5Update = (MD5UPDATE_FN_PTR) dlsym(lib, MD5_UPDATE);
+    ftab->md5Final = (MD5FINAL_FN_PTR) dlsym(lib, MD5_FINAL);
+    ftab->sha1Init = (SHA1INIT_FN_PTR) dlsym(lib, SHA1_INIT);
+    ftab->sha1Update = (SHA1UPDATE_FN_PTR) dlsym(lib, SHA1_UPDATE);
+    ftab->sha1Final = (SHA1FINAL_FN_PTR) dlsym(lib, SHA1_FINAL);
+    ftab->sha2Init = (SHA2INIT_FN_PTR) dlsym(lib, SHA2_INIT);
+    ftab->sha2Update = (SHA2UPDATE_FN_PTR) dlsym(lib, SHA2_UPDATE);
+    ftab->sha2Final = (SHA2FINAL_FN_PTR) dlsym(lib, SHA2_FINAL);
+    if (ftab->md5Init != NULL && ftab->md5Update != NULL &&
+        ftab->md5Final != NULL && ftab->sha1Init != NULL &&
+        ftab->sha1Update != NULL && ftab->sha1Final != NULL &&
+        ftab->sha2Init != NULL && ftab->sha2Update != NULL &&
+        ftab->sha2Final != NULL) {
+      buf[0] = JNI_TRUE;
+    } else {
+      dlclose(lib);
+    }
+  }
+
+  lib = dlopen("libsoftcrypto.so", RTLD_NOW);
+  if (lib != NULL) {
+    // These APIs aren't available for v0 lib on Solaris 10
+    ftab->ucryptoVersion = (UCRYPTO_VERSION_FN_PTR)
+      dlsym(lib, UCRYPTO_VERSION);
+    ftab->ucryptoGetMechList = (UCRYPTO_GET_MECHLIST_FN_PTR)
+      dlsym(lib, UCRYPTO_GET_MECHLIST);
+    //??
+    ftab->ucryptoSignInit = (UCRYPTO_SIGN_INIT_FN_PTR)
+      dlsym(lib, UCRYPTO_SIGN_INIT);
+    ftab->ucryptoSignUpdate = (UCRYPTO_SIGN_UPDATE_FN_PTR)
+      dlsym(lib, UCRYPTO_SIGN_UPDATE);
+    ftab->ucryptoSignFinal = (UCRYPTO_SIGN_FINAL_FN_PTR)
+      dlsym(lib, UCRYPTO_SIGN_FINAL);
+    ftab->ucryptoVerifyInit = (UCRYPTO_VERIFY_INIT_FN_PTR)
+      dlsym(lib, UCRYPTO_VERIFY_INIT);
+    ftab->ucryptoVerifyUpdate = (UCRYPTO_VERIFY_UPDATE_FN_PTR)
+      dlsym(lib, UCRYPTO_VERIFY_UPDATE);
+    ftab->ucryptoVerifyFinal = (UCRYPTO_VERIFY_FINAL_FN_PTR)
+      dlsym(lib, UCRYPTO_VERIFY_FINAL);
+
+    // These should be avilable for all libsoftcrypto libs
+    ftab->ucryptoEncryptInit = (UCRYPTO_ENCRYPT_INIT_FN_PTR)
+      dlsym(lib, UCRYPTO_ENCRYPT_INIT);
+    ftab->ucryptoEncryptUpdate = (UCRYPTO_ENCRYPT_UPDATE_FN_PTR)
+      dlsym(lib, UCRYPTO_ENCRYPT_UPDATE);
+    ftab->ucryptoEncryptFinal = (UCRYPTO_ENCRYPT_FINAL_FN_PTR)
+      dlsym(lib, UCRYPTO_ENCRYPT_FINAL);
+    ftab->ucryptoEncrypt = (UCRYPTO_ENCRYPT_FN_PTR)
+      dlsym(lib, UCRYPTO_ENCRYPT);
+
+    ftab->ucryptoDecryptInit = (UCRYPTO_DECRYPT_INIT_FN_PTR)
+      dlsym(lib, UCRYPTO_DECRYPT_INIT);
+    ftab->ucryptoDecryptUpdate = (UCRYPTO_DECRYPT_UPDATE_FN_PTR)
+      dlsym(lib, UCRYPTO_DECRYPT_UPDATE);
+    ftab->ucryptoDecryptFinal = (UCRYPTO_DECRYPT_FINAL_FN_PTR)
+      dlsym(lib, UCRYPTO_DECRYPT_FINAL);
+    ftab->ucryptoDecrypt = (UCRYPTO_DECRYPT_FN_PTR)
+      dlsym(lib, UCRYPTO_DECRYPT);
+
+    if (ftab->ucryptoEncryptInit != NULL &&
+        ftab->ucryptoEncryptUpdate != NULL &&
+        ftab->ucryptoEncryptFinal != NULL &&
+        ftab->ucryptoEncrypt != NULL &&
+        ftab->ucryptoDecryptInit != NULL &&
+        ftab->ucryptoDecryptUpdate != NULL &&
+        ftab->ucryptoDecryptFinal != NULL &&
+        ftab->ucryptoDecrypt != NULL) {
+      buf[1] = JNI_TRUE;
+    } else {
+      dlclose(lib);
+    }
+  }
+
+  return buf;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/jdk.crypto.ucrypto/solaris/native/libj2ucrypto/nativeFunc.h	Thu Oct 23 13:44:28 2014 -0700
@@ -0,0 +1,163 @@
+/*
+ * Copyright (c) 2014, 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
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+#ifndef SPARCT4_NATIVE_FUNC_H
+#define SPARCT4_NATIVE_FUNC_H
+#include <md5.h>
+#include <sha1.h>
+#include <sha2.h>
+#include <libsoftcrypto.h>
+
+jboolean* loadNative();
+
+/* function pointer definitions */
+
+typedef void (*MD5INIT_FN_PTR)(MD5_CTX *context);
+
+typedef void (*MD5UPDATE_FN_PTR)
+     (MD5_CTX *context, unsigned char *input,
+      unsigned int inlen);
+
+typedef void (*MD5FINAL_FN_PTR)
+     (unsigned char *output, MD5_CTX *context);
+
+typedef void (*SHA1INIT_FN_PTR)(SHA1_CTX *context);
+
+typedef void (*SHA1UPDATE_FN_PTR)
+     (SHA1_CTX *context, unsigned char *input,
+      unsigned int inlen);
+
+typedef void (*SHA1FINAL_FN_PTR)
+     (unsigned char *output, SHA1_CTX *context);
+
+typedef void (*SHA2INIT_FN_PTR)(uint64_t mech, SHA2_CTX *context);
+
+typedef void (*SHA2UPDATE_FN_PTR)
+     (SHA2_CTX *context, unsigned char *input,
+      unsigned int inlen);
+
+typedef void (*SHA2FINAL_FN_PTR)
+     (unsigned char *output, SHA2_CTX *context);
+
+typedef int (*UCRYPTO_VERSION_FN_PTR)();
+
+typedef int (*UCRYPTO_GET_MECHLIST_FN_PTR)(char *str);
+
+typedef int (*UCRYPTO_ENCRYPT_INIT_FN_PTR)
+     (crypto_ctx_t *context, ucrypto_mech_t mech_type,
+      uchar_t *key_str, size_t key_len,
+      void *iv, size_t iv_len);
+
+typedef int (*UCRYPTO_ENCRYPT_UPDATE_FN_PTR)
+     (crypto_ctx_t *context, uchar_t *in,
+      size_t in_len, uchar_t *out, size_t *out_len);
+
+typedef int (*UCRYPTO_ENCRYPT_FINAL_FN_PTR)
+     (crypto_ctx_t *context, uchar_t *out,
+      size_t *out_len);
+
+typedef int (*UCRYPTO_ENCRYPT_FN_PTR)
+     (ucrypto_mech_t mech_type, uchar_t *key_str,
+      size_t key_len, void *iv, size_t iv_len, uchar_t *in,
+      size_t in_len, uchar_t *out, size_t *out_len);
+
+typedef int (*UCRYPTO_DECRYPT_INIT_FN_PTR)
+     (crypto_ctx_t *context,
+      ucrypto_mech_t mech_type, uchar_t *key_str, size_t key_len,
+      void *iv, size_t iv_len);
+
+typedef int (*UCRYPTO_DECRYPT_UPDATE_FN_PTR)
+     (crypto_ctx_t *context, uchar_t *in,
+      size_t in_len, uchar_t *out, size_t *out_len);
+
+typedef int (*UCRYPTO_DECRYPT_FINAL_FN_PTR)
+     (crypto_ctx_t *context, uchar_t *out,
+      size_t *out_len);
+
+typedef int (*UCRYPTO_DECRYPT_FN_PTR)
+     (ucrypto_mech_t mech_type, uchar_t *key_str,
+      size_t key_len, void *iv, size_t iv_len, uchar_t *in,
+      size_t in_len, uchar_t *out, size_t *out_len);
+
+typedef int (*UCRYPTO_SIGN_INIT_FN_PTR)
+     (crypto_ctx_t *context, ucrypto_mech_t mech_type,
+      uchar_t *key_str, size_t key_len,
+      void *iv, size_t iv_len);
+
+typedef int (*UCRYPTO_SIGN_UPDATE_FN_PTR)
+     (crypto_ctx_t *context, uchar_t *data_str, size_t data_len);
+
+typedef int (*UCRYPTO_SIGN_FINAL_FN_PTR)
+     (crypto_ctx_t *context, uchar_t *sig_str, size_t *sig_len);
+
+typedef int (*UCRYPTO_VERIFY_INIT_FN_PTR)
+     (crypto_ctx_t *context, ucrypto_mech_t mech_type,
+      uchar_t *key_str, size_t key_len,
+      void *iv, size_t iv_len);
+
+typedef int (*UCRYPTO_VERIFY_UPDATE_FN_PTR)
+     (crypto_ctx_t *context, uchar_t *data_str, size_t data_len);
+
+typedef int (*UCRYPTO_VERIFY_FINAL_FN_PTR)
+     (crypto_ctx_t *context, uchar_t *sig_str, size_t *sig_len);
+
+
+
+/* dynamically resolved functions from libmd, and libsoftcrypto
+   libraries */
+typedef struct T4CRYPTO_FUNCTION_TABLE {
+  MD5INIT_FN_PTR                 md5Init;
+  MD5UPDATE_FN_PTR               md5Update;
+  MD5FINAL_FN_PTR                md5Final;
+  SHA1INIT_FN_PTR                sha1Init;
+  SHA1UPDATE_FN_PTR              sha1Update;
+  SHA1FINAL_FN_PTR               sha1Final;
+  SHA2INIT_FN_PTR                sha2Init;
+  SHA2UPDATE_FN_PTR              sha2Update;
+  SHA2FINAL_FN_PTR               sha2Final;
+  UCRYPTO_VERSION_FN_PTR         ucryptoVersion;
+  UCRYPTO_GET_MECHLIST_FN_PTR    ucryptoGetMechList;
+  UCRYPTO_ENCRYPT_INIT_FN_PTR    ucryptoEncryptInit;
+  UCRYPTO_ENCRYPT_UPDATE_FN_PTR  ucryptoEncryptUpdate;
+  UCRYPTO_ENCRYPT_FINAL_FN_PTR   ucryptoEncryptFinal;
+  UCRYPTO_ENCRYPT_FN_PTR         ucryptoEncrypt;
+  UCRYPTO_DECRYPT_INIT_FN_PTR    ucryptoDecryptInit;
+  UCRYPTO_DECRYPT_UPDATE_FN_PTR  ucryptoDecryptUpdate;
+  UCRYPTO_DECRYPT_FINAL_FN_PTR   ucryptoDecryptFinal;
+  UCRYPTO_DECRYPT_FN_PTR         ucryptoDecrypt;
+  UCRYPTO_SIGN_INIT_FN_PTR       ucryptoSignInit;
+  UCRYPTO_SIGN_UPDATE_FN_PTR     ucryptoSignUpdate;
+  UCRYPTO_SIGN_FINAL_FN_PTR      ucryptoSignFinal;
+  UCRYPTO_VERIFY_INIT_FN_PTR     ucryptoVerifyInit;
+  UCRYPTO_VERIFY_UPDATE_FN_PTR   ucryptoVerifyUpdate;
+  UCRYPTO_VERIFY_FINAL_FN_PTR    ucryptoVerifyFinal;
+} T4CRYPTO_FUNCTION_TABLE;
+
+typedef T4CRYPTO_FUNCTION_TABLE *T4CRYPTO_FUNCTION_TABLE_PTR;
+
+/* global function table */
+T4CRYPTO_FUNCTION_TABLE_PTR ftab;
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/jdk.crypto.ucrypto/solaris/native/libj2ucrypto/sys_old/crypto/common.h	Thu Oct 23 13:44:28 2014 -0700
@@ -0,0 +1,637 @@
+/*
+ * Copyright (c) 2003, 2011, 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
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+#ifndef _SYS_CRYPTO_COMMON_H
+#define _SYS_CRYPTO_COMMON_H
+
+/*
+ * Header file for the common data structures of the cryptographic framework
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <sys/types.h>
+#include <sys/uio.h>
+#include <sys/stream.h>
+#include <sys/mutex.h>
+#include <sys/condvar.h>
+
+/* Convenience defines/macros */
+
+#define CRYPTO_ARG_INPLACE(input, output)    \
+    if ((output) == NULL)        \
+        (output) = (input);
+
+#ifdef _KERNEL
+
+#include <sys/kmem.h>
+#define CRYPTO_KMFLAG(x)        crypto_kmflag((x))
+#define CRYPTO_ALLOC(sz, kmflag)        kmem_alloc((sz), (kmflag))
+#define CRYPTO_ZALLOC(sz, kmflag)        kmem_zalloc((sz), (kmflag))
+#define CRYPTO_FREE(ptr, sz)        kmem_free((ptr), (sz))
+#define CRYPTO_ZFREE(ptr, sz)        if (ptr != NULL) { \
+                                         bzero((ptr), (sz)), \
+                                         kmem_free((ptr), (sz)); \
+                                     }
+
+#else /* _KERNEL */
+
+#include <malloc.h>
+#define    CRYPTO_KMFLAG(x)        (0)
+#define    CRYPTO_ALLOC(sz, kmflag)        malloc((sz))
+#define    CRYPTO_ZALLOC(sz, kmflag)        calloc(1, (sz))
+#define    CRYPTO_FREE(ptr, sz)        free((ptr))
+#define    CRYPTO_ZFREE(ptr, sz)        if (ptr != NULL) { \
+                                         bzero((ptr), (sz)), \
+                                         free((ptr)); \
+                                     }
+
+#endif /* _KERNEL */
+
+/* Cryptographic Mechanisms */
+
+#define    CRYPTO_MAX_MECH_NAME 32
+typedef char crypto_mech_name_t[CRYPTO_MAX_MECH_NAME];
+
+typedef uint64_t crypto_mech_type_t;
+
+typedef struct crypto_mechanism {
+    crypto_mech_type_t    cm_type;    /* mechanism type */
+    caddr_t            cm_param;    /* mech. parameter */
+    size_t            cm_param_len;    /* mech. parameter len */
+} crypto_mechanism_t;
+
+#ifdef  _SYSCALL32
+
+typedef struct crypto_mechanism32 {
+    crypto_mech_type_t    cm_type;    /* mechanism type */
+    caddr32_t        cm_param;    /* mech. parameter */
+    size32_t        cm_param_len;   /* mech. parameter len */
+} crypto_mechanism32_t;
+
+#endif  /* _SYSCALL32 */
+
+#ifdef _KERNEL
+/* CK_AES_CTR_PARAMS provides parameters to the CKM_AES_CTR mechanism */
+typedef struct CK_AES_CTR_PARAMS {
+    ulong_t    ulCounterBits;
+    uint8_t cb[16];
+} CK_AES_CTR_PARAMS;
+#endif
+
+/* CK_AES_CCM_PARAMS provides parameters to the CKM_AES_CCM mechanism */
+typedef struct CK_AES_CCM_PARAMS {
+    ulong_t ulMACSize;
+    ulong_t ulNonceSize;
+    ulong_t ulAuthDataSize;
+    ulong_t ulDataSize; /* used for plaintext or ciphertext */
+    uchar_t *nonce;
+    uchar_t *authData;
+} CK_AES_CCM_PARAMS;
+
+/* CK_AES_GCM_PARAMS provides parameters to the CKM_AES_GCM mechanism */
+typedef struct CK_AES_GCM_PARAMS {
+    uchar_t *pIv;
+    ulong_t ulIvLen;
+    ulong_t ulIvBits;
+    uchar_t *pAAD;
+    ulong_t ulAADLen;
+    ulong_t ulTagBits;
+} CK_AES_GCM_PARAMS;
+
+/* CK_AES_GMAC_PARAMS provides parameters to the CKM_AES_GMAC mechanism */
+typedef struct CK_AES_GMAC_PARAMS {
+    uchar_t *pIv;
+    uchar_t *pAAD;
+    ulong_t ulAADLen;
+} CK_AES_GMAC_PARAMS;
+
+#ifdef _KERNEL
+/*
+ * CK_ECDH1_DERIVE_PARAMS provides the parameters to the
+ * CKM_ECDH1_KEY_DERIVE mechanism
+ */
+typedef struct CK_ECDH1_DERIVE_PARAMS {
+    ulong_t        kdf;
+    ulong_t        ulSharedDataLen;
+    uchar_t        *pSharedData;
+    ulong_t        ulPublicDataLen;
+    uchar_t        *pPublicData;
+} CK_ECDH1_DERIVE_PARAMS;
+#endif
+
+#ifdef _KERNEL
+#ifdef  _SYSCALL32
+
+/* needed for 32-bit applications running on 64-bit kernels */
+typedef struct CK_AES_CTR_PARAMS32 {
+    uint32_t ulCounterBits;
+    uint8_t cb[16];
+} CK_AES_CTR_PARAMS32;
+
+/* needed for 32-bit applications running on 64-bit kernels */
+typedef struct CK_AES_CCM_PARAMS32 {
+    uint32_t ulMACSize;
+    uint32_t ulNonceSize;
+    uint32_t ulAuthDataSize;
+    uint32_t ulDataSize;
+    caddr32_t nonce;
+    caddr32_t authData;
+} CK_AES_CCM_PARAMS32;
+
+/* needed for 32-bit applications running on 64-bit kernels */
+typedef struct CK_AES_GCM_PARAMS32 {
+    caddr32_t pIv;
+    uint32_t ulIvLen;
+    uint32_t ulIvBits;
+    caddr32_t pAAD;
+    uint32_t ulAADLen;
+    uint32_t ulTagBits;
+} CK_AES_GCM_PARAMS32;
+
+/* needed for 32-bit applications running on 64-bit kernels */
+typedef struct CK_AES_GMAC_PARAMS32 {
+    caddr32_t pIv;
+    caddr32_t pAAD;
+    uint32_t ulAADLen;
+} CK_AES_GMAC_PARAMS32;
+
+typedef struct CK_ECDH1_DERIVE_PARAMS32 {
+    uint32_t    kdf;
+    uint32_t    ulSharedDataLen;
+    caddr32_t    pSharedData;
+    uint32_t    ulPublicDataLen;
+    caddr32_t    pPublicData;
+} CK_ECDH1_DERIVE_PARAMS32;
+
+#endif  /* _SYSCALL32 */
+#endif /* _KERNEL */
+
+/*
+ * The measurement unit bit flag for a mechanism's minimum or maximum key size.
+ * The unit are mechanism dependent.  It can be in bits or in bytes.
+ */
+typedef uint32_t crypto_keysize_unit_t;
+
+/*
+ * The following bit flags are valid in cm_mech_flags field in
+ * the crypto_mech_info_t structure of the SPI.
+ *
+ * Only the first two bit flags are valid in mi_keysize_unit
+ * field in the crypto_mechanism_info_t structure of the API.
+ */
+#define    CRYPTO_KEYSIZE_UNIT_IN_BITS    0x00000001
+#define    CRYPTO_KEYSIZE_UNIT_IN_BYTES    0x00000002
+#define    CRYPTO_CAN_SHARE_OPSTATE    0x00000004 /* supports sharing */
+
+
+/* Mechanisms supported out-of-the-box */
+#define    SUN_CKM_MD4            "CKM_MD4"
+#define    SUN_CKM_MD5            "CKM_MD5"
+#define    SUN_CKM_MD5_HMAC        "CKM_MD5_HMAC"
+#define    SUN_CKM_MD5_HMAC_GENERAL    "CKM_MD5_HMAC_GENERAL"
+#define    SUN_CKM_SHA1            "CKM_SHA_1"
+#define    SUN_CKM_SHA1_HMAC        "CKM_SHA_1_HMAC"
+#define    SUN_CKM_SHA1_HMAC_GENERAL    "CKM_SHA_1_HMAC_GENERAL"
+#define    SUN_CKM_SHA256            "CKM_SHA256"
+#define    SUN_CKM_SHA256_HMAC        "CKM_SHA256_HMAC"
+#define    SUN_CKM_SHA256_HMAC_GENERAL    "CKM_SHA256_HMAC_GENERAL"
+#define    SUN_CKM_SHA384            "CKM_SHA384"
+#define    SUN_CKM_SHA384_HMAC        "CKM_SHA384_HMAC"
+#define    SUN_CKM_SHA384_HMAC_GENERAL    "CKM_SHA384_HMAC_GENERAL"
+#define    SUN_CKM_SHA512            "CKM_SHA512"
+#define    SUN_CKM_SHA512_HMAC        "CKM_SHA512_HMAC"
+#define    SUN_CKM_SHA512_HMAC_GENERAL    "CKM_SHA512_HMAC_GENERAL"
+#define    SUN_CKM_DES_CBC            "CKM_DES_CBC"
+#define    SUN_CKM_DES3_CBC        "CKM_DES3_CBC"
+#define    SUN_CKM_DES_ECB            "CKM_DES_ECB"
+#define    SUN_CKM_DES3_ECB        "CKM_DES3_ECB"
+#define    SUN_CKM_BLOWFISH_CBC        "CKM_BLOWFISH_CBC"
+#define    SUN_CKM_BLOWFISH_ECB        "CKM_BLOWFISH_ECB"
+#define    SUN_CKM_AES_CBC            "CKM_AES_CBC"
+#define    SUN_CKM_AES_ECB            "CKM_AES_ECB"
+#define    SUN_CKM_AES_CTR            "CKM_AES_CTR"
+#define    SUN_CKM_AES_CCM            "CKM_AES_CCM"
+#define    SUN_CKM_AES_GCM            "CKM_AES_GCM"
+#define    SUN_CKM_AES_GMAC        "CKM_AES_GMAC"
+#define    SUN_CKM_AES_CFB128        "CKM_AES_CFB128"
+#define    SUN_CKM_RC4            "CKM_RC4"
+#define    SUN_CKM_RSA_PKCS        "CKM_RSA_PKCS"
+#define    SUN_CKM_RSA_X_509        "CKM_RSA_X_509"
+#define    SUN_CKM_MD5_RSA_PKCS        "CKM_MD5_RSA_PKCS"
+#define    SUN_CKM_SHA1_RSA_PKCS        "CKM_SHA1_RSA_PKCS"
+#define    SUN_CKM_SHA256_RSA_PKCS        "CKM_SHA256_RSA_PKCS"
+#define    SUN_CKM_SHA384_RSA_PKCS        "CKM_SHA384_RSA_PKCS"
+#define    SUN_CKM_SHA512_RSA_PKCS        "CKM_SHA512_RSA_PKCS"
+#define    SUN_CKM_EC_KEY_PAIR_GEN        "CKM_EC_KEY_PAIR_GEN"
+#define    SUN_CKM_ECDH1_DERIVE        "CKM_ECDH1_DERIVE"
+#define    SUN_CKM_ECDSA_SHA1        "CKM_ECDSA_SHA1"
+#define    SUN_CKM_ECDSA            "CKM_ECDSA"
+
+/* Shared operation context format for CKM_RC4 */
+typedef struct {
+#if defined(__amd64)
+    uint32_t    i, j;
+    uint32_t    arr[256];
+    uint32_t    flag;
+#else
+    uchar_t        arr[256];
+    uchar_t        i, j;
+#endif /* __amd64 */
+    uint64_t    pad;        /* For 64-bit alignment */
+} arcfour_state_t;
+
+/* Data arguments of cryptographic operations */
+
+typedef enum crypto_data_format {
+    CRYPTO_DATA_RAW = 1,
+    CRYPTO_DATA_UIO,
+    CRYPTO_DATA_MBLK
+} crypto_data_format_t;
+
+typedef struct crypto_data {
+    crypto_data_format_t    cd_format;    /* Format identifier    */
+    off_t            cd_offset;    /* Offset from the beginning */
+    size_t            cd_length;    /* # of bytes in use */
+    caddr_t            cd_miscdata;    /* ancillary data */
+    union {
+        /* Raw format */
+        iovec_t cdu_raw;        /* Pointer and length        */
+
+        /* uio scatter-gather format */
+        uio_t    *cdu_uio;
+
+        /* mblk scatter-gather format */
+        mblk_t    *cdu_mp;        /* The mblk chain */
+
+    } cdu;    /* Crypto Data Union */
+} crypto_data_t;
+
+#define    cd_raw        cdu.cdu_raw
+#define    cd_uio        cdu.cdu_uio
+#define    cd_mp        cdu.cdu_mp
+
+#define    CRYPTO_SET_RAW_DATA(var, str, len)    \
+    (var).cd_format = CRYPTO_DATA_RAW;    \
+    (var).cd_offset = 0;            \
+    (var).cd_length = (len);        \
+    (var).cd_miscdata = NULL;        \
+    (var).cd_raw.iov_base = (caddr_t)(str);    \
+    (var).cd_raw.iov_len = (len);
+
+#define    CRYPTO_DATA_IS_USERSPACE(buf) \
+    ((buf->cd_format == CRYPTO_DATA_UIO && \
+    buf->cd_uio->uio_segflg == UIO_USERSPACE))
+
+typedef struct crypto_dual_data {
+    crypto_data_t        dd_data;    /* The data */
+    off_t            dd_offset2;    /* Used by dual operation */
+    size_t            dd_len2;    /* # of bytes to take    */
+} crypto_dual_data_t;
+
+#define    dd_format    dd_data.cd_format
+#define    dd_offset1    dd_data.cd_offset
+#define    dd_len1        dd_data.cd_length
+#define    dd_miscdata    dd_data.cd_miscdata
+#define    dd_raw        dd_data.cd_raw
+#define    dd_uio        dd_data.cd_uio
+#define    dd_mp        dd_data.cd_mp
+
+/* The keys, and their contents */
+
+typedef enum {
+    CRYPTO_KEY_RAW = 1,    /* ck_data is a cleartext key */
+    CRYPTO_KEY_REFERENCE,    /* ck_obj_id is an opaque reference */
+    CRYPTO_KEY_ATTR_LIST    /* ck_attrs is a list of object attributes */
+} crypto_key_format_t;
+
+typedef uint64_t crypto_attr_type_t;
+
+/* Attribute types to use for passing a RSA public key or a private key. */
+#define    SUN_CKA_MODULUS            0x00000120
+#define    SUN_CKA_MODULUS_BITS        0x00000121
+#define    SUN_CKA_PUBLIC_EXPONENT        0x00000122
+#define    SUN_CKA_PRIVATE_EXPONENT    0x00000123
+#define    SUN_CKA_PRIME_1            0x00000124
+#define    SUN_CKA_PRIME_2            0x00000125
+#define    SUN_CKA_EXPONENT_1        0x00000126
+#define    SUN_CKA_EXPONENT_2        0x00000127
+#define    SUN_CKA_COEFFICIENT        0x00000128
+#define    SUN_CKA_PRIME            0x00000130
+#define    SUN_CKA_SUBPRIME        0x00000131
+#define    SUN_CKA_BASE            0x00000132
+
+#define    CKK_EC            0x00000003
+#define    CKK_GENERIC_SECRET    0x00000010
+#define    CKK_RC4            0x00000012
+#define    CKK_AES            0x0000001F
+#define    CKK_DES            0x00000013
+#define    CKK_DES2        0x00000014
+#define    CKK_DES3        0x00000015
+
+#define    CKO_PUBLIC_KEY        0x00000002
+#define    CKO_PRIVATE_KEY        0x00000003
+#define    CKA_CLASS        0x00000000
+#define    CKA_VALUE        0x00000011
+#define    CKA_KEY_TYPE        0x00000100
+#define    CKA_VALUE_LEN        0x00000161
+#define    CKA_EC_PARAMS        0x00000180
+#define    CKA_EC_POINT        0x00000181
+
+typedef uint32_t    crypto_object_id_t;
+
+typedef struct crypto_object_attribute {
+    crypto_attr_type_t    oa_type;    /* attribute type */
+    caddr_t            oa_value;    /* attribute value */
+    ssize_t            oa_value_len;    /* length of attribute value */
+} crypto_object_attribute_t;
+
+typedef struct crypto_key {
+    crypto_key_format_t    ck_format;    /* format identifier */
+    union {
+        /* for CRYPTO_KEY_RAW ck_format */
+        struct {
+            uint_t    cku_v_length;    /* # of bits in ck_data   */
+            void    *cku_v_data;    /* ptr to key value */
+        } cku_key_value;
+
+        /* for CRYPTO_KEY_REFERENCE ck_format */
+        crypto_object_id_t cku_key_id;    /* reference to object key */
+
+        /* for CRYPTO_KEY_ATTR_LIST ck_format */
+        struct {
+            uint_t cku_a_count;    /* number of attributes */
+            crypto_object_attribute_t *cku_a_oattr;
+        } cku_key_attrs;
+    } cku_data;                /* Crypto Key union */
+} crypto_key_t;
+
+#ifdef  _SYSCALL32
+
+typedef struct crypto_object_attribute32 {
+    uint64_t    oa_type;    /* attribute type */
+    caddr32_t    oa_value;    /* attribute value */
+    ssize32_t    oa_value_len;    /* length of attribute value */
+} crypto_object_attribute32_t;
+
+typedef struct crypto_key32 {
+    crypto_key_format_t    ck_format;    /* format identifier */
+    union {
+        /* for CRYPTO_KEY_RAW ck_format */
+        struct {
+            uint32_t cku_v_length;    /* # of bytes in ck_data */
+            caddr32_t cku_v_data;    /* ptr to key value */
+        } cku_key_value;
+
+        /* for CRYPTO_KEY_REFERENCE ck_format */
+        crypto_object_id_t cku_key_id; /* reference to object key */
+
+        /* for CRYPTO_KEY_ATTR_LIST ck_format */
+        struct {
+            uint32_t cku_a_count;    /* number of attributes */
+            caddr32_t cku_a_oattr;
+        } cku_key_attrs;
+    } cku_data;                /* Crypto Key union */
+} crypto_key32_t;
+
+#endif  /* _SYSCALL32 */
+
+#define    ck_data        cku_data.cku_key_value.cku_v_data
+#define    ck_length    cku_data.cku_key_value.cku_v_length
+#define    ck_obj_id    cku_data.cku_key_id
+#define    ck_count    cku_data.cku_key_attrs.cku_a_count
+#define    ck_attrs    cku_data.cku_key_attrs.cku_a_oattr
+
+/*
+ * Raw key lengths are expressed in number of bits.
+ * The following macro returns the minimum number of
+ * bytes that can contain the specified number of bits.
+ * Round up without overflowing the integer type.
+ */
+#define    CRYPTO_BITS2BYTES(n) ((n) == 0 ? 0 : (((n) - 1) >> 3) + 1)
+#define    CRYPTO_BYTES2BITS(n) ((n) << 3)
+
+/* Providers */
+
+typedef enum {
+    CRYPTO_HW_PROVIDER = 0,
+    CRYPTO_SW_PROVIDER,
+    CRYPTO_LOGICAL_PROVIDER
+} crypto_provider_type_t;
+
+typedef uint32_t     crypto_provider_id_t;
+#define    KCF_PROVID_INVALID    ((uint32_t)-1)
+
+typedef struct crypto_provider_entry {
+    crypto_provider_id_t    pe_provider_id;
+    uint_t            pe_mechanism_count;
+} crypto_provider_entry_t;
+
+typedef struct crypto_dev_list_entry {
+    char            le_dev_name[MAXNAMELEN];
+    uint_t            le_dev_instance;
+    uint_t            le_mechanism_count;
+} crypto_dev_list_entry_t;
+
+/* User type for authentication ioctls and SPI entry points */
+
+typedef enum crypto_user_type {
+    CRYPTO_SO = 0,
+    CRYPTO_USER
+} crypto_user_type_t;
+
+/* Version for provider management ioctls and SPI entry points */
+
+typedef struct crypto_version {
+    uchar_t    cv_major;
+    uchar_t    cv_minor;
+} crypto_version_t;
+
+/* session data structure opaque to the consumer */
+typedef void *crypto_session_t;
+
+/* provider data structure opaque to the consumer */
+typedef void *crypto_provider_t;
+
+/* Limits used by both consumers and providers */
+#define    CRYPTO_EXT_SIZE_LABEL        32
+#define    CRYPTO_EXT_SIZE_MANUF        32
+#define    CRYPTO_EXT_SIZE_MODEL        16
+#define    CRYPTO_EXT_SIZE_SERIAL        16
+#define    CRYPTO_EXT_SIZE_TIME        16
+
+typedef struct crypto_provider_ext_info {
+    uchar_t            ei_label[CRYPTO_EXT_SIZE_LABEL];
+    uchar_t            ei_manufacturerID[CRYPTO_EXT_SIZE_MANUF];
+    uchar_t            ei_model[CRYPTO_EXT_SIZE_MODEL];
+    uchar_t            ei_serial_number[CRYPTO_EXT_SIZE_SERIAL];
+    ulong_t            ei_flags;
+    ulong_t            ei_max_session_count;
+    ulong_t            ei_max_pin_len;
+    ulong_t            ei_min_pin_len;
+    ulong_t            ei_total_public_memory;
+    ulong_t            ei_free_public_memory;
+    ulong_t            ei_total_private_memory;
+    ulong_t            ei_free_private_memory;
+    crypto_version_t    ei_hardware_version;
+    crypto_version_t    ei_firmware_version;
+    uchar_t            ei_time[CRYPTO_EXT_SIZE_TIME];
+    int            ei_hash_max_input_len;
+    int            ei_hmac_max_input_len;
+} crypto_provider_ext_info_t;
+
+typedef uint_t        crypto_session_id_t;
+
+typedef enum cmd_type {
+    COPY_FROM_DATA,
+    COPY_TO_DATA,
+    COMPARE_TO_DATA,
+    MD5_DIGEST_DATA,
+    SHA1_DIGEST_DATA,
+    SHA2_DIGEST_DATA,
+    GHASH_DATA
+} cmd_type_t;
+
+#define    CRYPTO_DO_UPDATE    0x01
+#define    CRYPTO_DO_FINAL        0x02
+#define    CRYPTO_DO_MD5        0x04
+#define    CRYPTO_DO_SHA1        0x08
+#define    CRYPTO_DO_SIGN        0x10
+#define    CRYPTO_DO_VERIFY    0x20
+#define    CRYPTO_DO_SHA2        0x40
+
+#define    PROVIDER_OWNS_KEY_SCHEDULE    0x00000001
+
+/*
+ * Common cryptographic status and error codes.
+ */
+#define    CRYPTO_SUCCESS                0x00000000
+#define    CRYPTO_CANCEL                0x00000001
+#define    CRYPTO_HOST_MEMORY            0x00000002
+#define    CRYPTO_GENERAL_ERROR            0x00000003
+#define    CRYPTO_FAILED                0x00000004
+#define    CRYPTO_ARGUMENTS_BAD            0x00000005
+#define    CRYPTO_ATTRIBUTE_READ_ONLY        0x00000006
+#define    CRYPTO_ATTRIBUTE_SENSITIVE        0x00000007
+#define    CRYPTO_ATTRIBUTE_TYPE_INVALID        0x00000008
+#define    CRYPTO_ATTRIBUTE_VALUE_INVALID        0x00000009
+#define    CRYPTO_CANCELED                0x0000000A
+#define    CRYPTO_DATA_INVALID            0x0000000B
+#define    CRYPTO_DATA_LEN_RANGE            0x0000000C
+#define    CRYPTO_DEVICE_ERROR            0x0000000D
+#define    CRYPTO_DEVICE_MEMORY            0x0000000E
+#define    CRYPTO_DEVICE_REMOVED            0x0000000F
+#define    CRYPTO_ENCRYPTED_DATA_INVALID        0x00000010
+#define    CRYPTO_ENCRYPTED_DATA_LEN_RANGE        0x00000011
+#define    CRYPTO_KEY_HANDLE_INVALID        0x00000012
+#define    CRYPTO_KEY_SIZE_RANGE            0x00000013
+#define    CRYPTO_KEY_TYPE_INCONSISTENT        0x00000014
+#define    CRYPTO_KEY_NOT_NEEDED            0x00000015
+#define    CRYPTO_KEY_CHANGED            0x00000016
+#define    CRYPTO_KEY_NEEDED            0x00000017
+#define    CRYPTO_KEY_INDIGESTIBLE            0x00000018
+#define    CRYPTO_KEY_FUNCTION_NOT_PERMITTED    0x00000019
+#define    CRYPTO_KEY_NOT_WRAPPABLE        0x0000001A
+#define    CRYPTO_KEY_UNEXTRACTABLE        0x0000001B
+#define    CRYPTO_MECHANISM_INVALID        0x0000001C
+#define    CRYPTO_MECHANISM_PARAM_INVALID        0x0000001D
+#define    CRYPTO_OBJECT_HANDLE_INVALID        0x0000001E
+#define    CRYPTO_OPERATION_IS_ACTIVE        0x0000001F
+#define    CRYPTO_OPERATION_NOT_INITIALIZED    0x00000020
+#define    CRYPTO_PIN_INCORRECT            0x00000021
+#define    CRYPTO_PIN_INVALID            0x00000022
+#define    CRYPTO_PIN_LEN_RANGE            0x00000023
+#define    CRYPTO_PIN_EXPIRED            0x00000024
+#define    CRYPTO_PIN_LOCKED            0x00000025
+#define    CRYPTO_SESSION_CLOSED            0x00000026
+#define    CRYPTO_SESSION_COUNT            0x00000027
+#define    CRYPTO_SESSION_HANDLE_INVALID        0x00000028
+#define    CRYPTO_SESSION_READ_ONLY        0x00000029
+#define    CRYPTO_SESSION_EXISTS            0x0000002A
+#define    CRYPTO_SESSION_READ_ONLY_EXISTS        0x0000002B
+#define    CRYPTO_SESSION_READ_WRITE_SO_EXISTS    0x0000002C
+#define    CRYPTO_SIGNATURE_INVALID        0x0000002D
+#define    CRYPTO_SIGNATURE_LEN_RANGE        0x0000002E
+#define    CRYPTO_TEMPLATE_INCOMPLETE        0x0000002F
+#define    CRYPTO_TEMPLATE_INCONSISTENT        0x00000030
+#define    CRYPTO_UNWRAPPING_KEY_HANDLE_INVALID    0x00000031
+#define    CRYPTO_UNWRAPPING_KEY_SIZE_RANGE    0x00000032
+#define    CRYPTO_UNWRAPPING_KEY_TYPE_INCONSISTENT    0x00000033
+#define    CRYPTO_USER_ALREADY_LOGGED_IN        0x00000034
+#define    CRYPTO_USER_NOT_LOGGED_IN        0x00000035
+#define    CRYPTO_USER_PIN_NOT_INITIALIZED        0x00000036
+#define    CRYPTO_USER_TYPE_INVALID        0x00000037
+#define    CRYPTO_USER_ANOTHER_ALREADY_LOGGED_IN    0x00000038
+#define    CRYPTO_USER_TOO_MANY_TYPES        0x00000039
+#define    CRYPTO_WRAPPED_KEY_INVALID        0x0000003A
+#define    CRYPTO_WRAPPED_KEY_LEN_RANGE        0x0000003B
+#define    CRYPTO_WRAPPING_KEY_HANDLE_INVALID    0x0000003C
+#define    CRYPTO_WRAPPING_KEY_SIZE_RANGE        0x0000003D
+#define    CRYPTO_WRAPPING_KEY_TYPE_INCONSISTENT    0x0000003E
+#define    CRYPTO_RANDOM_SEED_NOT_SUPPORTED    0x0000003F
+#define    CRYPTO_RANDOM_NO_RNG            0x00000040
+#define    CRYPTO_DOMAIN_PARAMS_INVALID        0x00000041
+#define    CRYPTO_BUFFER_TOO_SMALL            0x00000042
+#define    CRYPTO_INFORMATION_SENSITIVE        0x00000043
+#define    CRYPTO_NOT_SUPPORTED            0x00000044
+
+#define    CRYPTO_QUEUED                0x00000045
+#define    CRYPTO_BUFFER_TOO_BIG            0x00000046
+#define    CRYPTO_INVALID_CONTEXT            0x00000047
+#define    CRYPTO_INVALID_MAC            0x00000048
+#define    CRYPTO_MECH_NOT_SUPPORTED        0x00000049
+#define    CRYPTO_INCONSISTENT_ATTRIBUTE        0x0000004A
+#define    CRYPTO_NO_PERMISSION            0x0000004B
+#define    CRYPTO_INVALID_PROVIDER_ID        0x0000004C
+#define    CRYPTO_VERSION_MISMATCH            0x0000004D
+#define    CRYPTO_BUSY                0x0000004E
+#define    CRYPTO_UNKNOWN_PROVIDER            0x0000004F
+#define    CRYPTO_MODVERIFICATION_FAILED        0x00000050
+#define    CRYPTO_OLD_CTX_TEMPLATE            0x00000051
+#define    CRYPTO_WEAK_KEY                0x00000052
+#define    CRYPTO_FIPS140_ERROR            0x00000053
+/*
+ * Don't forget to update CRYPTO_LAST_ERROR and the error_number_table[]
+ * in kernelUtil.c when new error code is added.
+ */
+#define    CRYPTO_LAST_ERROR            0x00000053
+
+/*
+ * Special values that can be used to indicate that information is unavailable
+ * or that there is not practical limit. These values can be used
+ * by fields of the SPI crypto_provider_ext_info(9S) structure.
+ * The value of CRYPTO_UNAVAILABLE_INFO should be the same as
+ * CK_UNAVAILABLE_INFO in the PKCS#11 spec.
+ */
+#define    CRYPTO_UNAVAILABLE_INFO        ((ulong_t)(-1))
+#define    CRYPTO_EFFECTIVELY_INFINITE    0x0
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _SYS_CRYPTO_COMMON_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/jdk.crypto.ucrypto/solaris/native/libj2ucrypto/sys_old/crypto/spi.h	Thu Oct 23 13:44:28 2014 -0700
@@ -0,0 +1,791 @@
+/*
+ * Copyright (c) 2003, 2011, 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
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+#ifndef _SYS_CRYPTO_SPI_H
+#define    _SYS_CRYPTO_SPI_H
+
+/*
+ * CSPI: Cryptographic Service Provider Interface.
+ */
+
+#include <sys/types.h>
+#include <sys/crypto/common.h>
+
+#ifdef    __cplusplus
+extern "C" {
+#endif
+
+#ifdef    _KERNEL
+#include <sys/dditypes.h>
+#include <sys/ddi.h>
+#include <sys/kmem.h>
+
+#define    CRYPTO_SPI_VERSION_1    1
+#define    CRYPTO_SPI_VERSION_2    2
+#define    CRYPTO_SPI_VERSION_3    3
+#define    CRYPTO_SPI_VERSION_4    4
+#define    CRYPTO_SPI_VERSION_5    5
+
+#define    CRYPTO_OPS_OFFSET(f)        offsetof(crypto_ops_t, co_##f)
+#define    CRYPTO_PROVIDER_OFFSET(f)    \
+    offsetof(crypto_provider_management_ops_t, f)
+#define    CRYPTO_OBJECT_OFFSET(f)        offsetof(crypto_object_ops_t, f)
+#define    CRYPTO_SESSION_OFFSET(f)    offsetof(crypto_session_ops_t, f)
+
+#endif
+
+/*
+ * Provider-private handle. This handle is specified by a provider
+ * when it registers by means of the pi_provider_handle field of
+ * the crypto_provider_info structure, and passed to the provider
+ * when its entry points are invoked.
+ */
+typedef void *crypto_provider_handle_t;
+
+/*
+ * Context templates can be used to by software providers to pre-process
+ * keying material, such as key schedules. They are allocated by
+ * a software provider create_ctx_template(9E) entry point, and passed
+ * as argument to initialization and atomic provider entry points.
+ */
+typedef void *crypto_spi_ctx_template_t;
+
+/*
+ * Request handles are used by the kernel to identify an asynchronous
+ * request being processed by a provider. It is passed by the kernel
+ * to a hardware provider when submitting a request, and must be
+ * specified by a provider when calling crypto_op_notification(9F)
+ */
+typedef void *crypto_req_handle_t;
+
+/*
+ * The context structure is passed from kcf to a provider in kernel and
+ * internally in libsoftcrypto between ucrypto and the algorithm.
+ * It contains the information needed to process a multi-part or
+ * single part operation. The context structure is not used
+ * by atomic operations.
+ *
+ * Parameters needed to perform a cryptographic operation, such
+ * as keys, mechanisms, input and output buffers, are passed
+ * as separate arguments to Provider routines.
+ */
+typedef struct crypto_ctx {
+    crypto_provider_handle_t cc_provider;
+    crypto_session_id_t    cc_session;
+    void            *cc_provider_private;    /* owned by provider */
+    void            *cc_framework_private;    /* owned by framework */
+    uint32_t        cc_flags;        /* flags */
+    void            *cc_opstate;        /* state */
+} crypto_ctx_t;
+
+#ifdef    _KERNEL
+
+/* Values for cc_flags field */
+#define    CRYPTO_INIT_OPSTATE    0x00000001 /* allocate and init cc_opstate */
+#define    CRYPTO_USE_OPSTATE    0x00000002 /* .. start using it as context */
+
+/*
+ * Extended provider information.
+ */
+
+/*
+ * valid values for ei_flags field of extended info structure
+ * They match the RSA Security, Inc PKCS#11 tokenInfo flags.
+ */
+#define    CRYPTO_EXTF_RNG                    0x00000001
+#define    CRYPTO_EXTF_WRITE_PROTECTED            0x00000002
+#define    CRYPTO_EXTF_LOGIN_REQUIRED            0x00000004
+#define    CRYPTO_EXTF_USER_PIN_INITIALIZED        0x00000008
+#define    CRYPTO_EXTF_CLOCK_ON_TOKEN            0x00000040
+#define    CRYPTO_EXTF_PROTECTED_AUTHENTICATION_PATH    0x00000100
+#define    CRYPTO_EXTF_DUAL_CRYPTO_OPERATIONS        0x00000200
+#define    CRYPTO_EXTF_TOKEN_INITIALIZED            0x00000400
+#define    CRYPTO_EXTF_USER_PIN_COUNT_LOW            0x00010000
+#define    CRYPTO_EXTF_USER_PIN_FINAL_TRY            0x00020000
+#define    CRYPTO_EXTF_USER_PIN_LOCKED            0x00040000
+#define    CRYPTO_EXTF_USER_PIN_TO_BE_CHANGED        0x00080000
+#define    CRYPTO_EXTF_SO_PIN_COUNT_LOW            0x00100000
+#define    CRYPTO_EXTF_SO_PIN_FINAL_TRY            0x00200000
+#define    CRYPTO_EXTF_SO_PIN_LOCKED            0x00400000
+#define    CRYPTO_EXTF_SO_PIN_TO_BE_CHANGED        0x00800000
+
+/*
+ * The crypto_control_ops structure contains pointers to control
+ * operations for cryptographic providers.  It is passed through
+ * the crypto_ops(9S) structure when providers register with the
+ * kernel using crypto_register_provider(9F).
+ */
+typedef struct crypto_control_ops {
+    void (*provider_status)(crypto_provider_handle_t, uint_t *);
+} crypto_control_ops_t;
+
+/*
+ * The crypto_ctx_ops structure contains points to context and context
+ * templates management operations for cryptographic providers. It is
+ * passed through the crypto_ops(9S) structure when providers register
+ * with the kernel using crypto_register_provider(9F).
+ */
+typedef struct crypto_ctx_ops {
+    int (*create_ctx_template)(crypto_provider_handle_t,
+        crypto_mechanism_t *, crypto_key_t *,
+        crypto_spi_ctx_template_t *, size_t *, crypto_req_handle_t);
+    int (*free_context)(crypto_ctx_t *);
+} crypto_ctx_ops_t;
+
+/*
+ * The crypto_digest_ops structure contains pointers to digest
+ * operations for cryptographic providers.  It is passed through
+ * the crypto_ops(9S) structure when providers register with the
+ * kernel using crypto_register_provider(9F).
+ */
+typedef struct crypto_digest_ops {
+    int (*digest_init)(crypto_ctx_t *, crypto_mechanism_t *,
+        crypto_req_handle_t);
+    int (*digest)(crypto_ctx_t *, crypto_data_t *, crypto_data_t *,
+        crypto_req_handle_t);
+    int (*digest_update)(crypto_ctx_t *, crypto_data_t *,
+        crypto_req_handle_t);
+    int (*digest_key)(crypto_ctx_t *, crypto_key_t *, crypto_req_handle_t);
+    int (*digest_final)(crypto_ctx_t *, crypto_data_t *,
+        crypto_req_handle_t);
+    int (*digest_atomic)(crypto_provider_handle_t, crypto_session_id_t,
+        crypto_mechanism_t *, crypto_data_t *,
+        crypto_data_t *, crypto_req_handle_t);
+} crypto_digest_ops_t;
+
+/*
+ * The crypto_cipher_ops structure contains pointers to encryption
+ * and decryption operations for cryptographic providers.  It is
+ * passed through the crypto_ops(9S) structure when providers register
+ * with the kernel using crypto_register_provider(9F).
+ */
+typedef struct crypto_cipher_ops {
+    int (*encrypt_init)(crypto_ctx_t *,
+        crypto_mechanism_t *, crypto_key_t *,
+        crypto_spi_ctx_template_t, crypto_req_handle_t);
+    int (*encrypt)(crypto_ctx_t *,
+        crypto_data_t *, crypto_data_t *, crypto_req_handle_t);
+    int (*encrypt_update)(crypto_ctx_t *,
+        crypto_data_t *, crypto_data_t *, crypto_req_handle_t);
+    int (*encrypt_final)(crypto_ctx_t *,
+        crypto_data_t *, crypto_req_handle_t);
+    int (*encrypt_atomic)(crypto_provider_handle_t, crypto_session_id_t,
+        crypto_mechanism_t *, crypto_key_t *, crypto_data_t *,
+        crypto_data_t *, crypto_spi_ctx_template_t, crypto_req_handle_t);
+
+    int (*decrypt_init)(crypto_ctx_t *,
+        crypto_mechanism_t *, crypto_key_t *,
+        crypto_spi_ctx_template_t, crypto_req_handle_t);
+    int (*decrypt)(crypto_ctx_t *,
+        crypto_data_t *, crypto_data_t *, crypto_req_handle_t);
+    int (*decrypt_update)(crypto_ctx_t *,
+        crypto_data_t *, crypto_data_t *, crypto_req_handle_t);
+    int (*decrypt_final)(crypto_ctx_t *,
+        crypto_data_t *, crypto_req_handle_t);
+    int (*decrypt_atomic)(crypto_provider_handle_t, crypto_session_id_t,
+        crypto_mechanism_t *, crypto_key_t *, crypto_data_t *,
+        crypto_data_t *, crypto_spi_ctx_template_t, crypto_req_handle_t);
+} crypto_cipher_ops_t;
+
+/*
+ * The crypto_mac_ops structure contains pointers to MAC
+ * operations for cryptographic providers.  It is passed through
+ * the crypto_ops(9S) structure when providers register with the
+ * kernel using crypto_register_provider(9F).
+ */
+typedef struct crypto_mac_ops {
+    int (*mac_init)(crypto_ctx_t *,
+        crypto_mechanism_t *, crypto_key_t *,
+        crypto_spi_ctx_template_t, crypto_req_handle_t);
+    int (*mac)(crypto_ctx_t *,
+        crypto_data_t *, crypto_data_t *, crypto_req_handle_t);
+    int (*mac_update)(crypto_ctx_t *,
+        crypto_data_t *, crypto_req_handle_t);
+    int (*mac_final)(crypto_ctx_t *,
+        crypto_data_t *, crypto_req_handle_t);
+    int (*mac_atomic)(crypto_provider_handle_t, crypto_session_id_t,
+        crypto_mechanism_t *, crypto_key_t *, crypto_data_t *,
+        crypto_data_t *, crypto_spi_ctx_template_t,
+        crypto_req_handle_t);
+    int (*mac_verify_atomic)(crypto_provider_handle_t, crypto_session_id_t,
+        crypto_mechanism_t *, crypto_key_t *, crypto_data_t *,
+        crypto_data_t *, crypto_spi_ctx_template_t,
+        crypto_req_handle_t);
+} crypto_mac_ops_t;
+
+/*
+ * The crypto_sign_ops structure contains pointers to signing
+ * operations for cryptographic providers.  It is passed through
+ * the crypto_ops(9S) structure when providers register with the
+ * kernel using crypto_register_provider(9F).
+ */
+typedef struct crypto_sign_ops {
+    int (*sign_init)(crypto_ctx_t *,
+        crypto_mechanism_t *, crypto_key_t *, crypto_spi_ctx_template_t,
+        crypto_req_handle_t);
+    int (*sign)(crypto_ctx_t *,
+        crypto_data_t *, crypto_data_t *, crypto_req_handle_t);
+    int (*sign_update)(crypto_ctx_t *,
+        crypto_data_t *, crypto_req_handle_t);
+    int (*sign_final)(crypto_ctx_t *,
+        crypto_data_t *, crypto_req_handle_t);
+    int (*sign_atomic)(crypto_provider_handle_t, crypto_session_id_t,
+        crypto_mechanism_t *, crypto_key_t *, crypto_data_t *,
+        crypto_data_t *, crypto_spi_ctx_template_t,
+        crypto_req_handle_t);
+    int (*sign_recover_init)(crypto_ctx_t *, crypto_mechanism_t *,
+        crypto_key_t *, crypto_spi_ctx_template_t,
+        crypto_req_handle_t);
+    int (*sign_recover)(crypto_ctx_t *,
+        crypto_data_t *, crypto_data_t *, crypto_req_handle_t);
+    int (*sign_recover_atomic)(crypto_provider_handle_t,
+        crypto_session_id_t, crypto_mechanism_t *, crypto_key_t *,
+        crypto_data_t *, crypto_data_t *, crypto_spi_ctx_template_t,
+        crypto_req_handle_t);
+} crypto_sign_ops_t;
+
+/*
+ * The crypto_verify_ops structure contains pointers to verify
+ * operations for cryptographic providers.  It is passed through
+ * the crypto_ops(9S) structure when providers register with the
+ * kernel using crypto_register_provider(9F).
+ */
+typedef struct crypto_verify_ops {
+    int (*verify_init)(crypto_ctx_t *,
+        crypto_mechanism_t *, crypto_key_t *, crypto_spi_ctx_template_t,
+        crypto_req_handle_t);
+    int (*verify)(crypto_ctx_t *,
+        crypto_data_t *, crypto_data_t *, crypto_req_handle_t);
+    int (*verify_update)(crypto_ctx_t *,
+        crypto_data_t *, crypto_req_handle_t);
+    int (*verify_final)(crypto_ctx_t *,
+        crypto_data_t *, crypto_req_handle_t);
+    int (*verify_atomic)(crypto_provider_handle_t, crypto_session_id_t,
+        crypto_mechanism_t *, crypto_key_t *, crypto_data_t *,
+        crypto_data_t *, crypto_spi_ctx_template_t,
+        crypto_req_handle_t);
+    int (*verify_recover_init)(crypto_ctx_t *, crypto_mechanism_t *,
+        crypto_key_t *, crypto_spi_ctx_template_t,
+        crypto_req_handle_t);
+    int (*verify_recover)(crypto_ctx_t *,
+        crypto_data_t *, crypto_data_t *, crypto_req_handle_t);
+    int (*verify_recover_atomic)(crypto_provider_handle_t,
+        crypto_session_id_t, crypto_mechanism_t *, crypto_key_t *,
+        crypto_data_t *, crypto_data_t *, crypto_spi_ctx_template_t,
+        crypto_req_handle_t);
+} crypto_verify_ops_t;
+
+/*
+ * The crypto_dual_ops structure contains pointers to dual
+ * cipher and sign/verify operations for cryptographic providers.
+ * It is passed through the crypto_ops(9S) structure when
+ * providers register with the kernel using
+ * crypto_register_provider(9F).
+ */
+typedef struct crypto_dual_ops {
+    int (*digest_encrypt_update)(
+        crypto_ctx_t *, crypto_ctx_t *, crypto_data_t *,
+        crypto_data_t *, crypto_req_handle_t);
+    int (*decrypt_digest_update)(
+        crypto_ctx_t *, crypto_ctx_t *, crypto_data_t *,
+        crypto_data_t *, crypto_req_handle_t);
+    int (*sign_encrypt_update)(
+        crypto_ctx_t *, crypto_ctx_t *, crypto_data_t *,
+        crypto_data_t *, crypto_req_handle_t);
+    int (*decrypt_verify_update)(
+        crypto_ctx_t *, crypto_ctx_t *, crypto_data_t *,
+        crypto_data_t *, crypto_req_handle_t);
+} crypto_dual_ops_t;
+
+/*
+ * The crypto_dual_cipher_mac_ops structure contains pointers to dual
+ * cipher and MAC operations for cryptographic providers.
+ * It is passed through the crypto_ops(9S) structure when
+ * providers register with the kernel using
+ * crypto_register_provider(9F).
+ */
+typedef struct crypto_dual_cipher_mac_ops {
+    int (*encrypt_mac_init)(crypto_ctx_t *,
+        crypto_mechanism_t *, crypto_key_t *, crypto_mechanism_t *,
+        crypto_key_t *, crypto_spi_ctx_template_t,
+        crypto_spi_ctx_template_t, crypto_req_handle_t);
+    int (*encrypt_mac)(crypto_ctx_t *,
+        crypto_data_t *, crypto_dual_data_t *, crypto_data_t *,
+        crypto_req_handle_t);
+    int (*encrypt_mac_update)(crypto_ctx_t *,
+        crypto_data_t *, crypto_dual_data_t *, crypto_req_handle_t);
+    int (*encrypt_mac_final)(crypto_ctx_t *,
+        crypto_dual_data_t *, crypto_data_t *, crypto_req_handle_t);
+    int (*encrypt_mac_atomic)(crypto_provider_handle_t, crypto_session_id_t,
+        crypto_mechanism_t *, crypto_key_t *, crypto_mechanism_t *,
+        crypto_key_t *, crypto_data_t *, crypto_dual_data_t *,
+        crypto_data_t *, crypto_spi_ctx_template_t,
+        crypto_spi_ctx_template_t, crypto_req_handle_t);
+
+    int (*mac_decrypt_init)(crypto_ctx_t *,
+        crypto_mechanism_t *, crypto_key_t *, crypto_mechanism_t *,
+        crypto_key_t *, crypto_spi_ctx_template_t,
+        crypto_spi_ctx_template_t, crypto_req_handle_t);
+    int (*mac_decrypt)(crypto_ctx_t *,
+        crypto_dual_data_t *, crypto_data_t *, crypto_data_t *,
+        crypto_req_handle_t);
+    int (*mac_decrypt_update)(crypto_ctx_t *,
+        crypto_dual_data_t *, crypto_data_t *, crypto_req_handle_t);
+    int (*mac_decrypt_final)(crypto_ctx_t *,
+        crypto_data_t *, crypto_data_t *, crypto_req_handle_t);
+    int (*mac_decrypt_atomic)(crypto_provider_handle_t,
+        crypto_session_id_t, crypto_mechanism_t *, crypto_key_t *,
+        crypto_mechanism_t *, crypto_key_t *, crypto_dual_data_t *,
+        crypto_data_t *, crypto_data_t *, crypto_spi_ctx_template_t,
+        crypto_spi_ctx_template_t, crypto_req_handle_t);
+    int (*mac_verify_decrypt_atomic)(crypto_provider_handle_t,
+        crypto_session_id_t, crypto_mechanism_t *, crypto_key_t *,
+        crypto_mechanism_t *, crypto_key_t *, crypto_dual_data_t *,
+        crypto_data_t *, crypto_data_t *, crypto_spi_ctx_template_t,
+        crypto_spi_ctx_template_t, crypto_req_handle_t);
+} crypto_dual_cipher_mac_ops_t;
+
+/*
+ * The crypto_random_number_ops structure contains pointers to random
+ * number operations for cryptographic providers.  It is passed through
+ * the crypto_ops(9S) structure when providers register with the
+ * kernel using crypto_register_provider(9F).
+ */
+typedef struct crypto_random_number_ops {
+    int (*seed_random)(crypto_provider_handle_t, crypto_session_id_t,
+        uchar_t *, size_t, uint_t, uint32_t, crypto_req_handle_t);
+    int (*generate_random)(crypto_provider_handle_t, crypto_session_id_t,
+        uchar_t *, size_t, crypto_req_handle_t);
+} crypto_random_number_ops_t;
+
+/*
+ * Flag values for seed_random.
+ */
+#define    CRYPTO_SEED_NOW        0x00000001
+
+/*
+ * The crypto_session_ops structure contains pointers to session
+ * operations for cryptographic providers.  It is passed through
+ * the crypto_ops(9S) structure when providers register with the
+ * kernel using crypto_register_provider(9F).
+ */
+typedef struct crypto_session_ops {
+    int (*session_open)(crypto_provider_handle_t, crypto_session_id_t *,
+        crypto_req_handle_t);
+    int (*session_close)(crypto_provider_handle_t, crypto_session_id_t,
+        crypto_req_handle_t);
+    int (*session_login)(crypto_provider_handle_t, crypto_session_id_t,
+        crypto_user_type_t, char *, size_t, crypto_req_handle_t);
+    int (*session_logout)(crypto_provider_handle_t, crypto_session_id_t,
+        crypto_req_handle_t);
+} crypto_session_ops_t;
+
+/*
+ * The crypto_object_ops structure contains pointers to object
+ * operations for cryptographic providers.  It is passed through
+ * the crypto_ops(9S) structure when providers register with the
+ * kernel using crypto_register_provider(9F).
+ */
+typedef struct crypto_object_ops {
+    int (*object_create)(crypto_provider_handle_t, crypto_session_id_t,
+        crypto_object_attribute_t *, uint_t, crypto_object_id_t *,
+        crypto_req_handle_t);
+    int (*object_copy)(crypto_provider_handle_t, crypto_session_id_t,
+        crypto_object_id_t, crypto_object_attribute_t *, uint_t,
+        crypto_object_id_t *, crypto_req_handle_t);
+    int (*object_destroy)(crypto_provider_handle_t, crypto_session_id_t,
+        crypto_object_id_t, crypto_req_handle_t);
+    int (*object_get_size)(crypto_provider_handle_t, crypto_session_id_t,
+        crypto_object_id_t, size_t *, crypto_req_handle_t);
+    int (*object_get_attribute_value)(crypto_provider_handle_t,
+        crypto_session_id_t, crypto_object_id_t,
+        crypto_object_attribute_t *, uint_t, crypto_req_handle_t);
+    int (*object_set_attribute_value)(crypto_provider_handle_t,
+        crypto_session_id_t, crypto_object_id_t,
+        crypto_object_attribute_t *,  uint_t, crypto_req_handle_t);
+    int (*object_find_init)(crypto_provider_handle_t, crypto_session_id_t,
+        crypto_object_attribute_t *, uint_t, void **,
+        crypto_req_handle_t);
+    int (*object_find)(crypto_provider_handle_t, void *,
+        crypto_object_id_t *, uint_t, uint_t *, crypto_req_handle_t);
+    int (*object_find_final)(crypto_provider_handle_t, void *,
+        crypto_req_handle_t);
+} crypto_object_ops_t;
+
+/*
+ * The crypto_key_ops structure contains pointers to key
+ * operations for cryptographic providers.  It is passed through
+ * the crypto_ops(9S) structure when providers register with the
+ * kernel using crypto_register_provider(9F).
+ */
+typedef struct crypto_key_ops {
+    int (*key_generate)(crypto_provider_handle_t, crypto_session_id_t,
+        crypto_mechanism_t *, crypto_object_attribute_t *, uint_t,
+        crypto_object_id_t *, crypto_req_handle_t);
+    int (*key_generate_pair)(crypto_provider_handle_t, crypto_session_id_t,
+        crypto_mechanism_t *, crypto_object_attribute_t *, uint_t,
+        crypto_object_attribute_t *, uint_t, crypto_object_id_t *,
+        crypto_object_id_t *, crypto_req_handle_t);
+    int (*key_wrap)(crypto_provider_handle_t, crypto_session_id_t,
+        crypto_mechanism_t *, crypto_key_t *, crypto_object_id_t *,
+        uchar_t *, size_t *, crypto_req_handle_t);
+    int (*key_unwrap)(crypto_provider_handle_t, crypto_session_id_t,
+        crypto_mechanism_t *, crypto_key_t *, uchar_t *, size_t *,
+        crypto_object_attribute_t *, uint_t,
+        crypto_object_id_t *, crypto_req_handle_t);
+    int (*key_derive)(crypto_provider_handle_t, crypto_session_id_t,
+        crypto_mechanism_t *, crypto_key_t *, crypto_object_attribute_t *,
+        uint_t, crypto_object_id_t *, crypto_req_handle_t);
+    int (*key_check)(crypto_provider_handle_t, crypto_mechanism_t *,
+        crypto_key_t *);
+} crypto_key_ops_t;
+
+/*
+ * The crypto_provider_management_ops structure contains pointers
+ * to management operations for cryptographic providers.  It is passed
+ * through the crypto_ops(9S) structure when providers register with the
+ * kernel using crypto_register_provider(9F).
+ */
+typedef struct crypto_provider_management_ops {
+    int (*ext_info)(crypto_provider_handle_t,
+        crypto_provider_ext_info_t *, crypto_req_handle_t);
+    int (*init_token)(crypto_provider_handle_t, char *, size_t,
+        char *, crypto_req_handle_t);
+    int (*init_pin)(crypto_provider_handle_t, crypto_session_id_t,
+        char *, size_t, crypto_req_handle_t);
+    int (*set_pin)(crypto_provider_handle_t, crypto_session_id_t,
+        char *, size_t, char *, size_t, crypto_req_handle_t);
+} crypto_provider_management_ops_t;
+
+typedef struct crypto_mech_ops {
+    int (*copyin_mechanism)(crypto_provider_handle_t,
+        crypto_mechanism_t *, crypto_mechanism_t *, int *, int);
+    int (*copyout_mechanism)(crypto_provider_handle_t,
+        crypto_mechanism_t *, crypto_mechanism_t *, int *, int);
+    int (*free_mechanism)(crypto_provider_handle_t, crypto_mechanism_t *);
+} crypto_mech_ops_t;
+
+typedef struct crypto_nostore_key_ops {
+    int (*nostore_key_generate)(crypto_provider_handle_t,
+        crypto_session_id_t, crypto_mechanism_t *,
+        crypto_object_attribute_t *, uint_t, crypto_object_attribute_t *,
+        uint_t, crypto_req_handle_t);
+    int (*nostore_key_generate_pair)(crypto_provider_handle_t,
+        crypto_session_id_t, crypto_mechanism_t *,
+        crypto_object_attribute_t *, uint_t, crypto_object_attribute_t *,
+        uint_t, crypto_object_attribute_t *, uint_t,
+        crypto_object_attribute_t *, uint_t, crypto_req_handle_t);
+    int (*nostore_key_derive)(crypto_provider_handle_t, crypto_session_id_t,
+        crypto_mechanism_t *, crypto_key_t *, crypto_object_attribute_t *,
+        uint_t, crypto_object_attribute_t *, uint_t, crypto_req_handle_t);
+} crypto_nostore_key_ops_t;
+
+/*
+ * crypto_fips140_ops provides a function for FIPS 140 Power-On Self Test for
+ * those providers that are part of the Cryptographic Framework bounday.  See
+ * crypto_fips140_ops(9s) for details.
+ */
+typedef struct crypto_fips140_ops {
+    void (*fips140_post)(int *);
+} crypto_fips140_ops_t;
+
+/*
+ * The crypto_ops(9S) structure contains the structures containing
+ * the pointers to functions implemented by cryptographic providers.
+ * It is specified as part of the crypto_provider_info(9S)
+ * supplied by a provider when it registers with the kernel
+ * by calling crypto_register_provider(9F).
+ */
+typedef struct crypto_ops_v1 {
+    crypto_control_ops_t            *co_control_ops;
+    crypto_digest_ops_t            *co_digest_ops;
+    crypto_cipher_ops_t            *co_cipher_ops;
+    crypto_mac_ops_t            *co_mac_ops;
+    crypto_sign_ops_t            *co_sign_ops;
+    crypto_verify_ops_t            *co_verify_ops;
+    crypto_dual_ops_t            *co_dual_ops;
+    crypto_dual_cipher_mac_ops_t        *co_dual_cipher_mac_ops;
+    crypto_random_number_ops_t        *co_random_ops;
+    crypto_session_ops_t            *co_session_ops;
+    crypto_object_ops_t            *co_object_ops;
+    crypto_key_ops_t            *co_key_ops;
+    crypto_provider_management_ops_t    *co_provider_ops;
+    crypto_ctx_ops_t            *co_ctx_ops;
+} crypto_ops_v1_t;
+
+typedef struct crypto_ops_v2 {
+    crypto_ops_v1_t                v1_ops;
+    crypto_mech_ops_t            *co_mech_ops;
+} crypto_ops_v2_t;
+
+typedef struct crypto_ops_v3 {
+    crypto_ops_v2_t                v2_ops;
+    crypto_nostore_key_ops_t        *co_nostore_key_ops;
+} crypto_ops_v3_t;
+
+typedef struct crypto_ops_v4 {
+    crypto_ops_v3_t                v3_ops;
+    crypto_fips140_ops_t            *co_fips140_ops;
+} crypto_ops_v4_t;
+
+typedef struct crypto_ops_v5 {
+    crypto_ops_v4_t                v4_ops;
+    boolean_t                co_uio_userspace_ok;
+} crypto_ops_v5_t;
+
+typedef struct crypto_ops {
+    union {
+        crypto_ops_v5_t    cou_v5;
+        crypto_ops_v4_t    cou_v4;
+        crypto_ops_v3_t    cou_v3;
+        crypto_ops_v2_t    cou_v2;
+        crypto_ops_v1_t    cou_v1;
+    } cou;
+} crypto_ops_t;
+
+#define    co_control_ops            cou.cou_v1.co_control_ops
+#define    co_digest_ops            cou.cou_v1.co_digest_ops
+#define    co_cipher_ops            cou.cou_v1.co_cipher_ops
+#define    co_mac_ops            cou.cou_v1.co_mac_ops
+#define    co_sign_ops            cou.cou_v1.co_sign_ops
+#define    co_verify_ops            cou.cou_v1.co_verify_ops
+#define    co_dual_ops            cou.cou_v1.co_dual_ops
+#define    co_dual_cipher_mac_ops        cou.cou_v1.co_dual_cipher_mac_ops
+#define    co_random_ops            cou.cou_v1.co_random_ops
+#define    co_session_ops            cou.cou_v1.co_session_ops
+#define    co_object_ops            cou.cou_v1.co_object_ops
+#define    co_key_ops            cou.cou_v1.co_key_ops
+#define    co_provider_ops            cou.cou_v1.co_provider_ops
+#define    co_ctx_ops            cou.cou_v1.co_ctx_ops
+#define    co_mech_ops            cou.cou_v2.co_mech_ops
+#define    co_nostore_key_ops        cou.cou_v3.co_nostore_key_ops
+#define    co_fips140_ops            cou.cou_v4.co_fips140_ops
+#define    co_uio_userspace_ok        cou.cou_v5.co_uio_userspace_ok
+
+/*
+ * Provider device specification passed during registration.
+ *
+ * Software providers set the pi_provider_type field of provider_info_t
+ * to CRYPTO_SW_PROVIDER, and set the pd_sw field of
+ * crypto_provider_dev_t to the address of their modlinkage.
+ *
+ * Hardware providers set the pi_provider_type field of provider_info_t
+ * to CRYPTO_HW_PROVIDER, and set the pd_hw field of
+ * crypto_provider_dev_t to the dev_info structure corresponding
+ * to the device instance being registered.
+ *
+ * Logical providers set the pi_provider_type field of provider_info_t
+ * to CRYPTO_LOGICAL_PROVIDER, and set the pd_hw field of
+ * crypto_provider_dev_t to the dev_info structure corresponding
+ * to the device instance being registered.
+ */
+
+typedef union crypto_provider_dev {
+    struct modlinkage    *pd_sw; /* for CRYPTO_SW_PROVIDER */
+    dev_info_t        *pd_hw; /* for CRYPTO_HW_PROVIDER */
+} crypto_provider_dev_t;
+
+/*
+ * The mechanism info structure crypto_mech_info_t contains a function group
+ * bit mask cm_func_group_mask. This field, of type crypto_func_group_t,
+ * specifies the provider entry point that can be used a particular
+ * mechanism. The function group mask is a combination of the following values.
+ */
+
+typedef uint32_t crypto_func_group_t;
+
+#endif /* _KERNEL */
+
+#define    CRYPTO_FG_ENCRYPT        0x00000001 /* encrypt_init() */
+#define    CRYPTO_FG_DECRYPT        0x00000002 /* decrypt_init() */
+#define    CRYPTO_FG_DIGEST        0x00000004 /* digest_init() */
+#define    CRYPTO_FG_SIGN            0x00000008 /* sign_init() */
+#define    CRYPTO_FG_SIGN_RECOVER        0x00000010 /* sign_recover_init() */
+#define    CRYPTO_FG_VERIFY        0x00000020 /* verify_init() */
+#define    CRYPTO_FG_VERIFY_RECOVER    0x00000040 /* verify_recover_init() */
+#define    CRYPTO_FG_GENERATE        0x00000080 /* key_generate() */
+#define    CRYPTO_FG_GENERATE_KEY_PAIR    0x00000100 /* key_generate_pair() */
+#define    CRYPTO_FG_WRAP            0x00000200 /* key_wrap() */
+#define    CRYPTO_FG_UNWRAP        0x00000400 /* key_unwrap() */
+#define    CRYPTO_FG_DERIVE        0x00000800 /* key_derive() */
+#define    CRYPTO_FG_MAC            0x00001000 /* mac_init() */
+#define    CRYPTO_FG_ENCRYPT_MAC        0x00002000 /* encrypt_mac_init() */
+#define    CRYPTO_FG_MAC_DECRYPT        0x00004000 /* decrypt_mac_init() */
+#define    CRYPTO_FG_ENCRYPT_ATOMIC    0x00008000 /* encrypt_atomic() */
+#define    CRYPTO_FG_DECRYPT_ATOMIC    0x00010000 /* decrypt_atomic() */
+#define    CRYPTO_FG_MAC_ATOMIC        0x00020000 /* mac_atomic() */
+#define    CRYPTO_FG_DIGEST_ATOMIC        0x00040000 /* digest_atomic() */
+#define    CRYPTO_FG_SIGN_ATOMIC        0x00080000 /* sign_atomic() */
+#define    CRYPTO_FG_SIGN_RECOVER_ATOMIC   0x00100000 /* sign_recover_atomic() */
+#define    CRYPTO_FG_VERIFY_ATOMIC        0x00200000 /* verify_atomic() */
+#define    CRYPTO_FG_VERIFY_RECOVER_ATOMIC    0x00400000 /* verify_recover_atomic() */
+#define    CRYPTO_FG_ENCRYPT_MAC_ATOMIC    0x00800000 /* encrypt_mac_atomic() */
+#define    CRYPTO_FG_MAC_DECRYPT_ATOMIC    0x01000000 /* mac_decrypt_atomic() */
+#define    CRYPTO_FG_RESERVED        0x80000000
+
+/*
+ * Maximum length of the pi_provider_description field of the
+ * crypto_provider_info structure.
+ */
+#define    CRYPTO_PROVIDER_DESCR_MAX_LEN    64
+
+#ifdef _KERNEL
+
+/* Bit mask for all the simple operations */
+#define    CRYPTO_FG_SIMPLEOP_MASK    (CRYPTO_FG_ENCRYPT | CRYPTO_FG_DECRYPT | \
+    CRYPTO_FG_DIGEST | CRYPTO_FG_SIGN | CRYPTO_FG_VERIFY | CRYPTO_FG_MAC | \
+    CRYPTO_FG_ENCRYPT_ATOMIC | CRYPTO_FG_DECRYPT_ATOMIC |        \
+    CRYPTO_FG_MAC_ATOMIC | CRYPTO_FG_DIGEST_ATOMIC | CRYPTO_FG_SIGN_ATOMIC | \
+    CRYPTO_FG_VERIFY_ATOMIC)
+
+/* Bit mask for all the dual operations */
+#define    CRYPTO_FG_MAC_CIPHER_MASK    (CRYPTO_FG_ENCRYPT_MAC |    \
+    CRYPTO_FG_MAC_DECRYPT | CRYPTO_FG_ENCRYPT_MAC_ATOMIC |         \
+    CRYPTO_FG_MAC_DECRYPT_ATOMIC)
+
+/* Add other combos to CRYPTO_FG_DUAL_MASK */
+#define    CRYPTO_FG_DUAL_MASK    CRYPTO_FG_MAC_CIPHER_MASK
+
+/*
+ * The crypto_mech_info structure specifies one of the mechanisms
+ * supported by a cryptographic provider. The pi_mechanisms field of
+ * the crypto_provider_info structure contains a pointer to an array
+ * of crypto_mech_info's.
+ */
+typedef struct crypto_mech_info {
+    crypto_mech_name_t    cm_mech_name;
+    crypto_mech_type_t    cm_mech_number;
+    crypto_func_group_t    cm_func_group_mask;
+    ssize_t            cm_min_key_length;
+    ssize_t            cm_max_key_length;
+    uint32_t        cm_mech_flags;
+} crypto_mech_info_t;
+
+/* Alias the old name to the new name for compatibility. */
+#define    cm_keysize_unit    cm_mech_flags
+
+/*
+ * crypto_kcf_provider_handle_t is a handle allocated by the kernel.
+ * It is returned after the provider registers with
+ * crypto_register_provider(), and must be specified by the provider
+ * when calling crypto_unregister_provider(), and
+ * crypto_provider_notification().
+ */
+typedef uint_t crypto_kcf_provider_handle_t;
+
+/*
+ * Provider information. Passed as argument to crypto_register_provider(9F).
+ * Describes the provider and its capabilities. Multiple providers can
+ * register for the same device instance. In this case, the same
+ * pi_provider_dev must be specified with a different pi_provider_handle.
+ */
+typedef struct crypto_provider_info_v1 {
+    uint_t                pi_interface_version;
+    char                *pi_provider_description;
+    crypto_provider_type_t        pi_provider_type;
+    crypto_provider_dev_t        pi_provider_dev;
+    crypto_provider_handle_t    pi_provider_handle;
+    crypto_ops_t            *pi_ops_vector;
+    uint_t                pi_mech_list_count;
+    crypto_mech_info_t        *pi_mechanisms;
+    uint_t                pi_logical_provider_count;
+    crypto_kcf_provider_handle_t    *pi_logical_providers;
+} crypto_provider_info_v1_t;
+
+typedef struct crypto_provider_info_v2 {
+    crypto_provider_info_v1_t    v1_info;
+    uint_t                pi_flags;
+} crypto_provider_info_v2_t;
+
+typedef struct crypto_provider_info {
+    union {
+        crypto_provider_info_v2_t piu_v2;
+        crypto_provider_info_v1_t piu_v1;
+    } piu;
+} crypto_provider_info_t;
+
+#define    pi_interface_version        piu.piu_v1.pi_interface_version
+#define    pi_provider_description        piu.piu_v1.pi_provider_description
+#define    pi_provider_type        piu.piu_v1.pi_provider_type
+#define    pi_provider_dev            piu.piu_v1.pi_provider_dev
+#define    pi_provider_handle        piu.piu_v1.pi_provider_handle
+#define    pi_ops_vector            piu.piu_v1.pi_ops_vector
+#define    pi_mech_list_count        piu.piu_v1.pi_mech_list_count
+#define    pi_mechanisms            piu.piu_v1.pi_mechanisms
+#define    pi_logical_provider_count    piu.piu_v1.pi_logical_provider_count
+#define    pi_logical_providers        piu.piu_v1.pi_logical_providers
+#define    pi_flags            piu.piu_v2.pi_flags
+
+/* hidden providers can only be accessed via a logical provider */
+#define    CRYPTO_HIDE_PROVIDER        0x00000001
+/*
+ * provider can not do multi-part digest (updates) and has a limit
+ * on maximum input data that it can digest. The provider sets
+ * this value in crypto_provider_ext_info_t by implementing
+ * the ext_info entry point in the co_provider_ops vector.
+ */
+#define    CRYPTO_HASH_NO_UPDATE        0x00000002
+/*
+ * provider can not do multi-part HMAC (updates) and has a limit
+ * on maximum input data that it can hmac. The provider sets
+ * this value in crypto_provider_ext_info_t by implementing
+ * the ext_info entry point in the co_provider_ops vector.
+ */
+#define    CRYPTO_HMAC_NO_UPDATE        0x00000008
+
+/* provider can handle the request without returning a CRYPTO_QUEUED */
+#define    CRYPTO_SYNCHRONOUS        0x00000004
+
+#define    CRYPTO_PIFLAGS_RESERVED2    0x40000000
+#define    CRYPTO_PIFLAGS_RESERVED1    0x80000000
+
+/*
+ * Provider status passed by a provider to crypto_provider_notification(9F)
+ * and returned by the provider_stauts(9E) entry point.
+ */
+#define    CRYPTO_PROVIDER_READY        0
+#define    CRYPTO_PROVIDER_BUSY        1
+#define    CRYPTO_PROVIDER_FAILED        2
+
+/*
+ * Functions exported by Solaris to cryptographic providers. Providers
+ * call these functions to register and unregister, notify the kernel
+ * of state changes, and notify the kernel when a asynchronous request
+ * completed.
+ */
+extern int crypto_register_provider(crypto_provider_info_t *,
+        crypto_kcf_provider_handle_t *);
+extern int crypto_unregister_provider(crypto_kcf_provider_handle_t);
+extern void crypto_provider_notification(crypto_kcf_provider_handle_t, uint_t);
+extern void crypto_op_notification(crypto_req_handle_t, int);
+extern int crypto_kmflag(crypto_req_handle_t);
+
+#endif    /* _KERNEL */
+
+#ifdef    __cplusplus
+}
+#endif
+
+#endif    /* _SYS_CRYPTO_SPI_H */
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/extcheck/ExtCheck.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,410 +0,0 @@
-/*
- * Copyright (c) 1998, 2008, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.tools.extcheck;
-
-import java.util.*;
-import java.net.MalformedURLException;
-import java.util.Vector;
-import java.io.*;
-import java.util.StringTokenizer;
-import java.net.URL;
-import java.util.jar.JarFile;
-import java.util.jar.JarEntry;
-import java.util.jar.Manifest;
-import java.util.jar.Attributes;
-import java.util.jar.Attributes.Name;
-import java.net.URLConnection;
-import java.security.Permission;
-import java.util.jar.*;
-import java.net.JarURLConnection;
-import sun.net.www.ParseUtil;
-
-/**
- * ExtCheck reports on clashes between a specified (target)
- * jar file and jar files already installed in the extensions
- * directory.
- *
- * @author Benedict Gomes
- * @since 1.2
- */
-
-public class ExtCheck {
-
-    private static final boolean DEBUG = false;
-
-    // The following strings hold the values of the version variables
-    // for the target jar file
-    private String targetSpecTitle;
-    private String targetSpecVersion;
-    private String targetSpecVendor;
-    private String targetImplTitle;
-    private String targetImplVersion;
-    private String targetImplVendor;
-    private String targetsealed;
-
-    /* Flag to indicate whether extra information should be dumped to stdout */
-    private boolean verboseFlag;
-
-    /*
-     * Create a new instance of the jar reporting tool for a particular
-     * targetFile.
-     * @param targetFile is the file to compare against.
-     * @param verbose indicates whether to dump filenames and manifest
-     *                information (on conflict) to the standard output.
-     */
-    static ExtCheck create(File targetFile, boolean verbose) {
-        return new ExtCheck(targetFile, verbose);
-    }
-
-    private ExtCheck(File targetFile, boolean verbose) {
-        verboseFlag = verbose;
-        investigateTarget(targetFile);
-    }
-
-
-    private void investigateTarget(File targetFile) {
-        verboseMessage("Target file:" + targetFile);
-        Manifest targetManifest = null;
-        try {
-            File canon = new File(targetFile.getCanonicalPath());
-            URL url = ParseUtil.fileToEncodedURL(canon);
-            if (url != null){
-                JarLoader loader = new JarLoader(url);
-                JarFile jarFile = loader.getJarFile();
-                targetManifest = jarFile.getManifest();
-            }
-        } catch (MalformedURLException e){
-            error("Malformed URL ");
-        } catch (IOException e) {
-            error("IO Exception ");
-        }
-        if (targetManifest == null)
-            error("No manifest available in "+targetFile);
-        Attributes attr = targetManifest.getMainAttributes();
-        if (attr != null) {
-            targetSpecTitle   = attr.getValue(Name.SPECIFICATION_TITLE);
-            targetSpecVersion = attr.getValue(Name.SPECIFICATION_VERSION);
-            targetSpecVendor  = attr.getValue(Name.SPECIFICATION_VENDOR);
-            targetImplTitle   = attr.getValue(Name.IMPLEMENTATION_TITLE);
-            targetImplVersion = attr.getValue(Name.IMPLEMENTATION_VERSION);
-            targetImplVendor  = attr.getValue(Name.IMPLEMENTATION_VENDOR);
-            targetsealed      = attr.getValue(Name.SEALED);
-        } else {
-            error("No attributes available in the manifest");
-        }
-        if (targetSpecTitle == null)
-            error("The target file does not have a specification title");
-        if (targetSpecVersion == null)
-            error("The target file does not have a specification version");
-        verboseMessage("Specification title:" + targetSpecTitle);
-        verboseMessage("Specification version:" + targetSpecVersion);
-        if (targetSpecVendor != null)
-            verboseMessage("Specification vendor:" + targetSpecVendor);
-        if (targetImplVersion != null)
-            verboseMessage("Implementation version:" + targetImplVersion);
-        if (targetImplVendor != null)
-            verboseMessage("Implementation vendor:" + targetImplVendor);
-        verboseMessage("");
-    }
-
-    /**
-     * Verify that none of the jar files in the install directory
-     * has the same specification-title and the same or a newer
-     * specification-version.
-     *
-     * @return Return true if the target jar file is newer
-     *        than any installed jar file with the same specification-title,
-     *        otherwise return false
-     */
-    boolean checkInstalledAgainstTarget(){
-        String s = System.getProperty("java.ext.dirs");
-        File [] dirs;
-        if (s != null) {
-            StringTokenizer st =
-                new StringTokenizer(s, File.pathSeparator);
-            int count = st.countTokens();
-            dirs = new File[count];
-            for (int i = 0; i < count; i++) {
-                dirs[i] = new File(st.nextToken());
-            }
-        } else {
-            dirs = new File[0];
-        }
-
-        boolean result = true;
-        for (int i = 0; i < dirs.length; i++) {
-            String[] files = dirs[i].list();
-            if (files != null) {
-                for (int j = 0; j < files.length; j++) {
-                    try {
-                        File f = new File(dirs[i],files[j]);
-                        File canon = new File(f.getCanonicalPath());
-                        URL url = ParseUtil.fileToEncodedURL(canon);
-                        if (url != null){
-                            result = result && checkURLRecursively(1,url);
-                        }
-                    } catch (MalformedURLException e){
-                        error("Malformed URL");
-                    } catch (IOException e) {
-                        error("IO Exception");
-                    }
-                }
-            }
-        }
-        if (result) {
-            generalMessage("No conflicting installed jar found.");
-        } else {
-            generalMessage("Conflicting installed jar found. "
-                           + " Use -verbose for more information.");
-        }
-        return result;
-    }
-
-    /**
-     * Recursively verify that a jar file, and any urls mentioned
-     * in its class path, do not conflict with the target jar file.
-     *
-     * @param indent is the current nesting level
-     * @param url is the path to the jar file being checked.
-     * @return true if there is no newer URL, otherwise false
-     */
-    private boolean checkURLRecursively(int indent, URL url)
-        throws IOException
-    {
-        verboseMessage("Comparing with " + url);
-        JarLoader jarloader = new JarLoader(url);
-        JarFile j = jarloader.getJarFile();
-        Manifest man = j.getManifest();
-        if (man != null) {
-            Attributes attr = man.getMainAttributes();
-            if (attr != null){
-                String title   = attr.getValue(Name.SPECIFICATION_TITLE);
-                String version = attr.getValue(Name.SPECIFICATION_VERSION);
-                String vendor  = attr.getValue(Name.SPECIFICATION_VENDOR);
-                String implTitle   = attr.getValue(Name.IMPLEMENTATION_TITLE);
-                String implVersion
-                    = attr.getValue(Name.IMPLEMENTATION_VERSION);
-                String implVendor  = attr.getValue(Name.IMPLEMENTATION_VENDOR);
-                String sealed      = attr.getValue(Name.SEALED);
-                if (title != null){
-                    if (title.equals(targetSpecTitle)){
-                        if (version != null){
-                            if (version.equals(targetSpecVersion) ||
-                                isNotOlderThan(version,targetSpecVersion)){
-                                verboseMessage("");
-                                verboseMessage("CONFLICT DETECTED ");
-                                verboseMessage("Conflicting file:"+ url);
-                                verboseMessage("Installed Version:" +
-                                               version);
-                                if (implTitle != null)
-                                    verboseMessage("Implementation Title:"+
-                                                   implTitle);
-                                if (implVersion != null)
-                                    verboseMessage("Implementation Version:"+
-                                                   implVersion);
-                                if (implVendor != null)
-                                    verboseMessage("Implementation Vendor:"+
-                                                   implVendor);
-                                return false;
-                            }
-                        }
-                    }
-                }
-            }
-        }
-        boolean result = true;
-        URL[] loaderList = jarloader.getClassPath();
-        if (loaderList != null) {
-            for(int i=0; i < loaderList.length; i++){
-                if (url != null){
-                    boolean res =  checkURLRecursively(indent+1,loaderList[i]);
-                    result = res && result;
-                }
-            }
-        }
-        return result;
-    }
-
-    /**
-     *  See comment in method java.lang.Package.isCompatibleWith.
-     *  Return true if already is not older than target. i.e. the
-     *  target file may be superseded by a file already installed
-     */
-    private boolean isNotOlderThan(String already,String target)
-        throws NumberFormatException
-    {
-            if (already == null || already.length() < 1) {
-            throw new NumberFormatException("Empty version string");
-        }
-
-            // Until it matches scan and compare numbers
-            StringTokenizer dtok = new StringTokenizer(target, ".", true);
-            StringTokenizer stok = new StringTokenizer(already, ".", true);
-        while (dtok.hasMoreTokens() || stok.hasMoreTokens()) {
-            int dver;
-            int sver;
-            if (dtok.hasMoreTokens()) {
-                dver = Integer.parseInt(dtok.nextToken());
-            } else
-                dver = 0;
-
-            if (stok.hasMoreTokens()) {
-                sver = Integer.parseInt(stok.nextToken());
-            } else
-                sver = 0;
-
-                if (sver < dver)
-                        return false;                // Known to be incompatible
-                if (sver > dver)
-                        return true;                // Known to be compatible
-
-                // Check for and absorb separators
-                if (dtok.hasMoreTokens())
-                        dtok.nextToken();
-                if (stok.hasMoreTokens())
-                        stok.nextToken();
-                // Compare next component
-            }
-            // All components numerically equal
-        return true;
-    }
-
-
-    /**
-     * Prints out message if the verboseFlag is set
-     */
-    void verboseMessage(String message){
-        if (verboseFlag) {
-            System.err.println(message);
-        }
-    }
-
-    void generalMessage(String message){
-        System.err.println(message);
-    }
-
-    /**
-     * Throws a RuntimeException with a message describing the error.
-     */
-    static void error(String message) throws RuntimeException {
-        throw new RuntimeException(message);
-    }
-
-
-    /**
-     * Inner class used to represent a loader of resources and classes
-     * from a base URL. Somewhat modified version of code in
-     * sun.misc.URLClassPath.JarLoader
-     */
-    private static class JarLoader {
-        private final URL base;
-        private JarFile jar;
-        private URL csu;
-
-        /*
-         * Creates a new Loader for the specified URL.
-         */
-        JarLoader(URL url) {
-            String urlName = url + "!/";
-            URL tmpBaseURL = null;
-            try {
-                tmpBaseURL = new URL("jar","",urlName);
-                jar = findJarFile(url);
-                csu = url;
-            } catch (MalformedURLException e) {
-                ExtCheck.error("Malformed url "+urlName);
-            } catch (IOException e) {
-                ExtCheck.error("IO Exception occurred");
-            }
-            base = tmpBaseURL;
-
-        }
-
-        /*
-         * Returns the base URL for this Loader.
-         */
-        URL getBaseURL() {
-            return base;
-        }
-
-        JarFile getJarFile() {
-            return jar;
-        }
-
-        private JarFile findJarFile(URL url) throws IOException {
-             // Optimize case where url refers to a local jar file
-             if ("file".equals(url.getProtocol())) {
-                 String path = url.getFile().replace('/', File.separatorChar);
-                 File file = new File(path);
-                 if (!file.exists()) {
-                     throw new FileNotFoundException(path);
-                 }
-                 return new JarFile(path);
-             }
-             URLConnection uc = getBaseURL().openConnection();
-             //uc.setRequestProperty(USER_AGENT_JAVA_VERSION, JAVA_VERSION);
-             return ((JarURLConnection)uc).getJarFile();
-         }
-
-
-        /*
-         * Returns the JAR file local class path, or null if none.
-         */
-        URL[] getClassPath() throws IOException {
-            Manifest man = jar.getManifest();
-            if (man != null) {
-                Attributes attr = man.getMainAttributes();
-                if (attr != null) {
-                    String value = attr.getValue(Name.CLASS_PATH);
-                    if (value != null) {
-                        return parseClassPath(csu, value);
-                    }
-                }
-            }
-            return null;
-        }
-
-        /*
-         * Parses value of the Class-Path manifest attribute and returns
-         * an array of URLs relative to the specified base URL.
-         */
-        private URL[] parseClassPath(URL base, String value)
-            throws MalformedURLException
-        {
-            StringTokenizer st = new StringTokenizer(value);
-            URL[] urls = new URL[st.countTokens()];
-            int i = 0;
-            while (st.hasMoreTokens()) {
-                String path = st.nextToken();
-                urls[i] = new URL(base, path);
-                i++;
-            }
-            return urls;
-        }
-    }
-
-
-}
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/extcheck/Main.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,90 +0,0 @@
-/*
- * Copyright (c) 1998, 2008, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.tools.extcheck;
-
-import java.io.*;
-
-/**
- * Main program of extcheck
- */
-
-public final class Main {
-    public static final String INSUFFICIENT = "Insufficient number of arguments";
-    public static final String MISSING = "Missing <jar file> argument";
-    public static final String DOES_NOT_EXIST = "Jarfile does not exist: ";
-    public static final String EXTRA = "Extra command line argument: ";
-
-    /**
-     * Terminates with one of the following codes
-     *  1 A newer (or same version) jar file is already installed
-     *  0 No newer jar file was found
-     *  -1 An internal error occurred
-     */
-    public static void main(String args[]) {
-        try {
-            realMain(args);
-        } catch (Exception ex) {
-            System.err.println(ex.getMessage());
-            System.exit(-1);
-        }
-    }
-
-    public static void realMain(String[] args) throws Exception {
-        if (args.length < 1) {
-            usage(INSUFFICIENT);
-        }
-        int argIndex = 0;
-        boolean verboseFlag = false;
-        if (args[argIndex].equals("-verbose")) {
-            verboseFlag = true;
-            argIndex++;
-            if (argIndex >= args.length) {
-                usage(MISSING);
-            }
-        }
-        String jarName = args[argIndex];
-        argIndex++;
-        File jarFile = new File(jarName);
-        if (!jarFile.exists()){
-            usage(DOES_NOT_EXIST + jarName);
-        }
-        if (argIndex < args.length) {
-            usage(EXTRA + args[argIndex]);
-        }
-        ExtCheck jt = ExtCheck.create(jarFile,verboseFlag);
-        boolean result = jt.checkInstalledAgainstTarget();
-        if (result) {
-            System.exit(0);
-        } else {
-            System.exit(1);
-        }
-    }
-
-    private static void usage(String msg) throws Exception {
-        throw new Exception(msg + "\nUsage: extcheck [-verbose] <jar file>");
-    }
-}
-
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/BerDecoder.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,757 +0,0 @@
-/*
- * Copyright (c) 1997, 2007, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-package com.sun.jmx.snmp;
-
-
-
-
-/**
- * The <CODE>BerDecoder</CODE> class is used for decoding
- * BER-encoded data.
- *
- * A <CODE>BerDecoder</CODE> needs to be set up with the byte string containing
- * the encoding. It maintains a current position in the byte string.
- *
- * Methods allows to fetch integer, string, OID, etc., from the current
- * position. After a fetch the current position is moved forward.
- *
- * A fetch throws a <CODE>BerException</CODE> if the encoding is not of the
- * expected type.
- *
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- *
- * @since 1.5
- */
-
-public class BerDecoder {
-
-  /**
-  * Constructs a new decoder and attaches it to the specified byte string.
-  *
-  * @param b The byte string containing the encoded data.
-  */
-
-  public BerDecoder(byte b[]) {
-    bytes = b ;
-    reset() ;
-  }
-
-  public void reset() {
-    next = 0 ;
-    stackTop = 0 ;
-  }
-
-  /**
-  * Fetch an integer.
-  *
-  * @return The decoded integer.
-  *
-  * @exception BerException Current position does not point to an integer.
-  */
-
-  public int fetchInteger() throws BerException {
-    return fetchInteger(IntegerTag) ;
-  }
-
-
-  /**
-  * Fetch an integer with the specified tag.
-  *
-  * @param tag The expected tag.
-  *
-  * @return The decoded integer.
-  *
-  * @exception BerException Current position does not point to an integer
-  *                         or the tag is not the expected one.
-  */
-
-  public int fetchInteger(int tag) throws BerException {
-    int result = 0 ;
-    final int backup = next ;
-    try {
-      if (fetchTag() != tag) {
-        throw new BerException() ;
-      }
-      result = fetchIntegerValue() ;
-    }
-    catch(BerException e) {
-      next = backup ;
-      throw e ;
-    }
-
-    return result ;
-  }
-
-
-
-  /**
-  * Fetch an integer and return a long value.
-  *
-  * @return The decoded integer.
-  *
-  * @exception BerException Current position does not point to an integer.
-  */
-
-  public long fetchIntegerAsLong() throws BerException {
-    return fetchIntegerAsLong(IntegerTag) ;
-  }
-
-
-  /**
-  * Fetch an integer with the specified tag and return a long value.
-  *
-  * @param tag The expected tag.
-  *
-  * @return The decoded integer.
-  *
-  * @exception BerException Current position does not point to an integer
-  *                         or the tag is not the expected one.
-  */
-
-  public long fetchIntegerAsLong(int tag) throws BerException {
-    long result = 0 ;
-    final int backup = next ;
-    try {
-      if (fetchTag() != tag) {
-        throw new BerException() ;
-      }
-      result = fetchIntegerValueAsLong() ;
-    }
-    catch(BerException e) {
-      next = backup ;
-      throw e ;
-    }
-
-    return result ;
-  }
-
-
-
-  /**
-  * Fetch an octet string.
-  *
-  * @return The decoded string.
-  *
-  * @exception BerException Current position does not point to an octet string.
-  */
-
-  public byte[] fetchOctetString() throws BerException {
-    return fetchOctetString(OctetStringTag) ;
-  }
-
-
-  /**
-  * Fetch an octet string with a specified tag.
-  *
-  * @param tag The expected tag.
-  *
-  * @return The decoded string.
-  *
-  * @exception BerException Current position does not point to an octet string
-  *                         or the tag is not the expected one.
-  */
-
-  public byte[] fetchOctetString(int tag) throws BerException {
-    byte[] result = null ;
-    final int backup = next ;
-    try {
-      if (fetchTag() != tag) {
-        throw new BerException() ;
-      }
-      result = fetchStringValue() ;
-    }
-    catch(BerException e) {
-      next = backup ;
-      throw e ;
-    }
-
-    return result ;
-  }
-
-
-  /**
-  * Fetch an object identifier.
-  *
-  * @return The decoded object identifier as an array of long.
-  */
-
-  public long[] fetchOid() throws BerException {
-    return fetchOid(OidTag) ;
-  }
-
-
-  /**
-  * Fetch an object identifier with a specified tag.
-  *
-  * @param tag The expected tag.
-  *
-  * @return The decoded object identifier as an array of long.
-  *
-  * @exception BerException Current position does not point to an oid
-  *                         or the tag is not the expected one.
-  */
-
-  public long[] fetchOid(int tag) throws BerException {
-    long[] result = null ;
-    final int backup = next ;
-    try {
-      if (fetchTag() != tag) {
-        throw new BerException() ;
-      }
-      result = fetchOidValue() ;
-    }
-    catch(BerException e) {
-      next = backup ;
-      throw e ;
-    }
-
-    return result ;
-  }
-
-
-  /**
-  * Fetch a <CODE>NULL</CODE> value.
-  *
-  * @exception BerException Current position does not point to <CODE>NULL</CODE> value.
-  */
-
-  public void fetchNull() throws BerException {
-    fetchNull(NullTag) ;
-  }
-
-
-  /**
-  * Fetch a <CODE>NULL</CODE> value with a specified tag.
-  *
-  * @param tag The expected tag.
-  *
-  * @exception BerException Current position does not point to
-  *            <CODE>NULL</CODE> value or the tag is not the expected one.
-  */
-
-  public void fetchNull(int tag) throws BerException {
-    final int backup = next ;
-    try {
-      if (fetchTag() != tag) {
-        throw new BerException() ;
-      }
-      final int length = fetchLength();
-      if (length != 0) throw new BerException();
-    }
-    catch(BerException e) {
-      next = backup ;
-      throw e ;
-    }
-  }
-
-
-
-  /**
-  * Fetch an <CODE>ANY</CODE> value. In fact, this method does not decode anything
-  * it simply returns the next TLV as an array of bytes.
-  *
-  * @return The TLV as a byte array.
-  *
-  * @exception BerException The next TLV is really badly encoded...
-  */
-
-  public byte[] fetchAny() throws BerException {
-    byte[] result = null ;
-    final int backup = next ;
-    try {
-      final int tag = fetchTag() ;
-      final int contentLength = fetchLength() ;
-      if (contentLength < 0) throw new BerException() ;
-      final int tlvLength = next + contentLength - backup ;
-      if (contentLength > (bytes.length - next))
-          throw new IndexOutOfBoundsException("Decoded length exceeds buffer");
-      final byte[] data = new byte[tlvLength] ;
-      java.lang.System.arraycopy(bytes,backup,data,0,tlvLength);
-      // for (int i = 0 ; i < tlvLength ; i++) {
-      //  data[i] = bytes[backup + i] ;
-      // }
-      next = next + contentLength ;
-      result = data;
-    }
-    catch(IndexOutOfBoundsException e) {
-      next = backup ;
-      throw new BerException() ;
-    }
-    // catch(Error e) {
-    //    debug("fetchAny: Error decoding BER: " + e);
-    //    throw e;
-    // }
-
-    return result ;
-  }
-
-
-  /**
-  * Fetch an <CODE>ANY</CODE> value with a specific tag.
-  *
-  * @param tag The expected tag.
-  *
-  * @return The TLV as a byte array.
-  *
-  * @exception BerException The next TLV is really badly encoded...
-  */
-
-  public byte[] fetchAny(int tag) throws BerException {
-    if (getTag() != tag) {
-      throw new BerException() ;
-    }
-    return fetchAny() ;
-  }
-
-
-
-  /**
-  * Fetch a sequence header.
-  * The decoder computes the end position of the sequence and push it
-  * on its stack.
-  *
-  * @exception BerException Current position does not point to a sequence header.
-  */
-
-  public void openSequence() throws BerException {
-    openSequence(SequenceTag) ;
-  }
-
-
-  /**
-  * Fetch a sequence header with a specific tag.
-  *
-  * @param tag The expected tag.
-  *
-  * @exception BerException Current position does not point to a sequence header
-  *                         or the tag is not the expected one.
-  */
-
-  public void openSequence(int tag) throws BerException {
-    final int backup = next ;
-    try {
-      if (fetchTag() != tag) {
-        throw new BerException() ;
-      }
-      final int l = fetchLength() ;
-      if (l < 0) throw new BerException();
-      if (l > (bytes.length - next)) throw new BerException();
-      stackBuf[stackTop++] = next + l ;
-    }
-    catch(BerException e) {
-      next = backup ;
-      throw e ;
-    }
-  }
-
-
-  /**
-  * Close a sequence.
-  * The decode pull the stack and verifies that the current position
-  * matches with the calculated end of the sequence. If not it throws
-  * an exception.
-  *
-  * @exception BerException The sequence is not expected to finish here.
-  */
-
-  public void closeSequence() throws BerException {
-    if (stackBuf[stackTop - 1] == next) {
-      stackTop-- ;
-    }
-    else {
-      throw new BerException() ;
-    }
-  }
-
-
-  /**
-  * Return <CODE>true</CODE> if the end of the current sequence is not reached.
-  * When this method returns <CODE>false</CODE>, <CODE>closeSequence</CODE> can (and must) be
-  * invoked.
-  *
-  * @return <CODE>true</CODE> if there is still some data in the sequence.
-  */
-
-  public boolean cannotCloseSequence() {
-    return (next < stackBuf[stackTop - 1]) ;
-  }
-
-
-  /**
-  * Get the tag of the data at the current position.
-  * Current position is unchanged.
-  *
-  * @return The next tag.
-  */
-
-  public int getTag() throws BerException {
-    int result = 0 ;
-    final int backup = next ;
-    try {
-      result = fetchTag() ;
-    }
-    finally {
-      next = backup ;
-    }
-
-    return result ;
-  }
-
-
-
-  public String toString() {
-    final StringBuffer result = new StringBuffer(bytes.length * 2) ;
-    for (int i = 0 ; i < bytes.length ; i++) {
-      final int b = (bytes[i] > 0) ? bytes[i] : bytes[i] + 256 ;
-      if (i == next) {
-        result.append("(") ;
-      }
-      result.append(Character.forDigit(b / 16, 16)) ;
-      result.append(Character.forDigit(b % 16, 16)) ;
-      if (i == next) {
-        result.append(")") ;
-      }
-    }
-    if (bytes.length == next) {
-      result.append("()") ;
-    }
-
-    return new String(result) ;
-  }
-
-
-  //
-  // Some standard tags
-  //
-  public final static int BooleanTag      = 1 ;
-  public final static int IntegerTag      = 2 ;
-  public final static int OctetStringTag  = 4 ;
-  public final static int NullTag          = 5 ;
-  public final static int OidTag          = 6 ;
-  public final static int SequenceTag      = 0x30 ;
-
-
-
-
-  ////////////////////////// PRIVATE ///////////////////////////////
-
-
-
-  /**
-  * Fetch a tag and move the current position forward.
-  *
-  * @return The tag
-  */
-
-  private final int fetchTag() throws BerException {
-    int result = 0 ;
-    final int backup = next ;
-
-    try {
-      final byte b0 = bytes[next++] ;
-      result = (b0 >= 0) ? b0 : b0 + 256 ;
-      if ((result & 31) == 31) {
-        while ((bytes[next] & 128) != 0) {
-          result = result << 7 ;
-          result = result | (bytes[next++] & 127);
-        }
-      }
-    }
-    catch(IndexOutOfBoundsException e) {
-      next = backup ;
-      throw new BerException() ;
-    }
-
-    return result ;
-  }
-
-
-  /**
-  * Fetch a length and move the current position forward.
-  *
-  * @return The length
-  */
-
-  private final int fetchLength() throws BerException {
-    int result = 0 ;
-    final int backup = next ;
-
-    try {
-      final byte b0 = bytes[next++] ;
-      if (b0 >= 0) {
-        result = b0 ;
-      }
-      else {
-        for (int c = 128 + b0 ; c > 0 ; c--) {
-          final byte bX = bytes[next++] ;
-          result = result << 8 ;
-          result = result | ((bX >= 0) ? bX : bX+256) ;
-        }
-      }
-    }
-    catch(IndexOutOfBoundsException e) {
-      next = backup ;
-      throw new BerException() ;
-    }
-
-    return result ;
-  }
-
-
-  /**
-  * Fetch an integer value and move the current position forward.
-  *
-  * @return The integer
-  */
-
-  private int fetchIntegerValue() throws BerException {
-    int result = 0 ;
-    final int backup = next ;
-
-    try {
-      final int length = fetchLength() ;
-      if (length <= 0) throw new BerException() ;
-      if (length > (bytes.length - next)) throw
-          new IndexOutOfBoundsException("Decoded length exceeds buffer");
-      final int end = next + length ;
-      result = bytes[next++] ;
-      while (next < end) {
-        final byte b = bytes[next++] ;
-        if (b < 0) {
-          result = (result << 8) | (256 + b) ;
-        }
-        else {
-          result = (result << 8) | b ;
-        }
-      }
-    }
-    catch(BerException e) {
-      next = backup ;
-      throw e ;
-    }
-    catch(IndexOutOfBoundsException e) {
-      next = backup ;
-      throw new BerException() ;
-    }
-    catch(ArithmeticException e) {
-      next = backup ;
-      throw new BerException() ;
-    }
-    return result ;
-  }
-
-
-  /**
-  * Fetch an integer value and return a long value.
-  * FIX ME: someday we could have only on fetchIntegerValue() which always
-  * returns a long value.
-  *
-  * @return The integer
-  */
-
-  private final long fetchIntegerValueAsLong() throws BerException {
-    long result = 0 ;
-    final int backup = next ;
-
-    try {
-      final int length = fetchLength() ;
-      if (length <= 0) throw new BerException() ;
-      if (length > (bytes.length - next)) throw
-          new IndexOutOfBoundsException("Decoded length exceeds buffer");
-
-      final int end = next + length ;
-      result = bytes[next++] ;
-      while (next < end) {
-        final byte b = bytes[next++] ;
-        if (b < 0) {
-          result = (result << 8) | (256 + b) ;
-        }
-        else {
-          result = (result << 8) | b ;
-        }
-      }
-    }
-    catch(BerException e) {
-      next = backup ;
-      throw e ;
-    }
-    catch(IndexOutOfBoundsException e) {
-      next = backup ;
-      throw new BerException() ;
-    }
-    catch(ArithmeticException e) {
-      next = backup ;
-      throw new BerException() ;
-    }
-    return result ;
-  }
-
-
-  /**
-  * Fetch a byte string and move the current position forward.
-  *
-  * @return The byte string
-  */
-
-  private byte[] fetchStringValue() throws BerException {
-    byte[] result = null ;
-    final int backup = next ;
-
-    try {
-      final int length = fetchLength() ;
-      if (length < 0) throw new BerException() ;
-      if (length > (bytes.length - next))
-          throw new IndexOutOfBoundsException("Decoded length exceeds buffer");
-      final byte data[] = new byte[length] ;
-      java.lang.System.arraycopy(bytes,next,data,0,length);
-      next += length;
-      //      int i = 0 ;
-      //      while (i < length) {
-      //          result[i++] = bytes[next++] ;
-      //      }
-      result = data;
-    }
-    catch(BerException e) {
-        next = backup ;
-      throw e ;
-    }
-    catch(IndexOutOfBoundsException e) {
-      next = backup ;
-      throw new BerException() ;
-    }
-    catch(ArithmeticException e) {
-      next = backup ;
-      throw new BerException() ;
-    }
-    // catch(Error e) {
-    //  debug("fetchStringValue: Error decoding BER: " + e);
-    //  throw e;
-    // }
-
-    return result ;
-  }
-
-
-
-  /**
-  * Fetch an oid and move the current position forward.
-  *
-  * @return The oid
-  */
-
-  private final long[] fetchOidValue() throws BerException {
-    long[] result = null ;
-    final int backup = next ;
-
-    try {
-      final int length = fetchLength() ;
-      if (length <= 0) throw new BerException() ;
-      if (length > (bytes.length - next))
-          throw new IndexOutOfBoundsException("Decoded length exceeds buffer");
-      // Count how many bytes have their 8th bit to 0
-      // -> this gives the number of components in the oid
-      int subidCount = 2 ;
-      for (int i = 1 ; i < length ; i++) {
-        if ((bytes[next + i] & 0x80) == 0) {
-          subidCount++ ;
-        }
-      }
-      final int datalen = subidCount;
-      final long[] data = new long[datalen];
-      final byte b0 = bytes[next++] ;
-
-      // bugId 4641746
-      // The 8th bit of the first byte should always be set to 0
-      if (b0 < 0) throw new BerException();
-
-      // bugId 4641746
-      // The first sub Id cannot be greater than 2
-      final long lb0 =  b0 / 40 ;
-      if (lb0 > 2) throw new BerException();
-
-      final long lb1 = b0 % 40;
-      data[0] = lb0 ;
-      data[1] = lb1 ;
-      int i = 2 ;
-      while (i < datalen) {
-        long subid = 0 ;
-        byte b = bytes[next++] ;
-        while ((b & 0x80) != 0) {
-          subid = (subid << 7) | (b & 0x7f) ;
-          // bugId 4654674
-          if (subid < 0) throw new BerException();
-          b = bytes[next++] ;
-        }
-        subid = (subid << 7) | b ;
-        // bugId 4654674
-        if (subid < 0) throw new BerException();
-        data[i++] = subid ;
-      }
-      result = data;
-    }
-    catch(BerException e) {
-      next = backup ;
-      throw e ;
-    }
-    catch(IndexOutOfBoundsException e) {
-      next = backup ;
-      throw new BerException() ;
-    }
-    // catch(Error e) {
-    //  debug("fetchOidValue: Error decoding BER: " + e);
-    //  throw e;
-    // }
-
-    return result ;
-  }
-
-    // private static final void debug(String str) {
-    //   System.out.println(str);
-    // }
-
-  //
-  // This is the byte array containing the encoding.
-  //
-  private final byte bytes[];
-
-  //
-  // This is the current location. It is the next byte
-  // to be decoded. It's an index in bytes[].
-  //
-  private int next = 0 ;
-
-  //
-  // This is the stack where end of sequences are kept.
-  // A value is computed and pushed in it each time openSequence()
-  // is invoked.
-  // A value is pulled and checked each time closeSequence() is called.
-  //
-  private final int stackBuf[] = new int[200] ;
-  private int stackTop = 0 ;
-
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/BerEncoder.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,477 +0,0 @@
-/*
- * Copyright (c) 1997, 2007, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-package com.sun.jmx.snmp;
-
-
-/**
- * The <CODE>BerEncoder</CODE> class is used for encoding data using BER.
- *
- * A <CODE>BerEncoder</CODE> needs to be set up with a byte buffer. The encoded
- * data are stored in this byte buffer.
- * <P>
- * NOTE : the buffer is filled from end to start. This means the caller
- * needs to encode its data in the reverse order.
- *
- *
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- *
- * @since 1.5
- */
-
-public class BerEncoder {
-
-  /**
-  * Constructs a new encoder and attaches it to the specified byte string.
-  *
-  * @param b The byte string containing the encoded data.
-  */
-
-  public BerEncoder(byte b[]) {
-    bytes = b ;
-    start = b.length ;
-    stackTop = 0 ;
-  }
-
-
-  /**
-  * Trim the encoding data and returns the length of the encoding.
-  *
-  * The encoder does backward encoding : so the bytes buffer is
-  * filled from end to start. The encoded data must be shift before
-  * the buffer can be used. This is the purpose of the <CODE>trim</CODE> method.
-  *
-  * After a call to the <CODE>trim</CODE> method, the encoder is reinitialized and <CODE>putXXX</CODE>
-  * overwrite any existing encoded data.
-  *
-  * @return The length of the encoded data.
-  */
-
-  public int trim() {
-    final int result = bytes.length - start ;
-
-    // for (int i = start ; i < bytes.length ; i++) {
-    //  bytes[i-start] = bytes[i] ;
-    // }
-    if (result > 0)
-        java.lang.System.arraycopy(bytes,start,bytes,0,result);
-
-    start = bytes.length ;
-    stackTop = 0 ;
-
-    return result ;
-  }
-
-  /**
-  * Put an integer.
-  *
-  * @param v The integer to encode.
-  */
-
-  public void putInteger(int v) {
-    putInteger(v, IntegerTag) ;
-  }
-
-
-  /**
-  * Put an integer with the specified tag.
-  *
-  * @param v The integer to encode.
-  * @param tag The tag to encode.
-  */
-
-  public void putInteger(int v, int tag) {
-    putIntegerValue(v) ;
-    putTag(tag) ;
-  }
-
-
-
-  /**
-  * Put an integer expressed as a long.
-  *
-  * @param v The long to encode.
-  */
-
-  public void putInteger(long v) {
-    putInteger(v, IntegerTag) ;
-  }
-
-
-  /**
-  * Put an integer expressed as a long with the specified tag.
-  *
-  * @param v The long to encode
-  * @param tag The tag to encode.
-  */
-
-  public void putInteger(long v, int tag) {
-    putIntegerValue(v) ;
-    putTag(tag) ;
-  }
-
-
-
-  /**
-  * Put an octet string.
-  *
-  * @param s The bytes to encode
-  */
-
-  public void putOctetString(byte[] s) {
-    putOctetString(s, OctetStringTag) ;
-  }
-
-
-  /**
-  * Put an octet string with a specified tag.
-  *
-  * @param s The bytes to encode
-  * @param tag The tag to encode.
-  */
-
-  public void putOctetString(byte[] s, int tag) {
-    putStringValue(s) ;
-    putTag(tag) ;
-  }
-
-
-  /**
-  * Put an object identifier.
-  *
-  * @param s The oid to encode.
-  */
-
-  public void putOid(long[] s) {
-    putOid(s, OidTag) ;
-  }
-
-
-  /**
-  * Put an object identifier with a specified tag.
-  *
-  * @param s The integer to encode.
-  * @param tag The tag to encode.
-  */
-
-  public void putOid(long[] s, int tag) {
-    putOidValue(s) ;
-    putTag(tag) ;
-  }
-
-
-  /**
-  * Put a <CODE>NULL</CODE> value.
-  */
-
-  public void putNull() {
-    putNull(NullTag) ;
-  }
-
-
-  /**
-  * Put a <CODE>NULL</CODE> value with a specified tag.
-  *
-  * @param tag The tag to encode.
-  */
-
-  public void putNull(int tag) {
-    putLength(0) ;
-    putTag(tag) ;
-  }
-
-
-
-  /**
-  * Put an <CODE>ANY</CODE> value. In fact, this method does not encode anything.
-  * It simply copies the specified bytes into the encoding.
-  *
-  * @param s The encoding of the <CODE>ANY</CODE> value.
-  */
-
-  public void putAny(byte[] s) {
-        putAny(s, s.length) ;
-  }
-
-
-  /**
-  * Put an <CODE>ANY</CODE> value. Only the first <CODE>byteCount</CODE> are considered.
-  *
-  * @param s The encoding of the <CODE>ANY</CODE> value.
-  * @param byteCount The number of bytes of the encoding.
-  */
-
-  public void putAny(byte[] s, int byteCount) {
-      java.lang.System.arraycopy(s,0,bytes,start-byteCount,byteCount);
-      start -= byteCount;
-      //    for (int i = byteCount - 1 ; i >= 0 ; i--) {
-      //      bytes[--start] = s[i] ;
-      //    }
-  }
-
-
-  /**
-  * Open a sequence.
-  * The encoder push the current position on its stack.
-  */
-
-  public void openSequence() {
-    stackBuf[stackTop++] = start ;
-  }
-
-
-  /**
-  * Close a sequence.
-  * The decode pull the stack to know the end of the current sequence.
-  */
-
-  public void closeSequence() {
-    closeSequence(SequenceTag) ;
-  }
-
-
-  /**
-  * Close a sequence with the specified tag.
-  */
-
-  public void closeSequence(int tag) {
-    final int end = stackBuf[--stackTop] ;
-    putLength(end - start) ;
-    putTag(tag) ;
-  }
-
-
-  //
-  // Some standard tags
-  //
-  public final static int BooleanTag      = 1 ;
-  public final static int IntegerTag      = 2 ;
-  public final static int OctetStringTag  = 4 ;
-  public final static int NullTag          = 5 ;
-  public final static int OidTag          = 6 ;
-  public final static int SequenceTag      = 0x30 ;
-
-
-
-
-  ////////////////////////// PROTECTED ///////////////////////////////
-
-
-
-  /**
-  * Put a tag and move the current position backward.
-  *
-  * @param tag The tag to encode.
-  */
-
-  protected final void putTag(int tag) {
-    if (tag < 256) {
-      bytes[--start] = (byte)tag ;
-    }
-    else {
-      while (tag != 0) {
-        bytes[--start] = (byte)(tag & 127) ;
-        tag = tag << 7 ;
-      }
-    }
-  }
-
-
-  /**
-  * Put a length and move the current position backward.
-  *
-  * @param length The length to encode.
-  */
-
-  protected final void putLength(final int length) {
-    if (length < 0) {
-      throw new IllegalArgumentException() ;
-    }
-    else if (length < 128) {
-      bytes[--start] = (byte)length ;
-    }
-    else if (length < 256) {
-      bytes[--start] = (byte)length ;
-      bytes[--start] = (byte)0x81 ;
-    }
-    else if (length < 65536) {
-      bytes[--start] = (byte)(length) ;
-      bytes[--start] = (byte)(length >> 8) ;
-      bytes[--start] = (byte)0x82 ;
-    }
-    else if (length < 16777126) {
-      bytes[--start] = (byte)(length) ;
-      bytes[--start] = (byte)(length >> 8) ;
-      bytes[--start] = (byte)(length >> 16) ;
-      bytes[--start] = (byte)0x83 ;
-    }
-    else {
-      bytes[--start] = (byte)(length) ;
-      bytes[--start] = (byte)(length >> 8) ;
-      bytes[--start] = (byte)(length >> 16) ;
-      bytes[--start] = (byte)(length >> 24) ;
-      bytes[--start] = (byte)0x84 ;
-    }
-  }
-
-
-  /**
-  * Put an integer value and move the current position backward.
-  *
-  * @param v The integer to encode.
-  */
-
-  protected final void putIntegerValue(int v) {
-    final int end = start ;
-    int mask = 0x7f800000 ;
-    int byteNeeded = 4 ;
-    if (v < 0) {
-      while (((mask & v) == mask) && (byteNeeded > 1)) {
-        mask = mask >> 8 ;
-        byteNeeded-- ;
-      }
-    }
-    else {
-      while (((mask & v) == 0) && (byteNeeded > 1)) {
-        mask = mask >> 8 ;
-        byteNeeded-- ;
-      }
-    }
-    for (int i = 0 ; i < byteNeeded ; i++) {
-      bytes[--start] = (byte)v ;
-      v =  v >> 8 ;
-    }
-    putLength(end - start) ;
-  }
-
-
-  /**
-  * Put an integer value expressed as a long.
-  *
-  * @param v The integer to encode.
-  */
-
-  protected final void putIntegerValue(long v) {
-    final int end = start ;
-    long mask = 0x7f80000000000000L ;
-    int byteNeeded = 8 ;
-    if (v < 0) {
-      while (((mask & v) == mask) && (byteNeeded > 1)) {
-        mask = mask >> 8 ;
-        byteNeeded-- ;
-      }
-    }
-    else {
-      while (((mask & v) == 0) && (byteNeeded > 1)) {
-        mask = mask >> 8 ;
-        byteNeeded-- ;
-      }
-    }
-    for (int i = 0 ; i < byteNeeded ; i++) {
-      bytes[--start] = (byte)v ;
-      v =  v >> 8 ;
-    }
-    putLength(end - start) ;
-  }
-
-
-  /**
-  * Put a byte string and move the current position backward.
-  *
-  * @param s The byte string to encode.
-  */
-
-  protected final void putStringValue(byte[] s) {
-      final int datalen = s.length;
-      java.lang.System.arraycopy(s,0,bytes,start-datalen,datalen);
-      start -= datalen;
-      // for (int i = s.length - 1 ; i >= 0 ; i--) {
-      //   bytes[--start] = s[i] ;
-      // }
-      putLength(datalen) ;
-  }
-
-
-
-  /**
-  * Put an oid and move the current position backward.
-  *
-  * @param s The oid to encode.
-  */
-
-  protected final void putOidValue(final long[] s) {
-      final int end = start ;
-      final int slength = s.length;
-
-      // bugId 4641746: 0, 1, and 2 are legal values.
-      if ((slength < 2) || (s[0] > 2) || (s[1] >= 40)) {
-          throw new IllegalArgumentException() ;
-      }
-      for (int i = slength - 1 ; i >= 2 ; i--) {
-          long c = s[i] ;
-          if (c < 0) {
-              throw new IllegalArgumentException() ;
-          }
-          else if (c < 128) {
-              bytes[--start] = (byte)c ;
-          }
-          else {
-              bytes[--start] = (byte)(c & 127) ;
-              c = c >> 7 ;
-              while (c != 0) {
-                  bytes[--start] = (byte)(c | 128) ;
-                  c = c >> 7 ;
-              }
-          }
-      }
-      bytes[--start] = (byte)(s[0] * 40 + s[1]) ;
-      putLength(end - start) ;
-  }
-
-
-  //
-  // This is the byte array containing the encoding.
-  //
-  protected final byte bytes[];
-
-  //
-  // This is the index of the first byte of the encoding.
-  // It is initialized to <CODE>bytes.length</CODE> and decrease each time
-  // an value is put in the encoder.
-  //
-  protected int start = -1 ;
-
-  //
-  // This is the stack where end of sequences are kept.
-  // A value is computed and pushed in it each time the <CODE>openSequence</CODE> method
-  // is invoked.
-  // A value is pulled and checked each time the <CODE>closeSequence</CODE> method is called.
-  //
-  protected final int stackBuf[] = new int[200] ;
-  protected int stackTop = 0 ;
-
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/BerException.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-/*
- * Copyright (c) 1997, 2007, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-package com.sun.jmx.snmp;
-
-
-
-
-
-/**
- * Exception thrown when a BER encoding/decoding error occurs.
- *
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- *
- * @since 1.5
- */
-
-public class BerException extends Exception {
-  private static final long serialVersionUID = 494709767137042951L;
-
-  public static final int BAD_VERSION=1;
-
-  private int errorType= 0;
-
-  public BerException() {
-    errorType= 0;
-  }
-
-  public BerException(int x) {
-    errorType= x;
-  }
-
-  public boolean isInvalidSnmpVersion() {
-    if (errorType == BAD_VERSION)
-      return true;
-    else
-      return false;
-  }
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/EnumRowStatus.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,304 +0,0 @@
-/*
- * 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.jmx.snmp;
-
-import java.io.Serializable;
-import java.util.Hashtable;
-
-
-/**
- * This class is an internal class which is used to represent RowStatus
- * codes as defined in RFC 2579.
- *
- * It defines an additional code, <i>unspecified</i>, which is
- * implementation specific, and is used to identify
- * unspecified actions (when for instance the RowStatus variable
- * is not present in the varbind list) or uninitialized values.
- *
- * mibgen does not generate objects of this class but any variable
- * using the RowStatus textual convention can be converted into an
- * object of this class thanks to the
- * <code>EnumRowStatus(Enumerated valueIndex)</code> constructor.
- *
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- **/
-
-public class EnumRowStatus extends Enumerated implements Serializable {
-    private static final long serialVersionUID = 8966519271130162420L;
-
-    /**
-     * This value is SNMP Runtime implementation specific, and is used to identify
-     * unspecified actions (when for instance the RowStatus variable
-     * is not present in the varbind list) or uninitialized values.
-     */
-    public final static int unspecified   = 0;
-
-    /**
-     * This value corresponds to the <i>active</i> RowStatus, as defined in
-     * RFC 2579 from SMIv2:
-     * <ul>
-     * <i>active</i> indicates that the conceptual row is available for
-     * use by the managed device;
-     * </ul>
-     */
-    public final static int active        = 1;
-
-    /**
-     * This value corresponds to the <i>notInService</i> RowStatus, as
-     * defined in RFC 2579 from SMIv2:
-     * <ul>
-     * <i>notInService</i> indicates that the conceptual
-     * row exists in the agent, but is unavailable for use by
-     * the managed device; <i>notInService</i> has
-     * no implication regarding the internal consistency of
-     * the row, availability of resources, or consistency with
-     * the current state of the managed device;
-     * </ul>
-     **/
-    public final static int notInService  = 2;
-
-    /**
-     * This value corresponds to the <i>notReady</i> RowStatus, as defined
-     * in RFC 2579 from SMIv2:
-     * <ul>
-     * <i>notReady</i> indicates that the conceptual row
-     * exists in the agent, but is missing information
-     * necessary in order to be available for use by the
-     * managed device (i.e., one or more required columns in
-     * the conceptual row have not been instantiated);
-     * </ul>
-     */
-    public final static int notReady      = 3;
-
-    /**
-     * This value corresponds to the <i>createAndGo</i> RowStatus,
-     * as defined in RFC 2579 from SMIv2:
-     * <ul>
-     * <i>createAndGo</i> is supplied by a management
-     * station wishing to create a new instance of a
-     * conceptual row and to have its status automatically set
-     * to active, making it available for use by the managed
-     * device;
-     * </ul>
-     */
-    public final static int createAndGo   = 4;
-
-    /**
-     * This value corresponds to the <i>createAndWait</i> RowStatus,
-     * as defined in RFC 2579 from SMIv2:
-     * <ul>
-     * <i>createAndWait</i> is supplied by a management
-     * station wishing to create a new instance of a
-     * conceptual row (but not make it available for use by
-     * the managed device);
-     * </ul>
-     */
-    public final static int createAndWait = 5;
-
-    /**
-     * This value corresponds to the <i>destroy</i> RowStatus, as defined in
-     * RFC 2579 from SMIv2:
-     * <ul>
-     * <i>destroy</i> is supplied by a management station
-     * wishing to delete all of the instances associated with
-     * an existing conceptual row.
-     * </ul>
-     */
-    public final static int destroy       = 6;
-
-    /**
-     * Build an <code>EnumRowStatus</code> from an <code>int</code>.
-     * @param valueIndex should be either 0 (<i>unspecified</i>), or one of
-     *        the values defined in RFC 2579.
-     * @exception IllegalArgumentException if the given
-     *            <code>valueIndex</code> is not valid.
-     **/
-    public EnumRowStatus(int valueIndex)
-        throws IllegalArgumentException {
-        super(valueIndex);
-    }
-
-    /**
-     * Build an <code>EnumRowStatus</code> from an <code>Enumerated</code>.
-     * @param valueIndex should be either 0 (<i>unspecified</i>), or one of
-     *        the values defined in RFC 2579.
-     * @exception IllegalArgumentException if the given
-     *            <code>valueIndex</code> is not valid.
-     **/
-    public EnumRowStatus(Enumerated valueIndex)
-        throws IllegalArgumentException {
-        this(valueIndex.intValue());
-    }
-
-    /**
-     * Build an <code>EnumRowStatus</code> from a <code>long</code>.
-     * @param valueIndex should be either 0 (<i>unspecified</i>), or one of
-     *        the values defined in RFC 2579.
-     * @exception IllegalArgumentException if the given
-     *            <code>valueIndex</code> is not valid.
-     **/
-    public EnumRowStatus(long valueIndex)
-        throws IllegalArgumentException {
-        this((int)valueIndex);
-    }
-
-    /**
-     * Build an <code>EnumRowStatus</code> from an <code>Integer</code>.
-     * @param valueIndex should be either 0 (<i>unspecified</i>), or one of
-     *        the values defined in RFC 2579.
-     * @exception IllegalArgumentException if the given
-     *            <code>valueIndex</code> is not valid.
-     **/
-    public EnumRowStatus(Integer valueIndex)
-        throws IllegalArgumentException {
-        super(valueIndex);
-    }
-
-    /**
-     * Build an <code>EnumRowStatus</code> from a <code>Long</code>.
-     * @param valueIndex should be either 0 (<i>unspecified</i>), or one of
-     *        the values defined in RFC 2579.
-     * @exception IllegalArgumentException if the given
-     *            <code>valueIndex</code> is not valid.
-     **/
-    public EnumRowStatus(Long valueIndex)
-        throws IllegalArgumentException {
-        this(valueIndex.longValue());
-    }
-
-    /**
-     * Build an <code>EnumRowStatus</code> with <i>unspecified</i> value.
-     **/
-    public EnumRowStatus()
-        throws IllegalArgumentException {
-        this(unspecified);
-    }
-
-    /**
-     * Build an <code>EnumRowStatus</code> from a <code>String</code>.
-     * @param x should be either "unspecified", or one of
-     *        the values defined in RFC 2579 ("active", "notReady", etc...)
-     * @exception IllegalArgumentException if the given String
-     *            <code>x</code> is not valid.
-     **/
-    public EnumRowStatus(String x)
-        throws IllegalArgumentException {
-        super(x);
-    }
-
-    /**
-     * Build an <code>EnumRowStatus</code> from an <code>SnmpInt</code>.
-     * @param valueIndex should be either 0 (<i>unspecified</i>), or one of
-     *        the values defined in RFC 2579.
-     * @exception IllegalArgumentException if the given
-     *            <code>valueIndex</code> is not valid.
-     **/
-    public EnumRowStatus(SnmpInt valueIndex)
-        throws IllegalArgumentException {
-        this(valueIndex.intValue());
-    }
-
-    /**
-     * Build an SnmpValue from this object.
-     *
-     * @exception IllegalArgumentException if this object holds an
-     *            <i>unspecified</i> value.
-     * @return an SnmpInt containing this object value.
-     **/
-    public SnmpInt toSnmpValue()
-        throws IllegalArgumentException {
-        if (value == unspecified)
-            throw new
-        IllegalArgumentException("`unspecified' is not a valid SNMP value.");
-        return new SnmpInt(value);
-    }
-
-    /**
-     * Check that the given <code>value</code> is valid.
-     *
-     * Valid values are:
-     * <ul><li><i>unspecified(0)</i></li>
-     *     <li><i>active(1)</i></li>
-     *     <li><i>notInService(2)</i></li>
-     *     <li><i>notReady(3)</i></li>
-     *     <li><i>createAndGo(4)</i></li>
-     *     <li><i>createAndWait(5)</i></li>
-     *     <li><i>destroy(6)</i></li>
-     * </ul>
-     *
-     **/
-    static public boolean isValidValue(int value) {
-        if (value < 0) return false;
-        if (value > 6) return false;
-        return true;
-    }
-
-    // Documented in Enumerated
-    //
-    @Override
-    protected Hashtable<Integer, String> getIntTable() {
-        return EnumRowStatus.getRSIntTable();
-    }
-
-    // Documented in Enumerated
-    //
-    @Override
-    protected Hashtable<String, Integer> getStringTable() {
-        return  EnumRowStatus.getRSStringTable();
-    }
-
-    static Hashtable<Integer, String> getRSIntTable() {
-        return intTable ;
-    }
-
-    static Hashtable<String, Integer> getRSStringTable() {
-        return stringTable ;
-    }
-
-    // Initialize the mapping tables.
-    //
-    final static Hashtable<Integer, String> intTable = new Hashtable<>();
-    final static Hashtable<String, Integer> stringTable = new Hashtable<>();
-    static  {
-        intTable.put(0, "unspecified");
-        intTable.put(3, "notReady");
-        intTable.put(6, "destroy");
-        intTable.put(2, "notInService");
-        intTable.put(5, "createAndWait");
-        intTable.put(1, "active");
-        intTable.put(4, "createAndGo");
-        stringTable.put("unspecified", 0);
-        stringTable.put("notReady", 3);
-        stringTable.put("destroy", 6);
-        stringTable.put("notInService", 2);
-        stringTable.put("createAndWait", 5);
-        stringTable.put("active", 1);
-        stringTable.put("createAndGo", 4);
-    }
-
-
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/Enumerated.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,221 +0,0 @@
-/*
- * Copyright (c) 1999, 2014, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.jmx.snmp;
-
-
-import java.io.*;
-import java.util.Hashtable;
-import java.util.*;
-
-
-
-/** This class is used for implementing enumerated values.
- *
- * An enumeration is represented by a class derived from Enumerated.
- * The derived class defines what are the permitted values in the enumeration.
- *
- * An enumerated value is represented by an instance of the derived class.
- * It can be represented :
- *  - as an integer
- *  - as a string
- *
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- */
-@SuppressWarnings("serial") // JDK implementation class
-abstract public class Enumerated  implements Serializable {
-
-  /**
-   * Construct an enumerated with a default value.
-   * The default value is the first available in getIntTable().
-    * @exception IllegalArgumentException One of the arguments passed to the method is illegal or inappropriate.
-   */
-  public Enumerated() throws IllegalArgumentException {
-    Enumeration<Integer> e =getIntTable().keys();
-    if (e.hasMoreElements()) {
-      value = e.nextElement().intValue() ;
-    }
-    else {
-      throw new IllegalArgumentException() ;
-    }
-  }
-
-  /**
-   * Construct an enumerated from its integer form.
-   *
-   * @param valueIndex The integer form.
-   * @exception IllegalArgumentException One of the arguments passed to
-   *            the method is illegal or inappropriate.
-   */
-  public Enumerated(int valueIndex) throws IllegalArgumentException {
-    if (getIntTable().get(valueIndex) == null) {
-      throw new IllegalArgumentException() ;
-    }
-    value = valueIndex ;
-  }
-
-  /**
-   * Construct an enumerated from its Integer form.
-   *
-   * @param valueIndex The Integer form.
-   * @exception IllegalArgumentException One of the arguments passed to
-   *            the method is illegal or inappropriate.
-   */
-  public Enumerated(Integer valueIndex) throws IllegalArgumentException {
-    if (getIntTable().get(valueIndex) == null) {
-      throw new IllegalArgumentException() ;
-    }
-    value = valueIndex.intValue() ;
-  }
-
-
-  /**
-   * Construct an enumerated from its string form.
-   *
-   * @param valueString The string form.
-   * @exception IllegalArgumentException One of the arguments passed
-   *  to the method is illegal or inappropriate.
-   */
-  public Enumerated(String valueString) throws IllegalArgumentException {
-    Integer index = getStringTable().get(valueString) ;
-    if (index == null) {
-      throw new IllegalArgumentException() ;
-    }
-    else {
-      value = index.intValue() ;
-    }
-  }
-
-
-  /**
-   * Return the integer form of the enumerated.
-   *
-   * @return The integer form
-   */
-
-  public int intValue() {
-    return value ;
-  }
-
-
-  /**
-   * Returns an Java enumeration of the permitted integers.
-   *
-   * @return An enumeration of Integer instances
-   */
-
-  public Enumeration<Integer> valueIndexes() {
-    return getIntTable().keys() ;
-  }
-
-
-  /**
-   * Returns an Java enumeration of the permitted strings.
-   *
-   * @return An enumeration of String instances
-   */
-
-  public Enumeration<String> valueStrings() {
-    return getStringTable().keys() ;
-  }
-
-
-  /**
-   * Compares this enumerated to the specified enumerated.
-   *
-   * The result is true if and only if the argument is not null
-   * and is of the same class.
-   *
-   * @param obj The object to compare with.
-   *
-   * @return True if this and obj are the same; false otherwise
-   */
-  @Override
-  public boolean equals(Object obj) {
-
-    return ((obj != null) &&
-            (getClass() == obj.getClass()) &&
-            (value == ((Enumerated)obj).value)) ;
-  }
-
-
-  /**
-   * Returns the hash code for this enumerated.
-   *
-   * @return A hash code value for this object.
-   */
-  @Override
-  public int hashCode() {
-    String hashString = getClass().getName() + String.valueOf(value) ;
-    return hashString.hashCode() ;
-  }
-
-
-  /**
-   * Returns the string form of this enumerated.
-   *
-   * @return The string for for this object.
-   */
-  @Override
-  public String toString() {
-    return getIntTable().get(value);
-  }
-
-
-  /**
-   * Returns the hashtable of the integer forms.
-   * getIntTable().get(x) returns the string form associated
-   * to the integer x.
-   *
-   * This method must be implemented by the derived class.
-   *
-   * @return An hashtable for read-only purpose
-   */
-
-  protected abstract Hashtable<Integer,String>  getIntTable() ;
-
-
-
-  /**
-   * Returns the hashtable of the string forms.
-   * getStringTable().get(s) returns the integer form associated
-   * to the string s.
-   *
-   * This method must be implemented by the derived class.
-   *
-   * @return An hashtable for read-only purpose
-   */
-
-  protected abstract Hashtable<String,Integer> getStringTable() ;
-
-
-  /**
-   * This variable keeps the integer form of the enumerated.
-   * The string form is retrieved using getIntTable().
-   */
-  protected int value ;
-
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/ASCII_CharStream.README	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-WARNING : ASCII_CharStream.java must be PATCHED.
-
-The following methods should be removed after javacc generation.
-The goal is to simplify 100%-pure testing (see bug 4127719).
-
-
-  /**
-   * @deprecated 
-   * @see #getEndColumn
-   */
-
-  public final int getColumn() {
-     return bufcolumn[bufpos];
-  }
-
-  /**
-   * @deprecated 
-   * @see #getEndLine
-   */
-
-  public final int getLine() {
-     return bufline[bufpos];
-  }
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/ASCII_CharStream.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,402 +0,0 @@
-/*
- * Copyright (c) 1997, 2004, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/* Generated By:JavaCC: Do not edit this line. ASCII_CharStream.java Version 0.7pre6 */
-package com.sun.jmx.snmp.IPAcl;
-
-/**
- * An implementation of interface CharStream, where the stream is assumed to
- * contain only ASCII characters (without unicode processing).
- */
-
-final class ASCII_CharStream
-{
-  public static final boolean staticFlag = false;
-  int bufsize;
-  int available;
-  int tokenBegin;
-  public int bufpos = -1;
-  private int bufline[];
-  private int bufcolumn[];
-
-  private int column = 0;
-  private int line = 1;
-
-  private boolean prevCharIsCR = false;
-  private boolean prevCharIsLF = false;
-
-  private java.io.Reader inputStream;
-
-  private char[] buffer;
-  private int maxNextCharInd = 0;
-  private int inBuf = 0;
-
-  private final void ExpandBuff(boolean wrapAround)
-  {
-     char[] newbuffer = new char[bufsize + 2048];
-     int newbufline[] = new int[bufsize + 2048];
-     int newbufcolumn[] = new int[bufsize + 2048];
-
-     try
-     {
-        if (wrapAround)
-        {
-           System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin);
-           System.arraycopy(buffer, 0, newbuffer,
-                                             bufsize - tokenBegin, bufpos);
-           buffer = newbuffer;
-
-           System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin);
-           System.arraycopy(bufline, 0, newbufline, bufsize - tokenBegin, bufpos);
-           bufline = newbufline;
-
-           System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin);
-           System.arraycopy(bufcolumn, 0, newbufcolumn, bufsize - tokenBegin, bufpos);
-           bufcolumn = newbufcolumn;
-
-           maxNextCharInd = (bufpos += (bufsize - tokenBegin));
-        }
-        else
-        {
-           System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin);
-           buffer = newbuffer;
-
-           System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin);
-           bufline = newbufline;
-
-           System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin);
-           bufcolumn = newbufcolumn;
-
-           maxNextCharInd = (bufpos -= tokenBegin);
-        }
-     }
-     catch (Throwable t)
-     {
-        throw new Error(t.getMessage());
-     }
-
-
-     bufsize += 2048;
-     available = bufsize;
-     tokenBegin = 0;
-  }
-
-  private final void FillBuff() throws java.io.IOException
-  {
-     if (maxNextCharInd == available)
-     {
-        if (available == bufsize)
-        {
-           if (tokenBegin > 2048)
-           {
-              bufpos = maxNextCharInd = 0;
-              available = tokenBegin;
-           }
-           else if (tokenBegin < 0)
-              bufpos = maxNextCharInd = 0;
-           else
-              ExpandBuff(false);
-        }
-        else if (available > tokenBegin)
-           available = bufsize;
-        else if ((tokenBegin - available) < 2048)
-           ExpandBuff(true);
-        else
-           available = tokenBegin;
-     }
-
-     int i;
-     try {
-        if ((i = inputStream.read(buffer, maxNextCharInd,
-                                    available - maxNextCharInd)) == -1)
-        {
-           inputStream.close();
-           throw new java.io.IOException();
-        }
-        else
-           maxNextCharInd += i;
-        return;
-     }
-     catch(java.io.IOException e) {
-        --bufpos;
-        backup(0);
-        if (tokenBegin == -1)
-           tokenBegin = bufpos;
-        throw e;
-     }
-  }
-
-  public final char BeginToken() throws java.io.IOException
-  {
-     tokenBegin = -1;
-     char c = readChar();
-     tokenBegin = bufpos;
-
-     return c;
-  }
-
-  private final void UpdateLineColumn(char c)
-  {
-     column++;
-
-     if (prevCharIsLF)
-     {
-        prevCharIsLF = false;
-        line += (column = 1);
-     }
-     else if (prevCharIsCR)
-     {
-        prevCharIsCR = false;
-        if (c == '\n')
-        {
-           prevCharIsLF = true;
-        }
-        else
-           line += (column = 1);
-     }
-
-     switch (c)
-     {
-        case '\r' :
-           prevCharIsCR = true;
-           break;
-        case '\n' :
-           prevCharIsLF = true;
-           break;
-        case '\t' :
-           column--;
-           column += (8 - (column & 07));
-           break;
-        default :
-           break;
-     }
-
-     bufline[bufpos] = line;
-     bufcolumn[bufpos] = column;
-  }
-
-  public final char readChar() throws java.io.IOException
-  {
-     if (inBuf > 0)
-     {
-        --inBuf;
-        return (char)((char)0xff & buffer[(bufpos == bufsize - 1) ? (bufpos = 0) : ++bufpos]);
-     }
-
-     if (++bufpos >= maxNextCharInd)
-        FillBuff();
-
-     char c = (char)((char)0xff & buffer[bufpos]);
-
-     UpdateLineColumn(c);
-     return (c);
-  }
-
-  /**
-   * @deprecated
-   * @see #getEndColumn
-   */
-    @Deprecated
-  public final int getColumn() {
-     return bufcolumn[bufpos];
-  }
-
-  /**
-   * @deprecated
-   * @see #getEndLine
-   */
-    @Deprecated
-  public final int getLine() {
-     return bufline[bufpos];
-  }
-
-  public final int getEndColumn() {
-     return bufcolumn[bufpos];
-  }
-
-  public final int getEndLine() {
-     return bufline[bufpos];
-  }
-
-  public final int getBeginColumn() {
-     return bufcolumn[tokenBegin];
-  }
-
-  public final int getBeginLine() {
-     return bufline[tokenBegin];
-  }
-
-  public final void backup(int amount) {
-
-    inBuf += amount;
-    if ((bufpos -= amount) < 0)
-       bufpos += bufsize;
-  }
-
-  public ASCII_CharStream(java.io.Reader dstream, int startline,
-  int startcolumn, int buffersize)
-  {
-    inputStream = dstream;
-    line = startline;
-    column = startcolumn - 1;
-
-    available = bufsize = buffersize;
-    buffer = new char[buffersize];
-    bufline = new int[buffersize];
-    bufcolumn = new int[buffersize];
-  }
-
-  public ASCII_CharStream(java.io.Reader dstream, int startline,
-                                                           int startcolumn)
-  {
-     this(dstream, startline, startcolumn, 4096);
-  }
-  public void ReInit(java.io.Reader dstream, int startline,
-  int startcolumn, int buffersize)
-  {
-    inputStream = dstream;
-    line = startline;
-    column = startcolumn - 1;
-
-    if (buffer == null || buffersize != buffer.length)
-    {
-      available = bufsize = buffersize;
-      buffer = new char[buffersize];
-      bufline = new int[buffersize];
-      bufcolumn = new int[buffersize];
-    }
-    prevCharIsLF = prevCharIsCR = false;
-    tokenBegin = inBuf = maxNextCharInd = 0;
-    bufpos = -1;
-  }
-
-  public void ReInit(java.io.Reader dstream, int startline,
-                                                           int startcolumn)
-  {
-     ReInit(dstream, startline, startcolumn, 4096);
-  }
-  public ASCII_CharStream(java.io.InputStream dstream, int startline,
-  int startcolumn, int buffersize)
-  {
-     this(new java.io.InputStreamReader(dstream), startline, startcolumn, 4096);
-  }
-
-  public ASCII_CharStream(java.io.InputStream dstream, int startline,
-                                                           int startcolumn)
-  {
-     this(dstream, startline, startcolumn, 4096);
-  }
-
-  public void ReInit(java.io.InputStream dstream, int startline,
-  int startcolumn, int buffersize)
-  {
-     ReInit(new java.io.InputStreamReader(dstream), startline, startcolumn, 4096);
-  }
-  public void ReInit(java.io.InputStream dstream, int startline,
-                                                           int startcolumn)
-  {
-     ReInit(dstream, startline, startcolumn, 4096);
-  }
-  public final String GetImage()
-  {
-     if (bufpos >= tokenBegin)
-        return new String(buffer, tokenBegin, bufpos - tokenBegin + 1);
-     else
-        return new String(buffer, tokenBegin, bufsize - tokenBegin) +
-                              new String(buffer, 0, bufpos + 1);
-  }
-
-  public final char[] GetSuffix(int len)
-  {
-     char[] ret = new char[len];
-
-     if ((bufpos + 1) >= len)
-        System.arraycopy(buffer, bufpos - len + 1, ret, 0, len);
-     else
-     {
-        System.arraycopy(buffer, bufsize - (len - bufpos - 1), ret, 0,
-                                                          len - bufpos - 1);
-        System.arraycopy(buffer, 0, ret, len - bufpos - 1, bufpos + 1);
-     }
-
-     return ret;
-  }
-
-  public void Done()
-  {
-     buffer = null;
-     bufline = null;
-     bufcolumn = null;
-  }
-
-  /**
-   * Method to adjust line and column numbers for the start of a token.
-   */
-  public void adjustBeginLineColumn(int newLine, int newCol)
-  {
-     int start = tokenBegin;
-     int len;
-
-     if (bufpos >= tokenBegin)
-     {
-        len = bufpos - tokenBegin + inBuf + 1;
-     }
-     else
-     {
-        len = bufsize - tokenBegin + bufpos + 1 + inBuf;
-     }
-
-     int i = 0, j = 0, k = 0;
-     int nextColDiff = 0, columnDiff = 0;
-
-     while (i < len &&
-            bufline[j = start % bufsize] == bufline[k = ++start % bufsize])
-     {
-        bufline[j] = newLine;
-        nextColDiff = columnDiff + bufcolumn[k] - bufcolumn[j];
-        bufcolumn[j] = newCol + columnDiff;
-        columnDiff = nextColDiff;
-        i++;
-     }
-
-     if (i < len)
-     {
-        bufline[j] = newLine++;
-        bufcolumn[j] = newCol + columnDiff;
-
-        while (i++ < len)
-        {
-           if (bufline[j = start % bufsize] != bufline[++start % bufsize])
-              bufline[j] = newLine++;
-           else
-              bufline[j] = newLine;
-        }
-     }
-
-     line = bufline[j];
-     column = bufcolumn[j];
-  }
-
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/AclEntryImpl.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,263 +0,0 @@
-/*
- * Copyright (c) 1997, 2007, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-package com.sun.jmx.snmp.IPAcl;
-
-
-
-import java.security.acl.Permission;
-import java.util.Vector;
-import java.util.Enumeration;
-import java.io.Serializable;
-import java.net.UnknownHostException;
-
-import java.security.Principal;
-import java.security.acl.AclEntry;
-
-
-/**
- * Represent one entry in the Access Control List (ACL).
- * This ACL entry object contains a permission associated with a particular principal.
- * (A principal represents an entity such as an individual machine or a group).
- *
- * @see java.security.acl.AclEntry
- */
-
-class AclEntryImpl implements AclEntry, Serializable {
-  private static final long serialVersionUID = -5047185131260073216L;
-
-  private AclEntryImpl (AclEntryImpl i) throws UnknownHostException {
-        setPrincipal(i.getPrincipal());
-        permList = new Vector<Permission>();
-        commList = new Vector<String>();
-
-        for (Enumeration<String> en = i.communities(); en.hasMoreElements();){
-          addCommunity(en.nextElement());
-        }
-
-        for (Enumeration<Permission> en = i.permissions(); en.hasMoreElements();){
-          addPermission(en.nextElement());
-        }
-        if (i.isNegative()) setNegativePermissions();
-  }
-
-  /**
-   * Contructs an empty ACL entry.
-   */
-  public AclEntryImpl (){
-        princ = null;
-        permList = new Vector<Permission>();
-        commList = new Vector<String>();
-  }
-
-  /**
-   * Constructs an ACL entry with a specified principal.
-   *
-   * @param p the principal to be set for this entry.
-   */
-  public AclEntryImpl (Principal p) throws UnknownHostException {
-        princ = p;
-        permList = new Vector<Permission>();
-        commList = new Vector<String>();
-  }
-
-  /**
-   * Clones this ACL entry.
-   *
-   * @return a clone of this ACL entry.
-   */
-  public Object clone() {
-        AclEntryImpl i;
-        try {
-          i = new AclEntryImpl(this);
-        }catch (UnknownHostException e) {
-          i = null;
-        }
-        return (Object) i;
-  }
-
-  /**
-   * Returns true if this is a negative ACL entry (one denying the associated principal
-   * the set of permissions in the entry), false otherwise.
-   *
-   * @return true if this is a negative ACL entry, false if it's not.
-   */
-  public boolean isNegative(){
-        return neg;
-  }
-
-  /**
-   * Adds the specified permission to this ACL entry. Note: An entry can
-   * have multiple permissions.
-   *
-   * @param perm the permission to be associated with the principal in this
-   *        entry
-   * @return true if the permission is removed, false if the permission was
-   *         not part of this entry's permission set.
-   *
-   */
-  public boolean addPermission(java.security.acl.Permission perm){
-        if (permList.contains(perm)) return false;
-        permList.addElement(perm);
-        return true;
-  }
-
-  /**
-   * Removes the specified permission from this ACL entry.
-   *
-   * @param perm the permission to be removed from this entry.
-   * @return true if the permission is removed, false if the permission
-   *         was not part of this entry's permission set.
-   */
-  public boolean removePermission(java.security.acl.Permission perm){
-        if (!permList.contains(perm)) return false;
-        permList.removeElement(perm);
-        return true;
-  }
-
-  /**
-   * Checks if the specified permission is part of the permission set in
-   * this entry.
-   *
-   * @param perm the permission to be checked for.
-   * @return true if the permission is part of the permission set in this
-   *         entry, false otherwise.
-   */
-
-  public boolean checkPermission(java.security.acl.Permission perm){
-        return (permList.contains(perm));
-  }
-
-  /**
-   * Returns an enumeration of the permissions in this ACL entry.
-   *
-   * @return an enumeration of the permissions in this ACL entry.
-   */
-  public Enumeration<Permission> permissions(){
-        return permList.elements();
-  }
-
-  /**
-   * Sets this ACL entry to be a negative one. That is, the associated principal
-   * (e.g., a user or a group) will be denied the permission set specified in the
-   * entry. Note: ACL entries are by default positive. An entry becomes a negative
-   * entry only if this setNegativePermissions method is called on it.
-   *
-   * Not Implemented.
-   */
-  public void setNegativePermissions(){
-        neg = true;
-  }
-
-  /**
-   * Returns the principal for which permissions are granted or denied by this ACL
-   * entry. Returns null if there is no principal set for this entry yet.
-   *
-   * @return the principal associated with this entry.
-   */
-  public Principal getPrincipal(){
-        return princ;
-  }
-
-  /**
-   * Specifies the principal for which permissions are granted or denied by
-   * this ACL entry. If a principal was already set for this ACL entry,
-   * false is returned, otherwise true is returned.
-   *
-   * @param p the principal to be set for this entry.
-   * @return true if the principal is set, false if there was already a
-   *         principal set for this entry.
-   */
-  public boolean setPrincipal(Principal p) {
-        if (princ != null )
-          return false;
-        princ = p;
-        return true;
-  }
-
-  /**
-   * Returns a string representation of the contents of this ACL entry.
-   *
-   * @return a string representation of the contents.
-   */
-  public String toString(){
-        return "AclEntry:"+princ.toString();
-  }
-
-  /**
-   * Returns an enumeration of the communities in this ACL entry.
-   *
-   * @return an enumeration of the communities in this ACL entry.
-   */
-  public Enumeration<String> communities(){
-        return commList.elements();
-  }
-
-  /**
-   * Adds the specified community to this ACL entry. Note: An entry can
-   * have multiple communities.
-   *
-   * @param comm the community to be associated with the principal
-   *        in this entry.
-   * @return true if the community was added, false if the community was
-   *         already part of this entry's community set.
-   */
-  public boolean addCommunity(String comm){
-        if (commList.contains(comm)) return false;
-        commList.addElement(comm);
-        return true;
-  }
-
-  /**
-   * Removes the specified community from this ACL entry.
-   *
-   * @param comm the community  to be removed from this entry.
-   * @return true if the community is removed, false if the community was
-   *         not part of this entry's community set.
-   */
-  public boolean removeCommunity(String comm){
-        if (!commList.contains(comm)) return false;
-        commList.removeElement(comm);
-        return true;
-  }
-
-  /**
-   * Checks if the specified community is part of the community set in this
-   * entry.
-   *
-   * @param  comm the community to be checked for.
-   * @return true if the community is part of the community set in this
-   *         entry, false otherwise.
-   */
-  public boolean checkCommunity(String comm){
-        return (commList.contains(comm));
-  }
-
-  private Principal princ = null;
-  private boolean neg     = false;
-  private Vector<Permission> permList = null;
-  private Vector<String> commList = null;
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/AclImpl.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,295 +0,0 @@
-/*
- * Copyright (c) 1997, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-package com.sun.jmx.snmp.IPAcl;
-
-
-
-import java.security.Principal;
-import java.security.acl.Acl;
-import java.security.acl.AclEntry;
-import java.security.acl.NotOwnerException;
-
-import java.io.Serializable;
-import java.security.acl.Permission;
-import java.util.Vector;
-import java.util.Enumeration;
-
-
-/**
- * Represent an Access Control List (ACL) which is used to guard access to http adaptor.
- * <P>
- * It is a data structure with multiple ACL entries. Each ACL entry, of interface type
- * AclEntry, contains a set of permissions and a set of communities associated with a
- * particular principal. (A principal represents an entity such as a host or a group of host).
- * Additionally, each ACL entry is specified as being either positive or negative.
- * If positive, the permissions are to be granted to the associated principal.
- * If negative, the permissions are to be denied.
- *
- * @see java.security.acl.Acl
- */
-
-class AclImpl extends OwnerImpl implements Acl, Serializable {
-  private static final long serialVersionUID = -2250957591085270029L;
-
-  private Vector<AclEntry> entryList = null;
-  private String aclName = null;
-
-  /**
-   * Constructs the ACL with a specified owner
-   *
-   * @param owner owner of the ACL.
-   * @param name  name of this ACL.
-   */
-  public AclImpl (PrincipalImpl owner, String name) {
-        super(owner);
-        entryList = new Vector<>();
-        aclName = name;
-  }
-
-  /**
-   * Sets the name of this ACL.
-   *
-   * @param caller the principal invoking this method. It must be an owner
-   *        of this ACL.
-   * @param name the name to be given to this ACL.
-   *
-   * @exception NotOwnerException if the caller principal is not an owner
-   *            of this ACL.
-   * @see java.security.Principal
-   */
-  @Override
-  public void setName(Principal caller, String name)
-        throws NotOwnerException {
-          if (!isOwner(caller))
-                throw new NotOwnerException();
-          aclName = name;
-  }
-
-  /**
-   * Returns the name of this ACL.
-   *
-   * @return the name of this ACL.
-   */
-  @Override
-  public String getName(){
-        return aclName;
-  }
-
-  /**
-   * Adds an ACL entry to this ACL. An entry associates a principal (e.g., an individual or a group)
-   * with a set of permissions. Each principal can have at most one positive ACL entry
-   * (specifying permissions to be granted to the principal) and one negative ACL entry
-   * (specifying permissions to be denied). If there is already an ACL entry
-   * of the same type (negative or positive) already in the ACL, false is returned.
-   *
-   * @param caller the principal invoking this method. It must be an owner
-   *        of this ACL.
-   * @param entry the ACL entry to be added to this ACL.
-   * @return true on success, false if an entry of the same type (positive
-   *       or negative) for the same principal is already present in this ACL.
-   * @exception NotOwnerException if the caller principal is not an owner of
-   *       this ACL.
-   * @see java.security.Principal
-   */
-  @Override
-  public boolean addEntry(Principal caller, AclEntry entry)
-        throws NotOwnerException {
-          if (!isOwner(caller))
-                throw new NotOwnerException();
-
-          if (entryList.contains(entry))
-                return false;
-          /*
-                 for (Enumeration e = entryList.elements();e.hasMoreElements();){
-                 AclEntry ent = (AclEntry) e.nextElement();
-                 if (ent.getPrincipal().equals(entry.getPrincipal()))
-                 return false;
-                 }
-                 */
-
-          entryList.addElement(entry);
-          return true;
-  }
-
-  /**
-   * Removes an ACL entry from this ACL.
-   *
-   * @param caller the principal invoking this method. It must be an owner
-   *        of this ACL.
-   * @param entry the ACL entry to be removed from this ACL.
-   * @return true on success, false if the entry is not part of this ACL.
-   * @exception NotOwnerException if the caller principal is not an owner
-   *   of this Acl.
-   * @see java.security.Principal
-   * @see java.security.acl.AclEntry
-   */
-  @Override
-  public boolean removeEntry(Principal caller, AclEntry entry)
-        throws NotOwnerException {
-          if (!isOwner(caller))
-                throw new NotOwnerException();
-
-          return (entryList.removeElement(entry));
-  }
-
-  /**
-   * Removes all ACL entries from this ACL.
-   *
-   * @param caller the principal invoking this method. It must be an owner
-   *        of this ACL.
-   * @exception NotOwnerException if the caller principal is not an owner of
-   *        this Acl.
-   * @see java.security.Principal
-   */
-  public void removeAll(Principal caller)
-        throws NotOwnerException {
-          if (!isOwner(caller))
-                throw new NotOwnerException();
-        entryList.removeAllElements();
-  }
-
-  /**
-   * Returns an enumeration for the set of allowed permissions for
-   * the specified principal
-   * (representing an entity such as an individual or a group).
-   * This set of allowed permissions is calculated as follows:
-   * <UL>
-   * <LI>If there is no entry in this Access Control List for the specified
-   * principal, an empty permission set is returned.</LI>
-   * <LI>Otherwise, the principal's group permission sets are determined.
-   * (A principal can belong to one or more groups, where a group is a group
-   * of principals, represented by the Group interface.)</LI>
-   * </UL>
-   * @param user the principal whose permission set is to be returned.
-   * @return the permission set specifying the permissions the principal
-   *     is allowed.
-   * @see java.security.Principal
-   */
-  @Override
-  public Enumeration<Permission> getPermissions(Principal user){
-        Vector<Permission> empty = new Vector<>();
-        for (Enumeration<AclEntry> e = entryList.elements();e.hasMoreElements();){
-          AclEntry ent = e.nextElement();
-          if (ent.getPrincipal().equals(user))
-                return ent.permissions();
-        }
-        return empty.elements();
-  }
-
-  /**
-   * Returns an enumeration of the entries in this ACL. Each element in the
-   * enumeration is of type AclEntry.
-   *
-   * @return an enumeration of the entries in this ACL.
-   */
-  @Override
-  public Enumeration<AclEntry> entries(){
-        return entryList.elements();
-  }
-
-  /**
-   * Checks whether or not the specified principal has the specified
-   * permission.
-   * If it does, true is returned, otherwise false is returned.
-   * More specifically, this method checks whether the passed permission
-   * is a member of the allowed permission set of the specified principal.
-   * The allowed permission set is determined by the same algorithm as is
-   * used by the getPermissions method.
-   *
-   * @param user the principal, assumed to be a valid authenticated Principal.
-   * @param perm the permission to be checked for.
-   * @return true if the principal has the specified permission,
-   *         false otherwise.
-   * @see java.security.Principal
-   * @see java.security.Permission
-   */
-  @Override
-  public boolean checkPermission(Principal user,
-                                 java.security.acl.Permission perm) {
-        for (Enumeration<AclEntry> e = entryList.elements();e.hasMoreElements();){
-          AclEntry ent = e.nextElement();
-          if (ent.getPrincipal().equals(user))
-                if (ent.checkPermission(perm)) return true;
-        }
-        return false;
-  }
-
-  /**
-   * Checks whether or not the specified principal has the specified
-   * permission.
-   * If it does, true is returned, otherwise false is returned.
-   * More specifically, this method checks whether the passed permission
-   * is a member of the allowed permission set of the specified principal.
-   * The allowed permission set is determined by the same algorithm as is
-   * used by the getPermissions method.
-   *
-   * @param user the principal, assumed to be a valid authenticated Principal.
-   * @param community the community name associated with the principal.
-   * @param perm the permission to be checked for.
-   * @return true if the principal has the specified permission, false
-   *        otherwise.
-   * @see java.security.Principal
-   * @see java.security.Permission
-   */
-  public boolean checkPermission(Principal user, String community,
-                                 java.security.acl.Permission perm) {
-        for (Enumeration<AclEntry> e = entryList.elements();e.hasMoreElements();){
-          AclEntryImpl ent = (AclEntryImpl) e.nextElement();
-          if (ent.getPrincipal().equals(user))
-                if (ent.checkPermission(perm) && ent.checkCommunity(community)) return true;
-        }
-        return false;
-  }
-
-  /**
-   * Checks whether or not the specified community string is defined.
-   *
-   * @param community the community name associated with the principal.
-   *
-   * @return true if the specified community string is defined, false
-   *      otherwise.
-   * @see java.security.Principal
-   * @see java.security.Permission
-   */
-  public boolean checkCommunity(String community) {
-        for (Enumeration<AclEntry> e = entryList.elements();e.hasMoreElements();){
-          AclEntryImpl ent = (AclEntryImpl) e.nextElement();
-          if (ent.checkCommunity(community)) return true;
-        }
-        return false;
-  }
-
-  /**
-   * Returns a string representation of the ACL contents.
-   *
-   * @return a string representation of the ACL contents.
-   */
-  @Override
-  public String toString(){
-        return ("AclImpl: "+ getName());
-  }
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/GroupImpl.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,142 +0,0 @@
-/*
- * Copyright (c) 1997, 2007, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-package com.sun.jmx.snmp.IPAcl;
-
-
-
-import java.util.Vector;
-import java.util.Enumeration;
-import java.io.Serializable;
-import java.net.UnknownHostException;
-
-
-import java.security.Principal;
-import java.security.acl.Group;
-
-
-/**
- * This class is used to represent a subnet mask (a group of hosts
- * matching the same
- * IP mask).
- *
- */
-
-class GroupImpl extends PrincipalImpl implements Group, Serializable {
-  private static final long serialVersionUID = -7777387035032541168L;
-
-  /**
-   * Constructs an empty group.
-   * @exception UnknownHostException Not implemented
-   */
-  public GroupImpl () throws UnknownHostException {
-  }
-
-  /**
-   * Constructs a group using the specified subnet mask.
-   *
-   * @param mask The subnet mask to use to build the group.
-   * @exception UnknownHostException if the subnet mask cann't be built.
-   */
-  public GroupImpl (String mask) throws UnknownHostException {
-        super(mask);
-  }
-
-    /**
-     * Adds the specified member to the group.
-     *
-     * @param p the principal to add to this group.
-     * @return true if the member was successfully added, false if the
-     *     principal was already a member.
-     */
-    public boolean addMember(Principal p) {
-        // we don't need to add members because the ip address is a
-        // subnet mask
-        return true;
-    }
-
-  public int hashCode() {
-        return super.hashCode();
-  }
-
-  /**
-   * Compares this group to the specified object. Returns true if the object
-   * passed in matches the group represented.
-   *
-   * @param p the object to compare with.
-   * @return true if the object passed in matches the subnet mask,
-   *   false otherwise.
-   */
-  public boolean equals (Object p) {
-        if (p instanceof PrincipalImpl || p instanceof GroupImpl){
-          if ((super.hashCode() & p.hashCode()) == p.hashCode()) return true;
-          else return false;
-        } else {
-          return false;
-        }
-  }
-
-  /**
-   * Returns true if the passed principal is a member of the group.
-   *
-   * @param p the principal whose membership is to be checked.
-   * @return true if the principal is a member of this group, false otherwise.
-   */
-  public boolean isMember(Principal p) {
-        if ((p.hashCode() & super.hashCode()) == p.hashCode()) return true;
-        else return false;
-  }
-
-  /**
-   * Returns an enumeration which contains the subnet mask.
-   *
-   * @return an enumeration which contains the subnet mask.
-   */
-  public Enumeration<? extends Principal> members(){
-        Vector<Principal> v = new Vector<Principal>(1);
-        v.addElement(this);
-        return v.elements();
-  }
-
-  /**
-   * Removes the specified member from the group. (Not implemented)
-   *
-   * @param p the principal to remove from this group.
-   * @return allways return true.
-   */
-  public boolean removeMember(Principal p) {
-        return true;
-  }
-
-  /**
-   * Prints a string representation of this group.
-   *
-   * @return  a string representation of this group.
-   */
-  public String toString() {
-        return ("GroupImpl :"+super.getAddress().toString());
-  }
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/Host.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,182 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-package com.sun.jmx.snmp.IPAcl;
-
-
-
-// java import
-//
-import java.io.Serializable;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.util.Hashtable;
-import java.util.logging.Level;
-import java.util.Vector;
-import java.security.acl.NotOwnerException;
-
-import static com.sun.jmx.defaults.JmxProperties.SNMP_LOGGER;
-
-/**
- * The class defines an abstract representation of a host.
- *
- */
-@SuppressWarnings("serial") // JDK implementation class
-abstract class Host extends SimpleNode implements Serializable {
-
-    public Host(int id) {
-        super(id);
-    }
-
-    public Host(Parser p, int id) {
-        super(p, id);
-    }
-
-    protected abstract PrincipalImpl createAssociatedPrincipal()
-        throws UnknownHostException;
-
-    protected abstract String getHname();
-
-    public void buildAclEntries(PrincipalImpl owner, AclImpl acl) {
-        // Create a principal
-        //
-        PrincipalImpl p=null;
-        try {
-            p = createAssociatedPrincipal();
-        } catch(UnknownHostException e) {
-            if (SNMP_LOGGER.isLoggable(Level.FINEST)) {
-                SNMP_LOGGER.logp(Level.FINEST, Host.class.getName(),
-                        "buildAclEntries",
-                        "Cannot create ACL entry; got exception", e);
-            }
-            throw new IllegalArgumentException("Cannot create ACL entry for " + e.getMessage());
-        }
-
-        // Create an AclEntry
-        //
-        AclEntryImpl entry= null;
-        try {
-            entry = new AclEntryImpl(p);
-            // Add permission
-            //
-            registerPermission(entry);
-            acl.addEntry(owner, entry);
-        } catch(UnknownHostException e) {
-            if (SNMP_LOGGER.isLoggable(Level.FINEST)) {
-                SNMP_LOGGER.logp(Level.FINEST, Host.class.getName(),
-                        "buildAclEntries",
-                        "Cannot create ACL entry; got exception", e);
-            }
-            return;
-        } catch(NotOwnerException a) {
-            if (SNMP_LOGGER.isLoggable(Level.FINEST)) {
-                SNMP_LOGGER.logp(Level.FINEST, Host.class.getName(),
-                        "buildAclEntries",
-                        "Cannot create ACL entry; got exception", a);
-            }
-            return;
-        }
-    }
-
-    private void registerPermission(AclEntryImpl entry) {
-        JDMHost host= (JDMHost) jjtGetParent();
-        JDMManagers manager= (JDMManagers) host.jjtGetParent();
-        JDMAclItem acl= (JDMAclItem) manager.jjtGetParent();
-        JDMAccess access= acl.getAccess();
-        access.putPermission(entry);
-        JDMCommunities comm= acl.getCommunities();
-        comm.buildCommunities(entry);
-    }
-
-    public void buildTrapEntries(Hashtable<InetAddress, Vector<String>> dest) {
-
-        JDMHostTrap host= (JDMHostTrap) jjtGetParent();
-        JDMTrapInterestedHost hosts= (JDMTrapInterestedHost) host.jjtGetParent();
-        JDMTrapItem trap = (JDMTrapItem) hosts.jjtGetParent();
-        JDMTrapCommunity community = trap.getCommunity();
-        String comm = community.getCommunity();
-
-        InetAddress add = null;
-        try {
-            add = java.net.InetAddress.getByName(getHname());
-        } catch(UnknownHostException e) {
-            if (SNMP_LOGGER.isLoggable(Level.FINEST)) {
-                SNMP_LOGGER.logp(Level.FINEST, Host.class.getName(),
-                        "buildTrapEntries",
-                        "Cannot create TRAP entry; got exception", e);
-            }
-            return;
-        }
-
-        Vector<String> list = null;
-        if (dest.containsKey(add)){
-            list = dest.get(add);
-            if (!list.contains(comm)){
-                list.addElement(comm);
-            }
-        } else {
-            list = new Vector<String>();
-            list.addElement(comm);
-            dest.put(add,list);
-        }
-    }
-
-    public void buildInformEntries(Hashtable<InetAddress, Vector<String>> dest) {
-
-        JDMHostInform host= (JDMHostInform) jjtGetParent();
-        JDMInformInterestedHost hosts= (JDMInformInterestedHost) host.jjtGetParent();
-        JDMInformItem inform = (JDMInformItem) hosts.jjtGetParent();
-        JDMInformCommunity community = inform.getCommunity();
-        String comm = community.getCommunity();
-
-        InetAddress add = null;
-        try {
-            add = java.net.InetAddress.getByName(getHname());
-        } catch(UnknownHostException e) {
-            if (SNMP_LOGGER.isLoggable(Level.FINEST)) {
-                SNMP_LOGGER.logp(Level.FINEST, Host.class.getName(),
-                        "buildTrapEntries",
-                        "Cannot create INFORM entry; got exception", e);
-            }
-            return;
-        }
-
-        Vector<String> list = null;
-        if (dest.containsKey(add)){
-            list = dest.get(add);
-            if (!list.contains(comm)){
-                list.addElement(comm);
-            }
-        } else {
-            list = new Vector<String>();
-            list.addElement(comm);
-            dest.put(add,list);
-        }
-    }
-
-
-
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/JDMAccess.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-/*
- * Copyright (c) 1997, 2007, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-/* Generated By:JJTree: Do not edit this line. JDMAccess.java */
-
-package com.sun.jmx.snmp.IPAcl;
-
-
-class JDMAccess extends SimpleNode {
-  protected int access= -1;
-
-  JDMAccess(int id) {
-    super(id);
-  }
-
-  JDMAccess(Parser p, int id) {
-    super(p, id);
-  }
-
-  public static Node jjtCreate(int id) {
-      return new JDMAccess(id);
-  }
-
-  public static Node jjtCreate(Parser p, int id) {
-      return new JDMAccess(p, id);
-  }
-
-  protected void putPermission(AclEntryImpl entry) {
-    if (access == ParserConstants.RO) {
-       // We have a read-only access.
-       //
-       entry.addPermission(com.sun.jmx.snmp.IPAcl.SnmpAcl.getREAD());
-    }
-    if (access == ParserConstants.RW) {
-       // We have a read-write access.
-       //
-       entry.addPermission(com.sun.jmx.snmp.IPAcl.SnmpAcl.getREAD());
-       entry.addPermission(com.sun.jmx.snmp.IPAcl.SnmpAcl.getWRITE());
-    }
-  }
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/JDMAclBlock.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +0,0 @@
-/*
- * Copyright (c) 1997, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-/* Generated By:JJTree: Do not edit this line. JDMAclBlock.java */
-
-package com.sun.jmx.snmp.IPAcl;
-
-import java.net.InetAddress;
-import java.util.Hashtable;
-import java.util.Vector;
-
-class JDMAclBlock extends SimpleNode {
-  JDMAclBlock(int id) {
-    super(id);
-  }
-
-  JDMAclBlock(Parser p, int id) {
-    super(p, id);
-  }
-
-  public static Node jjtCreate(int id) {
-      return new JDMAclBlock(id);
-  }
-
-  public static Node jjtCreate(Parser p, int id) {
-      return new JDMAclBlock(p, id);
-  }
-
-  /**
-   * Do no need to go through this part of the tree for
-   * building TrapEntry.
-   */
-   @Override
-   public void buildTrapEntries(Hashtable<InetAddress, Vector<String>> dest) {}
-
-  /**
-   * Do no need to go through this part of the tree for
-   * building InformEntry.
-   */
-    @Override
-   public void buildInformEntries(Hashtable<InetAddress, Vector<String>> dest) {}
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/JDMAclItem.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 1997, 2007, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-/* Generated By:JJTree: Do not edit this line. JDMAclItem.java */
-
-package com.sun.jmx.snmp.IPAcl;
-
-class JDMAclItem extends SimpleNode {
-  protected JDMAccess access= null;
-  protected JDMCommunities com= null;
-
-  JDMAclItem(int id) {
-    super(id);
-  }
-
-  JDMAclItem(Parser p, int id) {
-    super(p, id);
-  }
-
-  public static Node jjtCreate(int id) {
-      return new JDMAclItem(id);
-  }
-
-  public static Node jjtCreate(Parser p, int id) {
-      return new JDMAclItem(p, id);
-  }
-
-  public JDMAccess getAccess() {
-    return access;
-  }
-
-  public JDMCommunities getCommunities() {
-    return com;
-  }
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/JDMCommunities.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 1997, 2007, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-/* Generated By:JJTree: Do not edit this line. JDMCommunities.java */
-
-package com.sun.jmx.snmp.IPAcl;
-
-
-class JDMCommunities extends SimpleNode {
-  JDMCommunities(int id) {
-    super(id);
-  }
-
-  JDMCommunities(Parser p, int id) {
-    super(p, id);
-  }
-
-  public static Node jjtCreate(int id) {
-      return new JDMCommunities(id);
-  }
-
-  public static Node jjtCreate(Parser p, int id) {
-      return new JDMCommunities(p, id);
-  }
-
-  public void buildCommunities(AclEntryImpl entry){
-        for (int i =0 ; i < children.length ; i++)
-          entry.addCommunity(((JDMCommunity)children[i]).getCommunity());
-  }
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/JDMCommunity.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 1997, 2007, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-/* Generated By:JJTree: Do not edit this line. JDMCommunity.java */
-
-package com.sun.jmx.snmp.IPAcl;
-
-class JDMCommunity extends SimpleNode {
-  protected String communityString= "";
-
-  JDMCommunity(int id) {
-    super(id);
-  }
-
-  JDMCommunity(Parser p, int id) {
-    super(p, id);
-  }
-
-  public static Node jjtCreate(int id) {
-      return new JDMCommunity(id);
-  }
-
-  public static Node jjtCreate(Parser p, int id) {
-      return new JDMCommunity(p, id);
-  }
-
-  public String getCommunity(){
-        return communityString;
-  }
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/JDMEnterprise.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 1997, 2007, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-/* Generated By:JJTree: Do not edit this line. JDMEnterprise.java */
-
-package com.sun.jmx.snmp.IPAcl;
-
-class JDMEnterprise extends SimpleNode {
-  protected String enterprise= "";
-
-  JDMEnterprise(int id) {
-    super(id);
-  }
-
-  JDMEnterprise(Parser p, int id) {
-    super(p, id);
-  }
-
-  public static Node jjtCreate(int id) {
-      return new JDMEnterprise(id);
-  }
-
-  public static Node jjtCreate(Parser p, int id) {
-      return new JDMEnterprise(p, id);
-  }
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/JDMHost.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 1997, 2007, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-/* Generated By:JJTree: Do not edit this line. JDMHost.java */
-
-package com.sun.jmx.snmp.IPAcl;
-
-
-class JDMHost extends SimpleNode {
-
-  JDMHost(int id) {
-    super(id);
-  }
-
-  JDMHost(Parser p, int id) {
-    super(p, id);
-  }
-
-  public static Node jjtCreate(int id) {
-      return new JDMHost(id);
-  }
-
-  public static Node jjtCreate(Parser p, int id) {
-      return new JDMHost(p, id);
-  }
-
-
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/JDMHostInform.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 2000, 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/* Generated By:JJTree: Do not edit this line. JDMHostInform.java */
-
-package com.sun.jmx.snmp.IPAcl;
-
-class JDMHostInform extends SimpleNode {
-    protected String name= "";
-
-    JDMHostInform(int id) {
-        super(id);
-    }
-
-    JDMHostInform(Parser p, int id) {
-        super(p, id);
-    }
-
-    public static Node jjtCreate(int id) {
-        return new JDMHostInform(id);
-    }
-
-    public static Node jjtCreate(Parser p, int id) {
-        return new JDMHostInform(p, id);
-    }
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/JDMHostName.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 1997, 2007, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-/* Generated By:JJTree: Do not edit this line. JDMHostName.java */
-
-package com.sun.jmx.snmp.IPAcl;
-
-import java.net.UnknownHostException;
-
-class JDMHostName extends Host {
-  private static final long serialVersionUID = -9120082068923591122L;
-
-  protected StringBuffer name = new StringBuffer();
-
-  JDMHostName(int id) {
-    super(id);
-  }
-
-  JDMHostName(Parser p, int id) {
-    super(p, id);
-  }
-
-  public static Node jjtCreate(int id) {
-      return new JDMHostName(id);
-  }
-
-  public static Node jjtCreate(Parser p, int id) {
-      return new JDMHostName(p, id);
-  }
-
-  protected String getHname() {
-        return name.toString();
-  }
-
-  protected PrincipalImpl createAssociatedPrincipal()
-    throws UnknownHostException {
-      return new PrincipalImpl(name.toString());
-  }
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/JDMHostTrap.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 1997, 2007, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-/* Generated By:JJTree: Do not edit this line. JDMHostTrap.java */
-
-package com.sun.jmx.snmp.IPAcl;
-
-class JDMHostTrap extends SimpleNode {
-  protected String name= "";
-
-  JDMHostTrap(int id) {
-    super(id);
-  }
-
-  JDMHostTrap(Parser p, int id) {
-    super(p, id);
-  }
-
-  public static Node jjtCreate(int id) {
-      return new JDMHostTrap(id);
-  }
-
-  public static Node jjtCreate(Parser p, int id) {
-      return new JDMHostTrap(p, id);
-  }
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/JDMInformBlock.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-/*
- * 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/* Generated By:JJTree: Do not edit this line. JDMInformBlock.java */
-
-package com.sun.jmx.snmp.IPAcl;
-
-import java.net.InetAddress;
-import java.util.Hashtable;
-import java.util.Vector;
-
-class JDMInformBlock extends SimpleNode {
-    JDMInformBlock(int id) {
-        super(id);
-    }
-
-    JDMInformBlock(Parser p, int id) {
-        super(p, id);
-    }
-
-    public static Node jjtCreate(int id) {
-        return new JDMInformBlock(id);
-    }
-
-    public static Node jjtCreate(Parser p, int id) {
-        return new JDMInformBlock(p, id);
-    }
-
-    /**
-     * Do no need to go through this part of the tree for
-     * building AclEntry.
-     */
-    @Override
-    public void buildAclEntries(PrincipalImpl owner, AclImpl acl) {}
-
-    /**
-     * Do no need to go through this part of the tree for
-     * building TrapEntry.
-     */
-    @Override
-    public void buildTrapEntries(Hashtable<InetAddress, Vector<String>> dest) {}
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/JDMInformCommunity.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2000, 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/* Generated By:JJTree: Do not edit this line. JDMInformCommunity.java */
-
-package com.sun.jmx.snmp.IPAcl;
-
-class JDMInformCommunity extends SimpleNode {
-    protected String community= "";
-    JDMInformCommunity(int id) {
-        super(id);
-    }
-
-    JDMInformCommunity(Parser p, int id) {
-        super(p, id);
-    }
-
-    public static Node jjtCreate(int id) {
-        return new JDMInformCommunity(id);
-    }
-
-    public static Node jjtCreate(Parser p, int id) {
-        return new JDMInformCommunity(p, id);
-    }
-
-    public String getCommunity() {
-        return community;
-    }
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/JDMInformInterestedHost.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 2000, 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/* Generated By:JJTree: Do not edit this line. JDMInformInterestedHost.java */
-
-package com.sun.jmx.snmp.IPAcl;
-
-class JDMInformInterestedHost extends SimpleNode {
-    JDMInformInterestedHost(int id) {
-        super(id);
-    }
-
-    JDMInformInterestedHost(Parser p, int id) {
-        super(p, id);
-    }
-
-    public static Node jjtCreate(int id) {
-        return new JDMInformInterestedHost(id);
-    }
-
-    public static Node jjtCreate(Parser p, int id) {
-        return new JDMInformInterestedHost(p, id);
-    }
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/JDMInformItem.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2000, 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/* Generated By:JJTree: Do not edit this line. JDMInformItem.java */
-
-package com.sun.jmx.snmp.IPAcl;
-
-class JDMInformItem extends SimpleNode {
-    protected JDMInformCommunity comm = null;
-    JDMInformItem(int id) {
-        super(id);
-    }
-
-    JDMInformItem(Parser p, int id) {
-        super(p, id);
-    }
-
-    public static Node jjtCreate(int id) {
-        return new JDMInformItem(id);
-    }
-
-    public static Node jjtCreate(Parser p, int id) {
-        return new JDMInformItem(p, id);
-    }
-
-    public JDMInformCommunity getCommunity(){
-        return comm;
-    }
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/JDMIpAddress.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-/*
- * Copyright (c) 1997, 2007, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-/* Generated By:JJTree: Do not edit this line. JDMIpAddress.java */
-
-package com.sun.jmx.snmp.IPAcl;
-
-import java.lang.StringBuffer;
-import java.net.UnknownHostException;
-
-class JDMIpAddress extends Host {
-  private static final long serialVersionUID = 849729919486384484L;
-
-  protected StringBuffer address= new StringBuffer();
-
-  JDMIpAddress(int id) {
-    super(id);
-  }
-
-  JDMIpAddress(Parser p, int id) {
-    super(p, id);
-  }
-
-  public static Node jjtCreate(int id) {
-      return new JDMIpAddress(id);
-  }
-
-  public static Node jjtCreate(Parser p, int id) {
-      return new JDMIpAddress(p, id);
-  }
-
-  protected String getHname() {
-          return address.toString();
-  }
-
-  protected PrincipalImpl createAssociatedPrincipal()
-    throws UnknownHostException {
-      return new PrincipalImpl(address.toString());
-  }
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/JDMIpMask.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-/*
- * Copyright (c) 1997, 2007, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-/* Generated By:JJTree: Do not edit this line. JDMIpMask.java */
-
-package com.sun.jmx.snmp.IPAcl;
-
-import java.lang.StringBuffer;
-import java.net.UnknownHostException;
-
-class JDMIpMask extends Host {
-  private static final long serialVersionUID = -8211312690652331386L;
-
-  protected StringBuffer address= new StringBuffer();
-
-  JDMIpMask(int id) {
-    super(id);
-  }
-
-  JDMIpMask(Parser p, int id) {
-    super(p, id);
-  }
-
-  public static Node jjtCreate(int id) {
-      return new JDMIpMask(id);
-  }
-
-  public static Node jjtCreate(Parser p, int id) {
-      return new JDMIpMask(p, id);
-  }
-
-  protected String getHname() {
-        return address.toString();
-  }
-
-  protected PrincipalImpl createAssociatedPrincipal()
-    throws UnknownHostException {
-      return new GroupImpl(address.toString());
-  }
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/JDMIpV6Address.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-/*
- * Copyright (c) 2002, 2006, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/* Generated By:JJTree: Do not edit this line. JDMIpV6Address.java */
-
-package com.sun.jmx.snmp.IPAcl;
-
-class JDMIpV6Address extends JDMIpAddress {
-  private static final long serialVersionUID = -5929917334606674243L;
-
-  public JDMIpV6Address(int id) {
-    super(id);
-  }
-
-  public JDMIpV6Address(Parser p, int id) {
-    super(p, id);
-  }
-
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/JDMManagers.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 1997, 2007, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-/* Generated By:JJTree: Do not edit this line. JDMManagers.java */
-
-package com.sun.jmx.snmp.IPAcl;
-
-class JDMManagers extends SimpleNode {
-  JDMManagers(int id) {
-    super(id);
-  }
-
-  JDMManagers(Parser p, int id) {
-    super(p, id);
-  }
-
-  public static Node jjtCreate(int id) {
-      return new JDMManagers(id);
-  }
-
-  public static Node jjtCreate(Parser p, int id) {
-      return new JDMManagers(p, id);
-  }
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/JDMNetMask.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 2002, 2006, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/* Generated By:JJTree: Do not edit this line. JDMNetMask.java */
-
-package com.sun.jmx.snmp.IPAcl;
-import java.net.UnknownHostException;
-
-class JDMNetMask extends Host {
-  private static final long serialVersionUID = -1979318280250821787L;
-
-  protected StringBuffer address= new StringBuffer();
-    protected String mask = null;
-  public JDMNetMask(int id) {
-    super(id);
-  }
-
-  public JDMNetMask(Parser p, int id) {
-    super(p, id);
-  }
-public static Node jjtCreate(int id) {
-      return new JDMNetMask(id);
-  }
-
-  public static Node jjtCreate(Parser p, int id) {
-      return new JDMNetMask(p, id);
-  }
-
-  protected String getHname() {
-        return address.toString();
-  }
-
-  protected PrincipalImpl createAssociatedPrincipal()
-    throws UnknownHostException {
-      return new NetMaskImpl(address.toString(), Integer.parseInt(mask));
-  }
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/JDMNetMaskV6.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 2002, 2006, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/* Generated By:JJTree: Do not edit this line. JDMNetMaskV6.java */
-
-package com.sun.jmx.snmp.IPAcl;
-
-import java.net.UnknownHostException;
-
-class JDMNetMaskV6 extends JDMNetMask {
-  private static final long serialVersionUID = 4505256777680576645L;
-
-  public JDMNetMaskV6(int id) {
-    super(id);
-  }
-
-  public JDMNetMaskV6(Parser p, int id) {
-    super(p, id);
-  }
-    protected PrincipalImpl createAssociatedPrincipal()
-    throws UnknownHostException {
-      return new NetMaskImpl(address.toString(), Integer.parseInt(mask));
-  }
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/JDMSecurityDefs.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 1997, 2007, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-/* Generated By:JJTree: Do not edit this line. JDMSecurityDefs.java */
-
-package com.sun.jmx.snmp.IPAcl;
-
-class JDMSecurityDefs extends SimpleNode {
-  JDMSecurityDefs(int id) {
-    super(id);
-  }
-
-  JDMSecurityDefs(Parser p, int id) {
-    super(p, id);
-  }
-
-  public static Node jjtCreate(int id) {
-      return new JDMSecurityDefs(id);
-  }
-
-  public static Node jjtCreate(Parser p, int id) {
-      return new JDMSecurityDefs(p, id);
-  }
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/JDMTrapBlock.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +0,0 @@
-/*
- * Copyright (c) 1997, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-/* Generated By:JJTree: Do not edit this line. JDMTrapBlock.java */
-
-package com.sun.jmx.snmp.IPAcl;
-
-import java.net.InetAddress;
-import java.util.Hashtable;
-import java.util.Vector;
-
-class JDMTrapBlock extends SimpleNode {
-  JDMTrapBlock(int id) {
-    super(id);
-  }
-
-  JDMTrapBlock(Parser p, int id) {
-    super(p, id);
-  }
-
-  public static Node jjtCreate(int id) {
-      return new JDMTrapBlock(id);
-  }
-
-  public static Node jjtCreate(Parser p, int id) {
-      return new JDMTrapBlock(p, id);
-  }
-
-  /**
-   * Do no need to go through this part of the tree for
-   * building AclEntry.
-   */
-   @Override
-   public void buildAclEntries(PrincipalImpl owner, AclImpl acl) {}
-
-  /**
-   * Do no need to go through this part of the tree for
-   * building InformEntry.
-   */
-   @Override
-   public void buildInformEntries(Hashtable<InetAddress, Vector<String>> dest) {}
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/JDMTrapCommunity.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 1997, 2007, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-/* Generated By:JJTree: Do not edit this line. JDMTrapCommunity.java */
-
-package com.sun.jmx.snmp.IPAcl;
-
-class JDMTrapCommunity extends SimpleNode {
-  protected String community= "";
-  JDMTrapCommunity(int id) {
-    super(id);
-  }
-
-  JDMTrapCommunity(Parser p, int id) {
-    super(p, id);
-  }
-
-  public static Node jjtCreate(int id) {
-      return new JDMTrapCommunity(id);
-  }
-
-  public static Node jjtCreate(Parser p, int id) {
-      return new JDMTrapCommunity(p, id);
-  }
-
-  public String getCommunity() {
-        return community;
-  }
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/JDMTrapInterestedHost.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 1997, 2007, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-/* Generated By:JJTree: Do not edit this line. JDMTrapInterestedHost.java */
-
-package com.sun.jmx.snmp.IPAcl;
-
-class JDMTrapInterestedHost extends SimpleNode {
-  JDMTrapInterestedHost(int id) {
-    super(id);
-  }
-
-  JDMTrapInterestedHost(Parser p, int id) {
-    super(p, id);
-  }
-
-  public static Node jjtCreate(int id) {
-      return new JDMTrapInterestedHost(id);
-  }
-
-  public static Node jjtCreate(Parser p, int id) {
-      return new JDMTrapInterestedHost(p, id);
-  }
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/JDMTrapItem.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 1997, 2007, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-/* Generated By:JJTree: Do not edit this line. JDMTrapItem.java */
-
-package com.sun.jmx.snmp.IPAcl;
-
-class JDMTrapItem extends SimpleNode {
-  protected JDMTrapCommunity comm = null;
-
-  JDMTrapItem(int id) {
-    super(id);
-  }
-
-  JDMTrapItem(Parser p, int id) {
-    super(p, id);
-  }
-
-  public static Node jjtCreate(int id) {
-      return new JDMTrapItem(id);
-  }
-
-  public static Node jjtCreate(Parser p, int id) {
-      return new JDMTrapItem(p, id);
-  }
-
-  public JDMTrapCommunity getCommunity(){
-        return comm;
-  }
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/JDMTrapNum.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 1997, 2007, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-/* Generated By:JJTree: Do not edit this line. JDMTrapNum.java */
-
-package com.sun.jmx.snmp.IPAcl;
-
-class JDMTrapNum extends SimpleNode {
-  protected int low=0;
-  protected int high=0;
-
-  JDMTrapNum(int id) {
-    super(id);
-  }
-
-  JDMTrapNum(Parser p, int id) {
-    super(p, id);
-  }
-
-  public static Node jjtCreate(int id) {
-      return new JDMTrapNum(id);
-  }
-
-  public static Node jjtCreate(Parser p, int id) {
-      return new JDMTrapNum(p, id);
-  }
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/JJTParserState.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,148 +0,0 @@
-/*
- * Copyright (c) 1997, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/* Generated By:JJTree: Do not edit this line. JJTParserState.java */
-
-package com.sun.jmx.snmp.IPAcl;
-
-class JJTParserState {
-  private java.util.Stack<Node> nodes;
-  private java.util.Stack<Integer> marks;
-
-  private int sp;               // number of nodes on stack
-  private int mk;               // current mark
-  private boolean node_created;
-
-  JJTParserState() {
-    nodes = new java.util.Stack<>();
-    marks = new java.util.Stack<>();
-    sp = 0;
-    mk = 0;
-  }
-
-  /* Determines whether the current node was actually closed and
-     pushed.  This should only be called in the final user action of a
-     node scope.  */
-  boolean nodeCreated() {
-    return node_created;
-  }
-
-  /* Call this to reinitialize the node stack.  It is called
-     automatically by the parser's ReInit() method. */
-  void reset() {
-    nodes.removeAllElements();
-    marks.removeAllElements();
-    sp = 0;
-    mk = 0;
-  }
-
-  /* Returns the root node of the AST.  It only makes sense to call
-     this after a successful parse. */
-  Node rootNode() {
-    return nodes.elementAt(0);
-  }
-
-  /* Pushes a node on to the stack. */
-  void pushNode(Node n) {
-    nodes.push(n);
-    ++sp;
-  }
-
-  /* Returns the node on the top of the stack, and remove it from the
-     stack.  */
-  Node popNode() {
-    if (--sp < mk) {
-      mk = marks.pop().intValue();
-    }
-    return nodes.pop();
-  }
-
-  /* Returns the node currently on the top of the stack. */
-  Node peekNode() {
-    return nodes.peek();
-  }
-
-  /* Returns the number of children on the stack in the current node
-     scope. */
-  int nodeArity() {
-    return sp - mk;
-  }
-
-
-  void clearNodeScope(Node n) {
-    while (sp > mk) {
-      popNode();
-    }
-    mk = marks.pop().intValue();
-  }
-
-
-  void openNodeScope(Node n) {
-    marks.push(mk);
-    mk = sp;
-    n.jjtOpen();
-  }
-
-
-  /* A definite node is constructed from a specified number of
-     children.  That number of nodes are popped from the stack and
-     made the children of the definite node.  Then the definite node
-     is pushed on to the stack. */
-  void closeNodeScope(Node n, int num) {
-    mk = marks.pop().intValue();
-    while (num-- > 0) {
-      Node c = popNode();
-      c.jjtSetParent(n);
-      n.jjtAddChild(c, num);
-    }
-    n.jjtClose();
-    pushNode(n);
-    node_created = true;
-  }
-
-
-  /* A conditional node is constructed if its condition is true.  All
-     the nodes that have been pushed since the node was opened are
-     made children of the the conditional node, which is then pushed
-     on to the stack.  If the condition is false the node is not
-     constructed and they are left on the stack. */
-  void closeNodeScope(Node n, boolean condition) {
-    if (condition) {
-      int a = nodeArity();
-      mk = marks.pop().intValue();
-      while (a-- > 0) {
-        Node c = popNode();
-        c.jjtSetParent(n);
-        n.jjtAddChild(c, a);
-      }
-      n.jjtClose();
-      pushNode(n);
-      node_created = true;
-    } else {
-      mk = marks.pop().intValue();
-      node_created = false;
-    }
-  }
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/NetMaskImpl.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,266 +0,0 @@
-/*
- * Copyright (c) 2002, 2007, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.jmx.snmp.IPAcl;
-
-import static com.sun.jmx.defaults.JmxProperties.SNMP_LOGGER;
-
-import java.util.logging.Level;
-import java.util.Vector;
-import java.util.Enumeration;
-import java.io.Serializable;
-import java.net.UnknownHostException;
-import java.net.InetAddress;
-
-import java.security.Principal;
-import java.security.acl.Group;
-
-
-/**
- * This class is used to represent a subnet mask (a group of hosts matching the same
- * IP mask).
- *
- * @see java.security.acl.Group
- */
-
-class NetMaskImpl extends PrincipalImpl implements Group, Serializable {
-    private static final long serialVersionUID = -7332541893877932896L;
-
-    protected byte[] subnet = null;
-    protected int prefix = -1;
-    /**
-     * Constructs an empty group.
-     * @exception UnknownHostException Not implemented
-     */
-    public NetMaskImpl () throws UnknownHostException {
-    }
-
-    private byte[] extractSubNet(byte[] b) {
-        int addrLength = b.length;
-        byte[] subnet = null;
-        if (SNMP_LOGGER.isLoggable(Level.FINEST)) {
-            SNMP_LOGGER.logp(Level.FINEST, NetMaskImpl.class.getName(),
-                "extractSubNet", "BINARY ARRAY :");
-            StringBuilder sb = new StringBuilder();
-            for(int i =0; i < addrLength; i++) {
-                sb.append((b[i] & 0xFF) + ":");
-            }
-            SNMP_LOGGER.logp(Level.FINEST, NetMaskImpl.class.getName(),
-                "extractSubNet", sb.toString());
-        }
-
-        // 8 is a byte size. Common to any InetAddress (V4 or V6).
-        int fullyCoveredByte = prefix / 8;
-        if(fullyCoveredByte == addrLength) {
-            if (SNMP_LOGGER.isLoggable(Level.FINEST)) {
-                SNMP_LOGGER.logp(Level.FINEST, NetMaskImpl.class.getName(), "extractSubNet",
-                   "The mask is the complete address, strange..." + addrLength);
-            }
-            subnet = b;
-            return subnet;
-        }
-        if(fullyCoveredByte > addrLength) {
-            if (SNMP_LOGGER.isLoggable(Level.FINEST)) {
-                SNMP_LOGGER.logp(Level.FINEST, NetMaskImpl.class.getName(), "extractSubNet",
-                   "The number of covered byte is longer than the address. BUG");
-            }
-            throw new IllegalArgumentException("The number of covered byte is longer than the address.");
-        }
-        int partialyCoveredIndex = fullyCoveredByte;
-        if (SNMP_LOGGER.isLoggable(Level.FINEST)) {
-            SNMP_LOGGER.logp(Level.FINEST, NetMaskImpl.class.getName(), "extractSubNet",
-               "Partially covered index : " + partialyCoveredIndex);
-        }
-        byte toDeal = b[partialyCoveredIndex];
-        if (SNMP_LOGGER.isLoggable(Level.FINEST)) {
-            SNMP_LOGGER.logp(Level.FINEST, NetMaskImpl.class.getName(), "extractSubNet",
-               "Partially covered byte : " + toDeal);
-        }
-
-        // 8 is a byte size. Common to any InetAddress (V4 or V6).
-        int nbbits = prefix % 8;
-        int subnetSize = 0;
-
-        if(nbbits == 0)
-        subnetSize = partialyCoveredIndex;
-        else
-        subnetSize = partialyCoveredIndex + 1;
-
-        if (SNMP_LOGGER.isLoggable(Level.FINEST)) {
-            SNMP_LOGGER.logp(Level.FINEST, NetMaskImpl.class.getName(), "extractSubNet",
-               "Remains : " + nbbits);
-        }
-
-        byte mask = 0;
-        for(int i = 0; i < nbbits; i++) {
-            mask |= (1 << (7 - i));
-        }
-        if (SNMP_LOGGER.isLoggable(Level.FINEST)) {
-            SNMP_LOGGER.logp(Level.FINEST, NetMaskImpl.class.getName(), "extractSubNet",
-               "Mask value : " + (mask & 0xFF));
-        }
-
-        byte maskedValue = (byte) ((int)toDeal & (int)mask);
-
-        if (SNMP_LOGGER.isLoggable(Level.FINEST)) {
-            SNMP_LOGGER.logp(Level.FINEST, NetMaskImpl.class.getName(), "extractSubNet",
-               "Masked byte : "  + (maskedValue &0xFF));
-        }
-        subnet = new byte[subnetSize];
-        if (SNMP_LOGGER.isLoggable(Level.FINEST)) {
-            SNMP_LOGGER.logp(Level.FINEST, NetMaskImpl.class.getName(), "extractSubNet",
-               "Resulting subnet : ");
-        }
-        for(int i = 0; i < partialyCoveredIndex; i++) {
-            subnet[i] = b[i];
-
-            if (SNMP_LOGGER.isLoggable(Level.FINEST)) {
-                SNMP_LOGGER.logp(Level.FINEST, NetMaskImpl.class.getName(), "extractSubNet",
-                   (subnet[i] & 0xFF) +":");
-            }
-        }
-
-        if(nbbits != 0) {
-            subnet[partialyCoveredIndex] = maskedValue;
-            if (SNMP_LOGGER.isLoggable(Level.FINEST)) {
-                SNMP_LOGGER.logp(Level.FINEST, NetMaskImpl.class.getName(), "extractSubNet",
-                    "Last subnet byte : " + (subnet[partialyCoveredIndex] &0xFF));
-            }
-        }
-        return subnet;
-    }
-
-  /**
-   * Constructs a group using the specified subnet mask.
-   * THIS ALGORITHM IS V4 and V6 compatible.
-   *
-   * @exception UnknownHostException if the subnet mask cann't be built.
-   */
-  public NetMaskImpl (String a, int prefix) throws UnknownHostException {
-        super(a);
-        this.prefix = prefix;
-        subnet = extractSubNet(getAddress().getAddress());
-  }
-
-  /**
-   * Adds the specified member to the group.
-   *
-   * @param p the principal to add to this group.
-   * @return true if the member was successfully added, false if the
-   *      principal was already a member.
-   */
-  public boolean addMember(Principal p) {
-        // we don't need to add members because the ip address is a subnet mask
-        return true;
-  }
-
-  public int hashCode() {
-        return super.hashCode();
-  }
-
-  /**
-   * Compares this group to the specified object. Returns true if the object
-   * passed in matches the group represented.
-   *
-   * @param p the object to compare with.
-   * @return true if the object passed in matches the subnet mask,
-   *    false otherwise.
-   */
-    public boolean equals (Object p) {
-        if (p instanceof PrincipalImpl || p instanceof NetMaskImpl){
-            PrincipalImpl received = (PrincipalImpl) p;
-            InetAddress addr = received.getAddress();
-            if (SNMP_LOGGER.isLoggable(Level.FINEST)) {
-                SNMP_LOGGER.logp(Level.FINEST, NetMaskImpl.class.getName(), "equals",
-                    "Received Address : " + addr);
-            }
-            byte[] recAddr = addr.getAddress();
-            for(int i = 0; i < subnet.length; i++) {
-                if (SNMP_LOGGER.isLoggable(Level.FINEST)) {
-                    SNMP_LOGGER.logp(Level.FINEST, NetMaskImpl.class.getName(), "equals",
-                        "(recAddr[i]) : " + (recAddr[i] & 0xFF));
-                    SNMP_LOGGER.logp(Level.FINEST, NetMaskImpl.class.getName(), "equals",
-                        "(recAddr[i] & subnet[i]) : " +
-                         ((recAddr[i] & (int)subnet[i]) &0xFF) +
-                         " subnet[i] : " + (subnet[i] &0xFF));
-                }
-                if((recAddr[i] & subnet[i]) != subnet[i]) {
-                    if (SNMP_LOGGER.isLoggable(Level.FINEST)) {
-                        SNMP_LOGGER.logp(Level.FINEST, NetMaskImpl.class.getName(), "equals",
-                            "FALSE");
-                    }
-                    return false;
-                }
-            }
-            if (SNMP_LOGGER.isLoggable(Level.FINEST)) {
-                SNMP_LOGGER.logp(Level.FINEST, NetMaskImpl.class.getName(), "equals",
-                    "TRUE");
-            }
-            return true;
-        } else
-            return false;
-    }
-  /**
-   * Returns true if the passed principal is a member of the group.
-   *
-   * @param p the principal whose membership is to be checked.
-   * @return true if the principal is a member of this group, false otherwise.
-   */
-  public boolean isMember(Principal p) {
-        if ((p.hashCode() & super.hashCode()) == p.hashCode()) return true;
-        else return false;
-  }
-
-  /**
-   * Returns an enumeration which contains the subnet mask.
-   *
-   * @return an enumeration which contains the subnet mask.
-   */
-  public Enumeration<? extends Principal> members(){
-        Vector<Principal> v = new Vector<Principal>(1);
-        v.addElement(this);
-        return v.elements();
-  }
-
-  /**
-   * Removes the specified member from the group. (Not implemented)
-   *
-   * @param p the principal to remove from this group.
-   * @return allways return true.
-   */
-  public boolean removeMember(Principal p) {
-        return true;
-  }
-
-  /**
-   * Prints a string representation of this group.
-   *
-   * @return  a string representation of this group.
-   */
-  public String toString() {
-        return ("NetMaskImpl :"+ super.getAddress().toString() + "/" + prefix);
-  }
-
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/Node.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 1997, 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-/* Generated By:JJTree: Do not edit this line. Node.java */
-
-package com.sun.jmx.snmp.IPAcl;
-
-/* All AST nodes must implement this interface.  It provides basic
-   machinery for constructing the parent and child relationships
-   between nodes. */
-
-interface Node {
-
-  /** This method is called after the node has been made the current
-    node.  It indicates that child nodes can now be added to it. */
-  public void jjtOpen();
-
-  /** This method is called after all the child nodes have been
-    added. */
-  public void jjtClose();
-
-  /** This pair of methods are used to inform the node of its
-    parent. */
-  public void jjtSetParent(Node n);
-  public Node jjtGetParent();
-
-  /** This method tells the node to add its argument to the node's
-    list of children.  */
-  public void jjtAddChild(Node n, int i);
-
-  /** This method returns a child node.  The children are numbered
-     from zero, left to right. */
-  public Node jjtGetChild(int i);
-
-  /** Return the number of children the node has. */
-  public int jjtGetNumChildren();
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/OwnerImpl.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,137 +0,0 @@
-/*
- * Copyright (c) 1997, 2007, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-package com.sun.jmx.snmp.IPAcl;
-
-
-
-import java.util.Vector;
-import java.io.Serializable;
-
-import java.security.Principal;
-import java.security.acl.Owner;
-import java.security.acl.LastOwnerException;
-import java.security.acl.NotOwnerException;
-
-
-/**
- * Owner of Access Control Lists (ACLs).
- * The initial owner Principal should be specified as an
- * argument to the constructor of the class AclImpl.
- *
- * @see java.security.acl.Owner
- */
-
-class OwnerImpl implements Owner, Serializable {
-  private static final long serialVersionUID = -576066072046319874L;
-
-  private Vector<Principal> ownerList = null;
-
-  /**
-   * Constructs an empty list of owner.
-   */
-  public OwnerImpl (){
-        ownerList = new Vector<Principal>();
-  }
-
-  /**
-   * Constructs a list of owner with the specified principal as first element.
-   *
-   * @param owner the principal added to the owner list.
-   */
-  public OwnerImpl (PrincipalImpl owner){
-        ownerList = new Vector<Principal>();
-        ownerList.addElement(owner);
-  }
-
-  /**
-   * Adds an owner. Only owners can modify ACL contents. The caller principal
-   * must be an owner of the ACL in order to invoke this method. That is, only
-   * an owner can add another owner. The initial owner is configured at
-   * ACL construction time.
-   *
-   * @param caller the principal invoking this method.
-   *        It must be an owner of the ACL.
-   * @param owner the owner that should be added to the list of owners.
-   * @return true if successful, false if owner is already an owner.
-   * @exception NotOwnerException if the caller principal is not an owner
-   *    of the ACL.
-   */
-  public boolean addOwner(Principal caller, Principal owner)
-        throws NotOwnerException {
-        if (!ownerList.contains(caller))
-          throw new NotOwnerException();
-
-        if (ownerList.contains(owner)) {
-          return false;
-        } else {
-          ownerList.addElement(owner);
-          return true;
-        }
-  }
-
-  /**
-   * Deletes an owner. If this is the last owner in the ACL, an exception is raised.
-   *<P>
-   * The caller principal must be an owner of the ACL in order to invoke this method.
-   *
-   * @param caller the principal invoking this method. It must be an owner
-   *   of the ACL.
-   * @param owner the owner to be removed from the list of owners.
-   * @return true if successful, false if owner is already an owner.
-   * @exception NotOwnerException if the caller principal is not an owner
-   *   of the ACL.
-   * @exception LastOwnerException if there is only one owner left, so that
-   *   deleteOwner would leave the ACL owner-less.
-   */
-  public boolean deleteOwner(Principal caller, Principal owner)
-                throws NotOwnerException,LastOwnerException {
-
-        if (!ownerList.contains(caller))
-          throw new NotOwnerException();
-
-        if (!ownerList.contains(owner)){
-          return false;
-        } else {
-          if (ownerList.size() == 1)
-                throw new LastOwnerException();
-
-          ownerList.removeElement(owner);
-          return true;
-        }
-  }
-
-  /**
-   * Returns true if the given principal is an owner of the ACL.
-   *
-   * @param owner the principal to be checked to determine whether or
-   *        not it is an owner.
-   * @return true if the given principal is an owner of the ACL.
-   */
-  public boolean isOwner(Principal owner){
-        return ownerList.contains(owner);
-  }
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/ParseError.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-/*
- * Copyright (c) 1997, 2006, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-/* Generated By:JavaCC: Do not edit this line. ParseError.java Version 0.7pre1 */
-package com.sun.jmx.snmp.IPAcl;
-
-class ParseError extends Exception {
-   private static final long serialVersionUID = 4907307342076722310L;
-
-   public ParseError() {
-   }
-   public ParseError(String message) {
-      super(message);
-   }
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/ParseException.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,217 +0,0 @@
-/*
- * Copyright (c) 1997, 2006, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/* Generated By:JavaCC: Do not edit this line. ParseException.java Version 0.7pre6 */
-package com.sun.jmx.snmp.IPAcl;
-
-/**
- * This exception is thrown when parse errors are encountered.
- * You can explicitly create objects of this exception type by
- * calling the method generateParseException in the generated
- * parser.
- *
- * You can modify this class to customize your error reporting
- * mechanisms so long as you retain the public fields.
- */
-class ParseException extends Exception {
-  private static final long serialVersionUID = -3695190720704845876L;
-
-  /**
-   * This constructor is used by the method "generateParseException"
-   * in the generated parser.  Calling this constructor generates
-   * a new object of this type with the fields "currentToken",
-   * "expectedTokenSequences", and "tokenImage" set.  The boolean
-   * flag "specialConstructor" is also set to true to indicate that
-   * this constructor was used to create this object.
-   * This constructor calls its super class with the empty string
-   * to force the "toString" method of parent class "Throwable" to
-   * print the error message in the form:
-   *     ParseException: <result of getMessage>
-   */
-  public ParseException(Token currentTokenVal,
-                        int[][] expectedTokenSequencesVal,
-                        String[] tokenImageVal
-                       )
-  {
-    super("");
-    specialConstructor = true;
-    currentToken = currentTokenVal;
-    expectedTokenSequences = expectedTokenSequencesVal;
-    tokenImage = tokenImageVal;
-  }
-
-  /**
-   * The following constructors are for use by you for whatever
-   * purpose you can think of.  Constructing the exception in this
-   * manner makes the exception behave in the normal way - i.e., as
-   * documented in the class "Throwable".  The fields "errorToken",
-   * "expectedTokenSequences", and "tokenImage" do not contain
-   * relevant information.  The JavaCC generated code does not use
-   * these constructors.
-   */
-
-  public ParseException() {
-    super();
-    specialConstructor = false;
-  }
-
-  public ParseException(String message) {
-    super(message);
-    specialConstructor = false;
-  }
-
-  /**
-   * This variable determines which constructor was used to create
-   * this object and thereby affects the semantics of the
-   * "getMessage" method (see below).
-   */
-  protected boolean specialConstructor;
-
-  /**
-   * This is the last token that has been consumed successfully.  If
-   * this object has been created due to a parse error, the token
-   * followng this token will (therefore) be the first error token.
-   */
-  public Token currentToken;
-
-  /**
-   * Each entry in this array is an array of integers.  Each array
-   * of integers represents a sequence of tokens (by their ordinal
-   * values) that is expected at this point of the parse.
-   */
-  public int[][] expectedTokenSequences;
-
-  /**
-   * This is a reference to the "tokenImage" array of the generated
-   * parser within which the parse error occurred.  This array is
-   * defined in the generated ...Constants interface.
-   */
-  public String[] tokenImage;
-
-  /**
-   * This method has the standard behavior when this object has been
-   * created using the standard constructors.  Otherwise, it uses
-   * "currentToken" and "expectedTokenSequences" to generate a parse
-   * error message and returns it.  If this object has been created
-   * due to a parse error, and you do not catch it (it gets thrown
-   * from the parser), then this method is called during the printing
-   * of the final stack trace, and hence the correct error message
-   * gets displayed.
-   */
-  public String getMessage() {
-    if (!specialConstructor) {
-      return super.getMessage();
-    }
-    String expected = "";
-    int maxSize = 0;
-    for (int i = 0; i < expectedTokenSequences.length; i++) {
-      if (maxSize < expectedTokenSequences[i].length) {
-        maxSize = expectedTokenSequences[i].length;
-      }
-      for (int j = 0; j < expectedTokenSequences[i].length; j++) {
-        expected += tokenImage[expectedTokenSequences[i][j]] + " ";
-      }
-      if (expectedTokenSequences[i][expectedTokenSequences[i].length - 1] != 0) {
-        expected += "...";
-      }
-      expected += eol + "    ";
-    }
-    String retval = "Encountered \"";
-    Token tok = currentToken.next;
-    for (int i = 0; i < maxSize; i++) {
-      if (i != 0) retval += " ";
-      if (tok.kind == 0) {
-        retval += tokenImage[0];
-        break;
-      }
-      retval += add_escapes(tok.image);
-      tok = tok.next;
-    }
-    retval += "\" at line " + currentToken.next.beginLine + ", column " + currentToken.next.beginColumn + "." + eol;
-    if (expectedTokenSequences.length == 1) {
-      retval += "Was expecting:" + eol + "    ";
-    } else {
-      retval += "Was expecting one of:" + eol + "    ";
-    }
-    retval += expected;
-    return retval;
-  }
-
-  /**
-   * The end of line string for this machine.
-   */
-  protected String eol = System.getProperty("line.separator", "\n");
-
-  /**
-   * Used to convert raw characters to their escaped version
-   * when these raw version cannot be used as part of an ASCII
-   * string literal.
-   */
-  protected String add_escapes(String str) {
-      StringBuilder retval = new StringBuilder();
-      char ch;
-      for (int i = 0; i < str.length(); i++) {
-        switch (str.charAt(i))
-        {
-           case 0 :
-              continue;
-           case '\b':
-              retval.append("\\b");
-              continue;
-           case '\t':
-              retval.append("\\t");
-              continue;
-           case '\n':
-              retval.append("\\n");
-              continue;
-           case '\f':
-              retval.append("\\f");
-              continue;
-           case '\r':
-              retval.append("\\r");
-              continue;
-           case '\"':
-              retval.append("\\\"");
-              continue;
-           case '\'':
-              retval.append("\\\'");
-              continue;
-           case '\\':
-              retval.append("\\\\");
-              continue;
-           default:
-              if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) {
-                 String s = "0000" + Integer.toString(ch, 16);
-                 retval.append("\\u" + s.substring(s.length() - 4, s.length()));
-              } else {
-                 retval.append(ch);
-              }
-              continue;
-        }
-      }
-      return retval.toString();
-   }
-
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/Parser.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1285 +0,0 @@
-/*
- * Copyright (c) 1997, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/* Generated By:JJTree&JavaCC: Do not edit this line. Parser.java */
-package com.sun.jmx.snmp.IPAcl;
-
-import java.io.*;
-
-@SuppressWarnings("unchecked")  // generated code, not worth fixing
-class Parser/*@bgen(jjtree)*/implements ParserTreeConstants, ParserConstants {/*@bgen(jjtree)*/
-  protected JJTParserState jjtree = new JJTParserState();
-
-// A file can contain several acl definitions
-//
-  final public JDMSecurityDefs SecurityDefs() throws ParseException {
-                                   /*@bgen(jjtree) SecurityDefs */
-  JDMSecurityDefs jjtn000 = new JDMSecurityDefs(JJTSECURITYDEFS);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-    try {
-      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-      case ACL:
-        AclBlock();
-        break;
-      default:
-        jj_la1[0] = jj_gen;
-        ;
-      }
-      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-      case TRAP:
-        TrapBlock();
-        break;
-      default:
-        jj_la1[1] = jj_gen;
-        ;
-      }
-      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-      case INFORM:
-        InformBlock();
-        break;
-      default:
-        jj_la1[2] = jj_gen;
-        ;
-      }
-      jj_consume_token(0);
-    jjtree.closeNodeScope(jjtn000, true);
-    jjtc000 = false;
-    {if (true) return jjtn000;}
-    } catch (Throwable jjte000) {
-    if (jjtc000) {
-      jjtree.clearNodeScope(jjtn000);
-      jjtc000 = false;
-    } else {
-      jjtree.popNode();
-    }
-    if (jjte000 instanceof RuntimeException) {
-      {if (true) throw (RuntimeException)jjte000;}
-    }
-    if (jjte000 instanceof ParseException) {
-      {if (true) throw (ParseException)jjte000;}
-    }
-    {if (true) throw (Error)jjte000;}
-    } finally {
-    if (jjtc000) {
-      jjtree.closeNodeScope(jjtn000, true);
-    }
-    }
-    throw new Error("Missing return statement in function");
-  }
-
-  final public void AclBlock() throws ParseException {
-                  /*@bgen(jjtree) AclBlock */
-  JDMAclBlock jjtn000 = new JDMAclBlock(JJTACLBLOCK);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-    try {
-      jj_consume_token(ACL);
-      jj_consume_token(ASSIGN);
-      jj_consume_token(LBRACE);
-      label_1:
-      while (true) {
-        AclItem();
-        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-        case LBRACE:
-          ;
-          break;
-        default:
-          jj_la1[3] = jj_gen;
-          break label_1;
-        }
-      }
-      jj_consume_token(RBRACE);
-    } catch (Throwable jjte000) {
-  if (jjtc000) {
-    jjtree.clearNodeScope(jjtn000);
-    jjtc000 = false;
-  } else {
-    jjtree.popNode();
-  }
-  if (jjte000 instanceof RuntimeException) {
-    {if (true) throw (RuntimeException)jjte000;}
-  }
-  if (jjte000 instanceof ParseException) {
-    {if (true) throw (ParseException)jjte000;}
-  }
-  {if (true) throw (Error)jjte000;}
-    } finally {
-  if (jjtc000) {
-    jjtree.closeNodeScope(jjtn000, true);
-  }
-    }
-  }
-
-  final public void AclItem() throws ParseException {
-                 /*@bgen(jjtree) AclItem */
-  JDMAclItem jjtn000 = new JDMAclItem(JJTACLITEM);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-    try {
-      jj_consume_token(LBRACE);
-      jjtn000.com = Communities();
-      jjtn000.access = Access();
-      Managers();
-      jj_consume_token(RBRACE);
-    } catch (Throwable jjte000) {
-  if (jjtc000) {
-    jjtree.clearNodeScope(jjtn000);
-    jjtc000 = false;
-  } else {
-    jjtree.popNode();
-  }
-  if (jjte000 instanceof RuntimeException) {
-    {if (true) throw (RuntimeException)jjte000;}
-  }
-  if (jjte000 instanceof ParseException) {
-    {if (true) throw (ParseException)jjte000;}
-  }
-  {if (true) throw (Error)jjte000;}
-    } finally {
-  if (jjtc000) {
-    jjtree.closeNodeScope(jjtn000, true);
-  }
-    }
-  }
-
-  final public JDMCommunities Communities() throws ParseException {
-                               /*@bgen(jjtree) Communities */
-  JDMCommunities jjtn000 = new JDMCommunities(JJTCOMMUNITIES);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-    try {
-      jj_consume_token(COMMUNITIES);
-      jj_consume_token(ASSIGN);
-      Community();
-      label_2:
-      while (true) {
-        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-        case COMMA:
-          ;
-          break;
-        default:
-          jj_la1[4] = jj_gen;
-          break label_2;
-        }
-        jj_consume_token(COMMA);
-        Community();
-      }
-  jjtree.closeNodeScope(jjtn000, true);
-  jjtc000 = false;
- {if (true) return jjtn000;}
-    } catch (Throwable jjte000) {
-  if (jjtc000) {
-    jjtree.clearNodeScope(jjtn000);
-    jjtc000 = false;
-  } else {
-    jjtree.popNode();
-  }
-  if (jjte000 instanceof RuntimeException) {
-    {if (true) throw (RuntimeException)jjte000;}
-  }
-  if (jjte000 instanceof ParseException) {
-    {if (true) throw (ParseException)jjte000;}
-  }
-  {if (true) throw (Error)jjte000;}
-    } finally {
-  if (jjtc000) {
-    jjtree.closeNodeScope(jjtn000, true);
-  }
-    }
-    throw new Error("Missing return statement in function");
-  }
-
-  final public void Community() throws ParseException {
- /*@bgen(jjtree) Community */
-  JDMCommunity jjtn000 = new JDMCommunity(JJTCOMMUNITY);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);Token t;
-    try {
-      t = jj_consume_token(IDENTIFIER);
-                 jjtree.closeNodeScope(jjtn000, true);
-                 jjtc000 = false;
-                jjtn000.communityString= t.image;
-    } finally {
-  if (jjtc000) {
-    jjtree.closeNodeScope(jjtn000, true);
-  }
-    }
-  }
-
-  final public JDMAccess Access() throws ParseException {
-                     /*@bgen(jjtree) Access */
-  JDMAccess jjtn000 = new JDMAccess(JJTACCESS);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-    try {
-      jj_consume_token(ACCESS);
-      jj_consume_token(ASSIGN);
-      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-      case RO:
-        jj_consume_token(RO);
-                     jjtn000.access= RO;
-        break;
-      case RW:
-        jj_consume_token(RW);
-                     jjtn000.access= RW;
-        break;
-      default:
-        jj_la1[5] = jj_gen;
-        jj_consume_token(-1);
-        throw new ParseException();
-      }
-  jjtree.closeNodeScope(jjtn000, true);
-  jjtc000 = false;
- {if (true) return jjtn000;}
-    } finally {
-  if (jjtc000) {
-    jjtree.closeNodeScope(jjtn000, true);
-  }
-    }
-    throw new Error("Missing return statement in function");
-  }
-
-  final public void Managers() throws ParseException {
-                   /*@bgen(jjtree) Managers */
-  JDMManagers jjtn000 = new JDMManagers(JJTMANAGERS);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-    try {
-      jj_consume_token(MANAGERS);
-      jj_consume_token(ASSIGN);
-      Host();
-      label_3:
-      while (true) {
-        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-        case COMMA:
-          ;
-          break;
-        default:
-          jj_la1[6] = jj_gen;
-          break label_3;
-        }
-        jj_consume_token(COMMA);
-        Host();
-      }
-    } catch (Throwable jjte000) {
-  if (jjtc000) {
-    jjtree.clearNodeScope(jjtn000);
-    jjtc000 = false;
-  } else {
-    jjtree.popNode();
-  }
-  if (jjte000 instanceof RuntimeException) {
-    {if (true) throw (RuntimeException)jjte000;}
-  }
-  if (jjte000 instanceof ParseException) {
-    {if (true) throw (ParseException)jjte000;}
-  }
-  {if (true) throw (Error)jjte000;}
-    } finally {
-  if (jjtc000) {
-    jjtree.closeNodeScope(jjtn000, true);
-  }
-    }
-  }
-
-  final public void Host() throws ParseException {
- /*@bgen(jjtree) Host */
-  JDMHost jjtn000 = new JDMHost(JJTHOST);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);Token t;
-    try {
-      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-      case IDENTIFIER:
-        HostName();
-        break;
-      default:
-        jj_la1[7] = jj_gen;
-        if (jj_2_1(2147483647)) {
-          NetMask();
-        } else if (jj_2_2(2147483647)) {
-          NetMaskV6();
-        } else if (jj_2_3(2147483647)) {
-          IpAddress();
-        } else {
-          switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-          case V6_ADDRESS:
-            IpV6Address();
-            break;
-          case INTEGER_LITERAL:
-            IpMask();
-            break;
-          default:
-            jj_la1[8] = jj_gen;
-            jj_consume_token(-1);
-            throw new ParseException();
-          }
-        }
-      }
-    } catch (Throwable jjte000) {
-  if (jjtc000) {
-    jjtree.clearNodeScope(jjtn000);
-    jjtc000 = false;
-  } else {
-    jjtree.popNode();
-  }
-  if (jjte000 instanceof RuntimeException) {
-    {if (true) throw (RuntimeException)jjte000;}
-  }
-  if (jjte000 instanceof ParseException) {
-    {if (true) throw (ParseException)jjte000;}
-  }
-  {if (true) throw (Error)jjte000;}
-    } finally {
-  if (jjtc000) {
-    jjtree.closeNodeScope(jjtn000, true);
-  }
-    }
-  }
-
-  final public void HostName() throws ParseException {
- /*@bgen(jjtree) HostName */
-  JDMHostName jjtn000 = new JDMHostName(JJTHOSTNAME);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);Token t;
-    try {
-      t = jj_consume_token(IDENTIFIER);
-                   jjtn000.name.append(t.image);
-      label_4:
-      while (true) {
-        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-        case DOT:
-          ;
-          break;
-        default:
-          jj_la1[9] = jj_gen;
-          break label_4;
-        }
-        jj_consume_token(DOT);
-        t = jj_consume_token(IDENTIFIER);
-   jjtn000.name.append( "." + t.image);
-      }
-    } finally {
-    if (jjtc000) {
-      jjtree.closeNodeScope(jjtn000, true);
-    }
-    }
-  }
-
-  final public void IpAddress() throws ParseException {
- /*@bgen(jjtree) IpAddress */
-JDMIpAddress jjtn000 = new JDMIpAddress(JJTIPADDRESS);
-boolean jjtc000 = true;
-jjtree.openNodeScope(jjtn000);Token t;
-    try {
-      t = jj_consume_token(INTEGER_LITERAL);
-   jjtn000.address.append(t.image);
-      label_5:
-      while (true) {
-        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-        case DOT:
-          ;
-          break;
-        default:
-          jj_la1[10] = jj_gen;
-          break label_5;
-        }
-        jj_consume_token(DOT);
-        t = jj_consume_token(INTEGER_LITERAL);
-   jjtn000.address.append( "." + t.image);
-      }
-    } finally {
-  if (jjtc000) {
-    jjtree.closeNodeScope(jjtn000, true);
-  }
-    }
-  }
-
-  final public void IpV6Address() throws ParseException {
- /*@bgen(jjtree) IpV6Address */
-JDMIpV6Address jjtn000 = new JDMIpV6Address(JJTIPV6ADDRESS);
-boolean jjtc000 = true;
-jjtree.openNodeScope(jjtn000);Token t;
-    try {
-      t = jj_consume_token(V6_ADDRESS);
-    jjtree.closeNodeScope(jjtn000, true);
-    jjtc000 = false;
-   jjtn000.address.append(t.image);
-    } finally {
-  if (jjtc000) {
-    jjtree.closeNodeScope(jjtn000, true);
-  }
-    }
-  }
-
-  final public void IpMask() throws ParseException {
- /*@bgen(jjtree) IpMask */
-JDMIpMask jjtn000 = new JDMIpMask(JJTIPMASK);
-boolean jjtc000 = true;
-jjtree.openNodeScope(jjtn000);Token t;
-    try {
-      t = jj_consume_token(INTEGER_LITERAL);
-   jjtn000.address.append(t.image);
-      label_6:
-      while (true) {
-        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-        case MARK:
-          ;
-          break;
-        default:
-          jj_la1[11] = jj_gen;
-          break label_6;
-        }
-        jj_consume_token(MARK);
-        t = jj_consume_token(INTEGER_LITERAL);
-   jjtn000.address.append( "." + t.image);
-      }
-    } finally {
-  if (jjtc000) {
-    jjtree.closeNodeScope(jjtn000, true);
-  }
-    }
-  }
-
-  final public void NetMask() throws ParseException {
- /*@bgen(jjtree) NetMask */
-JDMNetMask jjtn000 = new JDMNetMask(JJTNETMASK);
-boolean jjtc000 = true;
-jjtree.openNodeScope(jjtn000);Token t;
-    try {
-      t = jj_consume_token(INTEGER_LITERAL);
-   jjtn000.address.append(t.image);
-      label_7:
-      while (true) {
-        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-        case DOT:
-          ;
-          break;
-        default:
-          jj_la1[12] = jj_gen;
-          break label_7;
-        }
-        jj_consume_token(DOT);
-        t = jj_consume_token(INTEGER_LITERAL);
-   jjtn000.address.append( "." + t.image);
-      }
-      jj_consume_token(MASK);
-      t = jj_consume_token(INTEGER_LITERAL);
-                              jjtree.closeNodeScope(jjtn000, true);
-                              jjtc000 = false;
-                             jjtn000.mask = t.image;
-    } finally {
-  if (jjtc000) {
-    jjtree.closeNodeScope(jjtn000, true);
-  }
-    }
-  }
-
-  final public void NetMaskV6() throws ParseException {
- /*@bgen(jjtree) NetMaskV6 */
-JDMNetMaskV6 jjtn000 = new JDMNetMaskV6(JJTNETMASKV6);
-boolean jjtc000 = true;
-jjtree.openNodeScope(jjtn000);Token t;
-    try {
-      t = jj_consume_token(V6_ADDRESS);
-   jjtn000.address.append(t.image);
-      jj_consume_token(MASK);
-      t = jj_consume_token(INTEGER_LITERAL);
-                           jjtree.closeNodeScope(jjtn000, true);
-                           jjtc000 = false;
-                          jjtn000.mask = t.image;
-    } finally {
-  if (jjtc000) {
-    jjtree.closeNodeScope(jjtn000, true);
-  }
-    }
-  }
-
-  final public void TrapBlock() throws ParseException {
-                   /*@bgen(jjtree) TrapBlock */
-  JDMTrapBlock jjtn000 = new JDMTrapBlock(JJTTRAPBLOCK);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-    try {
-      jj_consume_token(TRAP);
-      jj_consume_token(ASSIGN);
-      jj_consume_token(LBRACE);
-      label_8:
-      while (true) {
-        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-        case LBRACE:
-          ;
-          break;
-        default:
-          jj_la1[13] = jj_gen;
-          break label_8;
-        }
-        TrapItem();
-      }
-      jj_consume_token(RBRACE);
-    } catch (Throwable jjte000) {
-  if (jjtc000) {
-    jjtree.clearNodeScope(jjtn000);
-    jjtc000 = false;
-  } else {
-    jjtree.popNode();
-  }
-  if (jjte000 instanceof RuntimeException) {
-    {if (true) throw (RuntimeException)jjte000;}
-  }
-  if (jjte000 instanceof ParseException) {
-    {if (true) throw (ParseException)jjte000;}
-  }
-  {if (true) throw (Error)jjte000;}
-    } finally {
-  if (jjtc000) {
-    jjtree.closeNodeScope(jjtn000, true);
-  }
-    }
-  }
-
-  final public void TrapItem() throws ParseException {
-                  /*@bgen(jjtree) TrapItem */
-  JDMTrapItem jjtn000 = new JDMTrapItem(JJTTRAPITEM);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-    try {
-      jj_consume_token(LBRACE);
-      jjtn000.comm = TrapCommunity();
-      TrapInterestedHost();
-      label_9:
-      while (true) {
-        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-        case LBRACE:
-          ;
-          break;
-        default:
-          jj_la1[14] = jj_gen;
-          break label_9;
-        }
-        Enterprise();
-      }
-      jj_consume_token(RBRACE);
-    } catch (Throwable jjte000) {
-  if (jjtc000) {
-    jjtree.clearNodeScope(jjtn000);
-    jjtc000 = false;
-  } else {
-    jjtree.popNode();
-  }
-  if (jjte000 instanceof RuntimeException) {
-    {if (true) throw (RuntimeException)jjte000;}
-  }
-  if (jjte000 instanceof ParseException) {
-    {if (true) throw (ParseException)jjte000;}
-  }
-  {if (true) throw (Error)jjte000;}
-    } finally {
-  if (jjtc000) {
-    jjtree.closeNodeScope(jjtn000, true);
-  }
-    }
-  }
-
-  final public JDMTrapCommunity TrapCommunity() throws ParseException {
- /*@bgen(jjtree) TrapCommunity */
-  JDMTrapCommunity jjtn000 = new JDMTrapCommunity(JJTTRAPCOMMUNITY);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);Token t;
-    try {
-      jj_consume_token(TRAPCOMMUNITY);
-      jj_consume_token(ASSIGN);
-      t = jj_consume_token(IDENTIFIER);
-                                      jjtree.closeNodeScope(jjtn000, true);
-                                      jjtc000 = false;
-                                      jjtn000.community= t.image; {if (true) return jjtn000;}
-    } finally {
-  if (jjtc000) {
-    jjtree.closeNodeScope(jjtn000, true);
-  }
-    }
-    throw new Error("Missing return statement in function");
-  }
-
-  final public void TrapInterestedHost() throws ParseException {
-                            /*@bgen(jjtree) TrapInterestedHost */
-  JDMTrapInterestedHost jjtn000 = new JDMTrapInterestedHost(JJTTRAPINTERESTEDHOST);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-    try {
-      jj_consume_token(HOSTS);
-      jj_consume_token(ASSIGN);
-      HostTrap();
-      label_10:
-      while (true) {
-        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-        case COMMA:
-          ;
-          break;
-        default:
-          jj_la1[15] = jj_gen;
-          break label_10;
-        }
-        jj_consume_token(COMMA);
-        HostTrap();
-      }
-    } catch (Throwable jjte000) {
-  if (jjtc000) {
-    jjtree.clearNodeScope(jjtn000);
-    jjtc000 = false;
-  } else {
-    jjtree.popNode();
-  }
-  if (jjte000 instanceof RuntimeException) {
-    {if (true) throw (RuntimeException)jjte000;}
-  }
-  if (jjte000 instanceof ParseException) {
-    {if (true) throw (ParseException)jjte000;}
-  }
-  {if (true) throw (Error)jjte000;}
-    } finally {
-  if (jjtc000) {
-    jjtree.closeNodeScope(jjtn000, true);
-  }
-    }
-  }
-
-  final public void HostTrap() throws ParseException {
- /*@bgen(jjtree) HostTrap */
-  JDMHostTrap jjtn000 = new JDMHostTrap(JJTHOSTTRAP);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);Token t;
-    try {
-      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-      case IDENTIFIER:
-        HostName();
-        break;
-      case INTEGER_LITERAL:
-        IpAddress();
-        break;
-      case V6_ADDRESS:
-        IpV6Address();
-        break;
-      default:
-        jj_la1[16] = jj_gen;
-        jj_consume_token(-1);
-        throw new ParseException();
-      }
-    } catch (Throwable jjte000) {
-  if (jjtc000) {
-    jjtree.clearNodeScope(jjtn000);
-    jjtc000 = false;
-  } else {
-    jjtree.popNode();
-  }
-  if (jjte000 instanceof RuntimeException) {
-    {if (true) throw (RuntimeException)jjte000;}
-  }
-  if (jjte000 instanceof ParseException) {
-    {if (true) throw (ParseException)jjte000;}
-  }
-  {if (true) throw (Error)jjte000;}
-    } finally {
-  if (jjtc000) {
-    jjtree.closeNodeScope(jjtn000, true);
-  }
-    }
-  }
-
-  final public void Enterprise() throws ParseException {
- /*@bgen(jjtree) Enterprise */
-  JDMEnterprise jjtn000 = new JDMEnterprise(JJTENTERPRISE);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);Token t;
-    try {
-      jj_consume_token(LBRACE);
-      jj_consume_token(ENTERPRISE);
-      jj_consume_token(ASSIGN);
-      t = jj_consume_token(CSTRING);
-                               jjtn000.enterprise= t.image;
-      jj_consume_token(TRAPNUM);
-      jj_consume_token(ASSIGN);
-      TrapNum();
-      label_11:
-      while (true) {
-        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-        case COMMA:
-          ;
-          break;
-        default:
-          jj_la1[17] = jj_gen;
-          break label_11;
-        }
-        jj_consume_token(COMMA);
-        TrapNum();
-      }
-      jj_consume_token(RBRACE);
-    } catch (Throwable jjte000) {
-  if (jjtc000) {
-    jjtree.clearNodeScope(jjtn000);
-    jjtc000 = false;
-  } else {
-    jjtree.popNode();
-  }
-  if (jjte000 instanceof RuntimeException) {
-    {if (true) throw (RuntimeException)jjte000;}
-  }
-  if (jjte000 instanceof ParseException) {
-    {if (true) throw (ParseException)jjte000;}
-  }
-  {if (true) throw (Error)jjte000;}
-    } finally {
-  if (jjtc000) {
-    jjtree.closeNodeScope(jjtn000, true);
-  }
-    }
-  }
-
-  final public void TrapNum() throws ParseException {
- /*@bgen(jjtree) TrapNum */
-  JDMTrapNum jjtn000 = new JDMTrapNum(JJTTRAPNUM);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);Token t;
-    try {
-      t = jj_consume_token(INTEGER_LITERAL);
-                       jjtn000.low= Integer.parseInt(t.image);
-      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-      case RANGE:
-        jj_consume_token(RANGE);
-        t = jj_consume_token(INTEGER_LITERAL);
-                           jjtn000.high= Integer.parseInt(t.image);
-        break;
-      default:
-        jj_la1[18] = jj_gen;
-        ;
-      }
-    } finally {
-    if (jjtc000) {
-      jjtree.closeNodeScope(jjtn000, true);
-    }
-    }
-  }
-
-  final public void InformBlock() throws ParseException {
-                     /*@bgen(jjtree) InformBlock */
-  JDMInformBlock jjtn000 = new JDMInformBlock(JJTINFORMBLOCK);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-    try {
-      jj_consume_token(INFORM);
-      jj_consume_token(ASSIGN);
-      jj_consume_token(LBRACE);
-      label_12:
-      while (true) {
-        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-        case LBRACE:
-          ;
-          break;
-        default:
-          jj_la1[19] = jj_gen;
-          break label_12;
-        }
-        InformItem();
-      }
-      jj_consume_token(RBRACE);
-    } catch (Throwable jjte000) {
-  if (jjtc000) {
-    jjtree.clearNodeScope(jjtn000);
-    jjtc000 = false;
-  } else {
-    jjtree.popNode();
-  }
-  if (jjte000 instanceof RuntimeException) {
-    {if (true) throw (RuntimeException)jjte000;}
-  }
-  if (jjte000 instanceof ParseException) {
-    {if (true) throw (ParseException)jjte000;}
-  }
-  {if (true) throw (Error)jjte000;}
-    } finally {
-  if (jjtc000) {
-    jjtree.closeNodeScope(jjtn000, true);
-  }
-    }
-  }
-
-  final public void InformItem() throws ParseException {
-                    /*@bgen(jjtree) InformItem */
-  JDMInformItem jjtn000 = new JDMInformItem(JJTINFORMITEM);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-    try {
-      jj_consume_token(LBRACE);
-      jjtn000.comm = InformCommunity();
-      InformInterestedHost();
-      jj_consume_token(RBRACE);
-    } catch (Throwable jjte000) {
-  if (jjtc000) {
-    jjtree.clearNodeScope(jjtn000);
-    jjtc000 = false;
-  } else {
-    jjtree.popNode();
-  }
-  if (jjte000 instanceof RuntimeException) {
-    {if (true) throw (RuntimeException)jjte000;}
-  }
-  if (jjte000 instanceof ParseException) {
-    {if (true) throw (ParseException)jjte000;}
-  }
-  {if (true) throw (Error)jjte000;}
-    } finally {
-  if (jjtc000) {
-    jjtree.closeNodeScope(jjtn000, true);
-  }
-    }
-  }
-
-  final public JDMInformCommunity InformCommunity() throws ParseException {
- /*@bgen(jjtree) InformCommunity */
-  JDMInformCommunity jjtn000 = new JDMInformCommunity(JJTINFORMCOMMUNITY);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);Token t;
-    try {
-      jj_consume_token(INFORMCOMMUNITY);
-      jj_consume_token(ASSIGN);
-      t = jj_consume_token(IDENTIFIER);
-                                        jjtree.closeNodeScope(jjtn000, true);
-                                        jjtc000 = false;
-                                        jjtn000.community= t.image; {if (true) return jjtn000;}
-    } finally {
-  if (jjtc000) {
-    jjtree.closeNodeScope(jjtn000, true);
-  }
-    }
-    throw new Error("Missing return statement in function");
-  }
-
-  final public void InformInterestedHost() throws ParseException {
-                              /*@bgen(jjtree) InformInterestedHost */
-  JDMInformInterestedHost jjtn000 = new JDMInformInterestedHost(JJTINFORMINTERESTEDHOST);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-    try {
-      jj_consume_token(HOSTS);
-      jj_consume_token(ASSIGN);
-      HostInform();
-      label_13:
-      while (true) {
-        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-        case COMMA:
-          ;
-          break;
-        default:
-          jj_la1[20] = jj_gen;
-          break label_13;
-        }
-        jj_consume_token(COMMA);
-        HostInform();
-      }
-    } catch (Throwable jjte000) {
-  if (jjtc000) {
-    jjtree.clearNodeScope(jjtn000);
-    jjtc000 = false;
-  } else {
-    jjtree.popNode();
-  }
-  if (jjte000 instanceof RuntimeException) {
-    {if (true) throw (RuntimeException)jjte000;}
-  }
-  if (jjte000 instanceof ParseException) {
-    {if (true) throw (ParseException)jjte000;}
-  }
-  {if (true) throw (Error)jjte000;}
-    } finally {
-  if (jjtc000) {
-    jjtree.closeNodeScope(jjtn000, true);
-  }
-    }
-  }
-
-  final public void HostInform() throws ParseException {
- /*@bgen(jjtree) HostInform */
-  JDMHostInform jjtn000 = new JDMHostInform(JJTHOSTINFORM);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);Token t;
-    try {
-      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-      case IDENTIFIER:
-        HostName();
-        break;
-      case INTEGER_LITERAL:
-        IpAddress();
-        break;
-      case V6_ADDRESS:
-        IpV6Address();
-        break;
-      default:
-        jj_la1[21] = jj_gen;
-        jj_consume_token(-1);
-        throw new ParseException();
-      }
-    } catch (Throwable jjte000) {
-  if (jjtc000) {
-    jjtree.clearNodeScope(jjtn000);
-    jjtc000 = false;
-  } else {
-    jjtree.popNode();
-  }
-  if (jjte000 instanceof RuntimeException) {
-    {if (true) throw (RuntimeException)jjte000;}
-  }
-  if (jjte000 instanceof ParseException) {
-    {if (true) throw (ParseException)jjte000;}
-  }
-  {if (true) throw (Error)jjte000;}
-    } finally {
-  if (jjtc000) {
-    jjtree.closeNodeScope(jjtn000, true);
-  }
-    }
-  }
-
-  final private boolean jj_2_1(int xla) {
-    jj_la = xla; jj_lastpos = jj_scanpos = token;
-    boolean retval = !jj_3_1();
-    jj_save(0, xla);
-    return retval;
-  }
-
-  final private boolean jj_2_2(int xla) {
-    jj_la = xla; jj_lastpos = jj_scanpos = token;
-    boolean retval = !jj_3_2();
-    jj_save(1, xla);
-    return retval;
-  }
-
-  final private boolean jj_2_3(int xla) {
-    jj_la = xla; jj_lastpos = jj_scanpos = token;
-    boolean retval = !jj_3_3();
-    jj_save(2, xla);
-    return retval;
-  }
-
-  final private boolean jj_3_3() {
-    if (jj_scan_token(INTEGER_LITERAL)) return true;
-    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
-    if (jj_scan_token(DOT)) return true;
-    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
-    return false;
-  }
-
-  final private boolean jj_3_2() {
-    if (jj_scan_token(V6_ADDRESS)) return true;
-    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
-    if (jj_scan_token(MASK)) return true;
-    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
-    if (jj_scan_token(INTEGER_LITERAL)) return true;
-    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
-    return false;
-  }
-
-  final private boolean jj_3_1() {
-    if (jj_scan_token(INTEGER_LITERAL)) return true;
-    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
-    Token xsp;
-    while (true) {
-      xsp = jj_scanpos;
-      if (jj_3R_14()) { jj_scanpos = xsp; break; }
-      if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
-    }
-    if (jj_scan_token(MASK)) return true;
-    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
-    if (jj_scan_token(INTEGER_LITERAL)) return true;
-    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
-    return false;
-  }
-
-  final private boolean jj_3R_14() {
-    if (jj_scan_token(DOT)) return true;
-    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
-    if (jj_scan_token(INTEGER_LITERAL)) return true;
-    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
-    return false;
-  }
-
-  public ParserTokenManager token_source;
-  ASCII_CharStream jj_input_stream;
-  public Token token, jj_nt;
-  private int jj_ntk;
-  private Token jj_scanpos, jj_lastpos;
-  private int jj_la;
-  public boolean lookingAhead = false;
-  private boolean jj_semLA;
-  private int jj_gen;
-  final private int[] jj_la1 = new int[22];
-  final private int[] jj_la1_0 = {0x100,0x80000,0x100000,0x2000,0x0,0x60000,0x0,0x80000000,0x11000000,0x0,0x0,0x0,0x0,0x2000,0x2000,0x0,0x91000000,0x0,0x8000,0x2000,0x0,0x91000000,};
-  final private int[] jj_la1_1 = {0x0,0x0,0x0,0x0,0x10,0x0,0x10,0x0,0x0,0x20,0x20,0x40,0x20,0x0,0x0,0x10,0x0,0x10,0x0,0x0,0x10,0x0,};
-  final private JJCalls[] jj_2_rtns = new JJCalls[3];
-  private boolean jj_rescan = false;
-  private int jj_gc = 0;
-
-  public Parser(java.io.InputStream stream) {
-    jj_input_stream = new ASCII_CharStream(stream, 1, 1);
-    token_source = new ParserTokenManager(jj_input_stream);
-    token = new Token();
-    jj_ntk = -1;
-    jj_gen = 0;
-    for (int i = 0; i < 22; i++) jj_la1[i] = -1;
-    for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
-  }
-
-  public void ReInit(java.io.InputStream stream) {
-    jj_input_stream.ReInit(stream, 1, 1);
-    token_source.ReInit(jj_input_stream);
-    token = new Token();
-    jj_ntk = -1;
-    jjtree.reset();
-    jj_gen = 0;
-    for (int i = 0; i < 22; i++) jj_la1[i] = -1;
-    for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
-  }
-
-  public Parser(java.io.Reader stream) {
-    jj_input_stream = new ASCII_CharStream(stream, 1, 1);
-    token_source = new ParserTokenManager(jj_input_stream);
-    token = new Token();
-    jj_ntk = -1;
-    jj_gen = 0;
-    for (int i = 0; i < 22; i++) jj_la1[i] = -1;
-    for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
-  }
-
-  public void ReInit(java.io.Reader stream) {
-    jj_input_stream.ReInit(stream, 1, 1);
-    token_source.ReInit(jj_input_stream);
-    token = new Token();
-    jj_ntk = -1;
-    jjtree.reset();
-    jj_gen = 0;
-    for (int i = 0; i < 22; i++) jj_la1[i] = -1;
-    for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
-  }
-
-  public Parser(ParserTokenManager tm) {
-    token_source = tm;
-    token = new Token();
-    jj_ntk = -1;
-    jj_gen = 0;
-    for (int i = 0; i < 22; i++) jj_la1[i] = -1;
-    for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
-  }
-
-  public void ReInit(ParserTokenManager tm) {
-    token_source = tm;
-    token = new Token();
-    jj_ntk = -1;
-    jjtree.reset();
-    jj_gen = 0;
-    for (int i = 0; i < 22; i++) jj_la1[i] = -1;
-    for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
-  }
-
-  final private Token jj_consume_token(int kind) throws ParseException {
-    Token oldToken;
-    if ((oldToken = token).next != null) token = token.next;
-    else token = token.next = token_source.getNextToken();
-    jj_ntk = -1;
-    if (token.kind == kind) {
-      jj_gen++;
-      if (++jj_gc > 100) {
-        jj_gc = 0;
-        for (int i = 0; i < jj_2_rtns.length; i++) {
-          JJCalls c = jj_2_rtns[i];
-          while (c != null) {
-            if (c.gen < jj_gen) c.first = null;
-            c = c.next;
-          }
-        }
-      }
-      return token;
-    }
-    token = oldToken;
-    jj_kind = kind;
-    throw generateParseException();
-  }
-
-  final private boolean jj_scan_token(int kind) {
-    if (jj_scanpos == jj_lastpos) {
-      jj_la--;
-      if (jj_scanpos.next == null) {
-        jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken();
-      } else {
-        jj_lastpos = jj_scanpos = jj_scanpos.next;
-      }
-    } else {
-      jj_scanpos = jj_scanpos.next;
-    }
-    if (jj_rescan) {
-      int i = 0; Token tok = token;
-      while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; }
-      if (tok != null) jj_add_error_token(kind, i);
-    }
-    return (jj_scanpos.kind != kind);
-  }
-
-  final public Token getNextToken() {
-    if (token.next != null) token = token.next;
-    else token = token.next = token_source.getNextToken();
-    jj_ntk = -1;
-    jj_gen++;
-    return token;
-  }
-
-  final public Token getToken(int index) {
-    Token t = lookingAhead ? jj_scanpos : token;
-    for (int i = 0; i < index; i++) {
-      if (t.next != null) t = t.next;
-      else t = t.next = token_source.getNextToken();
-    }
-    return t;
-  }
-
-  final private int jj_ntk() {
-    if ((jj_nt=token.next) == null)
-      return (jj_ntk = (token.next=token_source.getNextToken()).kind);
-    else
-      return (jj_ntk = jj_nt.kind);
-  }
-
-  private java.util.Vector<int[]> jj_expentries = new java.util.Vector<>();
-  private int[] jj_expentry;
-  private int jj_kind = -1;
-  private int[] jj_lasttokens = new int[100];
-  private int jj_endpos;
-
-  private void jj_add_error_token(int kind, int pos) {
-    if (pos >= 100) return;
-    if (pos == jj_endpos + 1) {
-      jj_lasttokens[jj_endpos++] = kind;
-    } else if (jj_endpos != 0) {
-      jj_expentry = new int[jj_endpos];
-      for (int i = 0; i < jj_endpos; i++) {
-        jj_expentry[i] = jj_lasttokens[i];
-      }
-      boolean exists = false;
-      for (java.util.Enumeration<int[]> enumv = jj_expentries.elements(); enumv.hasMoreElements();) {
-        int[] oldentry = enumv.nextElement();
-        if (oldentry.length == jj_expentry.length) {
-          exists = true;
-          for (int i = 0; i < jj_expentry.length; i++) {
-            if (oldentry[i] != jj_expentry[i]) {
-              exists = false;
-              break;
-            }
-          }
-          if (exists) break;
-        }
-      }
-      if (!exists) jj_expentries.addElement(jj_expentry);
-      if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind;
-    }
-  }
-
-  final public ParseException generateParseException() {
-    jj_expentries.removeAllElements();
-    boolean[] la1tokens = new boolean[40];
-    for (int i = 0; i < 40; i++) {
-      la1tokens[i] = false;
-    }
-    if (jj_kind >= 0) {
-      la1tokens[jj_kind] = true;
-      jj_kind = -1;
-    }
-    for (int i = 0; i < 22; i++) {
-      if (jj_la1[i] == jj_gen) {
-        for (int j = 0; j < 32; j++) {
-          if ((jj_la1_0[i] & (1<<j)) != 0) {
-            la1tokens[j] = true;
-          }
-          if ((jj_la1_1[i] & (1<<j)) != 0) {
-            la1tokens[32+j] = true;
-          }
-        }
-      }
-    }
-    for (int i = 0; i < 40; i++) {
-      if (la1tokens[i]) {
-        jj_expentry = new int[1];
-        jj_expentry[0] = i;
-        jj_expentries.addElement(jj_expentry);
-      }
-    }
-    jj_endpos = 0;
-    jj_rescan_token();
-    jj_add_error_token(0, 0);
-    int[][] exptokseq = new int[jj_expentries.size()][];
-    for (int i = 0; i < jj_expentries.size(); i++) {
-      exptokseq[i] = jj_expentries.elementAt(i);
-    }
-    return new ParseException(token, exptokseq, tokenImage);
-  }
-
-  final public void enable_tracing() {
-  }
-
-  final public void disable_tracing() {
-  }
-
-  final private void jj_rescan_token() {
-    jj_rescan = true;
-    for (int i = 0; i < 3; i++) {
-      JJCalls p = jj_2_rtns[i];
-      do {
-        if (p.gen > jj_gen) {
-          jj_la = p.arg; jj_lastpos = jj_scanpos = p.first;
-          switch (i) {
-            case 0: jj_3_1(); break;
-            case 1: jj_3_2(); break;
-            case 2: jj_3_3(); break;
-          }
-        }
-        p = p.next;
-      } while (p != null);
-    }
-    jj_rescan = false;
-  }
-
-  final private void jj_save(int index, int xla) {
-    JJCalls p = jj_2_rtns[index];
-    while (p.gen > jj_gen) {
-      if (p.next == null) { p = p.next = new JJCalls(); break; }
-      p = p.next;
-    }
-    p.gen = jj_gen + xla - jj_la; p.first = token; p.arg = xla;
-  }
-
-  static final class JJCalls {
-    int gen;
-    Token first;
-    int arg;
-    JJCalls next;
-  }
-
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/Parser.jj	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,948 +0,0 @@
-/*@bgen(jjtree) Generated By:JJTree: Do not edit this line. Parser.jj */
-/*@egen*//*
- * @(#)file      Parser.jjt
- * @(#)author    Sun Microsystems, Inc.
- *
- * Copyright (c) 1997, 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-options {              
-  STATIC=false;                                                                
-}
-
-
-PARSER_BEGIN(Parser)
-
-package com.sun.jmx.snmp.IPAcl;
-
-import java.io.*;
-
-public class Parser/*@bgen(jjtree)*/implements ParserTreeConstants/*@egen*/ {/*@bgen(jjtree)*/
-  protected JJTParserState jjtree = new JJTParserState();
-
-/*@egen*/
-}
-
-PARSER_END(Parser)
-
-
-SKIP :
-{
-  " "
-| "\t"
-| "\n"
-| "\r"
-| <"--" (~["\n","\r"])* ("\n"|"\r"|"\r\n")>
-| <"#" (~["\n","\r"])* ("\n"|"\r"|"\r\n")>
-
-}
-
-
-
-/* RESERVED WORDS AND LITERALS */
-
-TOKEN : 
-{
-  <ACCESS: "access">
-| <ACL: "acl">
-| <ASSIGN: "=">
-| <COMMUNITIES: "communities">
-| <ENTERPRISE: "enterprise">
-| <HOSTS: "hosts">
-| <LBRACE: "{">
-| <MANAGERS: "managers">
-| <RANGE: "-">
-| <RBRACE: "}">
-| <RO: "read-only">
-| <RW: "read-write">
-| <TRAP: "trap">
-| <INFORM: "inform">
-| <TRAPCOMMUNITY: "trap-community">
-| <INFORMCOMMUNITY: "inform-community">
-| <TRAPNUM: "trap-num">
-}
-
-
-
-TOKEN : /* LITERALS */
-{
-  < INTEGER_LITERAL:
-        <DECIMAL_LITERAL> (["l","L"])?
-      | <HEX_LITERAL> (["l","L"])?
-      | <OCTAL_LITERAL> (["l","L"])?
-  >
-|
-  < #DECIMAL_LITERAL: ["1"-"9"] (["0"-"9"])* >
-|
-  < #HEX_LITERAL: "0" ["x","X"] (["0"-"9","a"-"f","A"-"F"])+ >
-|      
-  < #OCTAL_LITERAL: "0" (["0"-"7"])* >
-}
-
-TOKEN : /* V6 LITERALS */
-{ 
-  < V6_ADDRESS: ((( ( (<H> ":")+ (":")?) | "::" ) (<H> ":")* (<H> | (<D> "." <D> "." <D> "." <D>))) | ("::")) | ( (<H> ":")+ ":") >
-|
-  <#H: (["0"-"9","a"-"f","A"-"F"])+ >
-| 
-  <#D: (["0"-"9"])+ >
-}
- 
-TOKEN : /* IDENTIFIERS */
-{
-  < IDENTIFIER: ( (<DIGIT>|<LETTER>)+ (<SEPARATOR>|<LETTER>|<DIGIT>)* (<DIGIT>|<LETTER>)+ ) | (<DIGIT>|<LETTER>)+ >
-|
-  < #LETTER: ["a"-"z","A"-"Z"] >
-|
-  < #SEPARATOR: ["-", "_"] >
-|
-  < #DIGIT: ["0"-"9"] >
-|
- <CSTRING: "\"" (~["\""])* "\"">
-}
-
- 
-
-TOKEN: /* SEPARATOR */
-{
-  < COMMA: "," >
-| < DOT: "." >
-| < MARK: "!" >
-| < MASK: "/">
-}
-
-// A file can contain several acl definitions
-//
-JDMSecurityDefs SecurityDefs()  : {/*@bgen(jjtree) SecurityDefs */
-  JDMSecurityDefs jjtn000 = new JDMSecurityDefs(JJTSECURITYDEFS);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-/*@egen*/}
-{/*@bgen(jjtree) SecurityDefs */
-  try {
-/*@egen*/
-  [AclBlock()]
-  [TrapBlock()]
-  [InformBlock()]
-  <EOF>/*@bgen(jjtree)*/
-  {
-    jjtree.closeNodeScope(jjtn000, true);
-    jjtc000 = false;
-  }
-/*@egen*/
-  { return jjtn000;}/*@bgen(jjtree)*/
-  } catch (Throwable jjte000) {
-    if (jjtc000) {
-      jjtree.clearNodeScope(jjtn000);
-      jjtc000 = false;
-    } else {
-      jjtree.popNode();
-    }
-    if (jjte000 instanceof RuntimeException) {
-      throw (RuntimeException)jjte000;
-    }
-    if (jjte000 instanceof ParseException) {
-      throw (ParseException)jjte000;
-    }
-    throw (Error)jjte000;
-  } finally {
-    if (jjtc000) {
-      jjtree.closeNodeScope(jjtn000, true);
-    }
-  }
-/*@egen*/
-}
-
-void AclBlock(): {/*@bgen(jjtree) AclBlock */
-  JDMAclBlock jjtn000 = new JDMAclBlock(JJTACLBLOCK);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-/*@egen*/}
-{/*@bgen(jjtree) AclBlock */
-try {
-/*@egen*/
-"acl" "=" "{" (AclItem())+ "}"/*@bgen(jjtree)*/
-} catch (Throwable jjte000) {
-  if (jjtc000) {
-    jjtree.clearNodeScope(jjtn000);
-    jjtc000 = false;
-  } else {
-    jjtree.popNode();
-  }
-  if (jjte000 instanceof RuntimeException) {
-    throw (RuntimeException)jjte000;
-  }
-  if (jjte000 instanceof ParseException) {
-    throw (ParseException)jjte000;
-  }
-  throw (Error)jjte000;
-} finally {
-  if (jjtc000) {
-    jjtree.closeNodeScope(jjtn000, true);
-  }
-}
-/*@egen*/
-}
-
-void AclItem(): {/*@bgen(jjtree) AclItem */
-  JDMAclItem jjtn000 = new JDMAclItem(JJTACLITEM);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-/*@egen*/}
-{/*@bgen(jjtree) AclItem */
-try {
-/*@egen*/
-"{" jjtn000.com= Communities() jjtn000.access= Access() Managers() "}"/*@bgen(jjtree)*/
-} catch (Throwable jjte000) {
-  if (jjtc000) {
-    jjtree.clearNodeScope(jjtn000);
-    jjtc000 = false;
-  } else {
-    jjtree.popNode();
-  }
-  if (jjte000 instanceof RuntimeException) {
-    throw (RuntimeException)jjte000;
-  }
-  if (jjte000 instanceof ParseException) {
-    throw (ParseException)jjte000;
-  }
-  throw (Error)jjte000;
-} finally {
-  if (jjtc000) {
-    jjtree.closeNodeScope(jjtn000, true);
-  }
-}
-/*@egen*/
-}
-
-JDMCommunities Communities(): {/*@bgen(jjtree) Communities */
-  JDMCommunities jjtn000 = new JDMCommunities(JJTCOMMUNITIES);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-/*@egen*/}
-{/*@bgen(jjtree) Communities */
-try {
-/*@egen*/
-"communities" "=" Community() ( "," Community())*/*@bgen(jjtree)*/
-{
-  jjtree.closeNodeScope(jjtn000, true);
-  jjtc000 = false;
-}
-/*@egen*/
-
-{return jjtn000;}/*@bgen(jjtree)*/
-} catch (Throwable jjte000) {
-  if (jjtc000) {
-    jjtree.clearNodeScope(jjtn000);
-    jjtc000 = false;
-  } else {
-    jjtree.popNode();
-  }
-  if (jjte000 instanceof RuntimeException) {
-    throw (RuntimeException)jjte000;
-  }
-  if (jjte000 instanceof ParseException) {
-    throw (ParseException)jjte000;
-  }
-  throw (Error)jjte000;
-} finally {
-  if (jjtc000) {
-    jjtree.closeNodeScope(jjtn000, true);
-  }
-}
-/*@egen*/
-
-}
-
-void Community(): 
-{/*@bgen(jjtree) Community */
-  JDMCommunity jjtn000 = new JDMCommunity(JJTCOMMUNITY);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-/*@egen*/
-  Token t;
-}
-{/*@bgen(jjtree) Community */
-try {
-/*@egen*/
-t=<IDENTIFIER>/*@bgen(jjtree)*/
-               {
-                 jjtree.closeNodeScope(jjtn000, true);
-                 jjtc000 = false;
-               }
-/*@egen*/ {jjtn000.communityString= t.image;}/*@bgen(jjtree)*/
-} finally {
-  if (jjtc000) {
-    jjtree.closeNodeScope(jjtn000, true);
-  }
-}
-/*@egen*/
-}
-
-JDMAccess Access(): {/*@bgen(jjtree) Access */
-  JDMAccess jjtn000 = new JDMAccess(JJTACCESS);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-/*@egen*/}
-{/*@bgen(jjtree) Access */
-try {
-/*@egen*/
-"access" "=" ( <RO> {jjtn000.access= RO;}
-              |
-               <RW> {jjtn000.access= RW;}
-             )/*@bgen(jjtree)*/
-{
-  jjtree.closeNodeScope(jjtn000, true);
-  jjtc000 = false;
-}
-/*@egen*/
-{return jjtn000;}/*@bgen(jjtree)*/
-} finally {
-  if (jjtc000) {
-    jjtree.closeNodeScope(jjtn000, true);
-  }
-}
-/*@egen*/
-}
-
-
-void Managers() : {/*@bgen(jjtree) Managers */
-  JDMManagers jjtn000 = new JDMManagers(JJTMANAGERS);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-/*@egen*/ }
-{/*@bgen(jjtree) Managers */
-try {
-/*@egen*/
-"managers" "=" Host() ( "," Host())*/*@bgen(jjtree)*/
-} catch (Throwable jjte000) {
-  if (jjtc000) {
-    jjtree.clearNodeScope(jjtn000);
-    jjtc000 = false;
-  } else {
-    jjtree.popNode();
-  }
-  if (jjte000 instanceof RuntimeException) {
-    throw (RuntimeException)jjte000;
-  }
-  if (jjte000 instanceof ParseException) {
-    throw (ParseException)jjte000;
-  }
-  throw (Error)jjte000;
-} finally {
-  if (jjtc000) {
-    jjtree.closeNodeScope(jjtn000, true);
-  }
-}
-/*@egen*/
-}
-
-void Host() : 
-{/*@bgen(jjtree) Host */
-  JDMHost jjtn000 = new JDMHost(JJTHOST);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-/*@egen*/
-  Token t;
-}
-{/*@bgen(jjtree) Host */
-try {
-/*@egen*/
-HostName()
-|
-LOOKAHEAD(<INTEGER_LITERAL> ( "." <INTEGER_LITERAL> )* "/" <INTEGER_LITERAL>)
-NetMask()
-|
-LOOKAHEAD(<V6_ADDRESS> "/" <INTEGER_LITERAL>)
-NetMaskV6()
-|
-LOOKAHEAD(<INTEGER_LITERAL> ".")
-IpAddress()
-|
-IpV6Address()
-|
-IpMask()/*@bgen(jjtree)*/
-} catch (Throwable jjte000) {
-  if (jjtc000) {
-    jjtree.clearNodeScope(jjtn000);
-    jjtc000 = false;
-  } else {
-    jjtree.popNode();
-  }
-  if (jjte000 instanceof RuntimeException) {
-    throw (RuntimeException)jjte000;
-  }
-  if (jjte000 instanceof ParseException) {
-    throw (ParseException)jjte000;
-  }
-  throw (Error)jjte000;
-} finally {
-  if (jjtc000) {
-    jjtree.closeNodeScope(jjtn000, true);
-  }
-}
-/*@egen*/
-}
-
-void HostName():
-{/*@bgen(jjtree) HostName */
-  JDMHostName jjtn000 = new JDMHostName(JJTHOSTNAME);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-/*@egen*/
-  Token t;
-}
-{/*@bgen(jjtree) HostName */
-  try {
-/*@egen*/
-  t=<IDENTIFIER> { jjtn000.name.append(t.image); }
-(
-"." t=<IDENTIFIER> 
-  {jjtn000.name.append( "." + t.image); }
-)*/*@bgen(jjtree)*/
-  } finally {
-    if (jjtc000) {
-      jjtree.closeNodeScope(jjtn000, true);
-    }
-  }
-/*@egen*/
-
-}
-
-void IpAddress():
-{/*@bgen(jjtree) IpAddress */
-JDMIpAddress jjtn000 = new JDMIpAddress(JJTIPADDRESS);
-boolean jjtc000 = true;
-jjtree.openNodeScope(jjtn000);
-/*@egen*/
-Token t;
-}
-{/*@bgen(jjtree) IpAddress */
-try {
-/*@egen*/
-
-t= <INTEGER_LITERAL> 
-  {jjtn000.address.append(t.image); }
-(
-"." t= <INTEGER_LITERAL> 
-  {jjtn000.address.append( "." + t.image); }
-)*/*@bgen(jjtree)*/
-} finally {
-  if (jjtc000) {
-    jjtree.closeNodeScope(jjtn000, true);
-  }
-}
-/*@egen*/
-
-}
-
-void IpV6Address():
-{/*@bgen(jjtree) IpV6Address */
-JDMIpV6Address jjtn000 = new JDMIpV6Address(JJTIPV6ADDRESS);
-boolean jjtc000 = true;
-jjtree.openNodeScope(jjtn000);
-/*@egen*/
-Token t;
-}
-{/*@bgen(jjtree) IpV6Address */
-try {
-/*@egen*/
-
-t= <V6_ADDRESS>/*@bgen(jjtree)*/
-  {
-    jjtree.closeNodeScope(jjtn000, true);
-    jjtc000 = false;
-  }
-/*@egen*/ 
-  {jjtn000.address.append(t.image); }/*@bgen(jjtree)*/
-} finally {
-  if (jjtc000) {
-    jjtree.closeNodeScope(jjtn000, true);
-  }
-}
-/*@egen*/
-}
-
-void IpMask():
-{/*@bgen(jjtree) IpMask */
-JDMIpMask jjtn000 = new JDMIpMask(JJTIPMASK);
-boolean jjtc000 = true;
-jjtree.openNodeScope(jjtn000);
-/*@egen*/
-Token t;
-}
-{/*@bgen(jjtree) IpMask */
-try {
-/*@egen*/
-
-t= <INTEGER_LITERAL> 
-  {jjtn000.address.append(t.image); }
-(
-"!" t= <INTEGER_LITERAL> 
-  {jjtn000.address.append( "." + t.image); }
-)*/*@bgen(jjtree)*/
-} finally {
-  if (jjtc000) {
-    jjtree.closeNodeScope(jjtn000, true);
-  }
-}
-/*@egen*/
-}
-
-void NetMask():
-{/*@bgen(jjtree) NetMask */
-JDMNetMask jjtn000 = new JDMNetMask(JJTNETMASK);
-boolean jjtc000 = true;
-jjtree.openNodeScope(jjtn000);
-/*@egen*/
-Token t;
-}
-{/*@bgen(jjtree) NetMask */
-try {
-/*@egen*/
-
-t= <INTEGER_LITERAL> 
-  {jjtn000.address.append(t.image); }
-(
-"." t= <INTEGER_LITERAL> 
-  {jjtn000.address.append( "." + t.image); }
-)* "/" t= <INTEGER_LITERAL>/*@bgen(jjtree)*/
-                            {
-                              jjtree.closeNodeScope(jjtn000, true);
-                              jjtc000 = false;
-                            }
-/*@egen*/ {jjtn000.mask = t.image; }/*@bgen(jjtree)*/
-} finally {
-  if (jjtc000) {
-    jjtree.closeNodeScope(jjtn000, true);
-  }
-}
-/*@egen*/
-}
-
-void NetMaskV6():
-{/*@bgen(jjtree) NetMaskV6 */
-JDMNetMaskV6 jjtn000 = new JDMNetMaskV6(JJTNETMASKV6);
-boolean jjtc000 = true;
-jjtree.openNodeScope(jjtn000);
-/*@egen*/
-Token t;
-}
-{/*@bgen(jjtree) NetMaskV6 */
-try {
-/*@egen*/
-
-t= <V6_ADDRESS> 
-  {jjtn000.address.append(t.image); }
-
-"/" t= <INTEGER_LITERAL>/*@bgen(jjtree)*/
-                         {
-                           jjtree.closeNodeScope(jjtn000, true);
-                           jjtc000 = false;
-                         }
-/*@egen*/ {jjtn000.mask = t.image; }/*@bgen(jjtree)*/
-} finally {
-  if (jjtc000) {
-    jjtree.closeNodeScope(jjtn000, true);
-  }
-}
-/*@egen*/
-}
-
-void TrapBlock(): {/*@bgen(jjtree) TrapBlock */
-  JDMTrapBlock jjtn000 = new JDMTrapBlock(JJTTRAPBLOCK);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-/*@egen*/ }
-{/*@bgen(jjtree) TrapBlock */
-try {
-/*@egen*/
-"trap" "=" "{" (TrapItem())* "}"/*@bgen(jjtree)*/
-} catch (Throwable jjte000) {
-  if (jjtc000) {
-    jjtree.clearNodeScope(jjtn000);
-    jjtc000 = false;
-  } else {
-    jjtree.popNode();
-  }
-  if (jjte000 instanceof RuntimeException) {
-    throw (RuntimeException)jjte000;
-  }
-  if (jjte000 instanceof ParseException) {
-    throw (ParseException)jjte000;
-  }
-  throw (Error)jjte000;
-} finally {
-  if (jjtc000) {
-    jjtree.closeNodeScope(jjtn000, true);
-  }
-}
-/*@egen*/
-}
-
-void TrapItem(): {/*@bgen(jjtree) TrapItem */
-  JDMTrapItem jjtn000 = new JDMTrapItem(JJTTRAPITEM);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-/*@egen*/ }
-{/*@bgen(jjtree) TrapItem */
-try {
-/*@egen*/
-"{" jjtn000.comm= TrapCommunity() TrapInterestedHost() (Enterprise())* "}"/*@bgen(jjtree)*/
-} catch (Throwable jjte000) {
-  if (jjtc000) {
-    jjtree.clearNodeScope(jjtn000);
-    jjtc000 = false;
-  } else {
-    jjtree.popNode();
-  }
-  if (jjte000 instanceof RuntimeException) {
-    throw (RuntimeException)jjte000;
-  }
-  if (jjte000 instanceof ParseException) {
-    throw (ParseException)jjte000;
-  }
-  throw (Error)jjte000;
-} finally {
-  if (jjtc000) {
-    jjtree.closeNodeScope(jjtn000, true);
-  }
-}
-/*@egen*/
-}
-
-JDMTrapCommunity TrapCommunity(): 
-{/*@bgen(jjtree) TrapCommunity */
-  JDMTrapCommunity jjtn000 = new JDMTrapCommunity(JJTTRAPCOMMUNITY);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-/*@egen*/
-  Token t;
-}
-{/*@bgen(jjtree) TrapCommunity */
-try {
-/*@egen*/
-"trap-community" "=" t=<IDENTIFIER>/*@bgen(jjtree)*/
-                                    {
-                                      jjtree.closeNodeScope(jjtn000, true);
-                                      jjtc000 = false;
-                                    }
-/*@egen*/ { jjtn000.community= t.image; return jjtn000; }/*@bgen(jjtree)*/
-} finally {
-  if (jjtc000) {
-    jjtree.closeNodeScope(jjtn000, true);
-  }
-}
-/*@egen*/
-}
-
-void TrapInterestedHost(): {/*@bgen(jjtree) TrapInterestedHost */
-  JDMTrapInterestedHost jjtn000 = new JDMTrapInterestedHost(JJTTRAPINTERESTEDHOST);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-/*@egen*/ }
-{/*@bgen(jjtree) TrapInterestedHost */
-try {
-/*@egen*/
-"hosts" "=" HostTrap() ("," HostTrap())*/*@bgen(jjtree)*/
-} catch (Throwable jjte000) {
-  if (jjtc000) {
-    jjtree.clearNodeScope(jjtn000);
-    jjtc000 = false;
-  } else {
-    jjtree.popNode();
-  }
-  if (jjte000 instanceof RuntimeException) {
-    throw (RuntimeException)jjte000;
-  }
-  if (jjte000 instanceof ParseException) {
-    throw (ParseException)jjte000;
-  }
-  throw (Error)jjte000;
-} finally {
-  if (jjtc000) {
-    jjtree.closeNodeScope(jjtn000, true);
-  }
-}
-/*@egen*/
-}
-
-void HostTrap() : 
-{/*@bgen(jjtree) HostTrap */
-  JDMHostTrap jjtn000 = new JDMHostTrap(JJTHOSTTRAP);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-/*@egen*/
-  Token t;
-}
-{/*@bgen(jjtree) HostTrap */
-try {
-/*@egen*/
-HostName()
-|
-IpAddress()
-|
-IpV6Address()/*@bgen(jjtree)*/
-} catch (Throwable jjte000) {
-  if (jjtc000) {
-    jjtree.clearNodeScope(jjtn000);
-    jjtc000 = false;
-  } else {
-    jjtree.popNode();
-  }
-  if (jjte000 instanceof RuntimeException) {
-    throw (RuntimeException)jjte000;
-  }
-  if (jjte000 instanceof ParseException) {
-    throw (ParseException)jjte000;
-  }
-  throw (Error)jjte000;
-} finally {
-  if (jjtc000) {
-    jjtree.closeNodeScope(jjtn000, true);
-  }
-}
-/*@egen*/
-}
-
-void Enterprise(): 
-{/*@bgen(jjtree) Enterprise */
-  JDMEnterprise jjtn000 = new JDMEnterprise(JJTENTERPRISE);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-/*@egen*/
-  Token t;
-}
-{/*@bgen(jjtree) Enterprise */
-try {
-/*@egen*/
-"{"
-"enterprise" "="  t=<CSTRING> {jjtn000.enterprise= t.image;}
-
-"trap-num" "=" TrapNum() ("," TrapNum())*
-
-"}"/*@bgen(jjtree)*/
-} catch (Throwable jjte000) {
-  if (jjtc000) {
-    jjtree.clearNodeScope(jjtn000);
-    jjtc000 = false;
-  } else {
-    jjtree.popNode();
-  }
-  if (jjte000 instanceof RuntimeException) {
-    throw (RuntimeException)jjte000;
-  }
-  if (jjte000 instanceof ParseException) {
-    throw (ParseException)jjte000;
-  }
-  throw (Error)jjte000;
-} finally {
-  if (jjtc000) {
-    jjtree.closeNodeScope(jjtn000, true);
-  }
-}
-/*@egen*/
-}
-
-void TrapNum():
-{/*@bgen(jjtree) TrapNum */
-  JDMTrapNum jjtn000 = new JDMTrapNum(JJTTRAPNUM);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-/*@egen*/
-  Token t;
-}
-{/*@bgen(jjtree) TrapNum */
-  try {
-/*@egen*/
-  t=<INTEGER_LITERAL> {jjtn000.low= Integer.parseInt(t.image);}
-[
-  "-" t=<INTEGER_LITERAL> {jjtn000.high= Integer.parseInt(t.image);}
-]/*@bgen(jjtree)*/
-  } finally {
-    if (jjtc000) {
-      jjtree.closeNodeScope(jjtn000, true);
-    }
-  }
-/*@egen*/
-}
-
-
-void InformBlock(): {/*@bgen(jjtree) InformBlock */
-  JDMInformBlock jjtn000 = new JDMInformBlock(JJTINFORMBLOCK);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-/*@egen*/ }
-{/*@bgen(jjtree) InformBlock */
-try {
-/*@egen*/
-"inform" "=" "{" (InformItem())* "}"/*@bgen(jjtree)*/
-} catch (Throwable jjte000) {
-  if (jjtc000) {
-    jjtree.clearNodeScope(jjtn000);
-    jjtc000 = false;
-  } else {
-    jjtree.popNode();
-  }
-  if (jjte000 instanceof RuntimeException) {
-    throw (RuntimeException)jjte000;
-  }
-  if (jjte000 instanceof ParseException) {
-    throw (ParseException)jjte000;
-  }
-  throw (Error)jjte000;
-} finally {
-  if (jjtc000) {
-    jjtree.closeNodeScope(jjtn000, true);
-  }
-}
-/*@egen*/
-}
-
-void InformItem(): {/*@bgen(jjtree) InformItem */
-  JDMInformItem jjtn000 = new JDMInformItem(JJTINFORMITEM);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-/*@egen*/ }
-{/*@bgen(jjtree) InformItem */
-try {
-/*@egen*/
-"{" jjtn000.comm= InformCommunity() InformInterestedHost() "}"/*@bgen(jjtree)*/
-} catch (Throwable jjte000) {
-  if (jjtc000) {
-    jjtree.clearNodeScope(jjtn000);
-    jjtc000 = false;
-  } else {
-    jjtree.popNode();
-  }
-  if (jjte000 instanceof RuntimeException) {
-    throw (RuntimeException)jjte000;
-  }
-  if (jjte000 instanceof ParseException) {
-    throw (ParseException)jjte000;
-  }
-  throw (Error)jjte000;
-} finally {
-  if (jjtc000) {
-    jjtree.closeNodeScope(jjtn000, true);
-  }
-}
-/*@egen*/
-}
-
-JDMInformCommunity InformCommunity(): 
-{/*@bgen(jjtree) InformCommunity */
-  JDMInformCommunity jjtn000 = new JDMInformCommunity(JJTINFORMCOMMUNITY);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-/*@egen*/
-  Token t;
-}
-{/*@bgen(jjtree) InformCommunity */
-try {
-/*@egen*/
-"inform-community" "=" t=<IDENTIFIER>/*@bgen(jjtree)*/
-                                      {
-                                        jjtree.closeNodeScope(jjtn000, true);
-                                        jjtc000 = false;
-                                      }
-/*@egen*/ { jjtn000.community= t.image; return jjtn000; }/*@bgen(jjtree)*/
-} finally {
-  if (jjtc000) {
-    jjtree.closeNodeScope(jjtn000, true);
-  }
-}
-/*@egen*/
-}
-
-void InformInterestedHost(): {/*@bgen(jjtree) InformInterestedHost */
-  JDMInformInterestedHost jjtn000 = new JDMInformInterestedHost(JJTINFORMINTERESTEDHOST);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-/*@egen*/ }
-{/*@bgen(jjtree) InformInterestedHost */
-try {
-/*@egen*/
-"hosts" "=" HostInform() ("," HostInform())*/*@bgen(jjtree)*/
-} catch (Throwable jjte000) {
-  if (jjtc000) {
-    jjtree.clearNodeScope(jjtn000);
-    jjtc000 = false;
-  } else {
-    jjtree.popNode();
-  }
-  if (jjte000 instanceof RuntimeException) {
-    throw (RuntimeException)jjte000;
-  }
-  if (jjte000 instanceof ParseException) {
-    throw (ParseException)jjte000;
-  }
-  throw (Error)jjte000;
-} finally {
-  if (jjtc000) {
-    jjtree.closeNodeScope(jjtn000, true);
-  }
-}
-/*@egen*/
-}
-
-void HostInform() : 
-{/*@bgen(jjtree) HostInform */
-  JDMHostInform jjtn000 = new JDMHostInform(JJTHOSTINFORM);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-/*@egen*/
-  Token t;
-}
-{/*@bgen(jjtree) HostInform */
-try {
-/*@egen*/
-HostName()
-|
-IpAddress()
-|
-IpV6Address()/*@bgen(jjtree)*/
-} catch (Throwable jjte000) {
-  if (jjtc000) {
-    jjtree.clearNodeScope(jjtn000);
-    jjtc000 = false;
-  } else {
-    jjtree.popNode();
-  }
-  if (jjte000 instanceof RuntimeException) {
-    throw (RuntimeException)jjte000;
-  }
-  if (jjte000 instanceof ParseException) {
-    throw (ParseException)jjte000;
-  }
-  throw (Error)jjte000;
-} finally {
-  if (jjtc000) {
-    jjtree.closeNodeScope(jjtn000, true);
-  }
-}
-/*@egen*/
-}
-
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/Parser.jjt	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,380 +0,0 @@
-/*
- * @(#)file      Parser.jjt
- * @(#)author    Sun Microsystems, Inc.
- *
- * Copyright (c) 1997, 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-options {
-  MULTI=true;
-  STATIC=false;
-  NODE_PREFIX= "JDM";
-  NODE_PACKAGE="com.sun.jmx.snmp.IPAcl";
-}
-
-
-PARSER_BEGIN(Parser)
-
-package com.sun.jmx.snmp.IPAcl;
-
-import java.io.*;
-
-public class Parser {
-}
-
-PARSER_END(Parser)
-
-
-SKIP :
-{
-  " "
-| "\t"
-| "\n"
-| "\r"
-| <"--" (~["\n","\r"])* ("\n"|"\r"|"\r\n")>
-| <"#" (~["\n","\r"])* ("\n"|"\r"|"\r\n")>
-
-}
-
-
-
-/* RESERVED WORDS AND LITERALS */
-
-TOKEN : 
-{
-  <ACCESS: "access">
-| <ACL: "acl">
-| <ASSIGN: "=">
-| <COMMUNITIES: "communities">
-| <ENTERPRISE: "enterprise">
-| <HOSTS: "hosts">
-| <LBRACE: "{">
-| <MANAGERS: "managers">
-| <RANGE: "-">
-| <RBRACE: "}">
-| <RO: "read-only">
-| <RW: "read-write">
-| <TRAP: "trap">
-| <INFORM: "inform">
-| <TRAPCOMMUNITY: "trap-community">
-| <INFORMCOMMUNITY: "inform-community">
-| <TRAPNUM: "trap-num">
-}
-
-
-
-TOKEN : /* LITERALS */
-{
-  < INTEGER_LITERAL:
-        <DECIMAL_LITERAL> (["l","L"])?
-      | <HEX_LITERAL> (["l","L"])?
-      | <OCTAL_LITERAL> (["l","L"])?
-  >
-|
-  < #DECIMAL_LITERAL: ["1"-"9"] (["0"-"9"])* >
-|
-  < #HEX_LITERAL: "0" ["x","X"] (["0"-"9","a"-"f","A"-"F"])+ >
-|      
-  < #OCTAL_LITERAL: "0" (["0"-"7"])* >
-}
-
-TOKEN : /* V6 LITERALS */
-{ 
-  < V6_ADDRESS: ((( ( (<H> ":")+ (":")?) | "::" ) (<H> ":")* (<H> | (<D> "." <D> "." <D> "." <D>))) | ("::")) | ( (<H> ":")+ ":") >
-|
-  <#H: (["0"-"9","a"-"f","A"-"F"])+ >
-| 
-  <#D: (["0"-"9"])+ >
-}
- 
-TOKEN : /* IDENTIFIERS */
-{
-  < IDENTIFIER: ( (<DIGIT>|<LETTER>)+ (<SEPARATOR>|<LETTER>|<DIGIT>)* (<DIGIT>|<LETTER>)+ ) | (<DIGIT>|<LETTER>)+ >
-|
-  < #LETTER: ["a"-"z","A"-"Z"] >
-|
-  < #SEPARATOR: ["-", "_"] >
-|
-  < #DIGIT: ["0"-"9"] >
-|
- <CSTRING: "\"" (~["\""])* "\"">
-}
-
- 
-
-TOKEN: /* SEPARATOR */
-{
-  < COMMA: "," >
-| < DOT: "." >
-| < MARK: "!" >
-| < MASK: "/">
-}
-
-// A file can contain several acl definitions
-//
-JDMSecurityDefs SecurityDefs()  : {}
-{
-  [AclBlock()]
-  [TrapBlock()]
-  [InformBlock()]
-  <EOF>
-  { return jjtThis;}
-}
-
-void AclBlock(): {}
-{
-"acl" "=" "{" (AclItem())+ "}"
-}
-
-void AclItem(): {}
-{
-"{" jjtThis.com= Communities() jjtThis.access= Access() Managers() "}"
-}
-
-JDMCommunities Communities(): {}
-{
-"communities" "=" Community() ( "," Community())*
-
-{return jjtThis;}
-
-}
-
-void Community(): 
-{
-  Token t;
-}
-{
-t=<IDENTIFIER> {jjtThis.communityString= t.image;}
-}
-
-JDMAccess Access(): {}
-{
-"access" "=" ( <RO> {jjtThis.access= RO;}
-              |
-               <RW> {jjtThis.access= RW;}
-             )
-{return jjtThis;}
-}
-
-
-void Managers() : { }
-{
-"managers" "=" Host() ( "," Host())*
-}
-
-void Host() : 
-{
-  Token t;
-}
-{
-HostName()
-|
-LOOKAHEAD(<INTEGER_LITERAL> ( "." <INTEGER_LITERAL> )* "/" <INTEGER_LITERAL>)
-NetMask()
-|
-LOOKAHEAD(<V6_ADDRESS> "/" <INTEGER_LITERAL>)
-NetMaskV6()
-|
-LOOKAHEAD(<INTEGER_LITERAL> ".")
-IpAddress()
-|
-IpV6Address()
-|
-IpMask()
-}
-
-void HostName():
-{
-  Token t;
-}
-{
-  t=<IDENTIFIER> { jjtThis.name.append(t.image); }
-(
-"." t=<IDENTIFIER> 
-  {jjtThis.name.append( "." + t.image); }
-)*
-
-}
-
-void IpAddress():
-{
-Token t;
-}
-{
-
-t= <INTEGER_LITERAL> 
-  {jjtThis.address.append(t.image); }
-(
-"." t= <INTEGER_LITERAL> 
-  {jjtThis.address.append( "." + t.image); }
-)*
-
-}
-
-void IpV6Address():
-{
-Token t;
-}
-{
-
-t= <V6_ADDRESS> 
-  {jjtThis.address.append(t.image); }
-}
-
-void IpMask():
-{
-Token t;
-}
-{
-
-t= <INTEGER_LITERAL> 
-  {jjtThis.address.append(t.image); }
-(
-"!" t= <INTEGER_LITERAL> 
-  {jjtThis.address.append( "." + t.image); }
-)*
-}
-
-void NetMask():
-{
-Token t;
-}
-{
-
-t= <INTEGER_LITERAL> 
-  {jjtThis.address.append(t.image); }
-(
-"." t= <INTEGER_LITERAL> 
-  {jjtThis.address.append( "." + t.image); }
-)* "/" t= <INTEGER_LITERAL> {jjtThis.mask = t.image; }
-}
-
-void NetMaskV6():
-{
-Token t;
-}
-{
-
-t= <V6_ADDRESS> 
-  {jjtThis.address.append(t.image); }
-
-"/" t= <INTEGER_LITERAL> {jjtThis.mask = t.image; }
-}
-
-void TrapBlock(): { }
-{
-"trap" "=" "{" (TrapItem())* "}"
-}
-
-void TrapItem(): { }
-{
-"{" jjtThis.comm= TrapCommunity() TrapInterestedHost() (Enterprise())* "}"
-}
-
-JDMTrapCommunity TrapCommunity(): 
-{
-  Token t;
-}
-{
-"trap-community" "=" t=<IDENTIFIER> { jjtThis.community= t.image; return jjtThis; }
-}
-
-void TrapInterestedHost(): { }
-{
-"hosts" "=" HostTrap() ("," HostTrap())*
-}
-
-void HostTrap() : 
-{
-  Token t;
-}
-{
-HostName()
-|
-IpAddress()
-|
-IpV6Address()
-}
-
-void Enterprise(): 
-{
-  Token t;
-}
-{
-"{"
-"enterprise" "="  t=<CSTRING> {jjtThis.enterprise= t.image;}
-
-"trap-num" "=" TrapNum() ("," TrapNum())*
-
-"}"
-}
-
-void TrapNum():
-{
-  Token t;
-}
-{
-  t=<INTEGER_LITERAL> {jjtThis.low= Integer.parseInt(t.image);}
-[
-  "-" t=<INTEGER_LITERAL> {jjtThis.high= Integer.parseInt(t.image);}
-]
-}
-
-
-void InformBlock(): { }
-{
-"inform" "=" "{" (InformItem())* "}"
-}
-
-void InformItem(): { }
-{
-"{" jjtThis.comm= InformCommunity() InformInterestedHost() "}"
-}
-
-JDMInformCommunity InformCommunity(): 
-{
-  Token t;
-}
-{
-"inform-community" "=" t=<IDENTIFIER> { jjtThis.community= t.image; return jjtThis; }
-}
-
-void InformInterestedHost(): { }
-{
-"hosts" "=" HostInform() ("," HostInform())*
-}
-
-void HostInform() : 
-{
-  Token t;
-}
-{
-HostName()
-|
-IpAddress()
-|
-IpV6Address()
-}
-
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/ParserConstants.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,111 +0,0 @@
-/*
- * Copyright (c) 1997, 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/* Generated By:JJTree&JavaCC: Do not edit this line. ParserConstants.java */
-package com.sun.jmx.snmp.IPAcl;
-
-interface ParserConstants {
-
-  int EOF = 0;
-  int ACCESS = 7;
-  int ACL = 8;
-  int ASSIGN = 9;
-  int COMMUNITIES = 10;
-  int ENTERPRISE = 11;
-  int HOSTS = 12;
-  int LBRACE = 13;
-  int MANAGERS = 14;
-  int RANGE = 15;
-  int RBRACE = 16;
-  int RO = 17;
-  int RW = 18;
-  int TRAP = 19;
-  int INFORM = 20;
-  int TRAPCOMMUNITY = 21;
-  int INFORMCOMMUNITY = 22;
-  int TRAPNUM = 23;
-  int INTEGER_LITERAL = 24;
-  int DECIMAL_LITERAL = 25;
-  int HEX_LITERAL = 26;
-  int OCTAL_LITERAL = 27;
-  int V6_ADDRESS = 28;
-  int H = 29;
-  int D = 30;
-  int IDENTIFIER = 31;
-  int LETTER = 32;
-  int SEPARATOR = 33;
-  int DIGIT = 34;
-  int CSTRING = 35;
-  int COMMA = 36;
-  int DOT = 37;
-  int MARK = 38;
-  int MASK = 39;
-
-  int DEFAULT = 0;
-
-  String[] tokenImage = {
-    "<EOF>",
-    "\" \"",
-    "\"\\t\"",
-    "\"\\n\"",
-    "\"\\r\"",
-    "<token of kind 5>",
-    "<token of kind 6>",
-    "\"access\"",
-    "\"acl\"",
-    "\"=\"",
-    "\"communities\"",
-    "\"enterprise\"",
-    "\"hosts\"",
-    "\"{\"",
-    "\"managers\"",
-    "\"-\"",
-    "\"}\"",
-    "\"read-only\"",
-    "\"read-write\"",
-    "\"trap\"",
-    "\"inform\"",
-    "\"trap-community\"",
-    "\"inform-community\"",
-    "\"trap-num\"",
-    "<INTEGER_LITERAL>",
-    "<DECIMAL_LITERAL>",
-    "<HEX_LITERAL>",
-    "<OCTAL_LITERAL>",
-    "<V6_ADDRESS>",
-    "<H>",
-    "<D>",
-    "<IDENTIFIER>",
-    "<LETTER>",
-    "<SEPARATOR>",
-    "<DIGIT>",
-    "<CSTRING>",
-    "\",\"",
-    "\".\"",
-    "\"!\"",
-    "\"/\"",
-  };
-
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/ParserTokenManager.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1514 +0,0 @@
-/*
- * Copyright (c) 1997, 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/* Generated By:JJTree&JavaCC: Do not edit this line. ParserTokenManager.java */
-package com.sun.jmx.snmp.IPAcl;
-import java.io.*;
-
-class ParserTokenManager implements ParserConstants
-{
-private final int jjStopStringLiteralDfa_0(int pos, long active0)
-{
-   switch (pos)
-   {
-      case 0:
-         if ((active0 & 0x8000L) != 0L)
-            return 0;
-         if ((active0 & 0xfe5000L) != 0L)
-         {
-            jjmatchedKind = 31;
-            return 47;
-         }
-         if ((active0 & 0xd80L) != 0L)
-         {
-            jjmatchedKind = 31;
-            return 48;
-         }
-         return -1;
-      case 1:
-         if ((active0 & 0xfe5c00L) != 0L)
-         {
-            jjmatchedKind = 31;
-            jjmatchedPos = 1;
-            return 49;
-         }
-         if ((active0 & 0x180L) != 0L)
-         {
-            jjmatchedKind = 31;
-            jjmatchedPos = 1;
-            return 50;
-         }
-         return -1;
-      case 2:
-         if ((active0 & 0xfe5c00L) != 0L)
-         {
-            jjmatchedKind = 31;
-            jjmatchedPos = 2;
-            return 49;
-         }
-         if ((active0 & 0x100L) != 0L)
-            return 49;
-         if ((active0 & 0x80L) != 0L)
-         {
-            jjmatchedKind = 31;
-            jjmatchedPos = 2;
-            return 50;
-         }
-         return -1;
-      case 3:
-         if ((active0 & 0x565c00L) != 0L)
-         {
-            if (jjmatchedPos != 3)
-            {
-               jjmatchedKind = 31;
-               jjmatchedPos = 3;
-            }
-            return 49;
-         }
-         if ((active0 & 0xa80000L) != 0L)
-            return 49;
-         if ((active0 & 0x80L) != 0L)
-         {
-            if (jjmatchedPos != 3)
-            {
-               jjmatchedKind = 31;
-               jjmatchedPos = 3;
-            }
-            return 50;
-         }
-         return -1;
-      case 4:
-         if ((active0 & 0xa00000L) != 0L)
-            return 51;
-         if ((active0 & 0x60000L) != 0L)
-         {
-            if (jjmatchedPos < 3)
-            {
-               jjmatchedKind = 31;
-               jjmatchedPos = 3;
-            }
-            return 51;
-         }
-         if ((active0 & 0x1000L) != 0L)
-            return 49;
-         if ((active0 & 0x504c80L) != 0L)
-         {
-            jjmatchedKind = 31;
-            jjmatchedPos = 4;
-            return 49;
-         }
-         return -1;
-      case 5:
-         if ((active0 & 0x500080L) != 0L)
-            return 49;
-         if ((active0 & 0x4c00L) != 0L)
-         {
-            if (jjmatchedPos != 5)
-            {
-               jjmatchedKind = 31;
-               jjmatchedPos = 5;
-            }
-            return 49;
-         }
-         if ((active0 & 0xa60000L) != 0L)
-         {
-            if (jjmatchedPos != 5)
-            {
-               jjmatchedKind = 31;
-               jjmatchedPos = 5;
-            }
-            return 51;
-         }
-         return -1;
-      case 6:
-         if ((active0 & 0x400000L) != 0L)
-            return 51;
-         if ((active0 & 0x4c00L) != 0L)
-         {
-            jjmatchedKind = 31;
-            jjmatchedPos = 6;
-            return 49;
-         }
-         if ((active0 & 0xa60000L) != 0L)
-         {
-            jjmatchedKind = 31;
-            jjmatchedPos = 6;
-            return 51;
-         }
-         return -1;
-      case 7:
-         if ((active0 & 0x660000L) != 0L)
-         {
-            jjmatchedKind = 31;
-            jjmatchedPos = 7;
-            return 51;
-         }
-         if ((active0 & 0x800000L) != 0L)
-            return 51;
-         if ((active0 & 0x4000L) != 0L)
-            return 49;
-         if ((active0 & 0xc00L) != 0L)
-         {
-            jjmatchedKind = 31;
-            jjmatchedPos = 7;
-            return 49;
-         }
-         return -1;
-      case 8:
-         if ((active0 & 0x20000L) != 0L)
-            return 51;
-         if ((active0 & 0xc00L) != 0L)
-         {
-            jjmatchedKind = 31;
-            jjmatchedPos = 8;
-            return 49;
-         }
-         if ((active0 & 0x640000L) != 0L)
-         {
-            jjmatchedKind = 31;
-            jjmatchedPos = 8;
-            return 51;
-         }
-         return -1;
-      case 9:
-         if ((active0 & 0x40000L) != 0L)
-            return 51;
-         if ((active0 & 0x800L) != 0L)
-            return 49;
-         if ((active0 & 0x600000L) != 0L)
-         {
-            jjmatchedKind = 31;
-            jjmatchedPos = 9;
-            return 51;
-         }
-         if ((active0 & 0x400L) != 0L)
-         {
-            jjmatchedKind = 31;
-            jjmatchedPos = 9;
-            return 49;
-         }
-         return -1;
-      case 10:
-         if ((active0 & 0x600000L) != 0L)
-         {
-            jjmatchedKind = 31;
-            jjmatchedPos = 10;
-            return 51;
-         }
-         if ((active0 & 0x400L) != 0L)
-            return 49;
-         return -1;
-      case 11:
-         if ((active0 & 0x600000L) != 0L)
-         {
-            jjmatchedKind = 31;
-            jjmatchedPos = 11;
-            return 51;
-         }
-         return -1;
-      case 12:
-         if ((active0 & 0x600000L) != 0L)
-         {
-            jjmatchedKind = 31;
-            jjmatchedPos = 12;
-            return 51;
-         }
-         return -1;
-      case 13:
-         if ((active0 & 0x400000L) != 0L)
-         {
-            jjmatchedKind = 31;
-            jjmatchedPos = 13;
-            return 51;
-         }
-         if ((active0 & 0x200000L) != 0L)
-            return 51;
-         return -1;
-      case 14:
-         if ((active0 & 0x400000L) != 0L)
-         {
-            jjmatchedKind = 31;
-            jjmatchedPos = 14;
-            return 51;
-         }
-         return -1;
-      default :
-         return -1;
-   }
-}
-private final int jjStartNfa_0(int pos, long active0)
-{
-   return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0), pos + 1);
-}
-private final int jjStopAtPos(int pos, int kind)
-{
-   jjmatchedKind = kind;
-   jjmatchedPos = pos;
-   return pos + 1;
-}
-private final int jjStartNfaWithStates_0(int pos, int kind, int state)
-{
-   jjmatchedKind = kind;
-   jjmatchedPos = pos;
-   try { curChar = input_stream.readChar(); }
-   catch(java.io.IOException e) { return pos + 1; }
-   return jjMoveNfa_0(state, pos + 1);
-}
-private final int jjMoveStringLiteralDfa0_0()
-{
-   switch(curChar)
-   {
-      case 33:
-         return jjStopAtPos(0, 38);
-      case 44:
-         return jjStopAtPos(0, 36);
-      case 45:
-         return jjStartNfaWithStates_0(0, 15, 0);
-      case 46:
-         return jjStopAtPos(0, 37);
-      case 47:
-         return jjStopAtPos(0, 39);
-      case 61:
-         return jjStopAtPos(0, 9);
-      case 97:
-         return jjMoveStringLiteralDfa1_0(0x180L);
-      case 99:
-         return jjMoveStringLiteralDfa1_0(0x400L);
-      case 101:
-         return jjMoveStringLiteralDfa1_0(0x800L);
-      case 104:
-         return jjMoveStringLiteralDfa1_0(0x1000L);
-      case 105:
-         return jjMoveStringLiteralDfa1_0(0x500000L);
-      case 109:
-         return jjMoveStringLiteralDfa1_0(0x4000L);
-      case 114:
-         return jjMoveStringLiteralDfa1_0(0x60000L);
-      case 116:
-         return jjMoveStringLiteralDfa1_0(0xa80000L);
-      case 123:
-         return jjStopAtPos(0, 13);
-      case 125:
-         return jjStopAtPos(0, 16);
-      default :
-         return jjMoveNfa_0(5, 0);
-   }
-}
-private final int jjMoveStringLiteralDfa1_0(long active0)
-{
-   try { curChar = input_stream.readChar(); }
-   catch(java.io.IOException e) {
-      jjStopStringLiteralDfa_0(0, active0);
-      return 1;
-   }
-   switch(curChar)
-   {
-      case 97:
-         return jjMoveStringLiteralDfa2_0(active0, 0x4000L);
-      case 99:
-         return jjMoveStringLiteralDfa2_0(active0, 0x180L);
-      case 101:
-         return jjMoveStringLiteralDfa2_0(active0, 0x60000L);
-      case 110:
-         return jjMoveStringLiteralDfa2_0(active0, 0x500800L);
-      case 111:
-         return jjMoveStringLiteralDfa2_0(active0, 0x1400L);
-      case 114:
-         return jjMoveStringLiteralDfa2_0(active0, 0xa80000L);
-      default :
-         break;
-   }
-   return jjStartNfa_0(0, active0);
-}
-private final int jjMoveStringLiteralDfa2_0(long old0, long active0)
-{
-   if (((active0 &= old0)) == 0L)
-      return jjStartNfa_0(0, old0);
-   try { curChar = input_stream.readChar(); }
-   catch(java.io.IOException e) {
-      jjStopStringLiteralDfa_0(1, active0);
-      return 2;
-   }
-   switch(curChar)
-   {
-      case 97:
-         return jjMoveStringLiteralDfa3_0(active0, 0xae0000L);
-      case 99:
-         return jjMoveStringLiteralDfa3_0(active0, 0x80L);
-      case 102:
-         return jjMoveStringLiteralDfa3_0(active0, 0x500000L);
-      case 108:
-         if ((active0 & 0x100L) != 0L)
-            return jjStartNfaWithStates_0(2, 8, 49);
-         break;
-      case 109:
-         return jjMoveStringLiteralDfa3_0(active0, 0x400L);
-      case 110:
-         return jjMoveStringLiteralDfa3_0(active0, 0x4000L);
-      case 115:
-         return jjMoveStringLiteralDfa3_0(active0, 0x1000L);
-      case 116:
-         return jjMoveStringLiteralDfa3_0(active0, 0x800L);
-      default :
-         break;
-   }
-   return jjStartNfa_0(1, active0);
-}
-private final int jjMoveStringLiteralDfa3_0(long old0, long active0)
-{
-   if (((active0 &= old0)) == 0L)
-      return jjStartNfa_0(1, old0);
-   try { curChar = input_stream.readChar(); }
-   catch(java.io.IOException e) {
-      jjStopStringLiteralDfa_0(2, active0);
-      return 3;
-   }
-   switch(curChar)
-   {
-      case 97:
-         return jjMoveStringLiteralDfa4_0(active0, 0x4000L);
-      case 100:
-         return jjMoveStringLiteralDfa4_0(active0, 0x60000L);
-      case 101:
-         return jjMoveStringLiteralDfa4_0(active0, 0x880L);
-      case 109:
-         return jjMoveStringLiteralDfa4_0(active0, 0x400L);
-      case 111:
-         return jjMoveStringLiteralDfa4_0(active0, 0x500000L);
-      case 112:
-         if ((active0 & 0x80000L) != 0L)
-         {
-            jjmatchedKind = 19;
-            jjmatchedPos = 3;
-         }
-         return jjMoveStringLiteralDfa4_0(active0, 0xa00000L);
-      case 116:
-         return jjMoveStringLiteralDfa4_0(active0, 0x1000L);
-      default :
-         break;
-   }
-   return jjStartNfa_0(2, active0);
-}
-private final int jjMoveStringLiteralDfa4_0(long old0, long active0)
-{
-   if (((active0 &= old0)) == 0L)
-      return jjStartNfa_0(2, old0);
-   try { curChar = input_stream.readChar(); }
-   catch(java.io.IOException e) {
-      jjStopStringLiteralDfa_0(3, active0);
-      return 4;
-   }
-   switch(curChar)
-   {
-      case 45:
-         return jjMoveStringLiteralDfa5_0(active0, 0xa60000L);
-      case 103:
-         return jjMoveStringLiteralDfa5_0(active0, 0x4000L);
-      case 114:
-         return jjMoveStringLiteralDfa5_0(active0, 0x500800L);
-      case 115:
-         if ((active0 & 0x1000L) != 0L)
-            return jjStartNfaWithStates_0(4, 12, 49);
-         return jjMoveStringLiteralDfa5_0(active0, 0x80L);
-      case 117:
-         return jjMoveStringLiteralDfa5_0(active0, 0x400L);
-      default :
-         break;
-   }
-   return jjStartNfa_0(3, active0);
-}
-private final int jjMoveStringLiteralDfa5_0(long old0, long active0)
-{
-   if (((active0 &= old0)) == 0L)
-      return jjStartNfa_0(3, old0);
-   try { curChar = input_stream.readChar(); }
-   catch(java.io.IOException e) {
-      jjStopStringLiteralDfa_0(4, active0);
-      return 5;
-   }
-   switch(curChar)
-   {
-      case 99:
-         return jjMoveStringLiteralDfa6_0(active0, 0x200000L);
-      case 101:
-         return jjMoveStringLiteralDfa6_0(active0, 0x4000L);
-      case 109:
-         if ((active0 & 0x100000L) != 0L)
-         {
-            jjmatchedKind = 20;
-            jjmatchedPos = 5;
-         }
-         return jjMoveStringLiteralDfa6_0(active0, 0x400000L);
-      case 110:
-         return jjMoveStringLiteralDfa6_0(active0, 0x800400L);
-      case 111:
-         return jjMoveStringLiteralDfa6_0(active0, 0x20000L);
-      case 112:
-         return jjMoveStringLiteralDfa6_0(active0, 0x800L);
-      case 115:
-         if ((active0 & 0x80L) != 0L)
-            return jjStartNfaWithStates_0(5, 7, 49);
-         break;
-      case 119:
-         return jjMoveStringLiteralDfa6_0(active0, 0x40000L);
-      default :
-         break;
-   }
-   return jjStartNfa_0(4, active0);
-}
-private final int jjMoveStringLiteralDfa6_0(long old0, long active0)
-{
-   if (((active0 &= old0)) == 0L)
-      return jjStartNfa_0(4, old0);
-   try { curChar = input_stream.readChar(); }
-   catch(java.io.IOException e) {
-      jjStopStringLiteralDfa_0(5, active0);
-      return 6;
-   }
-   switch(curChar)
-   {
-      case 45:
-         return jjMoveStringLiteralDfa7_0(active0, 0x400000L);
-      case 105:
-         return jjMoveStringLiteralDfa7_0(active0, 0x400L);
-      case 110:
-         return jjMoveStringLiteralDfa7_0(active0, 0x20000L);
-      case 111:
-         return jjMoveStringLiteralDfa7_0(active0, 0x200000L);
-      case 114:
-         return jjMoveStringLiteralDfa7_0(active0, 0x44800L);
-      case 117:
-         return jjMoveStringLiteralDfa7_0(active0, 0x800000L);
-      default :
-         break;
-   }
-   return jjStartNfa_0(5, active0);
-}
-private final int jjMoveStringLiteralDfa7_0(long old0, long active0)
-{
-   if (((active0 &= old0)) == 0L)
-      return jjStartNfa_0(5, old0);
-   try { curChar = input_stream.readChar(); }
-   catch(java.io.IOException e) {
-      jjStopStringLiteralDfa_0(6, active0);
-      return 7;
-   }
-   switch(curChar)
-   {
-      case 99:
-         return jjMoveStringLiteralDfa8_0(active0, 0x400000L);
-      case 105:
-         return jjMoveStringLiteralDfa8_0(active0, 0x40800L);
-      case 108:
-         return jjMoveStringLiteralDfa8_0(active0, 0x20000L);
-      case 109:
-         if ((active0 & 0x800000L) != 0L)
-            return jjStartNfaWithStates_0(7, 23, 51);
-         return jjMoveStringLiteralDfa8_0(active0, 0x200000L);
-      case 115:
-         if ((active0 & 0x4000L) != 0L)
-            return jjStartNfaWithStates_0(7, 14, 49);
-         break;
-      case 116:
-         return jjMoveStringLiteralDfa8_0(active0, 0x400L);
-      default :
-         break;
-   }
-   return jjStartNfa_0(6, active0);
-}
-private final int jjMoveStringLiteralDfa8_0(long old0, long active0)
-{
-   if (((active0 &= old0)) == 0L)
-      return jjStartNfa_0(6, old0);
-   try { curChar = input_stream.readChar(); }
-   catch(java.io.IOException e) {
-      jjStopStringLiteralDfa_0(7, active0);
-      return 8;
-   }
-   switch(curChar)
-   {
-      case 105:
-         return jjMoveStringLiteralDfa9_0(active0, 0x400L);
-      case 109:
-         return jjMoveStringLiteralDfa9_0(active0, 0x200000L);
-      case 111:
-         return jjMoveStringLiteralDfa9_0(active0, 0x400000L);
-      case 115:
-         return jjMoveStringLiteralDfa9_0(active0, 0x800L);
-      case 116:
-         return jjMoveStringLiteralDfa9_0(active0, 0x40000L);
-      case 121:
-         if ((active0 & 0x20000L) != 0L)
-            return jjStartNfaWithStates_0(8, 17, 51);
-         break;
-      default :
-         break;
-   }
-   return jjStartNfa_0(7, active0);
-}
-private final int jjMoveStringLiteralDfa9_0(long old0, long active0)
-{
-   if (((active0 &= old0)) == 0L)
-      return jjStartNfa_0(7, old0);
-   try { curChar = input_stream.readChar(); }
-   catch(java.io.IOException e) {
-      jjStopStringLiteralDfa_0(8, active0);
-      return 9;
-   }
-   switch(curChar)
-   {
-      case 101:
-         if ((active0 & 0x800L) != 0L)
-            return jjStartNfaWithStates_0(9, 11, 49);
-         else if ((active0 & 0x40000L) != 0L)
-            return jjStartNfaWithStates_0(9, 18, 51);
-         return jjMoveStringLiteralDfa10_0(active0, 0x400L);
-      case 109:
-         return jjMoveStringLiteralDfa10_0(active0, 0x400000L);
-      case 117:
-         return jjMoveStringLiteralDfa10_0(active0, 0x200000L);
-      default :
-         break;
-   }
-   return jjStartNfa_0(8, active0);
-}
-private final int jjMoveStringLiteralDfa10_0(long old0, long active0)
-{
-   if (((active0 &= old0)) == 0L)
-      return jjStartNfa_0(8, old0);
-   try { curChar = input_stream.readChar(); }
-   catch(java.io.IOException e) {
-      jjStopStringLiteralDfa_0(9, active0);
-      return 10;
-   }
-   switch(curChar)
-   {
-      case 109:
-         return jjMoveStringLiteralDfa11_0(active0, 0x400000L);
-      case 110:
-         return jjMoveStringLiteralDfa11_0(active0, 0x200000L);
-      case 115:
-         if ((active0 & 0x400L) != 0L)
-            return jjStartNfaWithStates_0(10, 10, 49);
-         break;
-      default :
-         break;
-   }
-   return jjStartNfa_0(9, active0);
-}
-private final int jjMoveStringLiteralDfa11_0(long old0, long active0)
-{
-   if (((active0 &= old0)) == 0L)
-      return jjStartNfa_0(9, old0);
-   try { curChar = input_stream.readChar(); }
-   catch(java.io.IOException e) {
-      jjStopStringLiteralDfa_0(10, active0);
-      return 11;
-   }
-   switch(curChar)
-   {
-      case 105:
-         return jjMoveStringLiteralDfa12_0(active0, 0x200000L);
-      case 117:
-         return jjMoveStringLiteralDfa12_0(active0, 0x400000L);
-      default :
-         break;
-   }
-   return jjStartNfa_0(10, active0);
-}
-private final int jjMoveStringLiteralDfa12_0(long old0, long active0)
-{
-   if (((active0 &= old0)) == 0L)
-      return jjStartNfa_0(10, old0);
-   try { curChar = input_stream.readChar(); }
-   catch(java.io.IOException e) {
-      jjStopStringLiteralDfa_0(11, active0);
-      return 12;
-   }
-   switch(curChar)
-   {
-      case 110:
-         return jjMoveStringLiteralDfa13_0(active0, 0x400000L);
-      case 116:
-         return jjMoveStringLiteralDfa13_0(active0, 0x200000L);
-      default :
-         break;
-   }
-   return jjStartNfa_0(11, active0);
-}
-private final int jjMoveStringLiteralDfa13_0(long old0, long active0)
-{
-   if (((active0 &= old0)) == 0L)
-      return jjStartNfa_0(11, old0);
-   try { curChar = input_stream.readChar(); }
-   catch(java.io.IOException e) {
-      jjStopStringLiteralDfa_0(12, active0);
-      return 13;
-   }
-   switch(curChar)
-   {
-      case 105:
-         return jjMoveStringLiteralDfa14_0(active0, 0x400000L);
-      case 121:
-         if ((active0 & 0x200000L) != 0L)
-            return jjStartNfaWithStates_0(13, 21, 51);
-         break;
-      default :
-         break;
-   }
-   return jjStartNfa_0(12, active0);
-}
-private final int jjMoveStringLiteralDfa14_0(long old0, long active0)
-{
-   if (((active0 &= old0)) == 0L)
-      return jjStartNfa_0(12, old0);
-   try { curChar = input_stream.readChar(); }
-   catch(java.io.IOException e) {
-      jjStopStringLiteralDfa_0(13, active0);
-      return 14;
-   }
-   switch(curChar)
-   {
-      case 116:
-         return jjMoveStringLiteralDfa15_0(active0, 0x400000L);
-      default :
-         break;
-   }
-   return jjStartNfa_0(13, active0);
-}
-private final int jjMoveStringLiteralDfa15_0(long old0, long active0)
-{
-   if (((active0 &= old0)) == 0L)
-      return jjStartNfa_0(13, old0);
-   try { curChar = input_stream.readChar(); }
-   catch(java.io.IOException e) {
-      jjStopStringLiteralDfa_0(14, active0);
-      return 15;
-   }
-   switch(curChar)
-   {
-      case 121:
-         if ((active0 & 0x400000L) != 0L)
-            return jjStartNfaWithStates_0(15, 22, 51);
-         break;
-      default :
-         break;
-   }
-   return jjStartNfa_0(14, active0);
-}
-private final void jjCheckNAdd(int state)
-{
-   if (jjrounds[state] != jjround)
-   {
-      jjstateSet[jjnewStateCnt++] = state;
-      jjrounds[state] = jjround;
-   }
-}
-private final void jjAddStates(int start, int end)
-{
-   do {
-      jjstateSet[jjnewStateCnt++] = jjnextStates[start];
-   } while (start++ != end);
-}
-private final void jjCheckNAddTwoStates(int state1, int state2)
-{
-   jjCheckNAdd(state1);
-   jjCheckNAdd(state2);
-}
-private final void jjCheckNAddStates(int start, int end)
-{
-   do {
-      jjCheckNAdd(jjnextStates[start]);
-   } while (start++ != end);
-}
-private final void jjCheckNAddStates(int start)
-{
-   jjCheckNAdd(jjnextStates[start]);
-   jjCheckNAdd(jjnextStates[start + 1]);
-}
-static final long[] jjbitVec0 = {
-   0x0L, 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL
-};
-private final int jjMoveNfa_0(int startState, int curPos)
-{
-   int[] nextStates;
-   int startsAt = 0;
-   jjnewStateCnt = 47;
-   int i = 1;
-   jjstateSet[0] = startState;
-   int j, kind = 0x7fffffff;
-   for (;;)
-   {
-      if (++jjround == 0x7fffffff)
-         ReInitRounds();
-      if (curChar < 64)
-      {
-         long l = 1L << curChar;
-         MatchLoop: do
-         {
-            switch(jjstateSet[--i])
-            {
-               case 49:
-                  if ((0x3ff200000000000L & l) != 0L)
-                     jjCheckNAddTwoStates(18, 19);
-                  if ((0x3ff000000000000L & l) != 0L)
-                  {
-                     if (kind > 31)
-                        kind = 31;
-                     jjCheckNAddStates(0, 2);
-                  }
-                  if ((0x3ff000000000000L & l) != 0L)
-                  {
-                     if (kind > 31)
-                        kind = 31;
-                     jjCheckNAdd(20);
-                  }
-                  if ((0x3ff000000000000L & l) != 0L)
-                  {
-                     if (kind > 31)
-                        kind = 31;
-                     jjCheckNAdd(19);
-                  }
-                  break;
-               case 48:
-                  if ((0x3ff200000000000L & l) != 0L)
-                     jjCheckNAddTwoStates(18, 19);
-                  else if (curChar == 58)
-                     jjCheckNAddStates(3, 5);
-                  if ((0x3ff000000000000L & l) != 0L)
-                  {
-                     if (kind > 31)
-                        kind = 31;
-                     jjCheckNAddStates(0, 2);
-                  }
-                  else if (curChar == 58)
-                     jjCheckNAddTwoStates(23, 25);
-                  if ((0x3ff000000000000L & l) != 0L)
-                  {
-                     if (kind > 31)
-                        kind = 31;
-                     jjCheckNAdd(20);
-                  }
-                  if ((0x3ff000000000000L & l) != 0L)
-                     jjCheckNAddTwoStates(26, 27);
-                  if ((0x3ff000000000000L & l) != 0L)
-                     jjCheckNAddTwoStates(23, 24);
-                  break;
-               case 47:
-                  if ((0x3ff200000000000L & l) != 0L)
-                     jjCheckNAddTwoStates(18, 19);
-                  if ((0x3ff000000000000L & l) != 0L)
-                  {
-                     if (kind > 31)
-                        kind = 31;
-                     jjCheckNAddStates(0, 2);
-                  }
-                  if ((0x3ff000000000000L & l) != 0L)
-                  {
-                     if (kind > 31)
-                        kind = 31;
-                     jjCheckNAdd(20);
-                  }
-                  break;
-               case 50:
-                  if ((0x3ff200000000000L & l) != 0L)
-                     jjCheckNAddTwoStates(18, 19);
-                  else if (curChar == 58)
-                     jjCheckNAddStates(3, 5);
-                  if ((0x3ff000000000000L & l) != 0L)
-                  {
-                     if (kind > 31)
-                        kind = 31;
-                     jjCheckNAddStates(0, 2);
-                  }
-                  else if (curChar == 58)
-                     jjCheckNAddTwoStates(23, 25);
-                  if ((0x3ff000000000000L & l) != 0L)
-                  {
-                     if (kind > 31)
-                        kind = 31;
-                     jjCheckNAdd(20);
-                  }
-                  if ((0x3ff000000000000L & l) != 0L)
-                  {
-                     if (kind > 31)
-                        kind = 31;
-                     jjCheckNAdd(19);
-                  }
-                  if ((0x3ff000000000000L & l) != 0L)
-                     jjCheckNAddTwoStates(26, 27);
-                  if ((0x3ff000000000000L & l) != 0L)
-                     jjCheckNAddTwoStates(23, 24);
-                  break;
-               case 5:
-                  if ((0x3ff000000000000L & l) != 0L)
-                     jjCheckNAddStates(6, 9);
-                  else if (curChar == 58)
-                     jjAddStates(10, 11);
-                  else if (curChar == 34)
-                     jjCheckNAddTwoStates(15, 16);
-                  else if (curChar == 35)
-                     jjCheckNAddStates(12, 14);
-                  else if (curChar == 45)
-                     jjstateSet[jjnewStateCnt++] = 0;
-                  if ((0x3ff000000000000L & l) != 0L)
-                  {
-                     if (kind > 31)
-                        kind = 31;
-                     jjCheckNAddStates(15, 17);
-                  }
-                  if ((0x3fe000000000000L & l) != 0L)
-                  {
-                     if (kind > 24)
-                        kind = 24;
-                     jjCheckNAddTwoStates(12, 13);
-                  }
-                  else if (curChar == 48)
-                  {
-                     if (kind > 24)
-                        kind = 24;
-                     jjCheckNAddStates(18, 20);
-                  }
-                  break;
-               case 51:
-                  if ((0x3ff200000000000L & l) != 0L)
-                     jjCheckNAddTwoStates(18, 19);
-                  if ((0x3ff000000000000L & l) != 0L)
-                  {
-                     if (kind > 31)
-                        kind = 31;
-                     jjCheckNAdd(19);
-                  }
-                  break;
-               case 0:
-                  if (curChar == 45)
-                     jjCheckNAddStates(21, 23);
-                  break;
-               case 1:
-                  if ((0xffffffffffffdbffL & l) != 0L)
-                     jjCheckNAddStates(21, 23);
-                  break;
-               case 2:
-                  if ((0x2400L & l) != 0L && kind > 5)
-                     kind = 5;
-                  break;
-               case 3:
-                  if (curChar == 10 && kind > 5)
-                     kind = 5;
-                  break;
-               case 4:
-                  if (curChar == 13)
-                     jjstateSet[jjnewStateCnt++] = 3;
-                  break;
-               case 6:
-                  if (curChar == 35)
-                     jjCheckNAddStates(12, 14);
-                  break;
-               case 7:
-                  if ((0xffffffffffffdbffL & l) != 0L)
-                     jjCheckNAddStates(12, 14);
-                  break;
-               case 8:
-                  if ((0x2400L & l) != 0L && kind > 6)
-                     kind = 6;
-                  break;
-               case 9:
-                  if (curChar == 10 && kind > 6)
-                     kind = 6;
-                  break;
-               case 10:
-                  if (curChar == 13)
-                     jjstateSet[jjnewStateCnt++] = 9;
-                  break;
-               case 11:
-                  if ((0x3fe000000000000L & l) == 0L)
-                     break;
-                  if (kind > 24)
-                     kind = 24;
-                  jjCheckNAddTwoStates(12, 13);
-                  break;
-               case 12:
-                  if ((0x3ff000000000000L & l) == 0L)
-                     break;
-                  if (kind > 24)
-                     kind = 24;
-                  jjCheckNAddTwoStates(12, 13);
-                  break;
-               case 14:
-                  if (curChar == 34)
-                     jjCheckNAddTwoStates(15, 16);
-                  break;
-               case 15:
-                  if ((0xfffffffbffffffffL & l) != 0L)
-                     jjCheckNAddTwoStates(15, 16);
-                  break;
-               case 16:
-                  if (curChar == 34 && kind > 35)
-                     kind = 35;
-                  break;
-               case 17:
-                  if ((0x3ff000000000000L & l) == 0L)
-                     break;
-                  if (kind > 31)
-                     kind = 31;
-                  jjCheckNAddStates(15, 17);
-                  break;
-               case 18:
-                  if ((0x3ff200000000000L & l) != 0L)
-                     jjCheckNAddTwoStates(18, 19);
-                  break;
-               case 19:
-                  if ((0x3ff000000000000L & l) == 0L)
-                     break;
-                  if (kind > 31)
-                     kind = 31;
-                  jjCheckNAdd(19);
-                  break;
-               case 20:
-                  if ((0x3ff000000000000L & l) == 0L)
-                     break;
-                  if (kind > 31)
-                     kind = 31;
-                  jjCheckNAdd(20);
-                  break;
-               case 21:
-                  if ((0x3ff000000000000L & l) == 0L)
-                     break;
-                  if (kind > 31)
-                     kind = 31;
-                  jjCheckNAddStates(0, 2);
-                  break;
-               case 22:
-                  if ((0x3ff000000000000L & l) != 0L)
-                     jjCheckNAddStates(6, 9);
-                  break;
-               case 23:
-                  if ((0x3ff000000000000L & l) != 0L)
-                     jjCheckNAddTwoStates(23, 24);
-                  break;
-               case 24:
-                  if (curChar == 58)
-                     jjCheckNAddTwoStates(23, 25);
-                  break;
-               case 25:
-               case 41:
-                  if (curChar == 58 && kind > 28)
-                     kind = 28;
-                  break;
-               case 26:
-                  if ((0x3ff000000000000L & l) != 0L)
-                     jjCheckNAddTwoStates(26, 27);
-                  break;
-               case 27:
-                  if (curChar == 58)
-                     jjCheckNAddStates(3, 5);
-                  break;
-               case 28:
-               case 42:
-                  if (curChar == 58)
-                     jjCheckNAddTwoStates(29, 36);
-                  break;
-               case 29:
-                  if ((0x3ff000000000000L & l) != 0L)
-                     jjCheckNAddTwoStates(29, 30);
-                  break;
-               case 30:
-                  if (curChar == 46)
-                     jjCheckNAdd(31);
-                  break;
-               case 31:
-                  if ((0x3ff000000000000L & l) != 0L)
-                     jjCheckNAddTwoStates(31, 32);
-                  break;
-               case 32:
-                  if (curChar == 46)
-                     jjCheckNAdd(33);
-                  break;
-               case 33:
-                  if ((0x3ff000000000000L & l) != 0L)
-                     jjCheckNAddTwoStates(33, 34);
-                  break;
-               case 34:
-                  if (curChar == 46)
-                     jjCheckNAdd(35);
-                  break;
-               case 35:
-                  if ((0x3ff000000000000L & l) == 0L)
-                     break;
-                  if (kind > 28)
-                     kind = 28;
-                  jjCheckNAdd(35);
-                  break;
-               case 36:
-                  if ((0x3ff000000000000L & l) == 0L)
-                     break;
-                  if (kind > 28)
-                     kind = 28;
-                  jjCheckNAddStates(24, 26);
-                  break;
-               case 37:
-                  if ((0x3ff000000000000L & l) != 0L)
-                     jjCheckNAddTwoStates(37, 28);
-                  break;
-               case 38:
-                  if ((0x3ff000000000000L & l) == 0L)
-                     break;
-                  if (kind > 28)
-                     kind = 28;
-                  jjCheckNAdd(38);
-                  break;
-               case 39:
-                  if ((0x3ff000000000000L & l) == 0L)
-                     break;
-                  if (kind > 28)
-                     kind = 28;
-                  jjCheckNAddStates(27, 31);
-                  break;
-               case 40:
-                  if (curChar == 58)
-                     jjAddStates(10, 11);
-                  break;
-               case 43:
-                  if (curChar != 48)
-                     break;
-                  if (kind > 24)
-                     kind = 24;
-                  jjCheckNAddStates(18, 20);
-                  break;
-               case 45:
-                  if ((0x3ff000000000000L & l) == 0L)
-                     break;
-                  if (kind > 24)
-                     kind = 24;
-                  jjCheckNAddTwoStates(45, 13);
-                  break;
-               case 46:
-                  if ((0xff000000000000L & l) == 0L)
-                     break;
-                  if (kind > 24)
-                     kind = 24;
-                  jjCheckNAddTwoStates(46, 13);
-                  break;
-               default : break;
-            }
-         } while(i != startsAt);
-      }
-      else if (curChar < 128)
-      {
-         long l = 1L << (curChar & 077);
-         MatchLoop: do
-         {
-            switch(jjstateSet[--i])
-            {
-               case 49:
-                  if ((0x7fffffe87fffffeL & l) != 0L)
-                     jjCheckNAddTwoStates(18, 19);
-                  if ((0x7fffffe07fffffeL & l) != 0L)
-                  {
-                     if (kind > 31)
-                        kind = 31;
-                     jjCheckNAddStates(0, 2);
-                  }
-                  if ((0x7fffffe07fffffeL & l) != 0L)
-                  {
-                     if (kind > 31)
-                        kind = 31;
-                     jjCheckNAdd(20);
-                  }
-                  if ((0x7fffffe07fffffeL & l) != 0L)
-                  {
-                     if (kind > 31)
-                        kind = 31;
-                     jjCheckNAdd(19);
-                  }
-                  break;
-               case 48:
-                  if ((0x7fffffe87fffffeL & l) != 0L)
-                     jjCheckNAddTwoStates(18, 19);
-                  if ((0x7fffffe07fffffeL & l) != 0L)
-                  {
-                     if (kind > 31)
-                        kind = 31;
-                     jjCheckNAddStates(0, 2);
-                  }
-                  if ((0x7fffffe07fffffeL & l) != 0L)
-                  {
-                     if (kind > 31)
-                        kind = 31;
-                     jjCheckNAdd(20);
-                  }
-                  if ((0x7e0000007eL & l) != 0L)
-                     jjCheckNAddTwoStates(26, 27);
-                  if ((0x7e0000007eL & l) != 0L)
-                     jjCheckNAddTwoStates(23, 24);
-                  break;
-               case 47:
-                  if ((0x7fffffe87fffffeL & l) != 0L)
-                     jjCheckNAddTwoStates(18, 19);
-                  if ((0x7fffffe07fffffeL & l) != 0L)
-                  {
-                     if (kind > 31)
-                        kind = 31;
-                     jjCheckNAddStates(0, 2);
-                  }
-                  if ((0x7fffffe07fffffeL & l) != 0L)
-                  {
-                     if (kind > 31)
-                        kind = 31;
-                     jjCheckNAdd(20);
-                  }
-                  break;
-               case 50:
-                  if ((0x7fffffe87fffffeL & l) != 0L)
-                     jjCheckNAddTwoStates(18, 19);
-                  if ((0x7fffffe07fffffeL & l) != 0L)
-                  {
-                     if (kind > 31)
-                        kind = 31;
-                     jjCheckNAddStates(0, 2);
-                  }
-                  if ((0x7fffffe07fffffeL & l) != 0L)
-                  {
-                     if (kind > 31)
-                        kind = 31;
-                     jjCheckNAdd(20);
-                  }
-                  if ((0x7fffffe07fffffeL & l) != 0L)
-                  {
-                     if (kind > 31)
-                        kind = 31;
-                     jjCheckNAdd(19);
-                  }
-                  if ((0x7e0000007eL & l) != 0L)
-                     jjCheckNAddTwoStates(26, 27);
-                  if ((0x7e0000007eL & l) != 0L)
-                     jjCheckNAddTwoStates(23, 24);
-                  break;
-               case 5:
-                  if ((0x7fffffe07fffffeL & l) != 0L)
-                  {
-                     if (kind > 31)
-                        kind = 31;
-                     jjCheckNAddStates(15, 17);
-                  }
-                  if ((0x7e0000007eL & l) != 0L)
-                     jjCheckNAddStates(6, 9);
-                  break;
-               case 51:
-                  if ((0x7fffffe87fffffeL & l) != 0L)
-                     jjCheckNAddTwoStates(18, 19);
-                  if ((0x7fffffe07fffffeL & l) != 0L)
-                  {
-                     if (kind > 31)
-                        kind = 31;
-                     jjCheckNAdd(19);
-                  }
-                  break;
-               case 1:
-                  jjAddStates(21, 23);
-                  break;
-               case 7:
-                  jjAddStates(12, 14);
-                  break;
-               case 13:
-                  if ((0x100000001000L & l) != 0L && kind > 24)
-                     kind = 24;
-                  break;
-               case 15:
-                  jjAddStates(32, 33);
-                  break;
-               case 17:
-                  if ((0x7fffffe07fffffeL & l) == 0L)
-                     break;
-                  if (kind > 31)
-                     kind = 31;
-                  jjCheckNAddStates(15, 17);
-                  break;
-               case 18:
-                  if ((0x7fffffe87fffffeL & l) != 0L)
-                     jjCheckNAddTwoStates(18, 19);
-                  break;
-               case 19:
-                  if ((0x7fffffe07fffffeL & l) == 0L)
-                     break;
-                  if (kind > 31)
-                     kind = 31;
-                  jjCheckNAdd(19);
-                  break;
-               case 20:
-                  if ((0x7fffffe07fffffeL & l) == 0L)
-                     break;
-                  if (kind > 31)
-                     kind = 31;
-                  jjCheckNAdd(20);
-                  break;
-               case 21:
-                  if ((0x7fffffe07fffffeL & l) == 0L)
-                     break;
-                  if (kind > 31)
-                     kind = 31;
-                  jjCheckNAddStates(0, 2);
-                  break;
-               case 22:
-                  if ((0x7e0000007eL & l) != 0L)
-                     jjCheckNAddStates(6, 9);
-                  break;
-               case 23:
-                  if ((0x7e0000007eL & l) != 0L)
-                     jjCheckNAddTwoStates(23, 24);
-                  break;
-               case 26:
-                  if ((0x7e0000007eL & l) != 0L)
-                     jjCheckNAddTwoStates(26, 27);
-                  break;
-               case 36:
-                  if ((0x7e0000007eL & l) == 0L)
-                     break;
-                  if (kind > 28)
-                     kind = 28;
-                  jjCheckNAddStates(24, 26);
-                  break;
-               case 37:
-                  if ((0x7e0000007eL & l) != 0L)
-                     jjCheckNAddTwoStates(37, 28);
-                  break;
-               case 38:
-                  if ((0x7e0000007eL & l) == 0L)
-                     break;
-                  if (kind > 28)
-                     kind = 28;
-                  jjCheckNAdd(38);
-                  break;
-               case 39:
-                  if ((0x7e0000007eL & l) == 0L)
-                     break;
-                  if (kind > 28)
-                     kind = 28;
-                  jjCheckNAddStates(27, 31);
-                  break;
-               case 44:
-                  if ((0x100000001000000L & l) != 0L)
-                     jjCheckNAdd(45);
-                  break;
-               case 45:
-                  if ((0x7e0000007eL & l) == 0L)
-                     break;
-                  if (kind > 24)
-                     kind = 24;
-                  jjCheckNAddTwoStates(45, 13);
-                  break;
-               default : break;
-            }
-         } while(i != startsAt);
-      }
-      else
-      {
-         int i2 = (curChar & 0xff) >> 6;
-         long l2 = 1L << (curChar & 077);
-         MatchLoop: do
-         {
-            switch(jjstateSet[--i])
-            {
-               case 1:
-                  if ((jjbitVec0[i2] & l2) != 0L)
-                     jjAddStates(21, 23);
-                  break;
-               case 7:
-                  if ((jjbitVec0[i2] & l2) != 0L)
-                     jjAddStates(12, 14);
-                  break;
-               case 15:
-                  if ((jjbitVec0[i2] & l2) != 0L)
-                     jjAddStates(32, 33);
-                  break;
-               default : break;
-            }
-         } while(i != startsAt);
-      }
-      if (kind != 0x7fffffff)
-      {
-         jjmatchedKind = kind;
-         jjmatchedPos = curPos;
-         kind = 0x7fffffff;
-      }
-      ++curPos;
-      if ((i = jjnewStateCnt) == (startsAt = 47 - (jjnewStateCnt = startsAt)))
-         return curPos;
-      try { curChar = input_stream.readChar(); }
-      catch(java.io.IOException e) { return curPos; }
-   }
-}
-static final int[] jjnextStates = {
-   18, 19, 21, 28, 29, 39, 23, 24, 26, 27, 41, 42, 7, 8, 10, 18,
-   20, 21, 44, 46, 13, 1, 2, 4, 37, 28, 38, 26, 27, 37, 28, 38,
-   15, 16,
-};
-public static final String[] jjstrLiteralImages = {
-"", null, null, null, null, null, null, "\141\143\143\145\163\163",
-"\141\143\154", "\75", "\143\157\155\155\165\156\151\164\151\145\163",
-"\145\156\164\145\162\160\162\151\163\145", "\150\157\163\164\163", "\173", "\155\141\156\141\147\145\162\163", "\55",
-"\175", "\162\145\141\144\55\157\156\154\171",
-"\162\145\141\144\55\167\162\151\164\145", "\164\162\141\160", "\151\156\146\157\162\155",
-"\164\162\141\160\55\143\157\155\155\165\156\151\164\171", "\151\156\146\157\162\155\55\143\157\155\155\165\156\151\164\171",
-"\164\162\141\160\55\156\165\155", null, null, null, null, null, null, null, null, null, null, null, null, "\54",
-"\56", "\41", "\57", };
-public static final String[] lexStateNames = {
-   "DEFAULT",
-};
-static final long[] jjtoToken = {
-   0xf891ffff81L,
-};
-static final long[] jjtoSkip = {
-   0x7eL,
-};
-private ASCII_CharStream input_stream;
-private final int[] jjrounds = new int[47];
-private final int[] jjstateSet = new int[94];
-protected char curChar;
-public ParserTokenManager(ASCII_CharStream stream)
-{
-   if (ASCII_CharStream.staticFlag)
-      throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer.");
-   input_stream = stream;
-}
-public ParserTokenManager(ASCII_CharStream stream, int lexState)
-{
-   this(stream);
-   SwitchTo(lexState);
-}
-public void ReInit(ASCII_CharStream stream)
-{
-   jjmatchedPos = jjnewStateCnt = 0;
-   curLexState = defaultLexState;
-   input_stream = stream;
-   ReInitRounds();
-}
-private final void ReInitRounds()
-{
-   int i;
-   jjround = 0x80000001;
-   for (i = 47; i-- > 0;)
-      jjrounds[i] = 0x80000000;
-}
-public void ReInit(ASCII_CharStream stream, int lexState)
-{
-   ReInit(stream);
-   SwitchTo(lexState);
-}
-public void SwitchTo(int lexState)
-{
-   if (lexState >= 1 || lexState < 0)
-      throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE);
-   else
-      curLexState = lexState;
-}
-
-private final Token jjFillToken()
-{
-   Token t = Token.newToken(jjmatchedKind);
-   t.kind = jjmatchedKind;
-   String im = jjstrLiteralImages[jjmatchedKind];
-   t.image = (im == null) ? input_stream.GetImage() : im;
-   t.beginLine = input_stream.getBeginLine();
-   t.beginColumn = input_stream.getBeginColumn();
-   t.endLine = input_stream.getEndLine();
-   t.endColumn = input_stream.getEndColumn();
-   return t;
-}
-
-int curLexState = 0;
-int defaultLexState = 0;
-int jjnewStateCnt;
-int jjround;
-int jjmatchedPos;
-int jjmatchedKind;
-
-public final Token getNextToken()
-{
-  int kind;
-  Token specialToken = null;
-  Token matchedToken;
-  int curPos = 0;
-
-  EOFLoop :
-  for (;;)
-  {
-   try
-   {
-      curChar = input_stream.BeginToken();
-   }
-   catch(java.io.IOException e)
-   {
-      jjmatchedKind = 0;
-      matchedToken = jjFillToken();
-      return matchedToken;
-   }
-
-   try { input_stream.backup(0);
-      while (curChar <= 32 && (0x100002600L & (1L << curChar)) != 0L)
-         curChar = input_stream.BeginToken();
-   }
-   catch (java.io.IOException e1) { continue EOFLoop; }
-   jjmatchedKind = 0x7fffffff;
-   jjmatchedPos = 0;
-   curPos = jjMoveStringLiteralDfa0_0();
-   if (jjmatchedKind != 0x7fffffff)
-   {
-      if (jjmatchedPos + 1 < curPos)
-         input_stream.backup(curPos - jjmatchedPos - 1);
-      if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
-      {
-         matchedToken = jjFillToken();
-         return matchedToken;
-      }
-      else
-      {
-         continue EOFLoop;
-      }
-   }
-   int error_line = input_stream.getEndLine();
-   int error_column = input_stream.getEndColumn();
-   String error_after = null;
-   boolean EOFSeen = false;
-   try { input_stream.readChar(); input_stream.backup(1); }
-   catch (java.io.IOException e1) {
-      EOFSeen = true;
-      error_after = curPos <= 1 ? "" : input_stream.GetImage();
-      if (curChar == '\n' || curChar == '\r') {
-         error_line++;
-         error_column = 0;
-      }
-      else
-         error_column++;
-   }
-   if (!EOFSeen) {
-      input_stream.backup(1);
-      error_after = curPos <= 1 ? "" : input_stream.GetImage();
-   }
-   throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR);
-  }
-}
-
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/ParserTreeConstants.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,88 +0,0 @@
-/*
- * Copyright (c) 1997, 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/* Generated By:JJTree: Do not edit this line. ParserTreeConstants.java */
-
-package com.sun.jmx.snmp.IPAcl;
-
-interface ParserTreeConstants
-{
-  public int JJTSECURITYDEFS = 0;
-  public int JJTACLBLOCK = 1;
-  public int JJTACLITEM = 2;
-  public int JJTCOMMUNITIES = 3;
-  public int JJTCOMMUNITY = 4;
-  public int JJTACCESS = 5;
-  public int JJTMANAGERS = 6;
-  public int JJTHOST = 7;
-  public int JJTHOSTNAME = 8;
-  public int JJTIPADDRESS = 9;
-  public int JJTIPV6ADDRESS = 10;
-  public int JJTIPMASK = 11;
-  public int JJTNETMASK = 12;
-  public int JJTNETMASKV6 = 13;
-  public int JJTTRAPBLOCK = 14;
-  public int JJTTRAPITEM = 15;
-  public int JJTTRAPCOMMUNITY = 16;
-  public int JJTTRAPINTERESTEDHOST = 17;
-  public int JJTHOSTTRAP = 18;
-  public int JJTENTERPRISE = 19;
-  public int JJTTRAPNUM = 20;
-  public int JJTINFORMBLOCK = 21;
-  public int JJTINFORMITEM = 22;
-  public int JJTINFORMCOMMUNITY = 23;
-  public int JJTINFORMINTERESTEDHOST = 24;
-  public int JJTHOSTINFORM = 25;
-
-
-  public String[] jjtNodeName = {
-    "SecurityDefs",
-    "AclBlock",
-    "AclItem",
-    "Communities",
-    "Community",
-    "Access",
-    "Managers",
-    "Host",
-    "HostName",
-    "IpAddress",
-    "IpV6Address",
-    "IpMask",
-    "NetMask",
-    "NetMaskV6",
-    "TrapBlock",
-    "TrapItem",
-    "TrapCommunity",
-    "TrapInterestedHost",
-    "HostTrap",
-    "Enterprise",
-    "TrapNum",
-    "InformBlock",
-    "InformItem",
-    "InformCommunity",
-    "InformInterestedHost",
-    "HostInform",
-  };
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/PermissionImpl.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,89 +0,0 @@
-/*
- * Copyright (c) 1997, 2007, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-package com.sun.jmx.snmp.IPAcl;
-
-
-
-import java.io.Serializable;
-
-
-/**
- * Permission is represented as a String.
- *
- * @see java.security.acl.Permission
- */
-
-class PermissionImpl implements java.security.acl.Permission, Serializable {
-  private static final long serialVersionUID = 4478110422746916589L;
-
-  private String perm = null;
-
-  /**
-   * Constructs a permission.
-   *
-   * @param s the string representing the permission.
-   */
-  public PermissionImpl(String s) {
-        perm = s;
-  }
-
-  public int hashCode() {
-        return super.hashCode();
-  }
-
-  /**
-   * Returns true if the object passed matches the permission represented in.
-   *
-   * @param p the Permission object to compare with.
-   * @return true if the Permission objects are equal, false otherwise.
-   */
-  public boolean equals(Object p){
-        if (p instanceof PermissionImpl){
-          return perm.equals(((PermissionImpl)p).getString());
-        } else {
-          return false;
-        }
-  }
-
-  /**
-   * Prints a string representation of this permission.
-   *
-   * @return a string representation of this permission.
-   */
-  public String toString(){
-        return perm;
-  }
-
-  /**
-   * Prints the permission.
-   *
-   * @return a string representation of this permission.
-   */
-  public String getString(){
-        return perm;
-  }
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/PrincipalImpl.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,148 +0,0 @@
-/*
- * Copyright (c) 1997, 2007, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-package com.sun.jmx.snmp.IPAcl;
-
-
-
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.io.Serializable;
-
-
-/**
- * Principal represents a host.
- *
- */
-
-class PrincipalImpl implements java.security.Principal, Serializable {
-    private static final long serialVersionUID = -7910027842878976761L;
-
-    private InetAddress[] add = null;
-
-    /**
-     * Constructs a principal with the local host.
-     */
-    public PrincipalImpl () throws UnknownHostException {
-        add = new InetAddress[1];
-        add[0] = java.net.InetAddress.getLocalHost();
-    }
-
-    /**
-     * Construct a principal using the specified host.
-     * <P>
-     * The host can be either:
-     * <UL>
-     * <LI> a host name
-     * <LI> an IP address
-     * </UL>
-     *
-     * @param hostName the host used to make the principal.
-     */
-    public PrincipalImpl(String hostName) throws UnknownHostException {
-        if ((hostName.equals("localhost")) || (hostName.equals("127.0.0.1"))) {
-            add = new InetAddress[1];
-            add[0] = java.net.InetAddress.getByName(hostName);
-        }
-        else
-            add = java.net.InetAddress.getAllByName( hostName );
-    }
-
-    /**
-     * Constructs a principal using an Internet Protocol (IP) address.
-     *
-     * @param address the Internet Protocol (IP) address.
-     */
-    public PrincipalImpl(InetAddress address) {
-        add = new InetAddress[1];
-        add[0] = address;
-    }
-
-    /**
-     * Returns the name of this principal.
-     *
-     * @return the name of this principal.
-     */
-    public String getName() {
-        return add[0].toString();
-    }
-
-    /**
-     * Compares this principal to the specified object. Returns true if the
-     * object passed in matches the principal
-     * represented by the implementation of this interface.
-     *
-     * @param a the principal to compare with.
-     * @return true if the principal passed in is the same as that encapsulated by this principal, false otherwise.
-     */
-    public boolean equals(Object a) {
-        if (a instanceof PrincipalImpl){
-            for(int i = 0; i < add.length; i++) {
-                if(add[i].equals (((PrincipalImpl) a).getAddress()))
-                    return true;
-            }
-            return false;
-        } else {
-            return false;
-        }
-    }
-
-    /**
-     * Returns a hashcode for this principal.
-     *
-     * @return a hashcode for this principal.
-     */
-    public int hashCode(){
-        return add[0].hashCode();
-    }
-
-    /**
-     * Returns a string representation of this principal. In case of multiple address, the first one is returned.
-     *
-     * @return a string representation of this principal.
-     */
-    public String toString() {
-        return ("PrincipalImpl :"+add[0].toString());
-    }
-
-    /**
-     * Returns the Internet Protocol (IP) address for this principal. In case of multiple address, the first one is returned.
-     *
-     * @return the Internet Protocol (IP) address for this principal.
-     */
-    public InetAddress getAddress(){
-        return add[0];
-    }
-
-    /**
-     * Returns the Internet Protocol (IP) address for this principal. In case of multiple address, the first one is returned.
-     *
-     * @return the array of Internet Protocol (IP) addresses for this principal.
-     */
-    public InetAddress[] getAddresses(){
-        return add;
-    }
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/README.update	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-1)Copy Parser.jjt in a dedicated directory.
-
-2) Grammar modificatiobns:
-Grammar located in file Parser.jjt :
-
-3) Command :
-/usr/lang/JAVA/JavaCC_2.0/bin/jjtree Parser.jjt
-/usr/lang/JAVA/JavaCC_2.0/bin/javacc Parser.jj
-
-4) Files to copy back in IPAcl directory:
-If you added new node (eg :IpV6Address()) copy the JDM file (eg:JDMIpV6Address.java)
-In any cases copy back (These files must be checkedout in IPAcl directory):
-ASCII_CharStream.java
-JJTParserState.java
-ParseException.java
-Parser.java
-ParserConstants.java
-ParserTokenManager.java
-ParserTreeConstants.java
-TokenMgrError.java
-
-5) You need to modify any JDM files you copied back. Lauch the compilation and you will see what is wrong.
-Have a look to similar nodes in order to see how to modify. Some protected methods have to be overloaded.
-
-6) Once your updates are running, copy back:
-Parser.jj
-Parser.jjt
-
-7) DONE.
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/SimpleNode.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,155 +0,0 @@
-/*
- * Copyright (c) 1997, 2007, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-/* Generated By:JJTree: Do not edit this line. SimpleNode.java */
-
-package com.sun.jmx.snmp.IPAcl;
-
-import java.net.InetAddress;
-import java.util.Hashtable;
-import java.util.Vector;
-
-class SimpleNode implements Node {
-    protected Node parent;
-    protected Node[] children;
-    protected int id;
-    protected Parser parser;
-
-    public SimpleNode(int i) {
-        id = i;
-    }
-
-    public SimpleNode(Parser p, int i) {
-        this(i);
-        parser = p;
-    }
-
-    public static Node jjtCreate(int id) {
-        return new SimpleNode(id);
-    }
-
-    public static Node jjtCreate(Parser p, int id) {
-        return new SimpleNode(p, id);
-    }
-
-    public void jjtOpen() {
-    }
-
-    public void jjtClose() {
-    }
-
-    public void jjtSetParent(Node n) { parent = n; }
-    public Node jjtGetParent() { return parent; }
-
-    public void jjtAddChild(Node n, int i) {
-        if (children == null) {
-            children = new Node[i + 1];
-        } else if (i >= children.length) {
-            Node c[] = new Node[i + 1];
-            System.arraycopy(children, 0, c, 0, children.length);
-            children = c;
-        }
-        children[i] = n;
-    }
-
-    public Node jjtGetChild(int i) {
-        return children[i];
-    }
-
-    public int jjtGetNumChildren() {
-        return (children == null) ? 0 : children.length;
-    }
-
-    /*
-      SR. Extend the SimpleNode definition
-    */
-
-    /**
-     * Build the Trap entries from the syntactic tree.
-     */
-    public void buildTrapEntries(Hashtable<InetAddress, Vector<String>> dest) {
-        if (children != null) {
-            for (int i = 0; i < children.length; ++i) {
-                SimpleNode n = (SimpleNode)children[i];
-                if (n != null) {
-                    n.buildTrapEntries(dest);
-                }
-            } /* end of loop */
-        }
-    }
-    /**
-     * Build the Inform entries from the syntactic tree.
-     */
-    public void buildInformEntries(Hashtable<InetAddress, Vector<String>> dest) {
-        if (children != null) {
-            for (int i = 0; i < children.length; ++i) {
-                SimpleNode n = (SimpleNode)children[i];
-                if (n != null) {
-                    n.buildInformEntries(dest);
-                }
-            } /* end of loop */
-        }
-    }
-
-    /**
-     * Build the Acl entries from the syntactic tree.
-     */
-    public void buildAclEntries(PrincipalImpl owner, AclImpl acl) {
-        if (children != null) {
-            for (int i = 0; i < children.length; ++i) {
-                SimpleNode n = (SimpleNode)children[i];
-                if (n != null) {
-                    n.buildAclEntries(owner, acl);
-                }
-            } /* end of loop */
-        }
-    }
-
-    /* END SR */
-
-    /* You can override these two methods in subclasses of SimpleNode to
-       customize the way the node appears when the tree is dumped.  If
-       your output uses more than one line you should override
-       toString(String), otherwise overriding toString() is probably all
-       you need to do. */
-
-    public String toString() { return ParserTreeConstants.jjtNodeName[id]; }
-    public String toString(String prefix) { return prefix + toString(); }
-
-    /* Override this method if you want to customize how the node dumps
-       out its children. */
-
-    public void dump(String prefix) {
-        if (children != null) {
-            for (int i = 0; i < children.length; ++i) {
-                SimpleNode n = (SimpleNode)children[i];
-                if (n != null) {
-                    n.dump(prefix + " ");
-                }
-            }
-        }
-    }
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/SnmpAcl.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,486 +0,0 @@
-/*
- * Copyright (c) 1997, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-package com.sun.jmx.snmp.IPAcl;
-
-
-
-// java import
-//
-import java.io.Serializable;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.util.Hashtable;
-import java.util.logging.Level;
-import java.util.Vector;
-import java.util.Enumeration;
-import java.util.HashSet;
-import java.security.acl.AclEntry;
-import java.security.acl.NotOwnerException;
-
-// SNMP Runtime import
-//
-import static com.sun.jmx.defaults.JmxProperties.SNMP_LOGGER;
-import com.sun.jmx.snmp.InetAddressAcl;
-
-/**
- * Defines an implementation of the {@link com.sun.jmx.snmp.InetAddressAcl InetAddressAcl} interface.
- * <p>
- * In this implementation the ACL information is stored on a flat file and
- * its default location is "$JRE/lib/snmp.acl" - See
- * {@link #getDefaultAclFileName()}
- * <p>
- * <OL>
-  *
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- */
-
-public class SnmpAcl implements InetAddressAcl, Serializable {
-    private static final long serialVersionUID = -6702287103824397063L;
-
-    static final PermissionImpl READ  = new PermissionImpl("READ");
-    static final PermissionImpl WRITE = new PermissionImpl("WRITE");
-
-    /**
-     * Constructs the Java Dynamic Management(TM) Access Control List
-     * based on IP addresses. The ACL will take the given owner name.
-     * The current IP address will be the owner of the ACL.
-     *
-     * @param Owner The name of the ACL Owner.
-     *
-     * @exception UnknownHostException If the local host is unknown.
-     * @exception IllegalArgumentException If the ACL file doesn't exist.
-     */
-    public SnmpAcl(String Owner)
-        throws UnknownHostException, IllegalArgumentException {
-        this(Owner,null);
-    }
-
-    /**
-     * Constructs the Java Dynamic Management(TM) Access Control List
-     * based on IP addresses. The ACL will take the given owner name.
-     * The current IP address will be the owner of the ACL.
-     *
-     * @param Owner The name of the ACL Owner.
-     * @param aclFileName The name of the ACL File.
-     *
-     * @exception UnknownHostException If the local host is unknown.
-     * @exception IllegalArgumentException If the ACL file doesn't exist.
-     */
-    public SnmpAcl(String Owner, String aclFileName)
-        throws UnknownHostException, IllegalArgumentException {
-        trapDestList= new Hashtable<InetAddress, Vector<String>>();
-        informDestList= new Hashtable<InetAddress, Vector<String>>();
-
-        // PrincipalImpl() take the current host as entry
-        owner = new PrincipalImpl();
-        try {
-            acl = new AclImpl(owner,Owner);
-            AclEntry ownEntry = new AclEntryImpl(owner);
-            ownEntry.addPermission(READ);
-            ownEntry.addPermission(WRITE);
-            acl.addEntry(owner,ownEntry);
-        } catch (NotOwnerException ex) {
-            if (SNMP_LOGGER.isLoggable(Level.FINEST)) {
-                SNMP_LOGGER.logp(Level.FINEST, SnmpAcl.class.getName(),
-                    "SnmpAcl(String,String)",
-                    "Should never get NotOwnerException as the owner " +
-                    "is built in this constructor");
-            }
-        }
-        if (aclFileName == null) setDefaultFileName();
-        else setAuthorizedListFile(aclFileName);
-        readAuthorizedListFile();
-    }
-
-    /**
-     * Returns an enumeration of the entries in this ACL. Each element in the
-     * enumeration is of type <CODE>java.security.acl.AclEntry</CODE>.
-     *
-     * @return An enumeration of the entries in this ACL.
-     */
-    public Enumeration<AclEntry> entries() {
-        return acl.entries();
-    }
-
-    /**
-     * Returns ann enumeration of community strings. Community strings are returned as String.
-     * @return The enumeration of community strings.
-     */
-    public Enumeration<String> communities() {
-        HashSet<String> set = new HashSet<String>();
-        Vector<String> res = new Vector<String>();
-        for (Enumeration<AclEntry> e = acl.entries() ; e.hasMoreElements() ;) {
-            AclEntryImpl entry = (AclEntryImpl) e.nextElement();
-            for (Enumeration<String> cs = entry.communities();
-                 cs.hasMoreElements() ;) {
-                set.add(cs.nextElement());
-            }
-        }
-        String[] objs = set.toArray(new String[0]);
-        for(int i = 0; i < objs.length; i++)
-            res.addElement(objs[i]);
-
-        return res.elements();
-    }
-
-    /**
-     * Returns the name of the ACL.
-     *
-     * @return The name of the ACL.
-     */
-    public String getName() {
-        return acl.getName();
-    }
-
-    /**
-     * Returns the read permission instance used.
-     *
-     * @return The read permission instance.
-     */
-    static public PermissionImpl getREAD() {
-        return READ;
-    }
-
-    /**
-     * Returns the write permission instance used.
-     *
-     * @return  The write permission instance.
-     */
-    static public PermissionImpl getWRITE() {
-        return WRITE;
-    }
-
-    /**
-     * Get the default name for the ACL file.
-     * In this implementation this is "$JRE/lib/snmp.acl"
-     * @return The default name for the ACL file.
-     **/
-    public static String getDefaultAclFileName() {
-        final String fileSeparator =
-            System.getProperty("file.separator");
-        final StringBuilder defaultAclName =
-            new StringBuilder(System.getProperty("java.home")).
-            append(fileSeparator).append("lib").append(fileSeparator).
-            append("snmp.acl");
-        return defaultAclName.toString();
-    }
-
-    /**
-     * Sets the full path of the file containing the ACL information.
-     *
-     * @param filename The full path of the file containing the ACL information.
-     * @throws IllegalArgumentException If the passed ACL file doesn't exist.
-     */
-    public void setAuthorizedListFile(String filename)
-        throws IllegalArgumentException {
-        File file = new File(filename);
-        if (!file.isFile() ) {
-            if (SNMP_LOGGER.isLoggable(Level.FINEST)) {
-                SNMP_LOGGER.logp(Level.FINEST, SnmpAcl.class.getName(),
-                    "setAuthorizedListFile", "ACL file not found: " + filename);
-            }
-            throw new
-                IllegalArgumentException("The specified file ["+file+"] "+
-                                         "doesn't exist or is not a file, "+
-                                         "no configuration loaded");
-        }
-        if (SNMP_LOGGER.isLoggable(Level.FINER)) {
-            SNMP_LOGGER.logp(Level.FINER, SnmpAcl.class.getName(),
-                "setAuthorizedListFile", "Default file set to " + filename);
-        }
-        authorizedListFile = filename;
-    }
-
-    /**
-     * Resets this ACL to the values contained in the configuration file.
-     *
-     * @exception NotOwnerException If the principal attempting the reset is not an owner of this ACL.
-     * @exception UnknownHostException If IP addresses for hosts contained in the ACL file couldn't be found.
-     */
-    public void rereadTheFile() throws NotOwnerException, UnknownHostException {
-        alwaysAuthorized = false;
-        acl.removeAll(owner);
-        trapDestList.clear();
-        informDestList.clear();
-        AclEntry ownEntry = new AclEntryImpl(owner);
-        ownEntry.addPermission(READ);
-        ownEntry.addPermission(WRITE);
-        acl.addEntry(owner,ownEntry);
-        readAuthorizedListFile();
-    }
-
-    /**
-     * Returns the full path of the file used to get ACL information.
-     *
-     * @return The full path of the file used to get ACL information.
-     */
-    public String getAuthorizedListFile() {
-        return authorizedListFile;
-    }
-
-    /**
-     * Checks whether or not the specified host has <CODE>READ</CODE> access.
-     *
-     * @param address The host address to check.
-     *
-     * @return <CODE>true</CODE> if the host has read permission, <CODE>false</CODE> otherwise.
-     */
-    public boolean checkReadPermission(InetAddress address) {
-        if (alwaysAuthorized) return ( true );
-        PrincipalImpl p = new PrincipalImpl(address);
-        return acl.checkPermission(p, READ);
-    }
-
-    /**
-     * Checks whether or not the specified host and community have <CODE>READ</CODE> access.
-     *
-     * @param address The host address to check.
-     * @param community The community associated with the host.
-     *
-     * @return <CODE>true</CODE> if the pair (host, community) has read permission, <CODE>false</CODE> otherwise.
-     */
-    public boolean checkReadPermission(InetAddress address, String community) {
-        if (alwaysAuthorized) return ( true );
-        PrincipalImpl p = new PrincipalImpl(address);
-        return acl.checkPermission(p, community, READ);
-    }
-
-    /**
-     * Checks whether or not a community string is defined.
-     *
-     * @param community The community to check.
-     *
-     * @return <CODE>true</CODE> if the community is known, <CODE>false</CODE> otherwise.
-     */
-    public boolean checkCommunity(String community) {
-        return acl.checkCommunity(community);
-    }
-
-    /**
-     * Checks whether or not the specified host has <CODE>WRITE</CODE> access.
-     *
-     * @param address The host address to check.
-     *
-     * @return <CODE>true</CODE> if the host has write permission, <CODE>false</CODE> otherwise.
-     */
-    public boolean checkWritePermission(InetAddress address) {
-        if (alwaysAuthorized) return ( true );
-        PrincipalImpl p = new PrincipalImpl(address);
-        return acl.checkPermission(p, WRITE);
-    }
-
-    /**
-     * Checks whether or not the specified host and community have <CODE>WRITE</CODE> access.
-     *
-     * @param address The host address to check.
-     * @param community The community associated with the host.
-     *
-     * @return <CODE>true</CODE> if the pair (host, community) has write permission, <CODE>false</CODE> otherwise.
-     */
-    public boolean checkWritePermission(InetAddress address, String community) {
-        if (alwaysAuthorized) return ( true );
-        PrincipalImpl p = new PrincipalImpl(address);
-        return acl.checkPermission(p, community, WRITE);
-    }
-
-    /**
-     * Returns an enumeration of trap destinations.
-     *
-     * @return An enumeration of the trap destinations (enumeration of <CODE>InetAddress</CODE>).
-     */
-    public Enumeration<InetAddress> getTrapDestinations() {
-        return trapDestList.keys();
-    }
-
-    /**
-     * Returns an enumeration of trap communities for a given host.
-     *
-     * @param i The address of the host.
-     *
-     * @return An enumeration of trap communities for a given host (enumeration of <CODE>String</CODE>).
-     */
-    public Enumeration<String> getTrapCommunities(InetAddress i) {
-        Vector<String> list = null;
-        if ((list = trapDestList.get(i)) != null ) {
-            if (SNMP_LOGGER.isLoggable(Level.FINER)) {
-                SNMP_LOGGER.logp(Level.FINER, SnmpAcl.class.getName(),
-                    "getTrapCommunities", "["+i.toString()+"] is in list");
-            }
-            return list.elements();
-        } else {
-            list = new Vector<>();
-            if (SNMP_LOGGER.isLoggable(Level.FINER)) {
-                SNMP_LOGGER.logp(Level.FINER, SnmpAcl.class.getName(),
-                    "getTrapCommunities", "["+i.toString()+"] is not in list");
-            }
-            return list.elements();
-        }
-    }
-
-    /**
-     * Returns an enumeration of inform destinations.
-     *
-     * @return An enumeration of the inform destinations (enumeration of <CODE>InetAddress</CODE>).
-     */
-    public Enumeration<InetAddress> getInformDestinations() {
-        return informDestList.keys();
-    }
-
-    /**
-     * Returns an enumeration of inform communities for a given host.
-     *
-     * @param i The address of the host.
-     *
-     * @return An enumeration of inform communities for a given host (enumeration of <CODE>String</CODE>).
-     */
-    public Enumeration<String> getInformCommunities(InetAddress i) {
-        Vector<String> list = null;
-        if ((list = informDestList.get(i)) != null ) {
-            if (SNMP_LOGGER.isLoggable(Level.FINER)) {
-                SNMP_LOGGER.logp(Level.FINER, SnmpAcl.class.getName(),
-                    "getInformCommunities", "["+i.toString()+"] is in list");
-            }
-            return list.elements();
-        } else {
-            list = new Vector<>();
-            if (SNMP_LOGGER.isLoggable(Level.FINER)) {
-                SNMP_LOGGER.logp(Level.FINER, SnmpAcl.class.getName(),
-                    "getInformCommunities", "["+i.toString()+"] is not in list");
-            }
-            return list.elements();
-        }
-    }
-
-    /**
-     * Converts the input configuration file into ACL.
-     */
-    private void readAuthorizedListFile() {
-
-        alwaysAuthorized = false;
-
-        if (authorizedListFile == null) {
-            if (SNMP_LOGGER.isLoggable(Level.FINER)) {
-                SNMP_LOGGER.logp(Level.FINER, SnmpAcl.class.getName(),
-                    "readAuthorizedListFile", "alwaysAuthorized set to true");
-            }
-            alwaysAuthorized = true ;
-        } else {
-            // Read the file content
-            Parser parser = null;
-            try {
-                parser= new Parser(new FileInputStream(getAuthorizedListFile()));
-            } catch (FileNotFoundException e) {
-                if (SNMP_LOGGER.isLoggable(Level.FINEST)) {
-                    SNMP_LOGGER.logp(Level.FINEST, SnmpAcl.class.getName(),
-                            "readAuthorizedListFile",
-                            "The specified file was not found, authorize everybody");
-                }
-                alwaysAuthorized = true ;
-                return;
-            }
-
-            try {
-                JDMSecurityDefs n = parser.SecurityDefs();
-                n.buildAclEntries(owner, acl);
-                n.buildTrapEntries(trapDestList);
-                n.buildInformEntries(informDestList);
-            } catch (ParseException e) {
-                if (SNMP_LOGGER.isLoggable(Level.FINEST)) {
-                    SNMP_LOGGER.logp(Level.FINEST, SnmpAcl.class.getName(),
-                        "readAuthorizedListFile", "Got parsing exception", e);
-                }
-                throw new IllegalArgumentException(e.getMessage());
-            } catch (Error err) {
-                if (SNMP_LOGGER.isLoggable(Level.FINEST)) {
-                    SNMP_LOGGER.logp(Level.FINEST, SnmpAcl.class.getName(),
-                        "readAuthorizedListFile", "Got unexpected error", err);
-                }
-                throw new IllegalArgumentException(err.getMessage());
-            }
-
-            for(Enumeration<AclEntry> e = acl.entries(); e.hasMoreElements();) {
-                AclEntryImpl aa = (AclEntryImpl) e.nextElement();
-                if (SNMP_LOGGER.isLoggable(Level.FINER)) {
-                    SNMP_LOGGER.logp(Level.FINER, SnmpAcl.class.getName(),
-                            "readAuthorizedListFile",
-                            "===> " + aa.getPrincipal().toString());
-                }
-                for (Enumeration<java.security.acl.Permission> eee = aa.permissions();eee.hasMoreElements();) {
-                    java.security.acl.Permission perm = eee.nextElement();
-                    if (SNMP_LOGGER.isLoggable(Level.FINER)) {
-                        SNMP_LOGGER.logp(Level.FINER, SnmpAcl.class.getName(),
-                                "readAuthorizedListFile", "perm = " + perm);
-                    }
-                }
-            }
-        }
-    }
-
-    /**
-     * Set the default full path for "snmp.acl" input file.
-     * Do not complain if the file does not exists.
-     */
-    private void setDefaultFileName() {
-        try {
-            setAuthorizedListFile(getDefaultAclFileName());
-        } catch (IllegalArgumentException x) {
-            // OK...
-        }
-    }
-
-
-    // PRIVATE VARIABLES
-    //------------------
-
-    /**
-     * Represents the Access Control List.
-     */
-    private AclImpl acl = null;
-    /**
-     * Flag indicating whether the access is always authorized.
-     * <BR>This is the case if there is no flat file defined.
-     */
-    private boolean alwaysAuthorized = false;
-    /**
-     * Represents the Access Control List flat file.
-     */
-    private String authorizedListFile = null;
-    /**
-     * Contains the hosts list for trap destination.
-     */
-    private Hashtable<InetAddress, Vector<String>> trapDestList = null;
-    /**
-     * Contains the hosts list for inform destination.
-     */
-    private Hashtable<InetAddress, Vector<String>> informDestList = null;
-
-    private PrincipalImpl owner = null;
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/Token.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,107 +0,0 @@
-/*
- * Copyright (c) 1997, 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-/* Generated By:JavaCC: Do not edit this line. Token.java Version 0.7pre3 */
-package com.sun.jmx.snmp.IPAcl;
-
-/**
- * Describes the input token stream.
- */
-
-class Token {
-
-  /**
-   * An integer that describes the kind of this token.  This numbering
-   * system is determined by JavaCCParser, and a table of these numbers is
-   * stored in the file ...Constants.java.
-   */
-  public int kind;
-
-  /**
-   * beginLine and beginColumn describe the position of the first character
-   * of this token; endLine and endColumn describe the position of the
-   * last character of this token.
-   */
-  public int beginLine, beginColumn, endLine, endColumn;
-
-  /**
-   * The string image of the token.
-   */
-  public String image;
-
-  /**
-   * A reference to the next regular (non-special) token from the input
-   * stream.  If this is the last token from the input stream, or if the
-   * token manager has not read tokens beyond this one, this field is
-   * set to null.  This is true only if this token is also a regular
-   * token.  Otherwise, see below for a description of the contents of
-   * this field.
-   */
-  public Token next;
-
-  /**
-   * This field is used to access special tokens that occur prior to this
-   * token, but after the immediately preceding regular (non-special) token.
-   * If there are no such special tokens, this field is set to null.
-   * When there are more than one such special token, this field refers
-   * to the last of these special tokens, which in turn refers to the next
-   * previous special token through its specialToken field, and so on
-   * until the first special token (whose specialToken field is null).
-   * The next fields of special tokens refer to other special tokens that
-   * immediately follow it (without an intervening regular token).  If there
-   * is no such token, this field is null.
-   */
-  public Token specialToken;
-
-  /**
-   * Returns the image.
-   */
-  public final String toString()
-  {
-     return image;
-  }
-
-  /**
-   * Returns a new Token object, by default. However, if you want, you
-   * can create and return subclass objects based on the value of ofKind.
-   * Simply add the cases to the switch for all those special cases.
-   * For example, if you have a subclass of Token called IDToken that
-   * you want to create if ofKind is ID, simlpy add something like :
-   *
-   *    case MyParserConstants.ID : return new IDToken();
-   *
-   * to the following switch statement. Then you can cast matchedToken
-   * variable to the appropriate type and use it in your lexical actions.
-   */
-  public static final Token newToken(int ofKind)
-  {
-     switch(ofKind)
-     {
-       default : return new Token();
-     }
-  }
-
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/TokenMgrError.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,160 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 0.7pre2 */
-package com.sun.jmx.snmp.IPAcl;
-
-class TokenMgrError extends Error
-{
-   private static final long serialVersionUID = -6373071623408870347L;
-
-   /*
-    * Ordinals for various reasons why an Error of this type can be thrown.
-    */
-
-   /**
-    * Lexical error occurred.
-    */
-   static final int LEXICAL_ERROR = 0;
-
-   /**
-    * An attempt wass made to create a second instance of a static token manager.
-    */
-   static final int STATIC_LEXER_ERROR = 1;
-
-   /**
-    * Tried to change to an invalid lexical state.
-    */
-   static final int INVALID_LEXICAL_STATE = 2;
-
-   /**
-    * Detected (and bailed out of) an infinite loop in the token manager.
-    */
-   static final int LOOP_DETECTED = 3;
-
-   /**
-    * Indicates the reason why the exception is thrown. It will have
-    * one of the above 4 values.
-    */
-   int errorCode;
-
-   /**
-    * Replaces unprintable characters by their espaced (or unicode escaped)
-    * equivalents in the given string
-    */
-   protected static final String addEscapes(String str) {
-      StringBuilder retval = new StringBuilder();
-      char ch;
-      for (int i = 0; i < str.length(); i++) {
-        switch (str.charAt(i))
-        {
-           case 0 :
-              continue;
-           case '\b':
-              retval.append("\\b");
-              continue;
-           case '\t':
-              retval.append("\\t");
-              continue;
-           case '\n':
-              retval.append("\\n");
-              continue;
-           case '\f':
-              retval.append("\\f");
-              continue;
-           case '\r':
-              retval.append("\\r");
-              continue;
-           case '\"':
-              retval.append("\\\"");
-              continue;
-           case '\'':
-              retval.append("\\\'");
-              continue;
-           case '\\':
-              retval.append("\\\\");
-              continue;
-           default:
-              if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) {
-                 String s = "0000" + Integer.toString(ch, 16);
-                 retval.append("\\u" + s.substring(s.length() - 4, s.length()));
-              } else {
-                 retval.append(ch);
-              }
-              continue;
-        }
-      }
-      return retval.toString();
-   }
-
-   /**
-    * Returns a detailed message for the Error when it is thrown by the
-    * token manager to indicate a lexical error.
-    * Parameters :
-    *    EOFSeen     : indicates if EOF caused the lexicl error
-    *    curLexState : lexical state in which this error occurred
-    *    errorLine   : line number when the error occurred
-    *    errorColumn : column number when the error occurred
-    *    errorAfter  : prefix that was seen before this error occurred
-    *    curchar     : the offending character
-    * Note: You can customize the lexical error message by modifying this method.
-    */
-   private static final String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) {
-      return("Lexical error at line " +
-           errorLine + ", column " +
-           errorColumn + ".  Encountered: " +
-           (EOFSeen ? "<EOF> " : ("\"" + addEscapes(String.valueOf(curChar)) + "\"") + " (" + (int)curChar + "), ") +
-           "after : \"" + addEscapes(errorAfter) + "\"");
-   }
-
-   /**
-    * You can also modify the body of this method to customize your error messages.
-    * For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not
-    * of end-users concern, so you can return something like :
-    *
-    *     "Internal Error : Please file a bug report .... "
-    *
-    * from this method for such cases in the release version of your parser.
-    */
-   public String getMessage() {
-      return super.getMessage();
-   }
-
-   /*
-    * Constructors of various flavors follow.
-    */
-
-   public TokenMgrError() {
-   }
-
-   public TokenMgrError(String message, int reason) {
-      super(message);
-      errorCode = reason;
-   }
-
-   public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar, int reason) {
-      this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason);
-   }
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/package.html	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-<HTML>
-<HEAD>
-<!--
-
-Copyright (c) 1999, 2003, 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
-particular file as subject to the "Classpath" exception as provided
-by Oracle in the LICENSE file that accompanied this code.
-
-This code is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-version 2 for more details (a copy is included in the LICENSE file that
-accompanied this code).
-
-You should have received a copy of the GNU General Public License version
-2 along with this work; if not, write to the Free Software Foundation,
-Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
-Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-or visit www.oracle.com if you need additional information or have any
-questions.
--->
-</HEAD>
-<BODY>
-Provides the classes for storing ACL information in an ASCII file.
-<p><b>This API is a Sun Microsystems internal API  and is subject 
-   to change without notice.</b></p>
-</BODY>
-</HTML>
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/InetAddressAcl.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,128 +0,0 @@
-/*
- * Copyright (c) 2002, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.jmx.snmp;
-
-// java import
-//
-import java.net.InetAddress;
-import java.util.Enumeration;
-
-/**
- * Defines the IP address based ACL used by the SNMP protocol adaptor.
- * <p>
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- * @since 1.5
- */
-
-public interface InetAddressAcl {
-
-    /**
-     * Returns the name of the ACL.
-     *
-     * @return The name of the ACL.
-     */
-    public String getName();
-
-    /**
-     * Checks whether or not the specified host has <CODE>READ</CODE> access.
-     *
-     * @param address The host address to check.
-     *
-     * @return <CODE>true</CODE> if the host has read permission, <CODE>false</CODE> otherwise.
-     */
-    public boolean checkReadPermission(InetAddress address);
-
-    /**
-     * Checks whether or not the specified host and community have <CODE>READ</CODE> access.
-     *
-     * @param address The host address to check.
-     * @param community The community associated with the host.
-     *
-     * @return <CODE>true</CODE> if the pair (host, community) has read permission, <CODE>false</CODE> otherwise.
-     */
-    public boolean checkReadPermission(InetAddress address, String community);
-
-    /**
-     * Checks whether or not a community string is defined.
-     *
-     * @param community The community to check.
-     *
-     * @return <CODE>true</CODE> if the community is known, <CODE>false</CODE> otherwise.
-     */
-    public boolean checkCommunity(String community);
-
-    /**
-     * Checks whether or not the specified host has <CODE>WRITE</CODE> access.
-     *
-     * @param address The host address to check.
-     *
-     * @return <CODE>true</CODE> if the host has write permission, <CODE>false</CODE> otherwise.
-     */
-    public boolean checkWritePermission(InetAddress address);
-
-    /**
-     * Checks whether or not the specified host and community have <CODE>WRITE</CODE> access.
-     *
-     * @param address The host address to check.
-     * @param community The community associated with the host.
-     *
-     * @return <CODE>true</CODE> if the pair (host, community) has write permission, <CODE>false</CODE> otherwise.
-     */
-    public boolean checkWritePermission(InetAddress address, String community);
-
-    /**
-     * Returns an enumeration of trap destinations.
-     *
-     * @return An enumeration of the trap destinations (enumeration of <CODE>InetAddress</CODE>).
-     */
-    public Enumeration<InetAddress> getTrapDestinations();
-
-    /**
-     * Returns an enumeration of trap communities for a given host.
-     *
-     * @param address The address of the host.
-     *
-     * @return An enumeration of trap communities for a given host (enumeration of <CODE>String</CODE>).
-     */
-    public Enumeration<String> getTrapCommunities(InetAddress address);
-
-    /**
-     * Returns an enumeration of inform destinations.
-     *
-     * @return An enumeration of the inform destinations (enumeration of <CODE>InetAddress</CODE>).
-     */
-    public Enumeration<InetAddress> getInformDestinations();
-
-    /**
-     * Returns an enumeration of inform communities for a given host.
-     *
-     * @param address The address of the host.
-     *
-     * @return An enumeration of inform communities for a given host (enumeration of <CODE>String</CODE>).
-     */
-    public Enumeration<String> getInformCommunities(InetAddress address);
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/ServiceName.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,170 +0,0 @@
-/*
- * Copyright (c) 1999, 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.jmx.snmp;
-
-/**
- * Used for storing default values used by SNMP Runtime services.
- * <p><b>This API is an Oracle Corporation internal API  and is subject
- * to change without notice.</b></p>
- */
-public class ServiceName {
-
-    // private constructor defined to "hide" the default public constructor
-    private ServiceName() {
-    }
-
-    /**
-     * The object name of the MBeanServer delegate object
-     * <BR>
-     * The value is <CODE>JMImplementation:type=MBeanServerDelegate</CODE>.
-     */
-    public static final String DELEGATE = "JMImplementation:type=MBeanServerDelegate" ;
-
-    /**
-     * The default key properties for registering the class loader of the MLet service.
-     * <BR>
-     * The value is <CODE>type=MLet</CODE>.
-     */
-    public static final String MLET = "type=MLet";
-
-    /**
-     * The default domain.
-     * <BR>
-     * The value is <CODE>DefaultDomain</CODE>.
-     */
-    public static final String DOMAIN = "DefaultDomain";
-
-    /**
-     * The default port for the RMI connector.
-     * <BR>
-     * The value is <CODE>1099</CODE>.
-     */
-    public static final int RMI_CONNECTOR_PORT = 1099 ;
-
-    /**
-     * The default key properties for the RMI connector.
-     * <BR>
-     * The value is <CODE>name=RmiConnectorServer</CODE>.
-     */
-    public static final String RMI_CONNECTOR_SERVER = "name=RmiConnectorServer" ;
-
-    /**
-     * The default port for the SNMP adaptor.
-     * <BR>
-     * The value is <CODE>161</CODE>.
-     */
-    public static final int SNMP_ADAPTOR_PORT = 161 ;
-
-    /**
-     * The default key properties for the SNMP protocol adaptor.
-     * <BR>
-     * The value is <CODE>name=SnmpAdaptorServer</CODE>.
-     */
-    public static final String SNMP_ADAPTOR_SERVER = "name=SnmpAdaptorServer" ;
-
-    /**
-     * The default port for the HTTP connector.
-     * <BR>
-     * The value is <CODE>8081</CODE>.
-     */
-    public static final int HTTP_CONNECTOR_PORT = 8081 ;
-
-    /**
-     * The default key properties for the HTTP connector.
-     * <BR>
-     * The value is <CODE>name=HttpConnectorServer</CODE>.
-     */
-    public static final String HTTP_CONNECTOR_SERVER = "name=HttpConnectorServer" ;
-
-    /**
-     * The default port for the HTTPS connector.
-     * <BR>
-     * The value is <CODE>8084</CODE>.
-     */
-    public static final int HTTPS_CONNECTOR_PORT = 8084 ;
-
-    /**
-     * The default key properties for the HTTPS connector.
-     * <BR>
-     * The value is <CODE>name=HttpsConnectorServer</CODE>.
-     */
-    public static final String HTTPS_CONNECTOR_SERVER = "name=HttpsConnectorServer" ;
-
-    /**
-     * The default port for the HTML adaptor.
-     * <BR>
-     * The value is <CODE>8082</CODE>.
-     */
-    public static final int HTML_ADAPTOR_PORT = 8082 ;
-
-    /**
-     * The default key properties for the HTML protocol adaptor.
-     * <BR>
-     * The value is <CODE>name=HtmlAdaptorServer</CODE>.
-     */
-    public static final String HTML_ADAPTOR_SERVER = "name=HtmlAdaptorServer" ;
-
-    /**
-     * The name of the JMX specification implemented by this product.
-     * <BR>
-     * The value is <CODE>Java Management Extensions</CODE>.
-     */
-    public static final String JMX_SPEC_NAME = "Java Management Extensions";
-
-    /**
-     * The version of the JMX specification implemented by this product.
-     * <BR>
-     * The value is <CODE>1.0 Final Release</CODE>.
-     */
-    public static final String JMX_SPEC_VERSION = "1.2 Maintenance Release";
-
-    /**
-     * The vendor of the JMX specification implemented by this product.
-     * <BR>
-     * The value is <CODE>Oracle Corporation</CODE>.
-     */
-    public static final String JMX_SPEC_VENDOR = "Oracle Corporation";
-
-    /**
-     * The name of the vendor of this product implementing the  JMX specification.
-     * <BR>
-     * The value is <CODE>Oracle Corporation</CODE>.
-     */
-    public static final String JMX_IMPL_VENDOR = "Oracle Corporation";
-
-    /**
-      * The build number of the current product version, of the form <CODE>rXX</CODE>.
-      */
-    public static final String BUILD_NUMBER = "r01";
-
-    /**
-     * The version of this product implementing the  JMX specification.
-     * <BR>
-     * The value is <CODE>5.1_rXX</CODE>, where <CODE>rXX</CODE> is the <CODE>BUILD_NUMBER</CODE> .
-     */
-    public static final String JMX_IMPL_VERSION = "5.1_" + BUILD_NUMBER;
-
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpAckPdu.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 2001, 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.sun.jmx.snmp;
-/**
- * Interface to be implemented by PDUs that are acknowledged (eg:
- * request, bulk).
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- * @since 1.5
- */
-public interface SnmpAckPdu {
-    /**
-     * Returns the PDU to use for the response.
-     * @return The response PDU.
-     */
-    public SnmpPdu getResponsePdu();
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpBadSecurityLevelException.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-/*
- * Copyright (c) 2001, 2006, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.sun.jmx.snmp;
-/**
- * This exception is thrown when an incorrect security level is handled.
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- * @since 1.5
- */
-public class SnmpBadSecurityLevelException extends Exception {
-    private static final long serialVersionUID = 8863728413063813053L;
-
-    public SnmpBadSecurityLevelException(String msg) {
-        super(msg);
-    }
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpCounter.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,99 +0,0 @@
-/*
- * Copyright (c) 1997, 2007, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-package com.sun.jmx.snmp;
-
-
-
-/**
- * Represents an SNMP counter.
- *
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- */
-
-public class SnmpCounter extends SnmpUnsignedInt {
-    private static final long serialVersionUID = 4655264728839396879L;
-
-    // CONSTRUCTORS
-    //-------------
-    /**
-     * Constructs a new <CODE>SnmpCounter</CODE> from the specified integer value.
-     * @param v The initialization value.
-     * @exception IllegalArgumentException The specified value is negative
-     * or larger than {@link SnmpUnsignedInt#MAX_VALUE SnmpUnsignedInt.MAX_VALUE}.
-     */
-    public SnmpCounter(int v) throws IllegalArgumentException {
-        super(v) ;
-    }
-
-    /**
-     * Constructs a new <CODE>SnmpCounter</CODE> from the specified <CODE>Integer</CODE> value.
-     * @param v The initialization value.
-     * @exception IllegalArgumentException The specified value is negative
-     * or larger than {@link SnmpUnsignedInt#MAX_VALUE SnmpUnsignedInt.MAX_VALUE}.
-     */
-    public SnmpCounter(Integer v) throws IllegalArgumentException {
-        super(v) ;
-    }
-
-    /**
-     * Constructs a new <CODE>SnmpCounter</CODE> from the specified long value.
-     * @param v The initialization value.
-     * @exception IllegalArgumentException The specified value is negative
-     * or larger than {@link SnmpUnsignedInt#MAX_VALUE SnmpUnsignedInt.MAX_VALUE}.
-     */
-    public SnmpCounter(long v) throws IllegalArgumentException {
-        super(v) ;
-    }
-
-    /**
-     * Constructs a new <CODE>SnmpCounter</CODE> from the specified <CODE>Long</CODE> value.
-     * @param v The initialization value.
-     * @exception IllegalArgumentException The specified value is negative
-     * or larger than {@link SnmpUnsignedInt#MAX_VALUE SnmpUnsignedInt.MAX_VALUE}.
-     */
-    public SnmpCounter(Long v) throws IllegalArgumentException {
-        super(v) ;
-    }
-
-    // PUBLIC METHODS
-    //---------------
-    /**
-     * Returns a textual description of the type object.
-     * @return ASN.1 textual description.
-     */
-    final public String getTypeName() {
-        return name ;
-    }
-
-    // VARIABLES
-    //----------
-    /**
-     * Name of the type.
-     */
-    final static String name = "Counter32" ;
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpCounter64.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,214 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-package com.sun.jmx.snmp;
-
-
-
-/**
- * Represents an SNMP 64bits counter.
- *
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- */
-
-public class SnmpCounter64 extends SnmpValue {
-    private static final long serialVersionUID = 8784850650494679937L;
-
-    // CONSTRUCTORS
-    //-------------
-    /**
-     * Constructs a new <CODE>SnmpCounter64</CODE> from the specified long value.
-     * @param v The initialization value.
-     * @exception IllegalArgumentException The specified value is negative
-     * or larger than <CODE>Long.MAX_VALUE</CODE>.
-     */
-    public SnmpCounter64(long v) throws IllegalArgumentException {
-
-        // NOTE:
-        // The max value for a counter64 variable is 2^64 - 1.
-        // The max value for a Long is 2^63 - 1.
-        // All the allowed values for a conuter64 variable cannot be covered !!!
-        //
-        if ((v < 0) || (v > Long.MAX_VALUE)) {
-            throw new IllegalArgumentException() ;
-        }
-        value = v ;
-    }
-
-    /**
-     * Constructs a new <CODE>SnmpCounter64</CODE> from the specified <CODE>Long</CODE> value.
-     * @param v The initialization value.
-     * @exception IllegalArgumentException The specified value is negative
-     * or larger than <CODE>Long.MAX_VALUE</CODE>.
-     */
-    public SnmpCounter64(Long v) throws IllegalArgumentException {
-        this(v.longValue()) ;
-    }
-
-    // PUBLIC METHODS
-    //---------------
-    /**
-     * Returns the counter value of this <CODE>SnmpCounter64</CODE>.
-     * @return The value.
-     */
-    public long longValue() {
-        return value ;
-    }
-
-    /**
-     * Converts the counter value to its <CODE>Long</CODE> form.
-     * @return The <CODE>Long</CODE> representation of the value.
-     */
-    public Long toLong() {
-        return value;
-    }
-
-    /**
-     * Converts the counter value to its integer form.
-     * @return The integer representation of the value.
-     */
-    public int intValue() {
-        return (int)value ;
-    }
-
-    /**
-     * Converts the counter value to its <CODE>Integer</CODE> form.
-     * @return The <CODE>Integer</CODE> representation of the value.
-     */
-    public Integer toInteger() {
-        return (int)value;
-    }
-
-    /**
-     * Converts the counter value to its <CODE>String</CODE> form.
-     * @return The <CODE>String</CODE> representation of the value.
-     */
-    public String toString() {
-        return String.valueOf(value) ;
-    }
-
-    /**
-     * Converts the counter value to its <CODE>SnmpOid</CODE> form.
-     * @return The OID representation of the value.
-     */
-    public SnmpOid toOid() {
-        return new SnmpOid(value) ;
-    }
-
-    /**
-     * Extracts the counter from an index OID and returns its
-     * value converted as an <CODE>SnmpOid</CODE>.
-     * @param index The index array.
-     * @param start The position in the index array.
-     * @return The OID representing the counter value.
-     * @exception SnmpStatusException There is no counter value
-     * available at the start position.
-     */
-    public static SnmpOid toOid(long[] index, int start) throws SnmpStatusException {
-        try {
-            return new SnmpOid(index[start]) ;
-        }
-        catch(IndexOutOfBoundsException e) {
-            throw new SnmpStatusException(SnmpStatusException.noSuchName) ;
-        }
-    }
-
-    /**
-     * Scans an index OID, skips the counter value and returns the position
-     * of the next value.
-     * @param index The index array.
-     * @param start The position in the index array.
-     * @return The position of the next value.
-     * @exception SnmpStatusException There is no counter value
-     * available at the start position.
-     */
-    public static int nextOid(long[] index, int start) throws SnmpStatusException {
-        if (start >= index.length) {
-            throw new SnmpStatusException(SnmpStatusException.noSuchName) ;
-        }
-        else {
-            return start + 1 ;
-        }
-    }
-
-    /**
-     * Appends an <CODE>SnmpOid</CODE> representing an <CODE>SnmpCounter64</CODE> to another OID.
-     * @param source An OID representing an <CODE>SnmpCounter64</CODE> value.
-     * @param dest Where source should be appended.
-     */
-    public static void appendToOid(SnmpOid source, SnmpOid dest) {
-        if (source.getLength() != 1) {
-            throw new IllegalArgumentException() ;
-        }
-        dest.append(source) ;
-    }
-
-    /**
-     * Performs a clone action. This provides a workaround for the
-     * <CODE>SnmpValue</CODE> interface.
-     * @return The SnmpValue clone.
-     */
-    final synchronized public SnmpValue duplicate() {
-        return (SnmpValue)clone() ;
-    }
-
-    /**
-     * Clones the <CODE>SnmpCounter64</CODE> object, making a copy of its data.
-     * @return The object clone.
-     */
-    final synchronized public Object clone() {
-        SnmpCounter64  newclone = null ;
-        try {
-            newclone = (SnmpCounter64) super.clone() ;
-            newclone.value = value ;
-        } catch (CloneNotSupportedException e) {
-            throw new InternalError(e) ; // vm bug.
-        }
-        return newclone ;
-    }
-
-    /**
-     * Returns a textual description of the type object.
-     * @return ASN.1 textual description.
-     */
-    final public String getTypeName() {
-        return name ;
-    }
-
-    // VARIABLES
-    //----------
-    /**
-     * Name of the type.
-     */
-    final static String name = "Counter64" ;
-
-    /**
-     * This is where the value is stored. This long is positive.
-     * @serial
-     */
-    private long value = 0 ;
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpEngine.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,70 +0,0 @@
-/*
- * Copyright (c) 2002, 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.sun.jmx.snmp;
-
-/**
- * This engine is conformant with the RFC 2571. It is the main object within an SNMP entity (agent, manager...).
- * To an engine is associated an {@link SnmpEngineId}.
- * Engine instantiation is based on a factory {@link com.sun.jmx.snmp.SnmpEngineFactory  SnmpEngineFactory}.
- * When an <CODE> SnmpEngine </CODE> is created, a User based Security Model (USM) is initialized. The security configuration is located in a text file.
- * The text file is read when the engine is created.
- * <p>Note that the engine is not used when the agent is SNMPv1/SNMPv2 only.
-<P> The USM configuration text file is remotely updatable using the USM Mib.</P>
-<P> User that are configured in the Usm text file are nonVolatile. </P>
-<P> Usm Mib userEntry supported storage type values are : volatile or nonVolatile only. Other values are rejected and a wrongValue is returned) </P>
-<ul>
-<li> volatile means that user entry is not flushed in security file </li>
-<li> nonVolatile means that user entry is flushed in security file </li>
-<li> If a nonVolatile row is set to be volatile, it will be not flushed in the file </li>
-<li>If a volatile row created from the UsmMib is set to nonVolatile, it will be flushed in the file (if the file exist and is writable otherwise an inconsistentValue is returned)</li>
-</ul>
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- * @since 1.5
- */
-public interface SnmpEngine {
-    /**
-     * Gets the engine time in seconds. This is the time from the last reboot.
-     * @return The time from the last reboot.
-     */
-    public int getEngineTime();
-    /**
-     * Gets the engine Id. This is unique for each engine.
-     * @return The engine Id object.
-     */
-    public SnmpEngineId getEngineId();
-
-    /**
-     * Gets the engine boot number. This is the number of time this engine has rebooted. Each time an <CODE>SnmpEngine</CODE> is instantiated, it will read this value in its Lcd, and store back the value incremented by one.
-     * @return The engine's number of reboot.
-     */
-    public int getEngineBoots();
-
-    /**
-     * Gets the Usm key handler.
-     * @return The key handler.
-     */
-    public SnmpUsmKeyHandler getUsmKeyHandler();
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpEngineFactory.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 2002, 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.sun.jmx.snmp;
-
-/**
- * This <CODE>SnmpEngineFactory</CODE> is instantiating an <CODE>SnmpEngine</CODE> containing :
- * <ul>
- * <li> Message Processing Sub System + V1, V2 et V3 Message Processing Models</li>
- * <li> Security Sub System + User based Security Model (Id 3)</li>
- * <li> Access Control Sub System + Ip Acl + User based Access Control Model. See <CODE> IpAcl </CODE> and <CODE> UserAcl </CODE>.</li>
- * </ul>
- *
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- * @since 1.5
- */
-public interface SnmpEngineFactory {
-    /**
-     * The engine instantiation method.
-     * @param p The parameters used to instantiate a new engine.
-     * @throws IllegalArgumentException Throwed if one of the configuration file file doesn't exist (Acl files, security file).
-     * @return The newly created SnmpEngine.
-     */
-    public SnmpEngine createEngine(SnmpEngineParameters p);
-
-    /**
-     * The engine instantiation method.
-     * @param p The parameters used to instantiate a new engine.
-     * @param ipacl The Ip ACL to pass to the Access Control Model.
-     * @throws IllegalArgumentException Throwed if one of the configuration
-     *         file file doesn't exist (Acl files, security file).
-     * @return The newly created SnmpEngine.
-     */
-    public SnmpEngine createEngine(SnmpEngineParameters p,
-                                   InetAddressAcl ipacl);
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpEngineId.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,489 +0,0 @@
-/*
- * Copyright (c) 2001, 2006, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.sun.jmx.snmp;
-
-import java.net.InetAddress;
-import java.io.Serializable;
-import java.net.UnknownHostException;
-import java.util.StringTokenizer;
-import java.util.Arrays;
-import java.util.NoSuchElementException;
-
-import com.sun.jmx.snmp.internal.SnmpTools;
-
-/**
- * This class is handling an <CODE>SnmpEngineId</CODE> data. It copes with binary as well as <CODE>String</CODE> representation of an engine Id. A string format engine is an hex string starting with 0x.
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- * @since 1.5
- */
-public class SnmpEngineId implements Serializable {
-    private static final long serialVersionUID = 5434729655830763317L;
-
-    byte[] engineId = null;
-    String hexString = null;
-    String humanString = null;
-    /**
-     * New <CODE>SnmpEngineId</CODE> with an hex string value. Can handle engine Id format &lt;host&gt:&lt;port&gt.
-     * @param hexString Hexa string.
-     */
-    SnmpEngineId(String hexString) {
-        engineId = SnmpTools.ascii2binary(hexString);
-        this.hexString = hexString.toLowerCase();
-    }
-    /**
-     * New <CODE>SnmpEngineId</CODE> with a binary value. You can use <CODE> SnmpTools </CODE> to convert from hex string to binary format.
-     * @param bin Binary value
-     */
-    SnmpEngineId(byte[] bin) {
-        engineId = bin;
-        hexString = SnmpTools.binary2ascii(bin).toLowerCase();
-    }
-
-    /**
-     * If a string of the format &lt;address&gt;:&lt;port&gt;:&lt;IANA number&gt; has been provided at creation time, this string is returned.
-     * @return The Id as a readable string or null if not provided.
-     */
-    public String getReadableId() {
-        return humanString;
-    }
-
-    /**
-     * Returns a string format engine Id.
-     * @return String format value.
-     */
-    public String toString() {
-        return hexString;
-    }
-    /**
-     * Returns a binary engine Id.
-     * @return Binary value.
-     */
-    public byte[] getBytes() {
-        return engineId;
-    }
-
-    /**
-     * In order to store the string used to create the engineId.
-     */
-    void setStringValue(String val) {
-        humanString = val;
-    }
-
-    static void validateId(String str) throws IllegalArgumentException {
-        byte[] arr = SnmpTools.ascii2binary(str);
-        validateId(arr);
-    }
-
-    static void validateId(byte[] arr) throws IllegalArgumentException {
-
-        if(arr.length < 5) throw new IllegalArgumentException("Id size lower than 5 bytes.");
-        if(arr.length > 32) throw new IllegalArgumentException("Id size greater than 32 bytes.");
-
-        //octet strings with very first bit = 0 and length != 12 octets
-        if( ((arr[0] & 0x80) == 0) && arr.length != 12)
-            throw new IllegalArgumentException("Very first bit = 0 and length != 12 octets");
-
-        byte[] zeroedArrays = new byte[arr.length];
-        if(Arrays.equals(zeroedArrays, arr)) throw new IllegalArgumentException("Zeroed Id.");
-        byte[] FFArrays = new byte[arr.length];
-        Arrays.fill(FFArrays, (byte)0xFF);
-        if(Arrays.equals(FFArrays, arr)) throw new IllegalArgumentException("0xFF Id.");
-
-    }
-
-    /**
-     * Generates an engine Id based on the passed array.
-     * @return The created engine Id or null if given arr is null or its length == 0;
-     * @exception IllegalArgumentException when:
-     * <ul>
-     *  <li>octet string lower than 5 bytes.</li>
-     *  <li>octet string greater than 32 bytes.</li>
-     *  <li>octet string = all zeros.</li>
-     *  <li>octet string = all 'ff'H.</li>
-     *  <li>octet strings with very first bit = 0 and length != 12 octets</li>
-     * </ul>
-     */
-    public static SnmpEngineId createEngineId(byte[] arr) throws IllegalArgumentException {
-        if( (arr == null) || arr.length == 0) return null;
-        validateId(arr);
-        return new SnmpEngineId(arr);
-    }
-
-    /**
-     * Generates an engine Id that is unique to the host the agent is running on. The engine Id unicity is system time based. The creation algorithm uses the SUN Microsystems IANA number (42).
-     * @return The generated engine Id.
-     */
-    public static SnmpEngineId createEngineId() {
-        byte[] address = null;
-        byte[] engineid = new byte[13];
-        int iana = 42;
-        long mask = 0xFF;
-        long time = System.currentTimeMillis();
-
-        engineid[0] = (byte) ( (iana & 0xFF000000) >> 24 );
-        engineid[0] |= 0x80;
-        engineid[1] = (byte) ( (iana & 0x00FF0000) >> 16 );
-        engineid[2] = (byte) ( (iana & 0x0000FF00) >> 8 );
-        engineid[3] = (byte) (iana & 0x000000FF);
-        engineid[4] = 0x05;
-
-        engineid[5] =  (byte) ( (time & (mask << 56)) >>> 56 );
-        engineid[6] =  (byte) ( (time & (mask << 48) ) >>> 48 );
-        engineid[7] =  (byte) ( (time & (mask << 40) ) >>> 40 );
-        engineid[8] =  (byte) ( (time & (mask << 32) ) >>> 32 );
-        engineid[9] =  (byte) ( (time & (mask << 24) ) >>> 24 );
-        engineid[10] = (byte) ( (time & (mask << 16) ) >>> 16 );
-        engineid[11] = (byte) ( (time & (mask << 8) ) >>> 8 );
-        engineid[12] = (byte) (time & mask);
-
-        return new SnmpEngineId(engineid);
-    }
-
-    /**
-     * Translates an engine Id in an SnmpOid format. This is useful when dealing with USM MIB indexes.
-     * The oid format is : <engine Id length>.<engine Id binary octet1>....<engine Id binary octetn - 1>.<engine Id binary octetn>
-     * Eg: "0x8000002a05819dcb6e00001f96" ==> 13.128.0.0.42.5.129.157.203.110.0.0.31.150
-     *
-     * @return SnmpOid The oid.
-     */
-    public SnmpOid toOid() {
-        long[] oid = new long[engineId.length + 1];
-        oid[0] = engineId.length;
-        for(int i = 1; i <= engineId.length; i++)
-            oid[i] = (long) (engineId[i-1] & 0xFF);
-        return new SnmpOid(oid);
-    }
-
-   /**
-    * <P>Generates a unique engine Id. Hexadecimal strings as well as a textual description are supported. The textual format is as follow:
-    * <BR>  &lt;address&gt;:&lt;port&gt;:&lt;IANA number&gt;</P>
-    * <P>The allowed formats :</P>
-    * <ul>
-    * <li> &lt;address&gt;:&lt;port&gt;:&lt;IANA number&gt
-    * <BR>   All these parameters are used to generate the Id. WARNING, this method is not compliant with IPv6 address format. Use { @link com.sun.jmx.snmp.SnmpEngineId#createEngineId(java.lang.String,java.lang.String) } instead.</li>
-    * <li> &lt;address&gt;:&lt;port&gt;
-    * <BR>   The IANA number will be the SUN Microsystems one (42). </li>
-    * <li> address
-    * <BR>   The port 161 will be used to generate the Id. IANA number will be the SUN Microsystems one (42). </li>
-    * <li> :port
-    * <BR>   The host to use is localhost. IANA number will be the SUN Microsystems one (42). </li>
-    * <li> ::&lt;IANA number&gt &nbsp;&nbsp;&nbsp;
-    * <BR>   The port 161 and localhost will be used to generate the Id. </li>
-    * <li> :&lt;port&gt;:&lt;IANA number&gt;
-    * <BR>   The host to use is localhost. </li>
-    * <li> &lt;address&gt;::&lt;IANA number&gt
-    * <BR>   The port 161 will be used to generate the Id. </li>
-    * <li> :: &nbsp;&nbsp;&nbsp;
-    * <BR>   The port 161, localhost and the SUN Microsystems IANA number will be used to generate the Id. </li>
-    * </ul>
-    * @exception UnknownHostException if the host name contained in the textual format is unknown.
-    * @exception IllegalArgumentException when :
-    * <ul>
-    *  <li>octet string lower than 5 bytes.</li>
-    *  <li>octet string greater than 32 bytes.</li>
-    *  <li>octet string = all zeros.</li>
-    *  <li>octet string = all 'ff'H.</li>
-    *  <li>octet strings with very first bit = 0 and length != 12 octets</li>
-    *  <li>An IPv6 address format is used in conjonction with the ":" separator</li>
-    * </ul>
-    * @param str The string to parse.
-    * @return The generated engine Id or null if the passed string is null.
-    *
-    */
-    public static SnmpEngineId createEngineId(String str)
-        throws IllegalArgumentException, UnknownHostException {
-        return createEngineId(str, null);
-    }
-
-    /**
-     * Idem { @link
-     * com.sun.jmx.snmp.SnmpEngineId#createEngineId(java.lang.String) }
-     * with the ability to provide your own separator. This allows IPv6
-     * address format handling (eg: providing @ as separator).
-     * @param str The string to parse.
-     * @param separator the separator to use. If null is provided, the default
-     * separator ":" is used.
-     * @return The generated engine Id or null if the passed string is null.
-     * @exception UnknownHostException if the host name contained in the
-     * textual format is unknown.
-     * @exception IllegalArgumentException when :
-     * <ul>
-     *  <li>octet string lower than 5 bytes.</li>
-     *  <li>octet string greater than 32 bytes.</li>
-     *  <li>octet string = all zeros.</li>
-     *  <li>octet string = all 'ff'H.</li>
-     *  <li>octet strings with very first bit = 0 and length != 12 octets</li>
-     *  <li>An IPv6 address format is used in conjonction with the ":"
-     *      separator</li>
-     * </ul>
-     * @since 1.5
-     */
-    public static SnmpEngineId createEngineId(String str, String separator)
-        throws IllegalArgumentException, UnknownHostException {
-        if(str == null) return null;
-
-        if(str.startsWith("0x") || str.startsWith("0X")) {
-            validateId(str);
-            return new SnmpEngineId(str);
-        }
-        separator = separator == null ? ":" : separator;
-        StringTokenizer token = new StringTokenizer(str,
-                                                    separator,
-                                                    true);
-
-        String address = null;
-        String port = null;
-        String iana = null;
-        int objPort = 161;
-        int objIana = 42;
-        InetAddress objAddress = null;
-        SnmpEngineId eng = null;
-        try {
-            //Deal with address
-            try {
-                address = token.nextToken();
-            }catch(NoSuchElementException e) {
-                throw new IllegalArgumentException("Passed string is invalid : ["+str+"]");
-            }
-            if(!address.equals(separator)) {
-                objAddress = InetAddress.getByName(address);
-                try {
-                    token.nextToken();
-                }catch(NoSuchElementException e) {
-                    //No need to go further, no port.
-                    eng = SnmpEngineId.createEngineId(objAddress,
-                                                      objPort,
-                                                      objIana);
-                    eng.setStringValue(str);
-                    return eng;
-                }
-            }
-            else
-                objAddress = InetAddress.getLocalHost();
-
-            //Deal with port
-            try {
-                port = token.nextToken();
-            }catch(NoSuchElementException e) {
-                //No need to go further, no port.
-                eng = SnmpEngineId.createEngineId(objAddress,
-                                                  objPort,
-                                                  objIana);
-                eng.setStringValue(str);
-                return eng;
-            }
-
-            if(!port.equals(separator)) {
-                objPort = Integer.parseInt(port);
-                try {
-                    token.nextToken();
-                }catch(NoSuchElementException e) {
-                    //No need to go further, no iana.
-                    eng = SnmpEngineId.createEngineId(objAddress,
-                                                      objPort,
-                                                      objIana);
-                    eng.setStringValue(str);
-                    return eng;
-                }
-            }
-
-            //Deal with iana
-            try {
-                iana = token.nextToken();
-            }catch(NoSuchElementException e) {
-                //No need to go further, no port.
-                eng = SnmpEngineId.createEngineId(objAddress,
-                                                  objPort,
-                                                  objIana);
-                eng.setStringValue(str);
-                return eng;
-            }
-
-            if(!iana.equals(separator))
-                objIana = Integer.parseInt(iana);
-
-            eng = SnmpEngineId.createEngineId(objAddress,
-                                              objPort,
-                                              objIana);
-            eng.setStringValue(str);
-
-            return eng;
-
-        } catch(Exception e) {
-            throw new IllegalArgumentException("Passed string is invalid : ["+str+"]. Check that the used separator ["+ separator + "] is compatible with IPv6 address format.");
-        }
-
-    }
-
-    /**
-     * Generates a unique engine Id. The engine Id unicity is based on
-     * the host IP address and port. The IP address used is the
-     * localhost one. The creation algorithm uses the SUN Microsystems IANA
-     * number (42).
-     * @param port The TCP/IP port the SNMPv3 Adaptor Server is listening to.
-     * @return The generated engine Id.
-     * @exception UnknownHostException if the local host name
-     *            used to calculate the id is unknown.
-     */
-    public static SnmpEngineId createEngineId(int port)
-        throws UnknownHostException {
-        int suniana = 42;
-        InetAddress address = null;
-        address = InetAddress.getLocalHost();
-        return createEngineId(address, port, suniana);
-    }
-    /**
-     * Generates a unique engine Id. The engine Id unicity is based on
-     * the host IP address and port. The IP address used is the passed
-     * one. The creation algorithm uses the SUN Microsystems IANA
-     * number (42).
-     * @param address The IP address the SNMPv3 Adaptor Server is listening to.
-     * @param port The TCP/IP port the SNMPv3 Adaptor Server is listening to.
-     * @return The generated engine Id.
-     * @exception UnknownHostException. if the provided address is null.
-     */
-    public static SnmpEngineId createEngineId(InetAddress address, int port)
-        throws IllegalArgumentException {
-        int suniana = 42;
-        if(address == null)
-            throw new IllegalArgumentException("InetAddress is null.");
-        return createEngineId(address, port, suniana);
-    }
-
-    /**
-     * Generates a unique engine Id. The engine Id unicity is based on
-     * the host IP address and port. The IP address is the localhost one.
-     * The creation algorithm uses the passed IANA number.
-     * @param port The TCP/IP port the SNMPv3 Adaptor Server is listening to.
-     * @param iana Your enterprise IANA number.
-     * @exception UnknownHostException if the local host name used to calculate the id is unknown.
-     * @return The generated engine Id.
-     */
-    public static SnmpEngineId createEngineId(int port, int iana) throws UnknownHostException {
-        InetAddress address = null;
-        address = InetAddress.getLocalHost();
-        return createEngineId(address, port, iana);
-    }
-
-    /**
-     * Generates a unique engine Id. The engine Id unicity is based on the host IP address and port. The IP address is the passed one, it handles IPv4 and IPv6 hosts. The creation algorithm uses the passed IANA number.
-     * @param addr The IP address the SNMPv3 Adaptor Server is listening to.
-     * @param port The TCP/IP port the SNMPv3 Adaptor Server is listening to.
-     * @param iana Your enterprise IANA number.
-     * @return The generated engine Id.
-     * @exception UnknownHostException if the provided <CODE>InetAddress </CODE> is null.
-     */
-    public static SnmpEngineId createEngineId(InetAddress addr,
-                                              int port,
-                                              int iana) {
-        if(addr == null) throw new IllegalArgumentException("InetAddress is null.");
-        byte[] address = addr.getAddress();
-        byte[] engineid = new byte[9 + address.length];
-        engineid[0] = (byte) ( (iana & 0xFF000000) >> 24 );
-        engineid[0] |= 0x80;
-        engineid[1] = (byte) ( (iana & 0x00FF0000) >> 16 );
-        engineid[2] = (byte) ( (iana & 0x0000FF00) >> 8 );
-
-engineid[3] = (byte) (iana & 0x000000FF);
-        engineid[4] = 0x05;
-
-        if(address.length == 4)
-            engineid[4] = 0x01;
-
-        if(address.length == 16)
-            engineid[4] = 0x02;
-
-        for(int i = 0; i < address.length; i++) {
-            engineid[i + 5] = address[i];
-        }
-
-        engineid[5 + address.length] = (byte)  ( (port & 0xFF000000) >> 24 );
-        engineid[6 + address.length] = (byte) ( (port & 0x00FF0000) >> 16 );
-        engineid[7 + address.length] = (byte) ( (port & 0x0000FF00) >> 8 );
-        engineid[8 + address.length] = (byte) (  port & 0x000000FF );
-
-        return new SnmpEngineId(engineid);
-    }
-
-     /**
-     * Generates an engine Id based on an InetAddress. Handles IPv4 and IPv6 addresses. The creation algorithm uses the passed IANA number.
-     * @param iana Your enterprise IANA number.
-     * @param addr The IP address the SNMPv3 Adaptor Server is listening to.
-     * @return The generated engine Id.
-     * @since 1.5
-     * @exception UnknownHostException if the provided <CODE>InetAddress </CODE> is null.
-     */
-    public static SnmpEngineId createEngineId(int iana, InetAddress addr)
-    {
-        if(addr == null) throw new IllegalArgumentException("InetAddress is null.");
-        byte[] address = addr.getAddress();
-        byte[] engineid = new byte[5 + address.length];
-        engineid[0] = (byte) ( (iana & 0xFF000000) >> 24 );
-        engineid[0] |= 0x80;
-        engineid[1] = (byte) ( (iana & 0x00FF0000) >> 16 );
-        engineid[2] = (byte) ( (iana & 0x0000FF00) >> 8 );
-
-        engineid[3] = (byte) (iana & 0x000000FF);
-        if(address.length == 4)
-            engineid[4] = 0x01;
-
-        if(address.length == 16)
-            engineid[4] = 0x02;
-
-        for(int i = 0; i < address.length; i++) {
-            engineid[i + 5] = address[i];
-        }
-
-        return new SnmpEngineId(engineid);
-    }
-
-    /**
-     * Generates an engine Id based on an InetAddress. Handles IPv4 and IPv6
-     * addresses. The creation algorithm uses the sun IANA number (42).
-     * @param addr The IP address the SNMPv3 Adaptor Server is listening to.
-     * @return The generated engine Id.
-     * @since 1.5
-     * @exception UnknownHostException if the provided
-     *            <CODE>InetAddress</CODE> is null.
-     */
-    public static SnmpEngineId createEngineId(InetAddress addr) {
-        return createEngineId(42, addr);
-    }
-
-
-    /**
-     * Tests <CODE>SnmpEngineId</CODE> instance equality. Two <CODE>SnmpEngineId</CODE> are equal if they have the same value.
-     * @return <CODE>true</CODE> if the two <CODE>SnmpEngineId</CODE> are equals, <CODE>false</CODE> otherwise.
-     */
-    public boolean equals(Object a) {
-        if(!(a instanceof SnmpEngineId) ) return false;
-        return hexString.equals(((SnmpEngineId) a).toString());
-    }
-
-    public int hashCode() {
-        return hexString.hashCode();
-    }
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpEngineParameters.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,117 +0,0 @@
-/*
- * Copyright (c) 2002, 2006, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.jmx.snmp;
-
-import java.io.Serializable;
-
-/**
- * This class is used to pass some specific parameters to an <CODE>
- * SnmpEngineFactory </CODE>.
- *
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- * @since 1.5
- */
-public class SnmpEngineParameters implements Serializable {
-    private static final long serialVersionUID = 3720556613478400808L;
-
-    private UserAcl uacl = null;
-    private String securityFile = null;
-    private boolean encrypt = false;
-    private SnmpEngineId engineId = null;
-
-    /**
-     * Sets the file to use for SNMP Runtime Lcd. If no file is provided, the default location will be checked.
-     */
-    public void setSecurityFile(String securityFile) {
-        this.securityFile = securityFile;
-    }
-
-    /**
-     * Gets the file to use for SNMP Runtime Lcd.
-     * @return The security file.
-     */
-    public String getSecurityFile() {
-        return securityFile;
-    }
-    /**
-     * Sets a customized user ACL. User Acl is used in order to check
-     * access for SNMP V3 requests. If no ACL is provided,
-     * <CODE>com.sun.jmx.snmp.usm.UserAcl.UserAcl</CODE> is instantiated.
-     * @param uacl The user ACL to use.
-     */
-    public void setUserAcl(UserAcl uacl) {
-        this.uacl = uacl;
-    }
-
-    /**
-     * Gets the customized user ACL.
-     * @return The customized user ACL.
-     */
-    public UserAcl getUserAcl() {
-        return uacl;
-    }
-
-    /**
-     * Activate SNMP V3 encryption. By default the encryption is not activated. Be sure that the security provider classes needed for DES are in your classpath (eg:JCE classes)
-     *
-     */
-    public void activateEncryption() {
-        this.encrypt = true;
-    }
-
-    /**
-     * Deactivate SNMP V3 encryption. By default the encryption is not activated. Be sure that the security provider classes needed for DES are in your classpath (eg:JCE classes)
-     *
-     */
-    public void deactivateEncryption() {
-        this.encrypt = false;
-    }
-
-    /**
-     * Check if encryption is activated. By default the encryption is not activated.
-     * @return The encryption activation status.
-     */
-    public boolean isEncryptionEnabled() {
-        return encrypt;
-    }
-
-    /**
-     * Set the engine Id.
-     * @param engineId The engine Id to use.
-     */
-    public void setEngineId(SnmpEngineId engineId) {
-        this.engineId = engineId;
-    }
-
-    /**
-     * Get the engine Id.
-     * @return The engineId.
-     */
-    public SnmpEngineId getEngineId() {
-        return engineId;
-    }
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpGauge.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,99 +0,0 @@
-/*
- * Copyright (c) 1997, 2007, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-package com.sun.jmx.snmp;
-
-
-
-/**
- * Represents an SNMP gauge.
- *
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- */
-
-public class SnmpGauge extends SnmpUnsignedInt {
-    private static final long serialVersionUID = -8366622742122792945L;
-
-    // CONSTRUCTORS
-    //-------------
-    /**
-     * Constructs a new <CODE>SnmpGauge</CODE> from the specified integer value.
-     * @param v The initialization value.
-     * @exception IllegalArgumentException The specified value is negative
-     * or larger than {@link SnmpUnsignedInt#MAX_VALUE SnmpUnsignedInt.MAX_VALUE}.
-     */
-    public SnmpGauge(int v) throws IllegalArgumentException {
-        super(v) ;
-    }
-
-    /**
-     * Constructs a new <CODE>SnmpGauge</CODE> from the specified <CODE>Integer</CODE> value.
-     * @param v The initialization value.
-     * @exception IllegalArgumentException The specified value is negative
-     * or larger than {@link SnmpUnsignedInt#MAX_VALUE SnmpUnsignedInt.MAX_VALUE}.
-     */
-    public SnmpGauge(Integer v) throws IllegalArgumentException {
-        super(v) ;
-    }
-
-    /**
-     * Constructs a new <CODE>SnmpGauge</CODE> from the specified long value.
-     * @param v The initialization value.
-     * @exception IllegalArgumentException The specified value is negative
-     * or larger than {@link SnmpUnsignedInt#MAX_VALUE SnmpUnsignedInt.MAX_VALUE}.
-     */
-    public SnmpGauge(long v) throws IllegalArgumentException {
-        super(v) ;
-    }
-
-    /**
-     * Constructs a new <CODE>SnmpGauge</CODE> from the specified <CODE>Long</CODE> value.
-     * @param v The initialization value.
-     * @exception IllegalArgumentException The specified value is negative
-     * or larger than {@link SnmpUnsignedInt#MAX_VALUE SnmpUnsignedInt.MAX_VALUE}.
-     */
-    public SnmpGauge(Long v) throws IllegalArgumentException {
-        super(v) ;
-    }
-
-    // PUBLIC METHODS
-    //---------------
-    /**
-     * Returns a textual description of the type object.
-     * @return ASN.1 textual description.
-     */
-    final public String getTypeName() {
-        return name ;
-    }
-
-    // VARIABLES
-    //----------
-    /**
-     * Name of the type.
-     */
-    final static String name = "Gauge32" ;
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpInt.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,282 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-package com.sun.jmx.snmp;
-
-
-
-import com.sun.jmx.snmp.Enumerated;
-
-/**
- * Represents an SNMP integer.
- *
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- */
-
-public class SnmpInt extends SnmpValue {
-    private static final long serialVersionUID = -7163624758070343373L;
-
-    // CONSTRUCTORS
-    //-------------
-    /**
-     * Constructs a new <CODE>SnmpInt</CODE> from the specified integer value.
-     * @param v The initialization value.
-     * @exception IllegalArgumentException The specified value is smaller than <CODE>Integer.MIN_VALUE</CODE>
-     * or larger than <CODE>Integer.MAX_VALUE</CODE>.
-     */
-    public SnmpInt(int v) throws IllegalArgumentException {
-        if ( isInitValueValid(v) == false ) {
-            throw new IllegalArgumentException() ;
-        }
-        value = (long)v ;
-    }
-
-    /**
-     * Constructs a new <CODE>SnmpInt</CODE> from the specified <CODE>Integer</CODE> value.
-     * @param v The initialization value.
-     * @exception IllegalArgumentException The specified value is smaller than <CODE>Integer.MIN_VALUE</CODE>
-     * or larger than <CODE>Integer.MAX_VALUE</CODE>.
-     */
-    public SnmpInt(Integer v) throws IllegalArgumentException {
-        this(v.intValue()) ;
-    }
-
-    /**
-     * Constructs a new <CODE>SnmpInt</CODE> from the specified long value.
-     * @param v The initialization value.
-     * @exception IllegalArgumentException The specified value is smaller than <CODE>Integer.MIN_VALUE</CODE>
-     * or larger than <CODE>Integer.MAX_VALUE</CODE>.
-     */
-    public SnmpInt(long v) throws IllegalArgumentException {
-        if ( isInitValueValid(v) == false ) {
-            throw new IllegalArgumentException() ;
-        }
-        value = v ;
-    }
-
-    /**
-     * Constructs a new <CODE>SnmpInt</CODE> from the specified <CODE>Long</CODE> value.
-     * @param v The initialization value.
-     * @exception IllegalArgumentException The specified value is smaller than <CODE>Integer.MIN_VALUE</CODE>
-     * or larger than <CODE>Integer.MAX_VALUE</CODE>.
-     */
-    public SnmpInt(Long v) throws IllegalArgumentException {
-        this(v.longValue()) ;
-    }
-
-    /**
-     * Constructs a new <CODE>SnmpInt</CODE> from the specified <CODE>Enumerated</CODE> value.
-     * @param v The initialization value.
-     * @exception IllegalArgumentException The specified value is smaller than <CODE>Integer.MIN_VALUE</CODE>
-     * or larger than <CODE>Integer.MAX_VALUE</CODE>.
-     * @see Enumerated
-     */
-    public SnmpInt(Enumerated v) throws IllegalArgumentException {
-        this(v.intValue()) ;
-    }
-
-    /**
-     * Constructs a new <CODE>SnmpInt</CODE> from the specified boolean value.
-     * This constructor applies rfc1903 rule:
-     * <p><blockquote><pre>
-     * TruthValue ::= TEXTUAL-CONVENTION
-     *     STATUS       current
-     *     DESCRIPTION
-     *             "Represents a boolean value."
-     *     SYNTAX       INTEGER { true(1), false(2) }
-     * </pre></blockquote>
-     * @param v The initialization value.
-     */
-    public SnmpInt(boolean v) {
-        value = v ? 1 : 2 ;
-    }
-
-    // PUBLIC METHODS
-    //---------------
-    /**
-     * Returns the long value of this <CODE>SnmpInt</CODE>.
-     * @return The value.
-     */
-    public long longValue() {
-        return value ;
-    }
-
-    /**
-     * Converts the integer value to its <CODE>Long</CODE> form.
-     * @return The <CODE>Long</CODE> representation of the value.
-     */
-    public Long toLong() {
-        return value;
-    }
-
-    /**
-     * Converts the integer value to its integer form.
-     * @return The integer representation of the value.
-     */
-    public int intValue() {
-        return (int) value ;
-    }
-
-    /**
-     * Converts the integer value to its <CODE>Integer</CODE> form.
-     * @return The <CODE>Integer</CODE> representation of the value.
-     */
-    public Integer toInteger() {
-        return (int)value;
-    }
-
-    /**
-     * Converts the integer value to its <CODE>String</CODE> form.
-     * @return The <CODE>String</CODE> representation of the value.
-     */
-    public String toString() {
-        return String.valueOf(value) ;
-    }
-
-    /**
-     * Converts the integer value to its <CODE>SnmpOid</CODE> form.
-     * @return The OID representation of the value.
-     */
-    public SnmpOid toOid() {
-        return new SnmpOid(value) ;
-    }
-
-    /**
-     * Extracts the integer from an index OID and returns its
-     * value converted as an <CODE>SnmpOid</CODE>.
-     * @param index The index array.
-     * @param start The position in the index array.
-     * @return The OID representing the integer value.
-     * @exception SnmpStatusException There is no integer value
-     * available at the start position.
-     */
-    public static SnmpOid toOid(long[] index, int start) throws SnmpStatusException {
-        try {
-            return new SnmpOid(index[start]) ;
-        }
-        catch(IndexOutOfBoundsException e) {
-            throw new SnmpStatusException(SnmpStatusException.noSuchName) ;
-        }
-    }
-
-    /**
-     * Scans an index OID, skips the integer value and returns the position
-     * of the next value.
-     * @param index The index array.
-     * @param start The position in the index array.
-     * @return The position of the next value.
-     * @exception SnmpStatusException There is no integer value
-     * available at the start position.
-     */
-    public static int nextOid(long[] index, int start) throws SnmpStatusException {
-        if (start >= index.length) {
-            throw new SnmpStatusException(SnmpStatusException.noSuchName) ;
-        }
-        else {
-            return start + 1 ;
-        }
-    }
-
-    /**
-     * Appends an <CODE>SnmpOid</CODE> representing an <CODE>SnmpInt</CODE> to another OID.
-     * @param source An OID representing an <CODE>SnmpInt</CODE> value.
-     * @param dest Where source should be appended.
-     */
-    public static void appendToOid(SnmpOid source, SnmpOid dest) {
-        if (source.getLength() != 1) {
-            throw new IllegalArgumentException() ;
-        }
-        dest.append(source) ;
-    }
-
-    /**
-     * Performs a clone action. This provides a workaround for the
-     * <CODE>SnmpValue</CODE> interface.
-     * @return The <CODE>SnmpValue</CODE> clone.
-     */
-    final synchronized public SnmpValue duplicate() {
-        return (SnmpValue) clone() ;
-    }
-
-    /**
-     * Clones the <CODE>SnmpInt</CODE> object, making a copy of its data.
-     * @return The object clone.
-     */
-    final synchronized public Object clone() {
-        SnmpInt  newclone = null ;
-        try {
-            newclone = (SnmpInt) super.clone() ;
-            newclone.value = value ;
-        } catch (CloneNotSupportedException e) {
-            throw new InternalError(e) ; // vm bug.
-        }
-        return newclone ;
-    }
-
-    /**
-     * Returns a textual description of the type object.
-     * @return ASN.1 textual description.
-     */
-    public String getTypeName() {
-        return name ;
-    }
-
-    /**
-     * This method has been defined to allow the sub-classes
-     * of SnmpInt to perform their own control at intialization time.
-     */
-    boolean isInitValueValid(int v) {
-        if ((v < Integer.MIN_VALUE) || (v > Integer.MAX_VALUE)) {
-            return false;
-        }
-        return true;
-    }
-
-    /**
-     * This method has been defined to allow the sub-classes
-     * of SnmpInt to perform their own control at intialization time.
-     */
-    boolean isInitValueValid(long v) {
-        if ((v < Integer.MIN_VALUE) || (v > Integer.MAX_VALUE)) {
-            return false;
-        }
-        return true;
-    }
-
-    // VARIABLES
-    //----------
-    /**
-     * Name of the type.
-     */
-    final static String name = "Integer32" ;
-
-    /**
-     * This is where the value is stored. This long is signed.
-     * @serial
-     */
-    protected long value = 0 ;
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpIpAddress.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,217 +0,0 @@
-/*
- * Copyright (c) 1997, 2007, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-package com.sun.jmx.snmp;
-
-
-
-
-/**
- * Represents an SNMP IpAddress.
- *
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- */
-
-public class SnmpIpAddress extends SnmpOid {
-    private static final long serialVersionUID = 7204629998270874474L;
-
-    // CONSTRUCTORS
-    //-------------
-    /**
-     * Constructs a new <CODE>SnmpIpAddress</CODE> from the specified bytes array.
-     * @param bytes The four bytes composing the address.
-     * @exception IllegalArgumentException The length of the array is not equal to four.
-     */
-    public SnmpIpAddress(byte[] bytes) throws IllegalArgumentException {
-        buildFromByteArray(bytes);
-    }
-
-    /**
-     * Constructs a new <CODE>SnmpIpAddress</CODE> from the specified long value.
-     * @param addr The initialization value.
-     */
-    public SnmpIpAddress(long addr) {
-        int address = (int)addr ;
-        byte[] ipaddr = new byte[4];
-
-        ipaddr[0] = (byte) ((address >>> 24) & 0xFF);
-        ipaddr[1] = (byte) ((address >>> 16) & 0xFF);
-        ipaddr[2] = (byte) ((address >>> 8) & 0xFF);
-        ipaddr[3] = (byte) (address & 0xFF);
-
-        buildFromByteArray(ipaddr);
-    }
-
-    /**
-     * Constructs a new <CODE>SnmpIpAddress</CODE> from a dot-formatted <CODE>String</CODE>.
-     * The dot-formatted <CODE>String</CODE> is formulated x.x.x.x .
-     * @param dotAddress The initialization value.
-     * @exception IllegalArgumentException The string does not correspond to an ip address.
-     */
-    public SnmpIpAddress(String dotAddress) throws IllegalArgumentException {
-        super(dotAddress) ;
-        if ((componentCount > 4) ||
-            (components[0] > 255) ||
-            (components[1] > 255) ||
-            (components[2] > 255) ||
-            (components[3] > 255)) {
-            throw new IllegalArgumentException(dotAddress) ;
-        }
-    }
-
-    /**
-     * Constructs a new <CODE>SnmpIpAddress</CODE> from four long values.
-     * @param b1 Byte 1.
-     * @param b2 Byte 2.
-     * @param b3 Byte 3.
-     * @param b4 Byte 4.
-     * @exception IllegalArgumentException A value is outside of [0-255].
-     */
-    public SnmpIpAddress(long b1, long b2, long b3, long b4) {
-        super(b1, b2, b3, b4) ;
-        if ((components[0] > 255) ||
-            (components[1] > 255) ||
-            (components[2] > 255) ||
-            (components[3] > 255)) {
-            throw new IllegalArgumentException() ;
-        }
-    }
-
-    // PUBLIC METHODS
-    //---------------
-    /**
-     * Converts the address value to its byte array form.
-     * @return The byte array representation of the value.
-     */
-    public byte[] byteValue() {
-        byte[] result = new byte[4] ;
-        result[0] = (byte)components[0] ;
-        result[1] = (byte)components[1] ;
-        result[2] = (byte)components[2] ;
-        result[3] = (byte)components[3] ;
-
-        return result ;
-    }
-
-    /**
-     * Converts the address to its <CODE>String</CODE> form.
-     * Same as <CODE>toString()</CODE>. Exists only to follow a naming scheme.
-     * @return The <CODE>String</CODE> representation of the value.
-     */
-    public String stringValue() {
-        return toString() ;
-    }
-
-    /**
-     * Extracts the ip address from an index OID and returns its
-     * value converted as an <CODE>SnmpOid</CODE>.
-     * @param index The index array.
-     * @param start The position in the index array.
-     * @return The OID representing the ip address value.
-     * @exception SnmpStatusException There is no ip address value
-     * available at the start position.
-     */
-    public static SnmpOid toOid(long[] index, int start) throws SnmpStatusException {
-        if (start + 4 <= index.length) {
-            try {
-                return new SnmpOid(
-                                   index[start],
-                                   index[start+1],
-                                   index[start+2],
-                                   index[start+3]) ;
-            }
-            catch(IllegalArgumentException e) {
-                throw new SnmpStatusException(SnmpStatusException.noSuchName) ;
-            }
-        }
-        else {
-            throw new SnmpStatusException(SnmpStatusException.noSuchName) ;
-        }
-    }
-
-    /**
-     * Scans an index OID, skips the address value and returns the position
-     * of the next value.
-     * @param index The index array.
-     * @param start The position in the index array.
-     * @return The position of the next value.
-     * @exception SnmpStatusException There is no address value
-     * available at the start position.
-     */
-    public static int nextOid(long[] index, int start) throws SnmpStatusException {
-        if (start + 4 <= index.length) {
-            return start + 4 ;
-        }
-        else {
-            throw new SnmpStatusException(SnmpStatusException.noSuchName) ;
-        }
-    }
-
-    /**
-     * Appends an <CODE>SnmpOid</CODE> representing an <CODE>SnmpIpAddress</CODE> to another OID.
-     * @param source An OID representing an <CODE>SnmpIpAddress</CODE> value.
-     * @param dest Where source should be appended.
-     */
-    public static void appendToOid(SnmpOid source, SnmpOid dest) {
-        if (source.getLength() != 4) {
-            throw new IllegalArgumentException() ;
-        }
-        dest.append(source) ;
-    }
-
-    /**
-     * Returns a textual description of the type object.
-     * @return ASN.1 textual description.
-     */
-    final public String getTypeName() {
-        return name ;
-    }
-
-    // PRIVATE METHODS
-    //----------------
-    /**
-     * Build Ip address from byte array.
-     */
-    private void buildFromByteArray(byte[] bytes) {
-        if (bytes.length != 4) {
-            throw new IllegalArgumentException() ;
-        }
-        components = new long[4] ;
-        componentCount= 4;
-        components[0] = (bytes[0] >= 0) ? bytes[0] : bytes[0] + 256 ;
-        components[1] = (bytes[1] >= 0) ? bytes[1] : bytes[1] + 256 ;
-        components[2] = (bytes[2] >= 0) ? bytes[2] : bytes[2] + 256 ;
-        components[3] = (bytes[3] >= 0) ? bytes[3] : bytes[3] + 256 ;
-    }
-
-    // VARIABLES
-    //----------
-    /**
-     * Name of the type.
-     */
-    final static String name = "IpAddress" ;
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpMessage.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,362 +0,0 @@
-/*
- * Copyright (c) 1998, 2007, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-package com.sun.jmx.snmp;
-
-
-
-// java imports
-//
-import java.util.logging.Level;
-import java.util.Vector;
-import java.net.InetAddress;
-
-import static com.sun.jmx.defaults.JmxProperties.SNMP_LOGGER;
-
-/**
- * Is a partially decoded representation of an SNMP packet.
- * <P>
- * You will not normally need to use this class unless you decide to
- * implement your own {@link com.sun.jmx.snmp.SnmpPduFactory SnmpPduFactory} object.
- * <P>
- * The <CODE>SnmpMessage</CODE> class is directly mapped onto the
- * <CODE>Message</CODE> syntax defined in RFC1157 and RFC1902.
- * <BLOCKQUOTE>
- * <PRE>
- * Message ::= SEQUENCE {
- *    version       INTEGER { version(1) }, -- for SNMPv2
- *    community     OCTET STRING,           -- community name
- *    data          ANY                     -- an SNMPv2 PDU
- * }
- * </PRE>
- * </BLOCKQUOTE>
- *
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- * @see SnmpPduFactory
- * @see SnmpPduPacket
- *
- */
-
-public class SnmpMessage extends SnmpMsg implements SnmpDefinitions {
-    /**
-     * Community name.
-     */
-    public byte[] community ;
-
-    /**
-     * Encodes this message and puts the result in the specified byte array.
-     * For internal use only.
-     *
-     * @param outputBytes An array to receive the resulting encoding.
-     *
-     * @exception ArrayIndexOutOfBoundsException If the result does not fit
-     *                                           into the specified array.
-     */
-    public int encodeMessage(byte[] outputBytes) throws SnmpTooBigException {
-        int encodingLength = 0 ;
-        if (data == null)
-            throw new IllegalArgumentException("Data field is null") ;
-
-        //
-        // Reminder: BerEncoder does backward encoding !
-        //
-        try {
-            BerEncoder benc = new BerEncoder(outputBytes) ;
-            benc.openSequence() ;
-            benc.putAny(data, dataLength) ;
-            benc.putOctetString((community != null) ? community : new byte[0]) ;
-            benc.putInteger(version) ;
-            benc.closeSequence() ;
-            encodingLength = benc.trim() ;
-        }
-        catch(ArrayIndexOutOfBoundsException x) {
-            throw new SnmpTooBigException() ;
-        }
-
-        return encodingLength ;
-    }
-    /**
-     * Returns the associated request ID.
-     * @param inputBytes The flat message.
-     * @return The request ID.
-     *
-     * @since 1.5
-     */
-    public int getRequestId(byte[] inputBytes) throws SnmpStatusException {
-        int requestId = 0;
-        BerDecoder bdec = null;
-        BerDecoder bdec2 = null;
-        byte[] any = null;
-        try {
-            bdec = new BerDecoder(inputBytes);
-            bdec.openSequence();
-            bdec.fetchInteger();
-            bdec.fetchOctetString();
-            any = bdec.fetchAny();
-            bdec2 = new BerDecoder(any);
-            int type = bdec2.getTag();
-            bdec2.openSequence(type);
-            requestId = bdec2.fetchInteger();
-        }
-        catch(BerException x) {
-            throw new SnmpStatusException("Invalid encoding") ;
-        }
-        try {
-            bdec.closeSequence();
-        }
-        catch(BerException x) {
-        }
-        try {
-            bdec2.closeSequence();
-        }
-        catch(BerException x) {
-        }
-        return requestId;
-    }
-    /**
-     * Decodes the specified bytes and initializes this message.
-     * For internal use only.
-     *
-     * @param inputBytes The bytes to be decoded.
-     *
-     * @exception SnmpStatusException If the specified bytes are not a valid encoding.
-     */
-    public void decodeMessage(byte[] inputBytes, int byteCount)
-        throws SnmpStatusException {
-        try {
-            BerDecoder bdec = new BerDecoder(inputBytes/*, byteCount */) ; // FIXME
-            bdec.openSequence() ;
-            version = bdec.fetchInteger() ;
-            community = bdec.fetchOctetString() ;
-            data = bdec.fetchAny() ;
-            dataLength = data.length ;
-            bdec.closeSequence() ;
-        }
-        catch(BerException x) {
-            throw new SnmpStatusException("Invalid encoding") ;
-        }
-    }
-
-    /**
-     * Initializes this message with the specified <CODE>pdu</CODE>.
-     * <P>
-     * This method initializes the data field with an array of
-     * <CODE>maxDataLength</CODE> bytes. It encodes the <CODE>pdu</CODE>.
-     * The resulting encoding is stored in the data field
-     * and the length of the encoding is stored in <CODE>dataLength</CODE>.
-     * <p>
-     * If the encoding length exceeds <CODE>maxDataLength</CODE>,
-     * the method throws an exception.
-     *
-     * @param pdu The PDU to be encoded.
-     * @param maxDataLength The maximum length permitted for the data field.
-     *
-     * @exception SnmpStatusException If the specified <CODE>pdu</CODE> is not valid.
-     * @exception SnmpTooBigException If the resulting encoding does not fit
-     * into <CODE>maxDataLength</CODE> bytes.
-     * @exception ArrayIndexOutOfBoundsException If the encoding exceeds <CODE>maxDataLength</CODE>.
-     *
-     * @since 1.5
-     */
-    public void encodeSnmpPdu(SnmpPdu pdu, int maxDataLength)
-        throws SnmpStatusException, SnmpTooBigException {
-        //
-        // The easy work
-        //
-        SnmpPduPacket pdupacket = (SnmpPduPacket) pdu;
-        version = pdupacket.version ;
-        community = pdupacket.community ;
-        address = pdupacket.address ;
-        port = pdupacket.port ;
-
-        //
-        // Allocate the array to receive the encoding.
-        //
-        data = new byte[maxDataLength] ;
-
-        //
-        // Encode the pdupacket
-        // Reminder: BerEncoder does backward encoding !
-        //
-
-        try {
-            BerEncoder benc = new BerEncoder(data) ;
-            benc.openSequence() ;
-            encodeVarBindList(benc, pdupacket.varBindList) ;
-
-            switch(pdupacket.type) {
-
-            case pduGetRequestPdu :
-            case pduGetNextRequestPdu :
-            case pduInformRequestPdu :
-            case pduGetResponsePdu :
-            case pduSetRequestPdu :
-            case pduV2TrapPdu :
-            case pduReportPdu :
-                SnmpPduRequest reqPdu = (SnmpPduRequest)pdupacket ;
-                benc.putInteger(reqPdu.errorIndex) ;
-                benc.putInteger(reqPdu.errorStatus) ;
-                benc.putInteger(reqPdu.requestId) ;
-                break ;
-
-            case pduGetBulkRequestPdu :
-                SnmpPduBulk bulkPdu = (SnmpPduBulk)pdupacket ;
-                benc.putInteger(bulkPdu.maxRepetitions) ;
-                benc.putInteger(bulkPdu.nonRepeaters) ;
-                benc.putInteger(bulkPdu.requestId) ;
-                break ;
-
-            case pduV1TrapPdu :
-                SnmpPduTrap trapPdu = (SnmpPduTrap)pdupacket ;
-                benc.putInteger(trapPdu.timeStamp, SnmpValue.TimeticksTag) ;
-                benc.putInteger(trapPdu.specificTrap) ;
-                benc.putInteger(trapPdu.genericTrap) ;
-                if(trapPdu.agentAddr != null)
-                    benc.putOctetString(trapPdu.agentAddr.byteValue(), SnmpValue.IpAddressTag) ;
-                else
-                    benc.putOctetString(new byte[0], SnmpValue.IpAddressTag);
-                benc.putOid(trapPdu.enterprise.longValue()) ;
-                break ;
-
-            default:
-                throw new SnmpStatusException("Invalid pdu type " + String.valueOf(pdupacket.type)) ;
-            }
-            benc.closeSequence(pdupacket.type) ;
-            dataLength = benc.trim() ;
-        }
-        catch(ArrayIndexOutOfBoundsException x) {
-            throw new SnmpTooBigException() ;
-        }
-    }
-    /**
-     * Gets the PDU encoded in this message.
-     * <P>
-     * This method decodes the data field and returns the resulting PDU.
-     *
-     * @return The resulting PDU.
-     * @exception SnmpStatusException If the encoding is not valid.
-     *
-     * @since 1.5
-     */
-    public SnmpPdu decodeSnmpPdu()
-        throws SnmpStatusException {
-        //
-        // Decode the pdu
-        //
-        SnmpPduPacket pdu = null ;
-        BerDecoder bdec = new BerDecoder(data) ;
-        try {
-            int type = bdec.getTag() ;
-            bdec.openSequence(type) ;
-            switch(type) {
-
-            case pduGetRequestPdu :
-            case pduGetNextRequestPdu :
-            case pduInformRequestPdu :
-            case pduGetResponsePdu :
-            case pduSetRequestPdu :
-            case pduV2TrapPdu :
-            case pduReportPdu :
-                SnmpPduRequest reqPdu = new SnmpPduRequest() ;
-                reqPdu.requestId = bdec.fetchInteger() ;
-                reqPdu.errorStatus = bdec.fetchInteger() ;
-                reqPdu.errorIndex = bdec.fetchInteger() ;
-                pdu = reqPdu ;
-                break ;
-
-            case pduGetBulkRequestPdu :
-                SnmpPduBulk bulkPdu = new SnmpPduBulk() ;
-                bulkPdu.requestId = bdec.fetchInteger() ;
-                bulkPdu.nonRepeaters = bdec.fetchInteger() ;
-                bulkPdu.maxRepetitions = bdec.fetchInteger() ;
-                pdu = bulkPdu ;
-                break ;
-
-            case pduV1TrapPdu :
-                SnmpPduTrap trapPdu = new SnmpPduTrap() ;
-                trapPdu.enterprise = new SnmpOid(bdec.fetchOid()) ;
-                byte []b = bdec.fetchOctetString(SnmpValue.IpAddressTag);
-                if(b.length != 0)
-                    trapPdu.agentAddr = new SnmpIpAddress(b) ;
-                else
-                    trapPdu.agentAddr = null;
-                trapPdu.genericTrap = bdec.fetchInteger() ;
-                trapPdu.specificTrap = bdec.fetchInteger() ;
-                trapPdu.timeStamp = bdec.fetchInteger(SnmpValue.TimeticksTag) ;
-                pdu = trapPdu ;
-                break ;
-
-            default:
-                throw new SnmpStatusException(snmpRspWrongEncoding) ;
-            }
-            pdu.type = type ;
-            pdu.varBindList = decodeVarBindList(bdec) ;
-            bdec.closeSequence() ;
-        } catch(BerException e) {
-            if (SNMP_LOGGER.isLoggable(Level.FINEST)) {
-                SNMP_LOGGER.logp(Level.FINEST, SnmpMessage.class.getName(),
-                        "decodeSnmpPdu", "BerException", e);
-            }
-            throw new SnmpStatusException(snmpRspWrongEncoding);
-        } catch(IllegalArgumentException e) {
-            // bug id 4654066
-            if (SNMP_LOGGER.isLoggable(Level.FINEST)) {
-                SNMP_LOGGER.logp(Level.FINEST, SnmpMessage.class.getName(),
-                        "decodeSnmpPdu", "IllegalArgumentException", e);
-            }
-            throw new SnmpStatusException(snmpRspWrongEncoding);
-        }
-
-        //
-        // The easy work
-        //
-        pdu.version = version ;
-        pdu.community = community ;
-        pdu.address = address ;
-        pdu.port = port ;
-
-        return pdu;
-    }
-    /**
-     * Dumps this message in a string.
-     *
-     * @return The string containing the dump.
-     */
-    public String printMessage() {
-        StringBuilder sb = new StringBuilder();
-        if (community == null) {
-            sb.append("Community: null") ;
-        }
-        else {
-            sb.append("Community: {\n") ;
-            sb.append(dumpHexBuffer(community, 0, community.length)) ;
-            sb.append("\n}\n") ;
-        }
-        return sb.append(super.printMessage()).toString();
-    }
-
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpMsg.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,476 +0,0 @@
-/*
- * Copyright (c) 2001, 2006, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.jmx.snmp;
-
-import com.sun.jmx.snmp.SnmpSecurityParameters;
-// java imports
-//
-import java.util.Vector;
-import java.net.InetAddress;
-
-
-import com.sun.jmx.snmp.SnmpStatusException;
-/**
- * A partially decoded representation of an SNMP packet. It contains
- * the information contained in any SNMP message (SNMPv1, SNMPv2 or
- * SNMPv3).
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- * @since 1.5
- */
-public abstract class SnmpMsg implements SnmpDefinitions {
-    /**
-     * The protocol version.
-     * <P><CODE>decodeMessage</CODE> and <CODE>encodeMessage</CODE> do not
-     * perform any check on this value.
-     * <BR><CODE>decodeSnmpPdu</CODE> and <CODE>encodeSnmpPdu</CODE> only
-     * accept  the values 0 (for SNMPv1), 1 (for SNMPv2) and 3 (for SNMPv3).
-     */
-    public int version = 0;
-
-    /**
-     * Encoding of the PDU.
-     * <P>This is usually the BER encoding of the PDU's syntax
-     * defined in RFC1157 and RFC1902. However, this can be authenticated
-     * or encrypted data (but you need to implemented your own
-     * <CODE>SnmpPduFactory</CODE> class).
-     */
-    public byte[] data = null;
-
-    /**
-     * Number of useful bytes in the <CODE>data</CODE> field.
-     */
-    public int dataLength = 0;
-
-    /**
-     * Source or destination address.
-     * <BR>For an incoming message it's the source.
-     * For an outgoing message it's the destination.
-     */
-    public InetAddress address = null;
-
-    /**
-     * Source or destination port.
-     * <BR>For an incoming message it's the source.
-     * For an outgoing message it's the destination.
-     */
-    public int port = 0;
-    /**
-     * Security parameters. Contain informations according to Security Model (Usm, community string based, ...).
-     */
-    public SnmpSecurityParameters securityParameters = null;
-    /**
-     * Returns the encoded SNMP version present in the passed byte array.
-     * @param data The unmarshalled SNMP message.
-     * @return The SNMP version (0, 1 or 3).
-     */
-    public static int getProtocolVersion(byte[] data)
-        throws SnmpStatusException {
-        int version = 0;
-        BerDecoder bdec = null;
-        try {
-            bdec = new BerDecoder(data);
-            bdec.openSequence();
-            version = bdec.fetchInteger();
-        }
-        catch(BerException x) {
-            throw new SnmpStatusException("Invalid encoding") ;
-        }
-        try {
-            bdec.closeSequence();
-        }
-        catch(BerException x) {
-        }
-        return version;
-    }
-
-    /**
-     * Returns the associated request ID.
-     * @param data The flat message.
-     * @return The request ID.
-     */
-    public abstract int getRequestId(byte[] data) throws SnmpStatusException;
-
-    /**
-     * Encodes this message and puts the result in the specified byte array.
-     * For internal use only.
-     *
-     * @param outputBytes An array to receive the resulting encoding.
-     *
-     * @exception ArrayIndexOutOfBoundsException If the result does not fit
-     *                                           into the specified array.
-     */
-    public abstract int encodeMessage(byte[] outputBytes)
-        throws SnmpTooBigException;
-
-     /**
-     * Decodes the specified bytes and initializes this message.
-     * For internal use only.
-     *
-     * @param inputBytes The bytes to be decoded.
-     *
-     * @exception SnmpStatusException If the specified bytes are not a valid encoding.
-     */
-    public abstract void decodeMessage(byte[] inputBytes, int byteCount)
-        throws SnmpStatusException;
-
-     /**
-     * Initializes this message with the specified <CODE>pdu</CODE>.
-     * <P>
-     * This method initializes the data field with an array of
-     * <CODE>maxDataLength</CODE> bytes. It encodes the <CODE>pdu</CODE>.
-     * The resulting encoding is stored in the data field
-     * and the length of the encoding is stored in <CODE>dataLength</CODE>.
-     * <p>
-     * If the encoding length exceeds <CODE>maxDataLength</CODE>,
-     * the method throws an exception.
-     *
-     * @param pdu The PDU to be encoded.
-     * @param maxDataLength The maximum length permitted for the data field.
-     *
-     * @exception SnmpStatusException If the specified <CODE>pdu</CODE> is not valid.
-     * @exception SnmpTooBigException If the resulting encoding does not fit
-     * into <CODE>maxDataLength</CODE> bytes.
-     * @exception ArrayIndexOutOfBoundsException If the encoding exceeds <CODE>maxDataLength</CODE>.
-     */
-    public abstract void encodeSnmpPdu(SnmpPdu pdu, int maxDataLength)
-        throws SnmpStatusException, SnmpTooBigException;
-
-
-    /**
-     * Gets the PDU encoded in this message.
-     * <P>
-     * This method decodes the data field and returns the resulting PDU.
-     *
-     * @return The resulting PDU.
-     * @exception SnmpStatusException If the encoding is not valid.
-     */
-    public abstract SnmpPdu decodeSnmpPdu()
-        throws SnmpStatusException;
-
-    /**
-     * Dumps the content of a byte buffer using hexadecimal form.
-     *
-     * @param b The buffer to dump.
-     * @param offset The position of the first byte to be dumped.
-     * @param len The number of bytes to be dumped starting from offset.
-     *
-     * @return The string containing the dump.
-     */
-    public static String dumpHexBuffer(byte [] b, int offset, int len) {
-        StringBuilder sb = new StringBuilder(len << 1) ;
-        int k = 1 ;
-        int flen = offset + len ;
-
-        for (int i = offset; i < flen ; i++) {
-            int j = b[i] & 0xFF ;
-            sb.append(Character.forDigit((j >>> 4), 16)) ;
-            sb.append(Character.forDigit((j & 0x0F), 16)) ;
-            k++ ;
-            if (k%16 == 0) {
-                sb.append('\n') ;
-                k = 1 ;
-            } else
-                sb.append(' ') ;
-        }
-        return sb.toString() ;
-    }
-
-    /**
-     * Dumps this message in a string.
-     *
-     * @return The string containing the dump.
-     */
-    public String printMessage() {
-        StringBuilder sb = new StringBuilder() ;
-        sb.append("Version: ") ;
-        sb.append(version) ;
-        sb.append("\n") ;
-        if (data == null) {
-            sb.append("Data: null") ;
-        }
-        else {
-            sb.append("Data: {\n") ;
-            sb.append(dumpHexBuffer(data, 0, dataLength)) ;
-            sb.append("\n}\n") ;
-        }
-
-        return sb.toString() ;
-    }
-
-    /**
-     * For SNMP Runtime private use only.
-     */
-    public void encodeVarBindList(BerEncoder benc,
-                                  SnmpVarBind[] varBindList)
-        throws SnmpStatusException, SnmpTooBigException {
-        //
-        // Remember: the encoder does backward encoding
-        //
-        int encodedVarBindCount = 0 ;
-        try {
-            benc.openSequence() ;
-            if (varBindList != null) {
-                for (int i = varBindList.length - 1 ; i >= 0 ; i--) {
-                    SnmpVarBind bind = varBindList[i] ;
-                    if (bind != null) {
-                        benc.openSequence() ;
-                        encodeVarBindValue(benc, bind.value) ;
-                        benc.putOid(bind.oid.longValue()) ;
-                        benc.closeSequence() ;
-                        encodedVarBindCount++ ;
-                    }
-                }
-            }
-            benc.closeSequence() ;
-        }
-        catch(ArrayIndexOutOfBoundsException x) {
-            throw new SnmpTooBigException(encodedVarBindCount) ;
-        }
-    }
-
-    /**
-     * For SNMP Runtime private use only.
-     */
-    void encodeVarBindValue(BerEncoder benc,
-                            SnmpValue v)throws SnmpStatusException {
-        if (v == null) {
-            benc.putNull() ;
-        }
-        else if (v instanceof SnmpIpAddress) {
-            benc.putOctetString(((SnmpIpAddress)v).byteValue(), SnmpValue.IpAddressTag) ;
-        }
-        else if (v instanceof SnmpCounter) {
-            benc.putInteger(((SnmpCounter)v).longValue(), SnmpValue.CounterTag) ;
-        }
-        else if (v instanceof SnmpGauge) {
-            benc.putInteger(((SnmpGauge)v).longValue(), SnmpValue.GaugeTag) ;
-        }
-        else if (v instanceof SnmpTimeticks) {
-            benc.putInteger(((SnmpTimeticks)v).longValue(), SnmpValue.TimeticksTag) ;
-        }
-        else if (v instanceof SnmpOpaque) {
-            benc.putOctetString(((SnmpOpaque)v).byteValue(), SnmpValue.OpaqueTag) ;
-        }
-        else if (v instanceof SnmpInt) {
-            benc.putInteger(((SnmpInt)v).intValue()) ;
-        }
-        else if (v instanceof SnmpString) {
-            benc.putOctetString(((SnmpString)v).byteValue()) ;
-        }
-        else if (v instanceof SnmpOid) {
-            benc.putOid(((SnmpOid)v).longValue()) ;
-        }
-        else if (v instanceof SnmpCounter64) {
-            if (version == snmpVersionOne) {
-                throw new SnmpStatusException("Invalid value for SNMP v1 : " + v) ;
-            }
-            benc.putInteger(((SnmpCounter64)v).longValue(), SnmpValue.Counter64Tag) ;
-        }
-        else if (v instanceof SnmpNull) {
-            int tag = ((SnmpNull)v).getTag() ;
-            if ((version == snmpVersionOne) && (tag != SnmpValue.NullTag)) {
-                throw new SnmpStatusException("Invalid value for SNMP v1 : " + v) ;
-            }
-            if ((version == snmpVersionTwo) &&
-                (tag != SnmpValue.NullTag) &&
-                (tag != SnmpVarBind.errNoSuchObjectTag) &&
-                (tag != SnmpVarBind.errNoSuchInstanceTag) &&
-                (tag != SnmpVarBind.errEndOfMibViewTag)) {
-                throw new SnmpStatusException("Invalid value " + v) ;
-            }
-            benc.putNull(tag) ;
-        }
-        else {
-            throw new SnmpStatusException("Invalid value " + v) ;
-        }
-
-    }
-
-
-    /**
-     * For SNMP Runtime private use only.
-     */
-    public SnmpVarBind[] decodeVarBindList(BerDecoder bdec)
-        throws BerException {
-            bdec.openSequence() ;
-            Vector<SnmpVarBind> tmp = new Vector<SnmpVarBind>() ;
-            while (bdec.cannotCloseSequence()) {
-                SnmpVarBind bind = new SnmpVarBind() ;
-                bdec.openSequence() ;
-                bind.oid = new SnmpOid(bdec.fetchOid()) ;
-                bind.setSnmpValue(decodeVarBindValue(bdec)) ;
-                bdec.closeSequence() ;
-                tmp.addElement(bind) ;
-            }
-            bdec.closeSequence() ;
-            SnmpVarBind[] varBindList= new SnmpVarBind[tmp.size()] ;
-            tmp.copyInto(varBindList);
-            return varBindList ;
-        }
-
-
-    /**
-     * For SNMP Runtime private use only.
-     */
-    SnmpValue decodeVarBindValue(BerDecoder bdec)
-        throws BerException {
-        SnmpValue result = null ;
-        int tag = bdec.getTag() ;
-
-        // bugId 4641696 : RuntimeExceptions must be transformed in
-        //                 BerException.
-        switch(tag) {
-
-            //
-            // Simple syntax
-            //
-        case BerDecoder.IntegerTag :
-            try {
-                result = new SnmpInt(bdec.fetchInteger()) ;
-            } catch(RuntimeException r) {
-                throw new BerException();
-                // BerException("Can't build SnmpInt from decoded value.");
-            }
-            break ;
-        case BerDecoder.OctetStringTag :
-            try {
-                result = new SnmpString(bdec.fetchOctetString()) ;
-            } catch(RuntimeException r) {
-                throw new BerException();
-                // BerException("Can't build SnmpString from decoded value.");
-            }
-            break ;
-        case BerDecoder.OidTag :
-            try {
-                result = new SnmpOid(bdec.fetchOid()) ;
-            } catch(RuntimeException r) {
-                throw new BerException();
-                // BerException("Can't build SnmpOid from decoded value.");
-            }
-            break ;
-        case BerDecoder.NullTag :
-            bdec.fetchNull() ;
-            try {
-                result = new SnmpNull() ;
-            } catch(RuntimeException r) {
-                throw new BerException();
-                // BerException("Can't build SnmpNull from decoded value.");
-            }
-            break ;
-
-            //
-            // Application syntax
-            //
-        case SnmpValue.IpAddressTag :
-            try {
-                result = new SnmpIpAddress(bdec.fetchOctetString(tag)) ;
-            } catch (RuntimeException r) {
-                throw new  BerException();
-              // BerException("Can't build SnmpIpAddress from decoded value.");
-            }
-            break ;
-        case SnmpValue.CounterTag :
-            try {
-                result = new SnmpCounter(bdec.fetchIntegerAsLong(tag)) ;
-            } catch(RuntimeException r) {
-                throw new BerException();
-                // BerException("Can't build SnmpCounter from decoded value.");
-            }
-            break ;
-        case SnmpValue.GaugeTag :
-            try {
-                result = new SnmpGauge(bdec.fetchIntegerAsLong(tag)) ;
-            } catch(RuntimeException r) {
-                throw new BerException();
-                // BerException("Can't build SnmpGauge from decoded value.");
-            }
-            break ;
-        case SnmpValue.TimeticksTag :
-            try {
-                result = new SnmpTimeticks(bdec.fetchIntegerAsLong(tag)) ;
-            } catch(RuntimeException r) {
-                throw new BerException();
-             // BerException("Can't build SnmpTimeticks from decoded value.");
-            }
-            break ;
-        case SnmpValue.OpaqueTag :
-            try {
-                result = new SnmpOpaque(bdec.fetchOctetString(tag)) ;
-            } catch(RuntimeException r) {
-                throw new BerException();
-                // BerException("Can't build SnmpOpaque from decoded value.");
-            }
-            break ;
-
-            //
-            // V2 syntaxes
-            //
-        case SnmpValue.Counter64Tag :
-            if (version == snmpVersionOne) {
-                throw new BerException(BerException.BAD_VERSION) ;
-            }
-            try {
-                result = new SnmpCounter64(bdec.fetchIntegerAsLong(tag)) ;
-            } catch(RuntimeException r) {
-                throw new BerException();
-             // BerException("Can't build SnmpCounter64 from decoded value.");
-            }
-            break ;
-
-        case SnmpVarBind.errNoSuchObjectTag :
-            if (version == snmpVersionOne) {
-                throw new BerException(BerException.BAD_VERSION) ;
-            }
-            bdec.fetchNull(tag) ;
-            result = SnmpVarBind.noSuchObject ;
-            break ;
-
-        case SnmpVarBind.errNoSuchInstanceTag :
-            if (version == snmpVersionOne) {
-                throw new BerException(BerException.BAD_VERSION) ;
-            }
-            bdec.fetchNull(tag) ;
-            result = SnmpVarBind.noSuchInstance ;
-            break ;
-
-        case SnmpVarBind.errEndOfMibViewTag :
-            if (version == snmpVersionOne) {
-                throw new BerException(BerException.BAD_VERSION) ;
-            }
-            bdec.fetchNull(tag) ;
-            result = SnmpVarBind.endOfMibView ;
-            break ;
-
-        default:
-            throw new BerException() ;
-
-        }
-
-        return result ;
-    }
-
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpNull.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,183 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-package com.sun.jmx.snmp;
-
-
-
-/**
- * Represents an SNMP null value.
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- */
-
-public class SnmpNull extends SnmpValue {
-    private static final long serialVersionUID = 1783782515994279177L;
-
-    // CONSTRUCTORS
-    //-------------
-    /**
-     * Constructs a new <CODE>SnmpNull</CODE>.
-     */
-    public SnmpNull() {
-        tag = NullTag ;
-    }
-
-    /**
-     * Constructs a new <CODE>SnmpNull</CODE>.
-     * <BR>For mibgen private use only.
-     */
-    public SnmpNull(String dummy) {
-        this();
-    }
-
-    /**
-     * Constructs a new <CODE>SnmpNull</CODE> from the specified tag value.
-     * @param t The initialization value.
-     */
-    public SnmpNull(int t) {
-        tag = t ;
-    }
-
-    // PUBLIC METHODS
-    //---------------
-    /**
-     * Returns the tag value of this <CODE>SnmpNull</CODE>.
-     * @return The value.
-     */
-    public int getTag() {
-        return tag ;
-    }
-
-    /**
-     * Converts the <CODE>NULL</CODE> value to its ASN.1 <CODE>String</CODE> form.
-     * When the tag is not the universal one, it is preprended
-     * to the <CODE>String</CODE> form.
-     * @return The <CODE>String</CODE> representation of the value.
-     */
-    public String toString() {
-        String result = "" ;
-        if (tag != 5) {
-            result += "[" + tag + "] " ;
-        }
-        result += "NULL" ;
-        switch(tag) {
-        case errNoSuchObjectTag :
-            result += " (noSuchObject)" ;
-            break ;
-
-        case errNoSuchInstanceTag :
-            result += " (noSuchInstance)" ;
-            break ;
-
-        case errEndOfMibViewTag :
-            result += " (endOfMibView)" ;
-            break ;
-        }
-        return result ;
-    }
-
-    /**
-     * Converts the <CODE>NULL</CODE> value to its <CODE>SnmpOid</CODE> form.
-     * Normally, a <CODE>NULL</CODE> value cannot be used as an index value,
-     * this method triggers an exception.
-     * @return The OID representation of the value.
-     */
-    public SnmpOid toOid() {
-        throw new IllegalArgumentException() ;
-    }
-
-    /**
-     * Performs a clone action. This provides a workaround for the
-     * <CODE>SnmpValue</CODE> interface.
-     * @return The SnmpValue clone.
-     */
-    final synchronized public SnmpValue duplicate() {
-        return (SnmpValue) clone() ;
-    }
-
-    /**
-     * Clones the <CODE>SnmpNull</CODE> object, making a copy of its data.
-     * @return The object clone.
-     */
-    final synchronized public Object clone() {
-        SnmpNull  newclone = null ;
-        try {
-            newclone = (SnmpNull) super.clone() ;
-            newclone.tag = tag ;
-        } catch (CloneNotSupportedException e) {
-            throw new InternalError(e) ; // vm bug.
-        }
-        return newclone ;
-    }
-
-    /**
-     * Returns a textual description of the type object.
-     * @return ASN.1 textual description.
-     */
-    final public String getTypeName() {
-        return name ;
-    }
-
-    /**
-     * Checks if this <CODE>SnmpNull</CODE> object corresponds to a <CODE>noSuchObject</CODE> value.
-     * @return <CODE>true</CODE> if the tag equals {@link com.sun.jmx.snmp.SnmpDataTypeEnums#errNoSuchObjectTag},
-     * <CODE>false</CODE> otherwise.
-     */
-    public boolean isNoSuchObjectValue() {
-        return (tag == SnmpDataTypeEnums.errNoSuchObjectTag);
-    }
-
-    /**
-     * Checks if this <CODE>SnmpNull</CODE> object corresponds to a <CODE>noSuchInstance</CODE> value.
-     * @return <CODE>true</CODE> if the tag equals {@link com.sun.jmx.snmp.SnmpDataTypeEnums#errNoSuchInstanceTag},
-     * <CODE>false</CODE> otherwise.
-     */
-    public boolean isNoSuchInstanceValue() {
-        return (tag == SnmpDataTypeEnums.errNoSuchInstanceTag);
-    }
-
-    /**
-     * Checks if this <CODE>SnmpNull</CODE> object corresponds to an <CODE>endOfMibView</CODE> value.
-     * @return <CODE>true</CODE> if the tag equals {@link com.sun.jmx.snmp.SnmpDataTypeEnums#errEndOfMibViewTag},
-     * <CODE>false</CODE> otherwise.
-     */
-    public boolean isEndOfMibViewValue() {
-        return (tag == SnmpDataTypeEnums.errEndOfMibViewTag);
-    }
-
-    // VARIABLES
-    //----------
-    /**
-     * Name of the type.
-     */
-    final static String name = "Null" ;
-
-    /**
-     * This is the tag of the NULL value. By default, it is the universal tag value.
-     */
-    private int tag = 5 ;
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpOpaque.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,100 +0,0 @@
-/*
- * Copyright (c) 1997, 2007, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-package com.sun.jmx.snmp;
-
-
-
-/**
- * Is used to represent an SNMP value.
- * The <CODE>Opaque</CODE> type is defined in RFC 1155.
- *
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- */
-
-public class SnmpOpaque extends SnmpString {
-    private static final long serialVersionUID = 380952213936036664L;
-
-    // CONSTRUCTORS
-    //-------------
-    /**
-     * Constructs a new <CODE>SnmpOpaque</CODE> from the specified bytes array.
-     * @param v The bytes composing the opaque value.
-     */
-    public SnmpOpaque(byte[] v) {
-        super(v) ;
-    }
-
-    /**
-     * Constructs a new <CODE>SnmpOpaque</CODE> with the specified <CODE>Bytes</CODE> array.
-     * @param v The <CODE>Bytes</CODE> composing the opaque value.
-     */
-    public SnmpOpaque(Byte[] v) {
-        super(v) ;
-    }
-
-    /**
-     * Constructs a new <CODE>SnmpOpaque</CODE> from the specified <CODE>String</CODE> value.
-     * @param v The initialization value.
-     */
-    public SnmpOpaque(String v) {
-        super(v) ;
-    }
-
-    // PUBLIC METHODS
-    //---------------
-    /**
-     * Converts the opaque to its <CODE>String</CODE> form, that is, a string of
-     * bytes expressed in hexadecimal form.
-     * @return The <CODE>String</CODE> representation of the value.
-     */
-    public String toString() {
-        StringBuilder result = new StringBuilder() ;
-        for (int i = 0 ; i < value.length ; i++) {
-            byte b = value[i] ;
-            int n = (b >= 0) ? b : b + 256 ;
-            result.append(Character.forDigit(n / 16, 16)) ;
-            result.append(Character.forDigit(n % 16, 16)) ;
-        }
-        return result.toString() ;
-    }
-
-    /**
-     * Returns a textual description of the type object.
-     * @return ASN.1 textual description.
-     */
-    final public String getTypeName() {
-        return name ;
-    }
-
-    // VARIABLES
-    //----------
-    /**
-     * Name of the type.
-     */
-    final static String name = "Opaque" ;
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpParams.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +0,0 @@
-/*
- * Copyright (c) 2001, 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.sun.jmx.snmp;
-
-import com.sun.jmx.snmp.SnmpDefinitions;
-
-/**
- * This class is the base class of all parameters that are used when making SNMP requests to an <CODE>SnmpPeer</CODE>.
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- * @since 1.5
- */
-public abstract class SnmpParams implements SnmpDefinitions {
-    private int protocolVersion = snmpVersionOne;
-    SnmpParams(int version) {
-        protocolVersion = version;
-    }
-
-    SnmpParams() {}
-    /**
-     * Checks whether parameters are in place for an SNMP <CODE>set</CODE> operation.
-     * @return <CODE>true</CODE> if parameters are in place, <CODE>false</CODE> otherwise.
-     */
-    public abstract boolean allowSnmpSets();
-    /**
-     * Returns the version of the protocol to use.
-     * The returned value is:
-     * <UL>
-     * <LI>{@link com.sun.jmx.snmp.SnmpDefinitions#snmpVersionOne snmpVersionOne} if the protocol is SNMPv1
-     * <LI>{@link com.sun.jmx.snmp.SnmpDefinitions#snmpVersionTwo snmpVersionTwo} if the protocol is SNMPv2
-     * <LI>{@link com.sun.jmx.snmp.SnmpDefinitions#snmpVersionThree snmpVersionThree} if the protocol is SNMPv3
-     * </UL>
-     * @return The version of the protocol to use.
-     */
-    public int getProtocolVersion() {
-        return protocolVersion ;
-    }
-
-    /**
-     * Sets the version of the protocol to be used.
-     * The version should be identified using the definitions
-     * contained in
-     * {@link com.sun.jmx.snmp.SnmpDefinitions SnmpDefinitions}.
-     * <BR>For instance if you wish to use SNMPv2, you can call the method as follows:
-     * <BLOCKQUOTE><PRE>
-     * setProtocolVersion(SnmpDefinitions.snmpVersionTwo);
-     * </PRE></BLOCKQUOTE>
-     * @param protocolversion The version of the protocol to be used.
-     */
-
-    public void setProtocolVersion(int protocolversion) {
-        this.protocolVersion = protocolversion ;
-    }
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpPdu.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,125 +0,0 @@
-/*
- * Copyright (c) 2001, 2014, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.sun.jmx.snmp;
-
-
-import java.io.Serializable;
-import java.net.InetAddress;
-/**
- * Is the fully decoded representation of an SNMP packet.
- * <P>
- * Classes are derived from <CODE>SnmpPdu</CODE> to
- * represent the different forms of SNMP packets
- * ({@link com.sun.jmx.snmp.SnmpPduPacket SnmpPduPacket},
- * {@link com.sun.jmx.snmp.SnmpScopedPduPacket SnmpScopedPduPacket})
- * <BR>The <CODE>SnmpPdu</CODE> class defines the attributes
- * common to every form of SNMP packets.
- *
- *
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- * @see SnmpMessage
- * @see SnmpPduFactory
- *
- * @since 1.5
- */
-@SuppressWarnings("serial") // JDK implementation class
-public abstract class SnmpPdu implements SnmpDefinitions, Serializable {
-
-    /**
-     * PDU type. Types are defined in
-     * {@link com.sun.jmx.snmp.SnmpDefinitions SnmpDefinitions}.
-     * @serial
-     */
-    public int type=0 ;
-
-    /**
-     * Protocol version. Versions are defined in
-     * {@link com.sun.jmx.snmp.SnmpDefinitions SnmpDefinitions}.
-     * @serial
-     */
-    public int version=0 ;
-
-    /**
-     * List of variables.
-     * @serial
-     */
-    public SnmpVarBind[] varBindList ;
-
-
-    /**
-     * Request identifier.
-     * Note that this field is not used by <CODE>SnmpPduTrap</CODE>.
-     * @serial
-     */
-    public int requestId=0 ;
-
-    /**
-     * Source or destination address.
-     * <P>For an incoming PDU it's the source.
-     * <BR>For an outgoing PDU it's the destination.
-     * @serial
-     */
-    public InetAddress address ;
-
-    /**
-     * Source or destination port.
-     * <P>For an incoming PDU it's the source.
-     * <BR>For an outgoing PDU it's the destination.
-     * @serial
-     */
-    public int port=0 ;
-
-    /**
-     * Returns the <CODE>String</CODE> representation of a PDU type.
-     * For instance, if the PDU type is <CODE>SnmpDefinitions.pduGetRequestPdu</CODE>,
-     * the method will return "SnmpGet".
-     * @param cmd The integer representation of the PDU type.
-     * @return The <CODE>String</CODE> representation of the PDU type.
-     */
-    public static String pduTypeToString(int cmd) {
-        switch (cmd) {
-        case pduGetRequestPdu :
-            return "SnmpGet" ;
-        case pduGetNextRequestPdu :
-            return "SnmpGetNext" ;
-        case pduWalkRequest :
-            return "SnmpWalk(*)" ;
-        case pduSetRequestPdu :
-            return "SnmpSet" ;
-        case pduGetResponsePdu :
-            return "SnmpResponse" ;
-        case pduV1TrapPdu :
-            return "SnmpV1Trap" ;
-        case pduV2TrapPdu :
-            return "SnmpV2Trap" ;
-        case pduGetBulkRequestPdu :
-            return "SnmpGetBulk" ;
-        case pduInformRequestPdu :
-            return "SnmpInform" ;
-        }
-        return "Unknown Command = " + cmd ;
-    }
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpPduBulk.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,119 +0,0 @@
-/*
- * Copyright (c) 1998, 2006, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-package com.sun.jmx.snmp;
-
-
-
-/**
- * Represents a <CODE>get-bulk</CODE> PDU as defined in RFC 1448.
- * <P>
- * You will not usually need to use this class, except if you
- * decide to implement your own
- * {@link com.sun.jmx.snmp.SnmpPduFactory SnmpPduFactory} object.
- * <P>
- * The <CODE>SnmpPduBulk</CODE> extends {@link com.sun.jmx.snmp.SnmpPduPacket SnmpPduPacket}
- * and defines attributes specific to the <CODE>get-bulk</CODE> PDU (see RFC 1448).
- *
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- */
-
-public class SnmpPduBulk extends SnmpPduPacket
-    implements SnmpPduBulkType {
-    private static final long serialVersionUID = -7431306775883371046L;
-
-    /**
-     * The <CODE>non-repeaters</CODE> value.
-     * @serial
-     */
-    public int            nonRepeaters ;
-
-
-    /**
-     * The <CODE>max-repetitions</CODE> value.
-     * @serial
-     */
-    public int            maxRepetitions ;
-
-
-    /**
-     * Builds a new <CODE>get-bulk</CODE> PDU.
-     * <BR><CODE>type</CODE> and <CODE>version</CODE> fields are initialized with
-     * {@link com.sun.jmx.snmp.SnmpDefinitions#pduGetBulkRequestPdu pduGetBulkRequestPdu}
-     * and {@link com.sun.jmx.snmp.SnmpDefinitions#snmpVersionTwo snmpVersionTwo}.
-     */
-    public SnmpPduBulk() {
-        type = pduGetBulkRequestPdu ;
-        version = snmpVersionTwo ;
-    }
-    /**
-     * Implements the <CODE>SnmpPduBulkType</CODE> interface.
-     *
-     * @since 1.5
-     */
-    public void setMaxRepetitions(int i) {
-        maxRepetitions = i;
-    }
-    /**
-     * Implements the <CODE>SnmpPduBulkType</CODE> interface.
-     *
-     * @since 1.5
-     */
-    public void setNonRepeaters(int i) {
-        nonRepeaters = i;
-    }
-    /**
-     * Implements the <CODE>SnmpPduBulkType</CODE> interface.
-     *
-     * @since 1.5
-     */
-    public int getMaxRepetitions() { return maxRepetitions; }
-    /**
-     * Implements the <CODE>SnmpPduBulkType</CODE> interface.
-     *
-     * @since 1.5
-     */
-    public int getNonRepeaters() { return nonRepeaters; }
-    /**
-     * Implements the <CODE>SnmpAckPdu</CODE> interface.
-     *
-     * @since 1.5
-     */
-    public SnmpPdu getResponsePdu() {
-        SnmpPduRequest result = new SnmpPduRequest();
-        result.address = address;
-        result.port = port;
-        result.version = version;
-        result.community = community;
-        result.type = SnmpDefinitions.pduGetResponsePdu;
-        result.requestId = requestId;
-        result.errorStatus = SnmpDefinitions.snmpRspNoError;
-        result.errorIndex = 0;
-
-        return result;
-    }
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpPduBulkType.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 2001, 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.sun.jmx.snmp;
-/**
- * Interface implemented by classes modelizing bulk pdu.
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- * @since 1.5
- */
-
-public interface SnmpPduBulkType extends SnmpAckPdu {
-
-    /**
-     * The <CODE>max-repetitions</CODE> setter.
-     * @param max Maximum repetition.
-     */
-    public void setMaxRepetitions(int max);
-
-    /**
-     * The <CODE>non-repeaters</CODE> setter.
-     * @param nr Non repeaters.
-     */
-    public void setNonRepeaters(int nr);
-
-    /**
-     * The <CODE>max-repetitions</CODE> getter.
-     * @return Maximum repetition.
-     */
-    public int getMaxRepetitions();
-
-    /**
-     * The <CODE>non-repeaters</CODE> getter.
-     * @return Non repeaters.
-     */
-    public int getNonRepeaters();
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpPduFactory.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,94 +0,0 @@
-/*
- * Copyright (c) 1998, 2007, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-package com.sun.jmx.snmp;
-
-
-
-
-/**
- * Defines the interface of the object in charge of encoding and decoding SNMP packets.
- * <P>
- * You will not usually need to use this interface, except if you
- * decide to replace the default implementation <CODE>SnmpPduFactoryBER</CODE>.
- * <P>
- * An <CODE>SnmpPduFactory</CODE> object is attached to an
- * {@link com.sun.jmx.snmp.daemon.SnmpAdaptorServer SNMP protocol adaptor}
- * or an {@link com.sun.jmx.snmp.SnmpPeer SnmpPeer}.
- * It is used each time an SNMP packet needs to be encoded or decoded.
- * <BR>{@link com.sun.jmx.snmp.SnmpPduFactoryBER SnmpPduFactoryBER} is the default
- * implementation.
- * It simply applies the standard ASN.1 encoding and decoding
- * on the bytes of the SNMP packet.
- * <P>
- * It's possible to implement your own <CODE>SnmpPduFactory</CODE>
- * object and to add authentication and/or encryption to the
- * default encoding/decoding process.
- *
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- * @see SnmpPduFactory
- * @see SnmpPduPacket
- * @see SnmpMessage
- *
- */
-
-public interface SnmpPduFactory {
-
-    /**
-     * Decodes the specified <CODE>SnmpMsg</CODE> and returns the
-     * resulting <CODE>SnmpPdu</CODE>. If this method returns
-     * <CODE>null</CODE>, the message will be considered unsafe
-     * and will be dropped.
-     *
-     * @param msg The <CODE>SnmpMsg</CODE> to be decoded.
-     * @return Null or a fully initialized <CODE>SnmpPdu</CODE>.
-     * @exception SnmpStatusException If the encoding is invalid.
-     *
-     * @since 1.5
-     */
-    public SnmpPdu decodeSnmpPdu(SnmpMsg msg) throws SnmpStatusException ;
-
-    /**
-     * Encodes the specified <CODE>SnmpPdu</CODE> and
-     * returns the resulting <CODE>SnmpMsg</CODE>. If this
-     * method returns null, the specified <CODE>SnmpPdu</CODE>
-     * will be dropped and the current SNMP request will be
-     * aborted.
-     *
-     * @param p The <CODE>SnmpPdu</CODE> to be encoded.
-     * @param maxDataLength The size limit of the resulting encoding.
-     * @return Null or a fully encoded <CODE>SnmpMsg</CODE>.
-     * @exception SnmpStatusException If <CODE>pdu</CODE> contains
-     *            illegal values and cannot be encoded.
-     * @exception SnmpTooBigException If the resulting encoding does not
-     *            fit into <CODE>maxPktSize</CODE> bytes.
-     *
-     * @since 1.5
-     */
-    public SnmpMsg encodeSnmpPdu(SnmpPdu p, int maxDataLength)
-        throws SnmpStatusException, SnmpTooBigException ;
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpPduFactoryBER.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,131 +0,0 @@
-/*
- * Copyright (c) 1998, 2006, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-package com.sun.jmx.snmp;
-
-
-// java imports
-//
-import java.io.Serializable;
-
-// jmx import
-//
-import com.sun.jmx.snmp.SnmpPduFactory;
-import com.sun.jmx.snmp.SnmpMessage;
-import com.sun.jmx.snmp.SnmpPduPacket;
-import com.sun.jmx.snmp.SnmpPdu;
-import com.sun.jmx.snmp.SnmpMsg;
-import com.sun.jmx.snmp.SnmpStatusException;
-import com.sun.jmx.snmp.SnmpTooBigException;
-import com.sun.jmx.snmp.SnmpDefinitions;
-
-// SNMP Runtime import
-//
-import com.sun.jmx.snmp.SnmpV3Message;
-
-/**
- * Default implementation of the {@link com.sun.jmx.snmp.SnmpPduFactory SnmpPduFactory} interface.
- * <BR>It uses the BER (basic encoding rules) standardized encoding scheme associated with ASN.1.
- * <P>
- * This implementation of the <CODE>SnmpPduFactory</CODE> is very
- * basic: it simply calls encoding and decoding methods from
- * {@link com.sun.jmx.snmp.SnmpMsg}.
- * <BLOCKQUOTE>
- * <PRE>
- * public SnmpPdu decodeSnmpPdu(SnmpMsg msg)
- * throws SnmpStatusException {
- *   return msg.decodeSnmpPdu() ;
- * }
- *
- * public SnmpMsg encodeSnmpPdu(SnmpPdu pdu, int maxPktSize)
- * throws SnmpStatusException, SnmpTooBigException {
- *   SnmpMsg result = new SnmpMessage() ;       // for SNMP v1/v2
- * <I>or</I>
- *   SnmpMsg result = new SnmpV3Message() ;     // for SNMP v3
- *   result.encodeSnmpPdu(pdu, maxPktSize) ;
- *   return result ;
- * }
- * </PRE>
- * </BLOCKQUOTE>
- * To implement your own object, you can implement <CODE>SnmpPduFactory</CODE>
- * or extend <CODE>SnmpPduFactoryBER</CODE>.
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- */
-
-public class SnmpPduFactoryBER implements SnmpPduFactory, Serializable {
-   private static final long serialVersionUID = -3525318344000547635L;
-
-   /**
-     * Calls {@link com.sun.jmx.snmp.SnmpMsg#decodeSnmpPdu SnmpMsg.decodeSnmpPdu}
-     * on the specified message and returns the resulting <CODE>SnmpPdu</CODE>.
-     *
-     * @param msg The SNMP message to be decoded.
-     * @return The resulting SNMP PDU packet.
-     * @exception SnmpStatusException If the encoding is invalid.
-     *
-     * @since 1.5
-     */
-    public SnmpPdu decodeSnmpPdu(SnmpMsg msg) throws SnmpStatusException {
-        return msg.decodeSnmpPdu();
-    }
-
-    /**
-     * Encodes the specified <CODE>SnmpPdu</CODE> and
-     * returns the resulting <CODE>SnmpMsg</CODE>. If this
-     * method returns null, the specified <CODE>SnmpPdu</CODE>
-     * will be dropped and the current SNMP request will be
-     * aborted.
-     *
-     * @param p The <CODE>SnmpPdu</CODE> to be encoded.
-     * @param maxDataLength The size limit of the resulting encoding.
-     * @return Null or a fully encoded <CODE>SnmpMsg</CODE>.
-     * @exception SnmpStatusException If <CODE>pdu</CODE> contains
-     *            illegal values and cannot be encoded.
-     * @exception SnmpTooBigException If the resulting encoding does not
-     *            fit into <CODE>maxPktSize</CODE> bytes.
-     *
-     * @since 1.5
-     */
-    public SnmpMsg encodeSnmpPdu(SnmpPdu p, int maxDataLength)
-        throws SnmpStatusException, SnmpTooBigException {
-        switch(p.version) {
-        case SnmpDefinitions.snmpVersionOne:
-        case SnmpDefinitions.snmpVersionTwo: {
-            SnmpMessage result = new SnmpMessage();
-            result.encodeSnmpPdu((SnmpPduPacket) p, maxDataLength);
-            return result;
-        }
-        case SnmpDefinitions.snmpVersionThree: {
-            SnmpV3Message result = new SnmpV3Message();
-            result.encodeSnmpPdu(p, maxDataLength);
-            return result;
-        }
-        default:
-            return null;
-        }
-    }
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpPduRequest.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,109 +0,0 @@
-/*
- * Copyright (c) 1998, 2007, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-package com.sun.jmx.snmp;
-
-
-
-
-/**
- * Is used to represent <CODE>get</CODE>, <CODE>get-next</CODE>, <CODE>set</CODE>, <CODE>response</CODE> and <CODE>SNMPv2-trap</CODE> PDUs.
- * <P>
- * You will not usually need to use this class, except if you
- * decide to implement your own
- * {@link com.sun.jmx.snmp.SnmpPduFactory SnmpPduFactory} object.
- *
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- */
-
-public class SnmpPduRequest extends SnmpPduPacket
-    implements SnmpPduRequestType {
-    private static final long serialVersionUID = 2218754017025258979L;
-
-
-    /**
-     * Error status. Statuses are defined in
-     * {@link com.sun.jmx.snmp.SnmpDefinitions SnmpDefinitions}.
-     * @serial
-     */
-    public int errorStatus=0 ;
-
-
-    /**
-     * Error index. Remember that SNMP indices start from 1.
-     * Thus the corresponding <CODE>SnmpVarBind</CODE> is
-     * <CODE>varBindList[errorIndex-1]</CODE>.
-     * @serial
-     */
-    public int errorIndex=0 ;
-    /**
-     * Implements <CODE>SnmpPduRequestType</CODE> interface.
-     *
-     * @since 1.5
-     */
-    public void setErrorIndex(int i) {
-        errorIndex = i;
-    }
-    /**
-     * Implements <CODE>SnmpPduRequestType</CODE> interface.
-     *
-     * @since 1.5
-     */
-    public void setErrorStatus(int i) {
-        errorStatus = i;
-    }
-    /**
-     * Implements <CODE>SnmpPduRequestType</CODE> interface.
-     *
-     * @since 1.5
-     */
-    public int getErrorIndex() { return errorIndex; }
-    /**
-     * Implements <CODE>SnmpPduRequestType</CODE> interface.
-     *
-     * @since 1.5
-     */
-    public int getErrorStatus() { return errorStatus; }
-    /**
-     * Implements <CODE>SnmpAckPdu</CODE> interface.
-     *
-     * @since 1.5
-     */
-    public SnmpPdu getResponsePdu() {
-        SnmpPduRequest result = new SnmpPduRequest();
-        result.address = address;
-        result.port = port;
-        result.version = version;
-        result.community = community;
-        result.type = SnmpDefinitions.pduGetResponsePdu;
-        result.requestId = requestId;
-        result.errorStatus = SnmpDefinitions.snmpRspNoError;
-        result.errorIndex = 0;
-
-        return result;
-    }
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpPduRequestType.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 2001, 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.sun.jmx.snmp;
-
-/**
- * Interface implemented by classes modelizing request pdu.
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- * @since 1.5
- */
-public interface SnmpPduRequestType extends SnmpAckPdu {
-    /**
-     * Error index setter. Remember that SNMP indices start from 1.
-     * Thus the corresponding <CODE>SnmpVarBind</CODE> is
-     * <CODE>varBindList[errorIndex-1]</CODE>.
-     * @param i Error index.
-     */
-    public void setErrorIndex(int i);
-    /**
-     * Error status setter. Statuses are defined in
-     * {@link com.sun.jmx.snmp.SnmpDefinitions SnmpDefinitions}.
-     * @param i Error status.
-     */
-    public void setErrorStatus(int i);
-    /**
-     * Error index getter. Remember that SNMP indices start from 1.
-     * Thus the corresponding <CODE>SnmpVarBind</CODE> is
-     * <CODE>varBindList[errorIndex-1]</CODE>.
-     * @return Error index.
-     */
-    public int getErrorIndex();
-    /**
-     * Error status getter. Statuses are defined in
-     * {@link com.sun.jmx.snmp.SnmpDefinitions SnmpDefinitions}.
-     * @return Error status.
-     */
-    public int getErrorStatus();
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpPduTrap.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,93 +0,0 @@
-/*
- * Copyright (c) 1997, 2007, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-package com.sun.jmx.snmp;
-
-
-
-/**
- * Represents an SNMPv1-trap PDU.
- * <P>
- * You will not usually need to use this class, except if you
- * decide to implement your own
- * {@link com.sun.jmx.snmp.SnmpPduFactory SnmpPduFactory} object.
- * <P>
- * The <CODE>SnmpPduTrap</CODE> extends {@link com.sun.jmx.snmp.SnmpPduPacket SnmpPduPacket}
- * and defines attributes specific to an SNMPv1 trap (see RFC1157).
- *
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- */
-
-public class SnmpPduTrap extends SnmpPduPacket {
-    private static final long serialVersionUID = -3670886636491433011L;
-
-    /**
-     * Enterprise object identifier.
-     * @serial
-     */
-    public SnmpOid        enterprise ;
-
-    /**
-     * Agent address. If the agent address source was not an IPv4 one (eg : IPv6), this field is null.
-     * @serial
-     */
-    public SnmpIpAddress  agentAddr ;
-
-    /**
-     * Generic trap number.
-     * <BR>
-     * The possible values are defined in
-     * {@link com.sun.jmx.snmp.SnmpDefinitions#trapColdStart SnmpDefinitions}.
-     * @serial
-     */
-    public int            genericTrap ;
-
-    /**
-     * Specific trap number.
-     * @serial
-     */
-    public int            specificTrap ;
-
-    /**
-     * Time-stamp.
-     * @serial
-     */
-    public long            timeStamp ;
-
-
-
-    /**
-     * Builds a new trap PDU.
-     * <BR><CODE>type</CODE> and <CODE>version</CODE> fields are initialized with
-     * {@link com.sun.jmx.snmp.SnmpDefinitions#pduV1TrapPdu pduV1TrapPdu}
-     * and {@link com.sun.jmx.snmp.SnmpDefinitions#snmpVersionOne snmpVersionOne}.
-     */
-    public SnmpPduTrap() {
-        type = pduV1TrapPdu ;
-        version = snmpVersionOne ;
-    }
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpScopedPduBulk.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,110 +0,0 @@
-/*
- * Copyright (c) 2001, 2006, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.sun.jmx.snmp;
-/**
- * Represents a <CODE>get-bulk</CODE> PDU as defined in RFC 1448.
- * <P>
- * <P>
- * The <CODE>SnmpSocpedPduBulk</CODE> extends {@link com.sun.jmx.snmp.SnmpScopedPduPacket SnmpScopedPduPacket}
- * and defines attributes specific to the <CODE>get-bulk</CODE> PDU (see RFC 1448).
- *
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- * @since 1.5
- */
-
-public class SnmpScopedPduBulk extends SnmpScopedPduPacket
-    implements SnmpPduBulkType {
-    private static final long serialVersionUID = -1648623646227038885L;
-
-    /**
-     * The <CODE>non-repeaters</CODE> value.
-     * @serial
-     */
-    int            nonRepeaters;
-
-
-    /**
-     * The <CODE>max-repetitions</CODE> value.
-     * @serial
-     */
-    int            maxRepetitions;
-
-    public SnmpScopedPduBulk() {
-        type = pduGetBulkRequestPdu;
-        version = snmpVersionThree;
-    }
-
-    /**
-     * The <CODE>max-repetitions</CODE> setter.
-     * @param max Maximum repetition.
-     */
-    public void setMaxRepetitions(int max) {
-        maxRepetitions = max;
-    }
-
-    /**
-     * The <CODE>non-repeaters</CODE> setter.
-     * @param nr Non repeaters.
-     */
-    public void setNonRepeaters(int nr) {
-        nonRepeaters = nr;
-    }
-
-    /**
-     * The <CODE>max-repetitions</CODE> getter.
-     * @return Maximum repetition.
-     */
-    public int getMaxRepetitions() { return maxRepetitions; }
-
-    /**
-     * The <CODE>non-repeaters</CODE> getter.
-     * @return Non repeaters.
-     */
-    public int getNonRepeaters() { return nonRepeaters; }
-
-    /**
-     * Generates the pdu to use for response.
-     * @return Response pdu.
-     */
-    public SnmpPdu getResponsePdu() {
-        SnmpScopedPduRequest result = new SnmpScopedPduRequest();
-        result.address = address ;
-        result.port = port ;
-        result.version = version ;
-        result.requestId = requestId;
-        result.msgId = msgId;
-        result.msgMaxSize = msgMaxSize;
-        result.msgFlags = msgFlags;
-        result.msgSecurityModel = msgSecurityModel;
-        result.contextEngineId = contextEngineId;
-        result.contextName = contextName;
-        result.securityParameters = securityParameters;
-        result.type = pduGetResponsePdu ;
-        result.errorStatus = SnmpDefinitions.snmpRspNoError ;
-        result.errorIndex = 0 ;
-        return result;
-    }
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpScopedPduPacket.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,105 +0,0 @@
-/*
- * Copyright (c) 2001, 2014, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.jmx.snmp;
-
-import java.io.Serializable;
-
-import com.sun.jmx.snmp.SnmpSecurityParameters;
-
-import com.sun.jmx.snmp.SnmpDefinitions;
-/**
- * Is the fully decoded representation of an SNMP V3 packet.
- * <P>
- *
- * Classes are derived from <CODE>SnmpPdu</CODE> to
- * represent the different forms of SNMP pdu
- * ({@link com.sun.jmx.snmp.SnmpScopedPduRequest SnmpScopedPduRequest},
- * {@link com.sun.jmx.snmp.SnmpScopedPduBulk SnmpScopedPduBulk}).
- * <BR>The <CODE>SnmpScopedPduPacket</CODE> class defines the attributes
- * common to every scoped SNMP packets.
- *
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- * @see SnmpV3Message
- *
- * @since 1.5
- */
-@SuppressWarnings("serial") // JDK implementation class
-public abstract class SnmpScopedPduPacket extends SnmpPdu
-    implements Serializable {
-    /**
-     * Message max size the pdu sender can deal with.
-     */
-    public int msgMaxSize = 0;
-
-    /**
-     * Message identifier.
-     */
-    public int msgId = 0;
-
-    /**
-     * Message flags. Reportable flag  and security level.</P>
-     *<PRE>
-     * --  .... ...1   authFlag
-     * --  .... ..1.   privFlag
-     * --  .... .1..   reportableFlag
-     * --              Please observe:
-     * --  .... ..00   is OK, means noAuthNoPriv
-     * --  .... ..01   is OK, means authNoPriv
-     * --  .... ..10   reserved, must NOT be used.
-     * --  .... ..11   is OK, means authPriv
-     *</PRE>
-     */
-    public byte msgFlags = 0;
-
-    /**
-     * The security model the security sub system MUST use in order to deal with this pdu (eg: User based Security Model Id = 3).
-     */
-    public int msgSecurityModel = 0;
-
-    /**
-     * The context engine Id in which the pdu must be handled (Generaly the local engine Id).
-     */
-    public byte[] contextEngineId = null;
-
-    /**
-     * The context name in which the OID have to be interpreted.
-     */
-    public byte[] contextName = null;
-
-    /**
-     * The security parameters. This is an opaque member that is
-     * interpreted by the concerned security model.
-     */
-    public SnmpSecurityParameters securityParameters = null;
-
-    /**
-     * Constructor. Is only called by a son. Set the version to <CODE>SnmpDefinitions.snmpVersionThree</CODE>.
-     */
-    protected SnmpScopedPduPacket() {
-        version = SnmpDefinitions.snmpVersionThree;
-    }
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpScopedPduRequest.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,95 +0,0 @@
-/*
- * Copyright (c) 2001, 2006, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.sun.jmx.snmp;
-/**
- * Is used to represent <CODE>get</CODE>, <CODE>get-next</CODE>, <CODE>set</CODE>, <CODE>response</CODE> SNMP V3 scoped PDUs.
- *
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- * @since 1.5
- */
-public class SnmpScopedPduRequest extends SnmpScopedPduPacket
-    implements SnmpPduRequestType {
-    private static final long serialVersionUID = 6463060973056773680L;
-
-    int errorStatus=0 ;
-
-    int errorIndex=0 ;
-
-    /**
-     * Error index setter. Remember that SNMP indices start from 1.
-     * Thus the corresponding <CODE>SnmpVarBind</CODE> is
-     * <CODE>varBindList[errorIndex-1]</CODE>.
-     * @param i Error index.
-     */
-    public void setErrorIndex(int i) {
-        errorIndex = i;
-    }
-    /**
-     * Error status setter. Statuses are defined in
-     * {@link com.sun.jmx.snmp.SnmpDefinitions SnmpDefinitions}.
-     * @param s Error status.
-     */
-    public void setErrorStatus(int s) {
-        errorStatus = s;
-    }
-
-    /**
-     * Error index getter. Remember that SNMP indices start from 1.
-     * Thus the corresponding <CODE>SnmpVarBind</CODE> is
-     * <CODE>varBindList[errorIndex-1]</CODE>.
-     * @return Error index.
-     */
-    public int getErrorIndex() { return errorIndex; }
-    /**
-     * Error status getter. Statuses are defined in
-     * {@link com.sun.jmx.snmp.SnmpDefinitions SnmpDefinitions}.
-     * @return Error status.
-     */
-    public int getErrorStatus() { return errorStatus; }
-
-    /**
-     * Generates the pdu to use for response.
-     * @return Response pdu.
-     */
-    public SnmpPdu getResponsePdu() {
-        SnmpScopedPduRequest result = new SnmpScopedPduRequest();
-        result.address = address ;
-        result.port = port ;
-        result.version = version ;
-        result.requestId = requestId;
-        result.msgId = msgId;
-        result.msgMaxSize = msgMaxSize;
-        result.msgFlags = msgFlags;
-        result.msgSecurityModel = msgSecurityModel;
-        result.contextEngineId = contextEngineId;
-        result.contextName = contextName;
-        result.securityParameters = securityParameters;
-        result.type = pduGetResponsePdu ;
-        result.errorStatus = SnmpDefinitions.snmpRspNoError ;
-        result.errorIndex = 0 ;
-        return result;
-    }
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpSecurityException.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,67 +0,0 @@
-/*
- * Copyright (c) 2001, 2006, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.sun.jmx.snmp;
-
-/**
- * This exception is thrown when an error occurs in an <CODE> SnmpSecurityModel </CODE>.
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- * @since 1.5
- */
-public class SnmpSecurityException extends Exception {
-    private static final long serialVersionUID = 5574448147432833480L;
-
-    /**
-     * The current request varbind list.
-     */
-    public SnmpVarBind[] list = null;
-    /**
-     * The status of the exception. See {@link com.sun.jmx.snmp.SnmpDefinitions} for possible values.
-     */
-    public int status = SnmpDefinitions.snmpReqUnknownError;
-    /**
-     * The current security model related security parameters.
-     */
-    public SnmpSecurityParameters params = null;
-    /**
-     * The current context engine Id.
-     */
-    public byte[] contextEngineId = null;
-     /**
-     * The current context name.
-     */
-    public byte[] contextName = null;
-     /**
-     * The current flags.
-     */
-    public byte flags = (byte) SnmpDefinitions.noAuthNoPriv;
-    /**
-     * Constructor.
-     * @param msg The exception msg to display.
-     */
-    public SnmpSecurityException(String msg) {
-        super(msg);
-    }
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpSecurityParameters.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 2001, 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.sun.jmx.snmp;
-import com.sun.jmx.snmp.SnmpStatusException;
-import com.sun.jmx.snmp.SnmpTooBigException;
-
-/**
- * Security parameters are security model dependent. Every security parameters class wishing to be passed to a security model must implement this marker interface.
- * This interface has to be implemented when developing customized security models.
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- * @since 1.5
- */
-public interface SnmpSecurityParameters {
-    /**
-     * BER encoding of security parameters.
-     * @param outputBytes Array to fill.
-     * @return Encoded parameters length.
-     */
-    int encode(byte[] outputBytes) throws SnmpTooBigException;
-    /**
-     * BER decoding of security parameters.
-     * @param params Encoded parameters.
-     */
-    void decode(byte[] params) throws SnmpStatusException;
-
-    /**
-     * Principal coded inside the security parameters.
-     * @return The security principal.
-     */
-    String getPrincipal();
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpStatusException.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,146 +0,0 @@
-/*
- * Copyright (c) 1997, 2007, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-package com.sun.jmx.snmp;
-
-
-
-/**
- * Reports an error which occurred during a get/set operation on a mib node.
- *
- * This exception includes a status error code as defined in the SNMP protocol.
- *
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- */
-
-public class SnmpStatusException extends Exception implements SnmpDefinitions {
-    private static final long serialVersionUID = 5809485694133115675L;
-
-    /**
-     * Error code as defined in RFC 1448 for: <CODE>noSuchName</CODE>.
-     */
-    public static final int noSuchName         = 2 ;
-
-    /**
-     * Error code as defined in RFC 1448 for: <CODE>badValue</CODE>.
-     */
-    public static final int badValue           = 3 ;
-
-    /**
-     * Error code as defined in RFC 1448 for: <CODE>readOnly</CODE>.
-     */
-    public static final int readOnly           = 4 ;
-
-
-    /**
-     * Error code as defined in RFC 1448 for: <CODE>noAccess</CODE>.
-     */
-    public static final int noAccess           = 6 ;
-
-    /**
-     * Error code for reporting a no such instance error.
-     */
-    public static final int noSuchInstance     = 0xE0;
-
-    /**
-     * Error code for reporting a no such object error.
-     */
-    public static final int noSuchObject     = 0xE1;
-
-    /**
-     * Constructs a new <CODE>SnmpStatusException</CODE> with the specified status error.
-     * @param status The error status.
-     */
-    public SnmpStatusException(int status) {
-        errorStatus = status ;
-    }
-
-    /**
-     * Constructs a new <CODE>SnmpStatusException</CODE> with the specified status error and status index.
-     * @param status The error status.
-     * @param index The error index.
-     */
-    public SnmpStatusException(int status, int index) {
-        errorStatus = status ;
-        errorIndex = index ;
-    }
-
-    /**
-     * Constructs a new <CODE>SnmpStatusException</CODE> with an error message.
-     * The error status is set to 0 (noError) and the index to -1.
-     * @param s The error message.
-     */
-    public SnmpStatusException(String s) {
-        super(s);
-    }
-
-    /**
-     * Constructs a new <CODE>SnmpStatusException</CODE> with an error index.
-     * @param x The original <CODE>SnmpStatusException</CODE>.
-     * @param index The error index.
-     */
-    public SnmpStatusException(SnmpStatusException x, int index) {
-        super(x.getMessage());
-        errorStatus= x.errorStatus;
-        errorIndex= index;
-    }
-
-    /**
-     * Return the error status.
-     * @return The error status.
-     */
-    public int getStatus() {
-        return errorStatus ;
-    }
-
-    /**
-     * Returns the index of the error.
-     * A value of -1 means that the index is not known/applicable.
-     * @return The error index.
-     */
-    public int getErrorIndex() {
-        return errorIndex;
-    }
-
-
-    // PRIVATE VARIABLES
-    //--------------------
-
-    /**
-     * Status of the error.
-     * @serial
-     */
-    private int errorStatus = 0 ;
-
-    /**
-     * Index of the error.
-     * If different from -1, indicates the index where the error occurs.
-     * @serial
-     */
-    private int errorIndex= -1;
-
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpString.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,278 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-package com.sun.jmx.snmp;
-
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-
-/**
- * Represents an SNMP string.
- *
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- */
-
-public class SnmpString extends SnmpValue {
-    private static final long serialVersionUID = -7011986973225194188L;
-
-    // CONSTRUCTORS
-    //-------------
-    /**
-     * Constructs a new empty <CODE>SnmpString</CODE>.
-     */
-    public SnmpString() {
-        value = new byte[0] ;
-    }
-
-    /**
-     * Constructs a new <CODE>SnmpString</CODE> from the specified bytes array.
-     * @param v The bytes composing the string value.
-     */
-    public SnmpString(byte[] v) {
-        value = v.clone() ;
-    }
-
-    /**
-     * Constructs a new <CODE>SnmpString</CODE> from the specified <CODE>Bytes</CODE> array.
-     * @param v The <CODE>Bytes</CODE> composing the string value.
-     */
-    public SnmpString(Byte[] v) {
-        value = new byte[v.length] ;
-        for (int i = 0 ; i < v.length ; i++) {
-            value[i] = v[i].byteValue() ;
-        }
-    }
-
-    /**
-     * Constructs a new <CODE>SnmpString</CODE> from the specified <CODE>String</CODE> value.
-     * @param v The initialization value.
-     */
-    public SnmpString(String v) {
-        value = v.getBytes() ;
-    }
-
-    /**
-     * Constructs a new <CODE>SnmpString</CODE> from the specified <CODE> InetAddress </Code>.
-     * @param address The <CODE>InetAddress </CODE>.
-     *
-     * @since 1.5
-     */
-    public SnmpString(InetAddress address) {
-        value = address.getAddress();
-    }
-
-    // PUBLIC METHODS
-    //---------------
-
-    /**
-     * Converts the string value to its <CODE> InetAddress </CODE> form.
-     * @return an {@link InetAddress} defined by the string value.
-     * @exception UnknownHostException If string value is not a legal address format.
-     *
-     * @since 1.5
-     */
-    public InetAddress inetAddressValue() throws UnknownHostException {
-        return InetAddress.getByAddress(value);
-    }
-
-    /**
-     * Converts the specified binary string into a character string.
-     * @param bin The binary string value to convert.
-     * @return The character string representation.
-     */
-    public static String BinToChar(String bin) {
-        char value[] = new char[bin.length()/8];
-        int binLength = value.length;
-        for (int i = 0; i < binLength; i++)
-            value[i] = (char)Integer.parseInt(bin.substring(8*i, 8*i+8), 2);
-        return new String(value);
-    }
-
-    /**
-     * Converts the specified hexadecimal string into a character string.
-     * @param hex The hexadecimal string value to convert.
-     * @return The character string representation.
-     */
-    public static String HexToChar(String hex) {
-        char value[] = new char[hex.length()/2];
-        int hexLength = value.length;
-        for (int i = 0; i < hexLength; i++)
-            value[i] = (char)Integer.parseInt(hex.substring(2*i, 2*i+2), 16);
-        return new String(value);
-    }
-
-    /**
-     * Returns the bytes array of this <CODE>SnmpString</CODE>.
-     * @return The value.
-     */
-    public byte[] byteValue() {
-        return value.clone() ;
-    }
-
-    /**
-     * Converts the string value to its array of <CODE>Bytes</CODE> form.
-     * @return The array of <CODE>Bytes</CODE> representation of the value.
-     */
-    public Byte[] toByte() {
-        Byte[] result = new Byte[value.length] ;
-        for (int i = 0 ; i < value.length ; i++) {
-            result[i] = value[i];
-        }
-        return result ;
-    }
-
-    /**
-     * Converts the string value to its <CODE>String</CODE> form.
-     * @return The <CODE>String</CODE> representation of the value.
-     */
-    public String toString() {
-        return new String(value) ;
-    }
-
-    /**
-     * Converts the string value to its <CODE>SnmpOid</CODE> form.
-     * @return The OID representation of the value.
-     */
-    public SnmpOid toOid() {
-        long[] ids = new long[value.length] ;
-        for (int i = 0 ; i < value.length ; i++) {
-            ids[i] = (long)(value[i] & 0xFF) ;
-        }
-        return new SnmpOid(ids) ;
-    }
-
-    /**
-     * Extracts the string from an index OID and returns its
-     * value converted as an <CODE>SnmpOid</CODE>.
-     * @param index The index array.
-     * @param start The position in the index array.
-     * @return The OID representing the string value.
-     * @exception SnmpStatusException There is no string value
-     * available at the start position.
-     */
-    public static SnmpOid toOid(long[] index, int start) throws SnmpStatusException {
-        try {
-            if (index[start] > Integer.MAX_VALUE) {
-                throw new SnmpStatusException(SnmpStatusException.noSuchName) ;
-            }
-            int strLen = (int)index[start++] ;
-            long[] ids = new long[strLen] ;
-            for (int i = 0 ; i < strLen ; i++) {
-                ids[i] = index[start + i] ;
-            }
-            return new SnmpOid(ids) ;
-        }
-        catch(IndexOutOfBoundsException e) {
-            throw new SnmpStatusException(SnmpStatusException.noSuchName) ;
-        }
-    }
-
-    /**
-     * Scans an index OID, skips the string value and returns the position
-     * of the next value.
-     * @param index The index array.
-     * @param start The position in the index array.
-     * @return The position of the next value.
-     * @exception SnmpStatusException There is no string value
-     * available at the start position.
-     */
-    public static int nextOid(long[] index, int start) throws SnmpStatusException {
-        try {
-            if (index[start] > Integer.MAX_VALUE) {
-                throw new SnmpStatusException(SnmpStatusException.noSuchName) ;
-            }
-            int strLen = (int)index[start++] ;
-            start += strLen ;
-            if (start <= index.length) {
-                return start ;
-            }
-            else {
-                throw new SnmpStatusException(SnmpStatusException.noSuchName) ;
-            }
-        }
-        catch(IndexOutOfBoundsException e) {
-            throw new SnmpStatusException(SnmpStatusException.noSuchName) ;
-        }
-    }
-
-    /**
-     * Appends an <CODE>SnmpOid</CODE> representing an <CODE>SnmpString</CODE> to another OID.
-     * @param source An OID representing an <CODE>SnmpString</CODE> value.
-     * @param dest Where source should be appended.
-     */
-    public static void appendToOid(SnmpOid source, SnmpOid dest) {
-        dest.append(source.getLength()) ;
-        dest.append(source) ;
-    }
-
-    /**
-     * Performs a clone action. This provides a workaround for the
-     * <CODE>SnmpValue</CODE> interface.
-     * @return The SnmpValue clone.
-     */
-    final synchronized public SnmpValue duplicate() {
-        return (SnmpValue) clone() ;
-    }
-
-    /**
-     * Clones the <CODE>SnmpString</CODE> object, making a copy of its data.
-     * @return The object clone.
-     */
-    synchronized public Object clone() {
-        SnmpString newclone = null ;
-
-        try {
-            newclone = (SnmpString) super.clone() ;
-            newclone.value = new byte[value.length] ;
-            System.arraycopy(value, 0, newclone.value, 0, value.length) ;
-        } catch (CloneNotSupportedException e) {
-            throw new InternalError(e) ; // vm bug.
-        }
-        return newclone ;
-    }
-
-    /**
-     * Returns a textual description of the type object.
-     * @return ASN.1 textual description.
-     */
-    public String getTypeName() {
-        return name ;
-    }
-
-    // VARIABLES
-    //----------
-    /**
-     * Name of the type.
-     */
-    final static String name = "String" ;
-
-    /**
-     * This is the bytes array of the string value.
-     * @serial
-     */
-    protected byte[] value = null ;
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpStringFixed.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,193 +0,0 @@
-/*
- * Copyright (c) 1997, 2007, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-package com.sun.jmx.snmp;
-
-
-
-// java imports
-//
-import java.lang.Math;
-
-/**
- * Represents an SNMP String defined with a fixed length.
- * The class is mainly used when dealing with table indexes for which one of the keys
- * is defined as a <CODE>String</CODE>.
- *
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- */
-
-public class SnmpStringFixed extends SnmpString {
-    private static final long serialVersionUID = -9120939046874646063L;
-
-    // CONSTRUCTORS
-    //-------------
-    /**
-     * Constructs a new <CODE>SnmpStringFixed</CODE> from the specified bytes array.
-     * @param v The bytes composing the fixed-string value.
-     */
-    public SnmpStringFixed(byte[] v) {
-        super(v) ;
-    }
-
-    /**
-     * Constructs a new <CODE>SnmpStringFixed</CODE> with the specified <CODE>Bytes</CODE> array.
-     * @param v The <CODE>Bytes</CODE> composing the fixed-string value.
-     */
-    public SnmpStringFixed(Byte[] v) {
-        super(v) ;
-    }
-
-    /**
-     * Constructs a new <CODE>SnmpStringFixed</CODE> from the specified <CODE>String</CODE> value.
-     * @param v The initialization value.
-     */
-    public SnmpStringFixed(String v) {
-        super(v) ;
-    }
-
-    /**
-     * Constructs a new <CODE>SnmpStringFixed</CODE> from the specified <CODE>bytes</CODE> array
-     * with the specified length.
-     * @param l The length of the fixed-string.
-     * @param v The <CODE>bytes</CODE> composing the fixed-string value.
-     * @exception IllegalArgumentException Either the length or the <CODE>byte</CODE> array is not valid.
-     */
-    public SnmpStringFixed(int l, byte[] v) throws IllegalArgumentException {
-        if ((l <= 0) || (v == null)) {
-            throw new IllegalArgumentException() ;
-        }
-        int length = Math.min(l, v.length);
-        value = new byte[l] ;
-        for (int i = 0 ; i < length ; i++) {
-            value[i] = v[i] ;
-        }
-        for (int i = length ; i < l ; i++) {
-            value[i] = 0 ;
-        }
-    }
-
-    /**
-     * Constructs a new <CODE>SnmpStringFixed</CODE> from the specified <CODE>Bytes</CODE> array
-     * with the specified length.
-     * @param l The length of the fixed-string.
-     * @param v The <CODE>Bytes</CODE> composing the fixed-string value.
-     * @exception IllegalArgumentException Either the length or the <CODE>Byte</CODE> array is not valid.
-     */
-    public SnmpStringFixed(int l, Byte[] v) throws IllegalArgumentException {
-        if ((l <= 0) || (v == null)) {
-            throw new IllegalArgumentException() ;
-        }
-        int length = Math.min(l, v.length);
-        value = new byte[l] ;
-        for (int i = 0 ; i < length ; i++) {
-            value[i] = v[i].byteValue() ;
-        }
-        for (int i = length ; i < l ; i++) {
-            value[i] = 0 ;
-        }
-    }
-
-    /**
-     * Constructs a new <CODE>SnmpStringFixed</CODE> from the specified <CODE>String</CODE>
-     * with the specified length.
-     * @param l The length of the fixed-string.
-     * @param s The <CODE>String</CODE> composing the fixed-string value.
-     * @exception IllegalArgumentException Either the length or the <CODE>String</CODE> is not valid.
-     */
-    public SnmpStringFixed(int l, String s) throws IllegalArgumentException {
-        if ((l <= 0) || (s == null)) {
-            throw new IllegalArgumentException() ;
-        }
-        byte[] v = s.getBytes();
-        int length = Math.min(l, v.length);
-        value = new byte[l] ;
-        for (int i = 0 ; i < length ; i++) {
-            value[i] = v[i] ;
-        }
-        for (int i = length ; i < l ; i++) {
-            value[i] = 0 ;
-        }
-    }
-
-    // PUBLIC METHODS
-    //---------------
-    /**
-     * Extracts the fixed-string from an index OID and returns its
-     * value converted as an <CODE>SnmpOid</CODE>.
-     * @param l The number of successive array elements to be retreived
-     * in order to construct the OID.
-     * These elements are retreived starting at the <CODE>start</CODE> position.
-     * @param index The index array.
-     * @param start The position in the index array.
-     * @return The OID representing the fixed-string value.
-     * @exception SnmpStatusException There is no string value
-     * available at the start position.
-     */
-    public static SnmpOid toOid(int l, long[] index, int start) throws SnmpStatusException {
-        try {
-            long[] ids = new long[l] ;
-            for (int i = 0 ; i < l ; i++) {
-                ids[i] = index[start + i] ;
-            }
-            return new SnmpOid(ids) ;
-        }
-        catch(IndexOutOfBoundsException e) {
-            throw new SnmpStatusException(SnmpStatusException.noSuchName) ;
-        }
-    }
-
-    /**
-     * Scans an index OID, skip the string value and returns the position
-     * of the next value.
-     * @param l The number of successive array elements to be passed
-     * in order to get the position of the next value.
-     * These elements are passed starting at the <CODE>start</CODE> position.
-     * @param index The index array.
-     * @param start The position in the index array.
-     * @return The position of the next value.
-     * @exception SnmpStatusException There is no string value
-     * available at the start position.
-     */
-    public static int nextOid(int l, long[] index, int start) throws SnmpStatusException {
-        int result = start + l ;
-        if (result > index.length) {
-            throw new SnmpStatusException(SnmpStatusException.noSuchName) ;
-        }
-        return result ;
-    }
-
-    /**
-     * Appends an <CODE>SnmpOid</CODE> representing an <CODE>SnmpStringFixed</CODE> to another OID.
-     * @param l Unused.
-     * @param source An OID representing an <CODE>SnmpStringFixed</CODE> value.
-     * @param dest Where source should be appended.
-     */
-    public static void appendToOid(int l, SnmpOid source, SnmpOid dest) {
-        dest.append(source) ;
-    }
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpTooBigException.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,82 +0,0 @@
-/*
- * Copyright (c) 1998, 2007, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-package com.sun.jmx.snmp;
-
-
-/**
- * Is used internally to signal that the size of a PDU exceeds the packet size limitation.
- * <p>
- * You will not usually need to use this class, except if you
- * decide to implement your own
- * {@link com.sun.jmx.snmp.SnmpPduFactory SnmPduFactory} object.
- * <p>
- * The <CODE>varBindCount</CODE> property contains the
- * number of <CODE>SnmpVarBind</CODE> successfully encoded
- * before the exception was thrown. Its value is 0
- * when this number is unknown.
- *
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- */
-
-public class SnmpTooBigException extends Exception {
-  private static final long serialVersionUID = 4754796246674803969L;
-
-  /**
-   * Builds an <CODE>SnmpTooBigException</CODE> with
-   * <CODE>varBindCount</CODE> set to 0.
-   */
-  public SnmpTooBigException() {
-    varBindCount = 0 ;
-  }
-
-  /**
-   * Builds an <CODE>SnmpTooBigException</CODE> with
-   * <CODE>varBindCount</CODE> set to the specified value.
-   * @param n The <CODE>varBindCount</CODE> value.
-   */
-  public SnmpTooBigException(int n) {
-    varBindCount = n ;
-  }
-
-
-  /**
-   * Returns the number of <CODE>SnmpVarBind</CODE> successfully
-   * encoded before the exception was thrown.
-   *
-   * @return A positive integer (0 means the number is unknown).
-   */
-  public int getVarBindCount() {
-    return varBindCount ;
-  }
-
-  /**
-   * The <CODE>varBindCount</CODE>.
-   * @serial
-   */
-  private int varBindCount ;
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpUnknownAccContrModelException.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2001, 2006, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.sun.jmx.snmp;
-
-import com.sun.jmx.snmp.SnmpUnknownModelException;
-
-/**
- * This exception is thrown when an
- * <CODE>SnmpAccessControlSubSystem</CODE> doesn't know the passed ID.
- *
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- * @since 1.5
- */
-public class SnmpUnknownAccContrModelException extends SnmpUnknownModelException {
-    private static final long serialVersionUID = -8831186713954487538L;
-
-    /**
-     * Constructor.
-     * @param msg The exception msg to display.
-     */
-    public SnmpUnknownAccContrModelException(String msg) {
-        super(msg);
-    }
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpUnknownModelException.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2001, 2006, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.sun.jmx.snmp;
-/**
- * This exception is thrown when a needed model is not present in the engine.
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- * @since 1.5
- */
-public class SnmpUnknownModelException extends Exception {
-    private static final long serialVersionUID = -8667664269418048003L;
-
-    /**
-     * Constructor.
-     * @param msg The exception msg to display.
-     */
-    public SnmpUnknownModelException(String msg) {
-        super(msg);
-    }
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpUnknownModelLcdException.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2001, 2006, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.sun.jmx.snmp;
-/**
- * This exception is thrown when an <CODE>SnmpLcd</CODE> has no ModelLcd associated to the model.
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- * @since 1.5
- */
-public class SnmpUnknownModelLcdException extends Exception {
-    private static final long serialVersionUID = 6369064741633646317L;
-
-    /**
-     * Constructor.
-     * @param msg The exception msg to display.
-     */
-    public SnmpUnknownModelLcdException(String msg) {
-        super(msg);
-    }
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpUnknownMsgProcModelException.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 2001, 2006, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.sun.jmx.snmp;
-
-import com.sun.jmx.snmp.SnmpUnknownModelException;
-
-/**
- * This exception is thrown when an <CODE>SnmpMsgProcessingSubSystem</CODE> doesn't know the passed ID.
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- * @since 1.5
- */
-public class SnmpUnknownMsgProcModelException extends SnmpUnknownModelException {
-    private static final long serialVersionUID = -4179907244861284771L;
-
-    /**
-     * Constructor.
-     * @param msg The exception msg to display.
-     */
-    public SnmpUnknownMsgProcModelException(String msg) {
-        super(msg);
-    }
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpUnknownSecModelException.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 2001, 2006, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.sun.jmx.snmp;
-
-import com.sun.jmx.snmp.SnmpUnknownModelException;
-
-/**
- * This exception is thrown when an <CODE>SnmpSecuritySubSystem</CODE> doesn't know the passed ID.
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- * @since 1.5
- */
-public class SnmpUnknownSecModelException extends SnmpUnknownModelException {
-    private static final long serialVersionUID = -2173491650805292799L;
-
-    /**
-     * Constructor.
-     * @param msg The exception msg to display.
-     */
-    public SnmpUnknownSecModelException(String msg) {
-        super(msg);
-    }
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpUnknownSubSystemException.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2001, 2006, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.sun.jmx.snmp;
-/**
- * This exception is thrown when the handled <CODE> SnmpSubSystem </CODE> is unknown.
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- * @since 1.5
- */
-public class SnmpUnknownSubSystemException extends Exception {
-    private static final long serialVersionUID = 4463202140045245052L;
-
-    /**
-     * Constructor.
-     * @param msg The exception msg to display.
-     */
-    public SnmpUnknownSubSystemException(String msg) {
-        super(msg);
-    }
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpUnsignedInt.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,125 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-package com.sun.jmx.snmp;
-
-
-
-/**
- * Is the base for all SNMP syntaxes based on unsigned integers.
- *
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- */
-@SuppressWarnings("serial") // JDK implementation class
-public abstract class SnmpUnsignedInt extends SnmpInt {
-
-    /**
-     * The largest value of the type <code>unsigned int</code> (2^32 - 1).
-     */
-    public static final long   MAX_VALUE = 0x0ffffffffL;
-
-    // CONSTRUCTORS
-    //-------------
-    /**
-     * Constructs a new <CODE>SnmpUnsignedInt</CODE> from the specified integer value.
-     * @param v The initialization value.
-     * @exception IllegalArgumentException The specified value is negative
-     * or larger than {@link #MAX_VALUE SnmpUnsignedInt.MAX_VALUE}.
-     */
-    public SnmpUnsignedInt(int v) throws IllegalArgumentException {
-        super(v);
-    }
-
-    /**
-     * Constructs a new <CODE>SnmpUnsignedInt</CODE> from the specified <CODE>Integer</CODE> value.
-     * @param v The initialization value.
-     * @exception IllegalArgumentException The specified value is negative
-     * or larger than {@link #MAX_VALUE SnmpUnsignedInt.MAX_VALUE}.
-     */
-    public SnmpUnsignedInt(Integer v) throws IllegalArgumentException {
-        super(v);
-    }
-
-    /**
-     * Constructs a new <CODE>SnmpUnsignedInt</CODE> from the specified long value.
-     * @param v The initialization value.
-     * @exception IllegalArgumentException The specified value is negative
-     * or larger than {@link #MAX_VALUE SnmpUnsignedInt.MAX_VALUE}.
-     */
-    public SnmpUnsignedInt(long v) throws IllegalArgumentException {
-        super(v);
-    }
-
-    /**
-     * Constructs a new <CODE>SnmpUnsignedInt</CODE> from the specified <CODE>Long</CODE> value.
-     * @param v The initialization value.
-     * @exception IllegalArgumentException The specified value is negative
-     * or larger than {@link #MAX_VALUE SnmpUnsignedInt.MAX_VALUE}.
-     */
-    public SnmpUnsignedInt(Long v) throws IllegalArgumentException {
-        super(v);
-    }
-
-    // PUBLIC METHODS
-    //---------------
-    /**
-     * Returns a textual description of the type object.
-     * @return ASN.1 textual description.
-     */
-    public String getTypeName() {
-        return name ;
-    }
-
-    /**
-     * This method has been defined to allow the sub-classes
-     * of SnmpInt to perform their own control at intialization time.
-     */
-    boolean isInitValueValid(int v) {
-        if ((v < 0) || (v > SnmpUnsignedInt.MAX_VALUE)) {
-            return false;
-        }
-        return true;
-    }
-
-    /**
-     * This method has been defined to allow the sub-classes
-     * of SnmpInt to perform their own control at intialization time.
-     */
-    boolean isInitValueValid(long v) {
-        if ((v < 0) || (v > SnmpUnsignedInt.MAX_VALUE)) {
-            return false;
-        }
-        return true;
-    }
-
-    // VARIABLES
-    //----------
-    /**
-     * Name of the type.
-     */
-    final static String name = "Unsigned32" ;
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpUsmKeyHandler.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,98 +0,0 @@
-/*
- * Copyright (c) 2002, 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.sun.jmx.snmp;
-
-/**
- * This interface allows you to compute key localization and delta generation. It is useful when adding user in USM MIB. An instance of <CODE> SnmpUsmKeyHandler </CODE> is associated to each <CODE> SnmpEngine </CODE> object.
- * When computing key, an authentication algorithm is needed. The supported ones are : usmHMACMD5AuthProtocol and usmHMACSHAAuthProtocol.
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- * @since 1.5
- */
-public interface SnmpUsmKeyHandler {
-
-    /**
-     * DES privacy algorithm key size. To be used when localizing privacy key
-     */
-    public static int DES_KEY_SIZE = 16;
-
-    /**
-     * DES privacy algorithm delta size. To be used when calculing privacy key delta.
-     */
-    public static int DES_DELTA_SIZE = 16;
-
-    /**
-     * Translate a password to a key. It MUST be compliant to RFC 2574 description.
-     * @param algoName The authentication algorithm to use.
-     * @param password Password to convert.
-     * @return The key.
-     * @exception IllegalArgumentException If the algorithm is unknown.
-     */
-    public byte[] password_to_key(String algoName, String password) throws IllegalArgumentException;
-    /**
-     * Localize the passed key using the passed <CODE>SnmpEngineId</CODE>. It MUST be compliant to RFC 2574 description.
-     * @param algoName The authentication algorithm to use.
-     * @param key The key to localize;
-     * @param engineId The Id used to localize the key.
-     * @return The localized key.
-     * @exception IllegalArgumentException If the algorithm is unknown.
-     */
-    public byte[] localizeAuthKey(String algoName, byte[] key, SnmpEngineId engineId) throws IllegalArgumentException;
-
-    /**
-     * Localize the passed privacy key using the passed <CODE>SnmpEngineId</CODE>. It MUST be compliant to RFC 2574 description.
-     * @param algoName The authentication algorithm to use.
-     * @param key The key to localize;
-     * @param engineId The Id used to localize the key.
-     * @param keysize The privacy algorithm key size.
-     * @return The localized key.
-     * @exception IllegalArgumentException If the algorithm is unknown.
-     */
-    public byte[] localizePrivKey(String algoName, byte[] key, SnmpEngineId engineId,int keysize) throws IllegalArgumentException;
-
-    /**
-     * Calculate the delta parameter needed when processing key change. This computation is done by the key change initiator. It MUST be compliant to RFC 2574 description.
-     * @param algoName The authentication algorithm to use.
-     * @param oldKey The old key.
-     * @param newKey The new key.
-     * @param random The random value.
-     * @return The delta.
-     * @exception IllegalArgumentException If the algorithm is unknown.
-     */
-    public byte[] calculateAuthDelta(String algoName, byte[] oldKey, byte[] newKey, byte[] random) throws IllegalArgumentException;
-
-    /**
-     * Calculate the delta parameter needed when processing key change for a privacy algorithm. This computation is done by the key change initiator. It MUST be compliant to RFC 2574 description.
-     * @param algoName The authentication algorithm to use.
-     * @param oldKey The old key.
-     * @param newKey The new key.
-     * @param random The random value.
-     * @param deltaSize The algo delta size.
-     * @return The delta.
-     * @exception IllegalArgumentException If the algorithm is unknown.
-     */
-    public byte[] calculatePrivDelta(String algoName, byte[] oldKey, byte[] newKey, byte[] random, int deltaSize) throws IllegalArgumentException;
-
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpV3Message.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,511 +0,0 @@
-/*
- * Copyright (c) 2001, 2006, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.sun.jmx.snmp;
-
-// java imports
-//
-import java.util.Vector;
-import java.util.logging.Level;
-import java.net.InetAddress;
-
-// import debug stuff
-//
-import static com.sun.jmx.defaults.JmxProperties.SNMP_LOGGER;
-import com.sun.jmx.snmp.internal.SnmpMsgProcessingSubSystem;
-import com.sun.jmx.snmp.internal.SnmpSecurityModel;
-import com.sun.jmx.snmp.internal.SnmpDecryptedPdu;
-import com.sun.jmx.snmp.internal.SnmpSecurityCache;
-
-import com.sun.jmx.snmp.SnmpMsg;
-import com.sun.jmx.snmp.SnmpPdu;
-import com.sun.jmx.snmp.SnmpStatusException;
-import com.sun.jmx.snmp.SnmpTooBigException;
-import com.sun.jmx.snmp.SnmpScopedPduBulk;
-import com.sun.jmx.snmp.BerException;
-import com.sun.jmx.snmp.SnmpScopedPduRequest;
-import com.sun.jmx.snmp.BerDecoder;
-import com.sun.jmx.snmp.SnmpDefinitions;
-import com.sun.jmx.snmp.SnmpEngineId;
-import com.sun.jmx.snmp.SnmpScopedPduPacket;
-import com.sun.jmx.snmp.BerEncoder;
-import com.sun.jmx.snmp.SnmpPduRequestType;
-import com.sun.jmx.snmp.SnmpPduBulkType;
-
-/**
- * Is a partially decoded representation of an SNMP V3 packet.
- * <P>
- * This class can be used when developing customized manager or agent.
- * <P>
- * The <CODE>SnmpV3Message</CODE> class is directly mapped onto the
- * message syntax defined in RFC 2572.
- * <BLOCKQUOTE>
- * <PRE>
- * SNMPv3Message ::= SEQUENCE {
- *          msgVersion INTEGER ( 0 .. 2147483647 ),
- *          -- administrative parameters
- *          msgGlobalData HeaderData,
- *          -- security model-specific parameters
- *          -- format defined by Security Model
- *          msgSecurityParameters OCTET STRING,
- *          msgData  ScopedPduData
- *      }
- *     HeaderData ::= SEQUENCE {
- *         msgID      INTEGER (0..2147483647),
- *         msgMaxSize INTEGER (484..2147483647),
- *
- *         msgFlags   OCTET STRING (SIZE(1)),
- *                    --  .... ...1   authFlag
- *                    --  .... ..1.   privFlag
- *                    --  .... .1..   reportableFlag
- *                    --              Please observe:
- *                    --  .... ..00   is OK, means noAuthNoPriv
- *                    --  .... ..01   is OK, means authNoPriv
- *                    --  .... ..10   reserved, must NOT be used.
- *                    --  .... ..11   is OK, means authPriv
- *
- *         msgSecurityModel INTEGER (1..2147483647)
- *     }
- * </BLOCKQUOTE>
- * </PRE>
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- * @since 1.5
- */
-public class SnmpV3Message extends SnmpMsg {
-
-    /**
-     * Message identifier.
-     */
-    public int msgId = 0;
-
-    /**
-     * Message max size the pdu sender can deal with.
-     */
-    public int msgMaxSize = 0;
-    /**
-     * Message flags. Reportable flag  and security level.</P>
-     *<PRE>
-     * --  .... ...1   authFlag
-     * --  .... ..1.   privFlag
-     * --  .... .1..   reportableFlag
-     * --              Please observe:
-     * --  .... ..00   is OK, means noAuthNoPriv
-     * --  .... ..01   is OK, means authNoPriv
-     * --  .... ..10   reserved, must NOT be used.
-     * --  .... ..11   is OK, means authPriv
-     *</PRE>
-     */
-    public byte msgFlags = 0;
-    /**
-     * The security model the security sub system MUST use in order to deal with this pdu (eg: User based Security Model Id = 3).
-     */
-    public int msgSecurityModel = 0;
-    /**
-     * The unmarshalled security parameters.
-     */
-    public byte[] msgSecurityParameters = null;
-    /**
-     * The context engine Id in which the pdu must be handled (Generaly the local engine Id).
-     */
-    public byte[] contextEngineId = null;
-    /**
-     * The context name in which the OID has to be interpreted.
-     */
-    public byte[] contextName = null;
-    /** The encrypted form of the scoped pdu (Only relevant when dealing with privacy).
-     */
-    public byte[] encryptedPdu = null;
-
-    /**
-     * Constructor.
-     *
-     */
-    public SnmpV3Message() {
-    }
-    /**
-     * Encodes this message and puts the result in the specified byte array.
-     * For internal use only.
-     *
-     * @param outputBytes An array to receive the resulting encoding.
-     *
-     * @exception ArrayIndexOutOfBoundsException If the result does not fit
-     *                                           into the specified array.
-     */
-    public int encodeMessage(byte[] outputBytes)
-        throws SnmpTooBigException {
-        int encodingLength = 0;
-        if (SNMP_LOGGER.isLoggable(Level.FINER)) {
-            SNMP_LOGGER.logp(Level.FINER, SnmpV3Message.class.getName(),
-                    "encodeMessage",
-                    "Can't encode directly V3Message! Need a SecuritySubSystem");
-        }
-        throw new IllegalArgumentException("Can't encode");
-    }
-
-    /**
-     * Decodes the specified bytes and initializes this message.
-     * For internal use only.
-     *
-     * @param inputBytes The bytes to be decoded.
-     *
-     * @exception SnmpStatusException If the specified bytes are not a valid encoding.
-     */
-    public void decodeMessage(byte[] inputBytes, int byteCount)
-        throws SnmpStatusException {
-
-        try {
-            BerDecoder bdec = new BerDecoder(inputBytes);
-            bdec.openSequence();
-            version = bdec.fetchInteger();
-            bdec.openSequence();
-            msgId = bdec.fetchInteger();
-            msgMaxSize = bdec.fetchInteger();
-            msgFlags = bdec.fetchOctetString()[0];
-            msgSecurityModel =bdec.fetchInteger();
-            bdec.closeSequence();
-            msgSecurityParameters = bdec.fetchOctetString();
-            if( (msgFlags & SnmpDefinitions.privMask) == 0 ) {
-                bdec.openSequence();
-                contextEngineId = bdec.fetchOctetString();
-                contextName = bdec.fetchOctetString();
-                data = bdec.fetchAny();
-                dataLength = data.length;
-                bdec.closeSequence();
-            }
-            else {
-                encryptedPdu = bdec.fetchOctetString();
-            }
-            bdec.closeSequence() ;
-        }
-        catch(BerException x) {
-            x.printStackTrace();
-            throw new SnmpStatusException("Invalid encoding") ;
-        }
-
-        if (SNMP_LOGGER.isLoggable(Level.FINER)) {
-            final StringBuilder strb = new StringBuilder()
-            .append("Unmarshalled message : \n")
-            .append("version : ").append(version)
-            .append("\n")
-            .append("msgId : ").append(msgId)
-            .append("\n")
-            .append("msgMaxSize : ").append(msgMaxSize)
-            .append("\n")
-            .append("msgFlags : ").append(msgFlags)
-            .append("\n")
-            .append("msgSecurityModel : ").append(msgSecurityModel)
-            .append("\n")
-            .append("contextEngineId : ").append(contextEngineId == null ? null :
-                SnmpEngineId.createEngineId(contextEngineId))
-            .append("\n")
-            .append("contextName : ").append(contextName)
-            .append("\n")
-            .append("data : ").append(data)
-            .append("\n")
-            .append("dat len : ").append((data == null) ? 0 : data.length)
-            .append("\n")
-            .append("encryptedPdu : ").append(encryptedPdu)
-            .append("\n");
-            SNMP_LOGGER.logp(Level.FINER, SnmpV3Message.class.getName(),
-                    "decodeMessage", strb.toString());
-        }
-    }
-
-    /**
-     * Returns the associated request Id.
-     * @param data The flat message.
-     * @return The request Id.
-     */
-    public int getRequestId(byte[] data) throws SnmpStatusException {
-        BerDecoder bdec = null;
-        int msgId = 0;
-        try {
-            bdec = new BerDecoder(data);
-            bdec.openSequence();
-            bdec.fetchInteger();
-            bdec.openSequence();
-            msgId = bdec.fetchInteger();
-        }catch(BerException x) {
-            throw new SnmpStatusException("Invalid encoding") ;
-        }
-        try {
-            bdec.closeSequence();
-        }
-        catch(BerException x) {
-        }
-
-        return msgId;
-    }
-
-    /**
-     * Initializes this message with the specified <CODE>pdu</CODE>.
-     * <P>
-     * This method initializes the data field with an array of
-     * <CODE>maxDataLength</CODE> bytes. It encodes the <CODE>pdu</CODE>.
-     * The resulting encoding is stored in the data field
-     * and the length of the encoding is stored in <CODE>dataLength</CODE>.
-     * <p>
-     * If the encoding length exceeds <CODE>maxDataLength</CODE>,
-     * the method throws an exception.
-     *
-     * @param p The PDU to be encoded.
-     * @param maxDataLength The maximum length permitted for the data field.
-     *
-     * @exception SnmpStatusException If the specified <CODE>pdu</CODE>
-     *   is not valid.
-     * @exception SnmpTooBigException If the resulting encoding does not fit
-     * into <CODE>maxDataLength</CODE> bytes.
-     * @exception ArrayIndexOutOfBoundsException If the encoding exceeds
-     *    <CODE>maxDataLength</CODE>.
-     */
-    public void encodeSnmpPdu(SnmpPdu p,
-                              int maxDataLength)
-        throws SnmpStatusException, SnmpTooBigException {
-
-        SnmpScopedPduPacket pdu = (SnmpScopedPduPacket) p;
-
-        if (SNMP_LOGGER.isLoggable(Level.FINER)) {
-            final StringBuilder strb = new StringBuilder()
-            .append("PDU to marshall: \n")
-            .append("security parameters : ").append(pdu.securityParameters)
-            .append("\n")
-            .append("type : ").append(pdu.type)
-            .append("\n")
-            .append("version : ").append(pdu.version)
-            .append("\n")
-            .append("requestId : ").append(pdu.requestId)
-            .append("\n")
-            .append("msgId : ").append(pdu.msgId)
-            .append("\n")
-            .append("msgMaxSize : ").append(pdu.msgMaxSize)
-            .append("\n")
-            .append("msgFlags : ").append(pdu.msgFlags)
-            .append("\n")
-            .append("msgSecurityModel : ").append(pdu.msgSecurityModel)
-            .append("\n")
-            .append("contextEngineId : ").append(pdu.contextEngineId)
-            .append("\n")
-            .append("contextName : ").append(pdu.contextName)
-            .append("\n");
-            SNMP_LOGGER.logp(Level.FINER, SnmpV3Message.class.getName(),
-                    "encodeSnmpPdu", strb.toString());
-        }
-
-        version = pdu.version;
-        address = pdu.address;
-        port = pdu.port;
-        msgId = pdu.msgId;
-        msgMaxSize = pdu.msgMaxSize;
-        msgFlags = pdu.msgFlags;
-        msgSecurityModel = pdu.msgSecurityModel;
-
-        contextEngineId = pdu.contextEngineId;
-        contextName = pdu.contextName;
-
-        securityParameters = pdu.securityParameters;
-
-        //
-        // Allocate the array to receive the encoding.
-        //
-        data = new byte[maxDataLength];
-
-        //
-        // Encode the pdu
-        // Reminder: BerEncoder does backward encoding !
-        //
-
-        try {
-            BerEncoder benc = new BerEncoder(data) ;
-            benc.openSequence() ;
-            encodeVarBindList(benc, pdu.varBindList) ;
-
-            switch(pdu.type) {
-
-            case pduGetRequestPdu :
-            case pduGetNextRequestPdu :
-            case pduInformRequestPdu :
-            case pduGetResponsePdu :
-            case pduSetRequestPdu :
-            case pduV2TrapPdu :
-            case pduReportPdu :
-                SnmpPduRequestType reqPdu = (SnmpPduRequestType) pdu;
-                benc.putInteger(reqPdu.getErrorIndex());
-                benc.putInteger(reqPdu.getErrorStatus());
-                benc.putInteger(pdu.requestId);
-                break;
-
-            case pduGetBulkRequestPdu :
-                SnmpPduBulkType bulkPdu = (SnmpPduBulkType) pdu;
-                benc.putInteger(bulkPdu.getMaxRepetitions());
-                benc.putInteger(bulkPdu.getNonRepeaters());
-                benc.putInteger(pdu.requestId);
-                break ;
-
-            default:
-                throw new SnmpStatusException("Invalid pdu type " + String.valueOf(pdu.type)) ;
-            }
-            benc.closeSequence(pdu.type) ;
-            dataLength = benc.trim() ;
-        }
-        catch(ArrayIndexOutOfBoundsException x) {
-            throw new SnmpTooBigException() ;
-        }
-    }
-
-
-    /**
-     * Gets the PDU encoded in this message.
-     * <P>
-     * This method decodes the data field and returns the resulting PDU.
-     *
-     * @return The resulting PDU.
-     * @exception SnmpStatusException If the encoding is not valid.
-     */
-
-    public SnmpPdu decodeSnmpPdu()
-        throws SnmpStatusException {
-
-        SnmpScopedPduPacket pdu = null;
-
-        BerDecoder bdec = new BerDecoder(data) ;
-        try {
-            int type = bdec.getTag() ;
-            bdec.openSequence(type) ;
-            switch(type) {
-
-            case pduGetRequestPdu :
-            case pduGetNextRequestPdu :
-            case pduInformRequestPdu :
-            case pduGetResponsePdu :
-            case pduSetRequestPdu :
-            case pduV2TrapPdu :
-            case pduReportPdu :
-                SnmpScopedPduRequest reqPdu = new SnmpScopedPduRequest() ;
-                reqPdu.requestId = bdec.fetchInteger() ;
-                reqPdu.setErrorStatus(bdec.fetchInteger());
-                reqPdu.setErrorIndex(bdec.fetchInteger());
-                pdu = reqPdu ;
-                break ;
-
-            case pduGetBulkRequestPdu :
-                SnmpScopedPduBulk bulkPdu = new SnmpScopedPduBulk() ;
-                bulkPdu.requestId = bdec.fetchInteger() ;
-                bulkPdu.setNonRepeaters(bdec.fetchInteger());
-                bulkPdu.setMaxRepetitions(bdec.fetchInteger());
-                pdu = bulkPdu ;
-                break ;
-            default:
-                throw new SnmpStatusException(snmpRspWrongEncoding) ;
-            }
-            pdu.type = type;
-            pdu.varBindList = decodeVarBindList(bdec);
-            bdec.closeSequence() ;
-        } catch(BerException e) {
-            if (SNMP_LOGGER.isLoggable(Level.FINEST)) {
-                SNMP_LOGGER.logp(Level.FINEST, SnmpV3Message.class.getName(),
-                        "decodeSnmpPdu", "BerException", e);
-            }
-            throw new SnmpStatusException(snmpRspWrongEncoding);
-        }
-
-        //
-        // The easy work.
-        //
-        pdu.address = address;
-        pdu.port = port;
-        pdu.msgFlags = msgFlags;
-        pdu.version = version;
-        pdu.msgId = msgId;
-        pdu.msgMaxSize = msgMaxSize;
-        pdu.msgSecurityModel = msgSecurityModel;
-        pdu.contextEngineId = contextEngineId;
-        pdu.contextName = contextName;
-
-        pdu.securityParameters = securityParameters;
-
-        if (SNMP_LOGGER.isLoggable(Level.FINER)) {
-            final StringBuilder strb = new StringBuilder()
-            .append("Unmarshalled PDU : \n")
-            .append("type : ").append(pdu.type)
-            .append("\n")
-            .append("version : ").append(pdu.version)
-            .append("\n")
-            .append("requestId : ").append(pdu.requestId)
-            .append("\n")
-            .append("msgId : ").append(pdu.msgId)
-            .append("\n")
-            .append("msgMaxSize : ").append(pdu.msgMaxSize)
-            .append("\n")
-            .append("msgFlags : ").append(pdu.msgFlags)
-            .append("\n")
-            .append("msgSecurityModel : ").append(pdu.msgSecurityModel)
-            .append("\n")
-            .append("contextEngineId : ").append(pdu.contextEngineId)
-            .append("\n")
-            .append("contextName : ").append(pdu.contextName)
-            .append("\n");
-            SNMP_LOGGER.logp(Level.FINER, SnmpV3Message.class.getName(),
-                    "decodeSnmpPdu", strb.toString());
-        }
-        return pdu ;
-    }
-
-    /**
-     * Dumps this message in a string.
-     *
-     * @return The string containing the dump.
-     */
-    public String printMessage() {
-        StringBuilder sb = new StringBuilder();
-        sb.append("msgId : " + msgId + "\n");
-        sb.append("msgMaxSize : " + msgMaxSize + "\n");
-        sb.append("msgFlags : " + msgFlags + "\n");
-        sb.append("msgSecurityModel : " + msgSecurityModel + "\n");
-
-        if (contextEngineId == null) {
-            sb.append("contextEngineId : null");
-        }
-        else {
-            sb.append("contextEngineId : {\n");
-            sb.append(dumpHexBuffer(contextEngineId,
-                                    0,
-                                    contextEngineId.length));
-            sb.append("\n}\n");
-        }
-
-        if (contextName == null) {
-            sb.append("contextName : null");
-        }
-        else {
-            sb.append("contextName : {\n");
-            sb.append(dumpHexBuffer(contextName,
-                                    0,
-                                    contextName.length));
-            sb.append("\n}\n");
-        }
-        return sb.append(super.printMessage()).toString();
-    }
-
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/SnmpValue.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,96 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-package com.sun.jmx.snmp;
-
-
-
-import java.io.Serializable;
-
-/**
- * Is an abstract representation of an SNMP Value.
- * All classes provided for dealing with SNMP types should derive from this
- * class.
- *
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- */
-@SuppressWarnings("serial") // JDK implementation class
-public abstract class SnmpValue implements Cloneable, Serializable, SnmpDataTypeEnums {
-
-    /**
-     * Returns a <CODE>String</CODE> form containing ASN.1 tagging information.
-     * @return The <CODE>String</CODE> form.
-     */
-    public String toAsn1String() {
-        return "[" + getTypeName() + "] " + toString();
-    }
-
-    /**
-     * Returns the value encoded as an OID.
-     * The method is particularly useful when dealing with indexed table made of
-     * several SNMP variables.
-     * @return The value encoded as an OID.
-     */
-    public abstract SnmpOid toOid() ;
-
-    /**
-     * Returns a textual description of the object.
-     * @return ASN.1 textual description.
-     */
-    public abstract String getTypeName() ;
-
-    /**
-     * Same as clone, but you cannot perform cloning using this object because
-     * clone is protected. This method should call <CODE>clone()</CODE>.
-     * @return The <CODE>SnmpValue</CODE> clone.
-     */
-    public abstract SnmpValue duplicate() ;
-
-    /**
-     * This method returns <CODE>false</CODE> by default and is redefined
-     * in the {@link com.sun.jmx.snmp.SnmpNull} class.
-     */
-    public boolean isNoSuchObjectValue() {
-        return false;
-    }
-
-    /**
-     * This method returns <CODE>false</CODE> by default and is redefined
-     * in the {@link com.sun.jmx.snmp.SnmpNull} class.
-     */
-    public boolean isNoSuchInstanceValue() {
-        return false;
-    }
-
-    /**
-     * This method returns <CODE>false</CODE> by default and is redefined
-     * in the {@link com.sun.jmx.snmp.SnmpNull} class.
-     */
-    public boolean isEndOfMibViewValue() {
-        return false;
-    }
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/ThreadContext.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,326 +0,0 @@
-/*
- * Copyright (c) 2000, 2007, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-package com.sun.jmx.snmp;
-
-import java.util.Stack;
-import java.util.EmptyStackException;
-
-/**
- * <p><b>Warning: The interface of this class is subject to change.
- * Use at your own risk.</b></p>
- *
- * <p>This class associates a context with each thread that
- * references it.  The context is a set of mappings between Strings
- * and Objects.  It is managed as a stack, typically with code like
- * this:</p>
- *
- * <pre>
- * ThreadContext oldContext = ThreadContext.push(myKey, myObject);
- * // plus possibly further calls to ThreadContext.push...
- * try {
- *      doSomeOperation();
- * } finally {
- *      ThreadContext.restore(oldContext);
- * }
- * </pre>
- *
- * <p>The <code>try</code>...<code>finally</code> block ensures that
- * the <code>restore</code> is done even if
- * <code>doSomeOperation</code> terminates abnormally (with an
- * exception).</p>
- *
- * <p>A thread can consult its own context using
- * <code>ThreadContext.get(myKey)</code>.  The result is the
- * value that was most recently pushed with the given key.</p>
- *
- * <p>A thread cannot read or modify the context of another thread.</p>
- *
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- */
-public class ThreadContext implements Cloneable {
-
-    /* The context of a thread is stored as a linked list.  At the
-       head of the list is the value returned by localContext.get().
-       At the tail of the list is a sentinel ThreadContext value with
-       "previous" and "key" both null.  There is a different sentinel
-       object for each thread.
-
-       Because a null key indicates the sentinel, we reject attempts to
-       push context entries with a null key.
-
-       The reason for using a sentinel rather than just terminating
-       the list with a null reference is to protect against incorrect
-       or even malicious code.  If you have a reference to the
-       sentinel value, you can erase the context stack.  Only the
-       caller of the first "push" that put something on the stack can
-       get such a reference, so if that caller does not give this
-       reference away, no one else can erase the stack.
-
-       If the restore method took a null reference to mean an empty
-       stack, anyone could erase the stack, since anyone can make a
-       null reference.
-
-       When the stack is empty, we discard the sentinel object and
-       have localContext.get() return null.  Then we recreate the
-       sentinel object on the first subsequent push.
-
-       ThreadContext objects are immutable.  As a consequence, you can
-       give a ThreadContext object to setInitialContext that is no
-       longer current.  But the interface says this can be rejected,
-       in case we remove immutability later.  */
-
-    /* We have to comment out "final" here because of a bug in the JDK1.1
-       compiler.  Uncomment it when we discard 1.1 compatibility.  */
-    private /*final*/ ThreadContext previous;
-    private /*final*/ String key;
-    private /*final*/ Object value;
-
-    private ThreadContext(ThreadContext previous, String key, Object value) {
-        this.previous = previous;
-        this.key = key;
-        this.value = value;
-    }
-
-    /**
-     * <p>Get the Object that was most recently pushed with the given key.</p>
-     *
-     * @param key the key of interest.
-     *
-     * @return the last Object that was pushed (using
-     * <code>push</code>) with that key and not subsequently canceled
-     * by a <code>restore</code>; or null if there is no such object.
-     * A null return value may also indicate that the last Object
-     * pushed was the value <code>null</code>.  Use the
-     * <code>contains</code> method to distinguish this case from the
-     * case where there is no Object.
-     *
-     * @exception IllegalArgumentException if <code>key</code> is null.
-     */
-    public static Object get(String key) throws IllegalArgumentException {
-        ThreadContext context = contextContaining(key);
-        if (context == null)
-            return null;
-        else
-            return context.value;
-    }
-
-    /**
-     * <p>Check whether a value with the given key exists in the stack.
-     * This means that the <code>push</code> method was called with
-     * this key and it was not cancelled by a subsequent
-     * <code>restore</code>.  This method is useful when the
-     * <code>get</code> method returns null, to distinguish between
-     * the case where the key exists in the stack but is associated
-     * with a null value, and the case where the key does not exist in
-     * the stack.</p>
-     *
-     * @return true if the key exists in the stack.
-     *
-     * @exception IllegalArgumentException if <code>key</code> is null.
-     */
-    public static boolean contains(String key)
-            throws IllegalArgumentException {
-        return (contextContaining(key) != null);
-    }
-
-    /**
-     * <p>Find the ThreadContext in the stack that contains the given key,
-     * or return null if there is none.</p>
-     *
-     * @exception IllegalArgumentException if <code>key</code> is null.
-     */
-    private static ThreadContext contextContaining(String key)
-            throws IllegalArgumentException {
-        if (key == null)
-            throw new IllegalArgumentException("null key");
-        for (ThreadContext context = getContext();
-             context != null;
-             context = context.previous) {
-            if (key.equals(context.key))
-                return context;
-            /* Note that "context.key" may be null if "context" is the
-               sentinel, so don't write "if (context.key.equals(key))"!  */
-        }
-        return null;
-    }
-
-//  /**
-//   * Change the value that was most recently associated with the given key
-//   * in a <code>push</code> operation not cancelled by a subsequent
-//   * <code>restore</code>.  If there is no such association, nothing happens
-//   * and the return value is null.
-//   *
-//   * @param key the key of interest.
-//   * @param value the new value to associate with that key.
-//   *
-//   * @return the value that was previously associated with the key, or null
-//   * if the key does not exist in the stack.
-//   *
-//   * @exception IllegalArgumentException if <code>key</code> is null.
-//   */
-//  public static Object set(String key, Object value)
-//          throws IllegalArgumentException {
-//      ThreadContext context = contextContaining(key);
-//      if (context == null)
-//          return null;
-//      Object old = context.value;
-//      context.value = value;
-//      return old;
-//  }
-
-    /**
-     * <p>Push an object on the context stack with the given key.
-     * This operation can subsequently be undone by calling
-     * <code>restore</code> with the ThreadContext value returned
-     * here.</p>
-     *
-     * @param key the key that will be used to find the object while it is
-     * on the stack.
-     * @param value the value to be associated with that key.  It may be null.
-     *
-     * @return a ThreadContext that can be given to <code>restore</code> to
-     * restore the stack to its state before the <code>push</code>.
-     *
-     * @exception IllegalArgumentException if <code>key</code> is null.
-     */
-    public static ThreadContext push(String key, Object value)
-            throws IllegalArgumentException {
-        if (key == null)
-            throw new IllegalArgumentException("null key");
-
-        ThreadContext oldContext = getContext();
-        if (oldContext == null)
-            oldContext = new ThreadContext(null, null, null);  // make sentinel
-        ThreadContext newContext = new ThreadContext(oldContext, key, value);
-        setContext(newContext);
-        return oldContext;
-    }
-
-    /**
-     * <p>Return an object that can later be supplied to <code>restore</code>
-     * to restore the context stack to its current state.  The object can
-     * also be given to <code>setInitialContext</code>.</p>
-     *
-     * @return a ThreadContext that represents the current context stack.
-     */
-    public static ThreadContext getThreadContext() {
-        return getContext();
-    }
-
-    /**
-     * <p>Restore the context stack to an earlier state.  This typically
-     * undoes the effect of one or more <code>push</code> calls.</p>
-     *
-     * @param oldContext the state to return.  This is usually the return
-     * value of an earlier <code>push</code> operation.
-     *
-     * @exception NullPointerException if <code>oldContext</code> is null.
-     * @exception IllegalArgumentException if <code>oldContext</code>
-     * does not represent a context from this thread, or if that
-     * context was undone by an earlier <code>restore</code>.
-     */
-    public static void restore(ThreadContext oldContext)
-            throws NullPointerException, IllegalArgumentException {
-        /* The following test is not strictly necessary in the code as it
-           stands today, since the reference to "oldContext.key" would
-           generate a NullPointerException anyway.  But if someone
-           didn't notice that during subsequent changes, they could
-           accidentally permit restore(null) with the semantics of
-           trashing the context stack.  */
-        if (oldContext == null)
-            throw new NullPointerException();
-
-        /* Check that the restored context is in the stack.  */
-        for (ThreadContext context = getContext();
-             context != oldContext;
-             context = context.previous) {
-            if (context == null) {
-                throw new IllegalArgumentException("Restored context is not " +
-                                                   "contained in current " +
-                                                   "context");
-            }
-        }
-
-        /* Discard the sentinel if the stack is empty.  This means that it
-           is an error to call "restore" a second time with the
-           ThreadContext value that means an empty stack.  That's why we
-           don't say that it is all right to restore the stack to the
-           state it was already in.  */
-        if (oldContext.key == null)
-            oldContext = null;
-
-        setContext(oldContext);
-    }
-
-    /**
-     * <p>Set the initial context of the calling thread to a context obtained
-     * from another thread.  After this call, the calling thread will see
-     * the same results from the <code>get</code> method as the thread
-     * from which the <code>context</code> argument was obtained, at the
-     * time it was obtained.</p>
-     *
-     * <p>The <code>context</code> argument must be the result of an earlier
-     * <code>push</code> or <code>getThreadContext</code> call.  It is an
-     * error (which may or may not be detected) if this context has been
-     * undone by a <code>restore</code>.</p>
-     *
-     * <p>The context stack of the calling thread must be empty before this
-     * call, i.e., there must not have been a <code>push</code> not undone
-     * by a subsequent <code>restore</code>.</p>
-     *
-     * @exception IllegalArgumentException if the context stack was
-     * not empty before the call.  An implementation may also throw this
-     * exception if <code>context</code> is no longer current in the
-     * thread from which it was obtained.
-     */
-    /* We rely on the fact that ThreadContext objects are immutable.
-       This means that we don't have to check that the "context"
-       argument is valid.  It necessarily represents the head of a
-       valid chain of ThreadContext objects, even if the thread from
-       which it was obtained has subsequently been set to a point
-       later in that chain using "restore".  */
-    public void setInitialContext(ThreadContext context)
-            throws IllegalArgumentException {
-        /* The following test assumes that we discard sentinels when the
-           stack is empty.  */
-        if (getContext() != null)
-            throw new IllegalArgumentException("previous context not empty");
-        setContext(context);
-    }
-
-    private static ThreadContext getContext() {
-        return localContext.get();
-    }
-
-    private static void setContext(ThreadContext context) {
-        localContext.set(context);
-    }
-
-    private static ThreadLocal<ThreadContext> localContext =
-            new ThreadLocal<ThreadContext>();
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/UserAcl.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,97 +0,0 @@
-/*
- * Copyright (c) 2001, 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.jmx.snmp;
-
-
-// java import
-//
-import java.util.Enumeration;
-import java.net.InetAddress;
-
-/**
- * Defines the user based ACL used by the SNMP protocol adaptor.
- * <p>
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- * @since 1.5
- */
-
-public interface UserAcl {
-
-    /**
-     * Returns the name of the ACL.
-     *
-     * @return The name of the ACL.
-     */
-    public String getName();
-
-    /**
-     * Checks whether or not the specified user has <CODE>READ</CODE> access.
-     *
-     * @param user The user name to check.
-     *
-     * @return <CODE>true</CODE> if the host has read permission, <CODE>false</CODE> otherwise.
-     */
-    public boolean checkReadPermission(String user);
-
-    /**
-     * Checks whether or not the specified user and context name have <CODE>READ</CODE> access.
-     *
-     * @param user The user name to check.
-     * @param contextName The context name associated with the user.
-     * @param securityLevel The request security level.
-     * @return <CODE>true</CODE> if the pair (user, context) has read permission, <CODE>false</CODE> otherwise.
-     */
-    public boolean checkReadPermission(String user, String contextName, int securityLevel);
-
-    /**
-     * Checks whether or not a context name is defined.
-     *
-     * @param contextName The context name to check.
-     *
-     * @return <CODE>true</CODE> if the context is known, <CODE>false</CODE> otherwise.
-     */
-    public boolean checkContextName(String contextName);
-
-    /**
-     * Checks whether or not the specified user has <CODE>WRITE</CODE> access.
-     *
-     * @param user The user to check.
-     *
-     * @return <CODE>true</CODE> if the user has write permission, <CODE>false</CODE> otherwise.
-     */
-    public boolean checkWritePermission(String user);
-
-    /**
-     * Checks whether or not the specified user and context name have <CODE>WRITE</CODE> access.
-     *
-     * @param user The user name to check.
-     * @param contextName The context name associated with the user.
-     * @param securityLevel The request security level.
-     * @return <CODE>true</CODE> if the pair (user, context) has write permission, <CODE>false</CODE> otherwise.
-     */
-    public boolean checkWritePermission(String user, String contextName, int securityLevel);
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/agent/AcmChecker.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,151 +0,0 @@
-/*
- * Copyright (c) 1997, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.jmx.snmp.agent;
-
-import java.io.Serializable;
-import java.util.Enumeration;
-import java.util.logging.Level;
-import java.util.Vector;
-
-import javax.management.ObjectName;
-import javax.management.MBeanServer;
-import javax.management.MalformedObjectNameException;
-import javax.management.InstanceAlreadyExistsException;
-import javax.management.MBeanRegistrationException;
-import javax.management.NotCompliantMBeanException;
-
-import static com.sun.jmx.defaults.JmxProperties.SNMP_ADAPTOR_LOGGER;
-import com.sun.jmx.snmp.SnmpOid;
-import com.sun.jmx.snmp.SnmpVarBind;
-import com.sun.jmx.snmp.SnmpDefinitions;
-import com.sun.jmx.snmp.SnmpStatusException;
-import com.sun.jmx.snmp.SnmpEngine;
-import com.sun.jmx.snmp.SnmpUnknownModelException;
-import com.sun.jmx.snmp.internal.SnmpAccessControlModel;
-import com.sun.jmx.snmp.internal.SnmpEngineImpl;
-
-/**
- * Oid Checker makes use of ACM to check each OID during the getnext process.
- */
-class AcmChecker {
-
-
-    SnmpAccessControlModel model = null;
-    String principal = null;
-    int securityLevel = -1;
-    int version = -1;
-    int pduType = -1;
-    int securityModel = -1;
-    byte[] contextName = null;
-    SnmpEngineImpl engine = null;
-    LongList l = null;
-    AcmChecker(SnmpMibRequest req) {
-        engine = (SnmpEngineImpl) req.getEngine();
-        //We are in V3 architecture, ACM is in the picture.
-        if(engine != null) {
-            if(engine.isCheckOidActivated()) {
-                try {
-                    if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                        SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
-                                SnmpMib.class.getName(),
-                                "AcmChecker(SnmpMibRequest)",
-                                "SNMP V3 Access Control to be done");
-                    }
-                    model = (SnmpAccessControlModel)
-                        engine.getAccessControlSubSystem().
-                        getModel(SnmpDefinitions.snmpVersionThree);
-                    principal = req.getPrincipal();
-                    securityLevel = req.getSecurityLevel();
-                    pduType = req.getPdu().type;
-                    version = req.getRequestPduVersion();
-                    securityModel = req.getSecurityModel();
-                    contextName = req.getAccessContextName();
-                    l = new LongList();
-                    if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                        final StringBuilder strb = new StringBuilder()
-                        .append("Will check oid for : principal : ")
-                        .append(principal)
-                        .append("; securityLevel : ").append(securityLevel)
-                        .append("; pduType : ").append(pduType)
-                        .append("; version : ").append(version)
-                        .append("; securityModel : ").append(securityModel)
-                        .append("; contextName : ").append(contextName);
-                        SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
-                                SnmpMib.class.getName(),
-                                "AcmChecker(SnmpMibRequest)", strb.toString());
-                    }
-
-                }catch(SnmpUnknownModelException e) {
-                    if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                        SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
-                                SnmpMib.class.getName(),
-                                "AcmChecker(SnmpMibRequest)",
-                                "Unknown Model, no ACM check.");
-                    }
-                }
-            }
-        }
-    }
-
-    void add(int index, long arc) {
-        if(model != null)
-            l.add(index, arc);
-    }
-
-    void remove(int index) {
-        if(model != null)
-            l.remove(index);
-    }
-
-    void add(final int at,final long[] src, final int from,
-             final int count) {
-        if(model != null)
-            l.add(at,src,from,count);
-    }
-
-    void remove(final int from, final int count) {
-        if(model != null)
-            l.remove(from,count);
-    }
-
-    void checkCurrentOid() throws SnmpStatusException {
-        if(model != null) {
-            SnmpOid oid = new SnmpOid(l.toArray());
-            if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, SnmpMib.class.getName(),
-                        "checkCurrentOid", "Checking access for : " + oid);
-            }
-            model.checkAccess(version,
-                              principal,
-                              securityLevel,
-                              pduType,
-                              securityModel,
-                              contextName,
-                              oid);
-        }
-    }
-
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/agent/LongList.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,235 +0,0 @@
-/*
- * Copyright (c) 1997, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.jmx.snmp.agent;
-
-import java.io.Serializable;
-import java.util.Enumeration;
-import java.util.logging.Level;
-import java.util.Vector;
-
-import javax.management.ObjectName;
-import javax.management.MBeanServer;
-import javax.management.MalformedObjectNameException;
-import javax.management.InstanceAlreadyExistsException;
-import javax.management.MBeanRegistrationException;
-import javax.management.NotCompliantMBeanException;
-
-import static com.sun.jmx.defaults.JmxProperties.SNMP_ADAPTOR_LOGGER;
-import com.sun.jmx.snmp.SnmpOid;
-import com.sun.jmx.snmp.SnmpVarBind;
-import com.sun.jmx.snmp.SnmpDefinitions;
-import com.sun.jmx.snmp.SnmpStatusException;
-import com.sun.jmx.snmp.SnmpEngine;
-import com.sun.jmx.snmp.SnmpUnknownModelException;
-import com.sun.jmx.snmp.internal.SnmpAccessControlModel;
-import com.sun.jmx.snmp.internal.SnmpEngineImpl;
-
-/**
- * This list is used in order to construct the OID during the getnext.
- * The constructed oid is checked by the checker AcmChecker.
- */
-final class LongList {
-
-    public static int DEFAULT_CAPACITY = 10;
-
-    public static int DEFAULT_INCREMENT = 10;
-
-
-    private final int DELTA;
-    private int size;
-
-    /**
-     * The list content. Any access to this variable must be protected
-     * by a synchronized block on the LongList object.
-     * Only read-only action should be performed on this object.
-     **/
-    public  long[] list;
-
-    LongList() {
-        this(DEFAULT_CAPACITY,DEFAULT_INCREMENT);
-    }
-
-    LongList(int initialCapacity) {
-        this(initialCapacity,DEFAULT_INCREMENT);
-    }
-
-    LongList(int initialCapacity, int delta) {
-        size = 0;
-        DELTA = delta;
-        list = allocate(initialCapacity);
-    }
-
-    /**
-     * Same behaviour than size() in {@link java.util.List}.
-     **/
-    public final int size() { return size;}
-
-    /**
-     * Same behaviour than add(long o) in {@link java.util.List}.
-     * Any access to this method should be protected in a synchronized
-     * block on the LongList object.
-     **/
-    public final boolean add(final long o) {
-        if (size >= list.length)
-            resize();
-        list[size++]=o;
-        return true;
-    }
-
-    /**
-     * Same behaviour than add(int index, long o) in
-     * {@link java.util.List}.
-     * Any access to this method should be protected in a synchronized
-     * block on the LongList object.
-     **/
-    public final void add(final int index, final long o) {
-        if (index >  size) throw new IndexOutOfBoundsException();
-        if (index >= list.length) resize();
-        if (index == size) {
-            list[size++]=o;
-            return;
-        }
-
-        java.lang.System.arraycopy(list,index,list,index+1,size-index);
-        list[index]=o;
-        size++;
-    }
-
-    /**
-     * Adds <var>count</var> elements to the list.
-     * @param at index at which the elements must be inserted. The
-     *        first element will be inserted at this index.
-     * @param src  An array containing the elements we want to insert.
-     * @param from Index of the first element from <var>src</var> that
-     *        must be inserted.
-     * @param count number of elements to insert.
-     * Any access to this method should be protected in a synchronized
-     * block on the LongList object.
-     **/
-    public final void add(final int at,final long[] src, final int from,
-                          final int count) {
-        if (count <= 0) return;
-        if (at > size) throw new IndexOutOfBoundsException();
-        ensure(size+count);
-        if (at < size) {
-            java.lang.System.arraycopy(list,at,list,at+count,size-at);
-        }
-        java.lang.System.arraycopy(src,from,list,at,count);
-        size+=count;
-    }
-
-    /**
-     * Any access to this method should be protected in a synchronized
-     * block on the LongList object.
-     **/
-    public final long remove(final int from, final int count) {
-        if (count < 1 || from < 0) return -1;
-        if (from+count > size) return -1;
-
-        final long o = list[from];
-        final int oldsize = size;
-        size = size - count;
-
-        if (from == size) return o;
-
-        java.lang.System.arraycopy(list,from+count,list,from,
-                                   size-from);
-        return o;
-    }
-
-    /**
-     * Same behaviour than remove(int index) in {@link java.util.List}.
-     * Any access to this method should be protected in a synchronized
-     * block on the LongList object.
-     **/
-    public final long remove(final int index) {
-        if (index >= size) return -1;
-        final long o = list[index];
-        list[index]=0;
-        if (index == --size) return o;
-
-        java.lang.System.arraycopy(list,index+1,list,index,
-                                   size-index);
-        return o;
-    }
-
-    /**
-     * Same behaviour than the toArray(long[] a) method in
-     * {@link java.util.List}.
-     * Any access to this method should be protected in a synchronized
-     * block on the LongList object.
-     **/
-    public final long[] toArray(long[] a) {
-        java.lang.System.arraycopy(list,0,a,0,size);
-        return a;
-    }
-
-    /**
-     * Same behaviour than the toArray() method in
-     * {@link java.util.List}.
-     * Any access to this method should be protected in a synchronized
-     * block on the LongList object.
-     **/
-    public final long[] toArray() {
-        return toArray(new long[size]);
-    }
-
-    /**
-     * Resize the list. Increase its capacity by DELTA elements.
-     * Any call to this method must be protected by a synchronized
-     * block on this LongList.
-     **/
-    private final void resize() {
-        final long[] newlist = allocate(list.length + DELTA);
-        java.lang.System.arraycopy(list,0,newlist,0,size);
-        list = newlist;
-    }
-
-    /**
-     * Resize the list. Insure that the new length will be at
-     * least equal to <var>length</var>.
-     * @param length new minimal length requested.
-     * Any call to this method must be protected by a synchronized
-     * block on this LongList.
-     **/
-    private final void ensure(int length) {
-        if (list.length < length) {
-            final int min = list.length+DELTA;
-            length=(length<min)?min:length;
-            final long[] newlist = allocate(length);
-            java.lang.System.arraycopy(list,0,newlist,0,size);
-            list = newlist;
-        }
-    }
-
-    /**
-     * Allocate a new array of object of specified length.
-     **/
-    private final long[] allocate(final int length) {
-        return new long[length];
-    }
-
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/agent/SnmpEntryOid.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2000, 2006, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.sun.jmx.snmp.agent;
-
-import com.sun.jmx.snmp.SnmpOid;
-
-/**
- * This class only adds a new constructor to SnmpOid...
- *
- **/
-class SnmpEntryOid extends SnmpOid {
-    private static final long serialVersionUID = 9212653887791059564L;
-
-    /**
-     * Constructs a new <CODE>SnmpOid</CODE> from the specified
-     * component array, starting at given position.
-     *
-     * @param oid   The original OID array
-     * @param start The position at which to begin.
-     *
-     **/
-    public SnmpEntryOid(long[] oid, int start) {
-        final int subLength = oid.length - start;
-        final long[] subOid = new long[subLength];
-        java.lang.System.arraycopy(oid, start, subOid, 0, subLength) ;
-        components = subOid;
-        componentCount = subLength;
-    }
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/agent/SnmpErrorHandlerAgent.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,214 +0,0 @@
-/*
- * Copyright (c) 2001, 2013, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.jmx.snmp.agent;
-
-import java.io.Serializable;
-import java.util.Enumeration;
-import java.util.logging.Level;
-
-import javax.management.ObjectName;
-import javax.management.MBeanServer;
-
-import static com.sun.jmx.defaults.JmxProperties.SNMP_ADAPTOR_LOGGER;
-import com.sun.jmx.snmp.SnmpStatusException;
-import com.sun.jmx.snmp.SnmpDefinitions;
-import com.sun.jmx.snmp.SnmpVarBind;
-
-/**
- * A simple MIB agent that implements SNMP calls (get, set, getnext and getbulk) in a way that only errors or exceptions are returned. Every call done on this agent fails. Error handling is done according to the manager's SNMP protocol version.
- * <P>It is used by <CODE>SnmpAdaptorServer</CODE> for its default agent behavior. When a received Oid doesn't match, this agent is called to fill the result list with errors.</P>
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- * @since 1.5
- *
- */
-
-public class SnmpErrorHandlerAgent extends SnmpMibAgent
-        implements Serializable {
-    private static final long serialVersionUID = 7751082923508885650L;
-
-    public SnmpErrorHandlerAgent() {}
-
-    /**
-     * Initializes the MIB (with no registration of the MBeans into the
-     * MBean server). Does nothing.
-     *
-     * @exception IllegalAccessException The MIB cannot be initialized.
-     */
-
-    @Override
-    public void init() throws IllegalAccessException {
-    }
-
-    /**
-     * Initializes the MIB but each single MBean representing the MIB
-     * is inserted into the MBean server.
-     *
-     * @param server The MBean server to register the service with.
-     * @param name The object name.
-     *
-     * @return The passed name parameter.
-     *
-     * @exception java.lang.Exception
-     */
-
-    @Override
-    public ObjectName preRegister(MBeanServer server, ObjectName name)
-        throws Exception {
-        return name;
-    }
-
-    /**
-     * Gets the root object identifier of the MIB.
-     * <P>The root object identifier is the object identifier uniquely
-     * identifying the MIB.
-     *
-     * @return The returned oid is null.
-     */
-
-    @Override
-    public long[] getRootOid() {
-        return null;
-    }
-
-    /**
-     * Processes a <CODE>get</CODE> operation. It will throw an exception for V1 requests or it will set exceptions within the list for V2 requests.
-     *
-     * @param inRequest The SnmpMibRequest object holding the list of variable to be retrieved.
-     *
-     * @exception SnmpStatusException An error occurred during the operation.
-     */
-
-    @Override
-    public void get(SnmpMibRequest inRequest) throws SnmpStatusException {
-
-        SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
-                SnmpErrorHandlerAgent.class.getName(),
-                "get", "Get in Exception");
-
-        if(inRequest.getVersion() == SnmpDefinitions.snmpVersionOne)
-            throw new SnmpStatusException(SnmpStatusException.noSuchName);
-
-        Enumeration<SnmpVarBind> l = inRequest.getElements();
-        while(l.hasMoreElements()) {
-            SnmpVarBind varbind = l.nextElement();
-            varbind.setNoSuchObject();
-        }
-    }
-
-    /**
-     * Checks if a <CODE>set</CODE> operation can be performed.
-     * If the operation can not be performed, the method should emit a
-     * <CODE>SnmpStatusException</CODE>.
-     *
-     * @param inRequest The SnmpMibRequest object holding the list of variables to
-     *            be set. This list is composed of
-     *            <CODE>SnmpVarBind</CODE> objects.
-     *
-     * @exception SnmpStatusException The <CODE>set</CODE> operation
-     *    cannot be performed.
-     */
-
-    @Override
-    public void check(SnmpMibRequest inRequest) throws SnmpStatusException {
-
-        SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
-                SnmpErrorHandlerAgent.class.getName(),
-                "check", "Check in Exception");
-
-        throw new SnmpStatusException(SnmpDefinitions.snmpRspNotWritable);
-    }
-
-    /**
-     * Processes a <CODE>set</CODE> operation. Should never be called (check previously called having failed).
-     *
-     * @param inRequest The SnmpMibRequest object holding the list of variable to be set.
-     *
-     * @exception SnmpStatusException An error occurred during the operation.
-     */
-
-    @Override
-    public void set(SnmpMibRequest inRequest) throws SnmpStatusException {
-
-        SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
-                SnmpErrorHandlerAgent.class.getName(),
-                "set", "Set in Exception, CANNOT be called");
-
-        throw new SnmpStatusException(SnmpDefinitions.snmpRspNotWritable);
-    }
-
-    /**
-     * Processes a <CODE>getNext</CODE> operation. It will throw an exception for V1 requests or it will set exceptions within the list for V2 requests..
-     *
-     * @param inRequest The SnmpMibRequest object holding the list of variables to be retrieved.
-     *
-     * @exception SnmpStatusException An error occurred during the operation.
-     */
-
-    @Override
-    public void getNext(SnmpMibRequest inRequest) throws SnmpStatusException {
-
-        SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
-                SnmpErrorHandlerAgent.class.getName(),
-                "getNext", "GetNext in Exception");
-
-        if(inRequest.getVersion() == SnmpDefinitions.snmpVersionOne)
-            throw new SnmpStatusException(SnmpStatusException.noSuchName);
-
-        Enumeration<SnmpVarBind> l = inRequest.getElements();
-        while(l.hasMoreElements()) {
-            SnmpVarBind varbind = l.nextElement();
-            varbind.setEndOfMibView();
-        }
-    }
-
-    /**
-     * Processes a <CODE>getBulk</CODE> operation. It will throw an exception if the request is a V1 one or it will set exceptions within the list for V2 ones.
-     *
-     * @param inRequest The SnmpMibRequest object holding the list of variable to be retrieved.
-     *
-     * @exception SnmpStatusException An error occurred during the operation.
-     */
-
-    @Override
-    public void getBulk(SnmpMibRequest inRequest, int nonRepeat, int maxRepeat)
-        throws SnmpStatusException {
-
-        SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
-                SnmpErrorHandlerAgent.class.getName(),
-                "getBulk", "GetBulk in Exception");
-
-        if(inRequest.getVersion() == SnmpDefinitions.snmpVersionOne)
-            throw new SnmpStatusException(SnmpDefinitions.snmpRspGenErr, 0);
-
-        Enumeration<SnmpVarBind> l = inRequest.getElements();
-        while(l.hasMoreElements()) {
-            SnmpVarBind varbind = l.nextElement();
-            varbind.setEndOfMibView();
-        }
-    }
-
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/agent/SnmpGenericMetaServer.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,132 +0,0 @@
-/*
- * Copyright (c) 2000, 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.jmx.snmp.agent;
-
-// jmx imports
-//
-import com.sun.jmx.snmp.SnmpValue;
-import com.sun.jmx.snmp.SnmpStatusException;
-
-/**
- * <p>
- * This interface defines the methods that must be implemented by an
- * SNMP metadata object that needs to interact with an
- * {@link com.sun.jmx.snmp.agent.SnmpGenericObjectServer} object.
- * </p>
- *
- * <p>
- * All these methods are usually generated by <code>mibgen</code> when
- * run in generic-metadata mode.
- * </p>
- *
- * <p><b><i>
- * This interface is used internally between the generated Metadata and
- * the SNMP runtime and you shouldn't need to worry about it, because
- * you will never have to use it directly.
- * </b></i></p>
- *
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- **/
-public interface SnmpGenericMetaServer {
-
-    /**
-     * Construct an attribute value (as returned by Attribute::getValue())
-     * from an SnmpValue. The returned attribute value can be used to
-     * construct an Attribute object.
-     *
-     * @param id The OID arc identifying the variable for which the
-     *           value is constructed.
-     * @param value The SnmpValue from which the Attribute::value will be
-     *              constructed.
-     * @return The attribute value built from the given <code>value</code>.
-     * @exception SnmpStatusException if the attribute value cannot be built
-     *            from the given SnmpValue <code>value</code>.
-     *
-     */
-    Object buildAttributeValue(long id, SnmpValue value)
-        throws SnmpStatusException;
-
-    /**
-     * Construct an SnmpValue from an Attribute value as returned by
-     * Attribute::getValue().
-     *
-     * @param id The OID arc identifying the variable for which the
-     *           value is constructed.
-     * @param value The attribute value as returned by Attribute::getValue().
-     *
-     * @return The SnmpValue built from the given <code>value</code>.
-     * @exception SnmpStatusException if the SnmpValue cannot be built from
-     *            the given <code>value</code>.
-     **/
-    SnmpValue buildSnmpValue(long id, Object value)
-        throws SnmpStatusException;
-
-    /**
-     * Return the name of the attribute corresponding to the
-     * SNMP variable identified by the given <code>id</code>.
-     *
-     * @param id The OID arc identifying the variable.
-     *
-     * @return The name of the variable identified by the given
-     *         <code>id</code>.
-     *
-     * @exception SnmpStatusException if the given <code>id</code> does not
-     *            correspond to a known variable.
-     */
-    String getAttributeName(long id)
-        throws SnmpStatusException;
-
-    /**
-     * Check the access rights for a SET operation.
-     *
-     * @param x  The new requested value.
-     * @param id The OID arc identifying the variable for which the SET is
-     *           requested.
-     * @param data A contextual object containing user-data.
-     *           This object is allocated through the <code>
-     *           {@link com.sun.jmx.snmp.agent.SnmpUserDataFactory}</code>
-     *           for each incoming SNMP request.
-     * @exception SnmpStatusException if the SET operation must be rejected.
-     */
-    void checkSetAccess(SnmpValue x, long id, Object data)
-        throws SnmpStatusException;
-
-    /**
-     * Check the access rights for a GET operation.
-     *
-     * @param id The OID arc identifying the variable for which the SET is
-     *           requested.
-     * @param data A contextual object containing user-data.
-     *           This object is allocated through the <code>
-     *           {@link com.sun.jmx.snmp.agent.SnmpUserDataFactory}</code>
-     *           for each incoming SNMP request.
-     * @exception SnmpStatusException if the SET operation must be rejected.
-     */
-    void checkGetAccess(long id, Object data)
-        throws SnmpStatusException;
-
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/agent/SnmpGenericObjectServer.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,572 +0,0 @@
-/*
- * 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.jmx.snmp.agent;
-
-
-// java imports
-//
-import java.util.Enumeration;
-import java.util.Iterator;
-
-// jmx imports
-//
-import javax.management.AttributeList;
-import javax.management.Attribute;
-import javax.management.MBeanException;
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-import javax.management.ReflectionException;
-import javax.management.InstanceNotFoundException;
-import javax.management.InvalidAttributeValueException;
-import javax.management.InstanceAlreadyExistsException;
-import javax.management.MBeanRegistrationException;
-import javax.management.NotCompliantMBeanException;
-import javax.management.RuntimeOperationsException;
-import com.sun.jmx.snmp.SnmpOid;
-import com.sun.jmx.snmp.SnmpValue;
-import com.sun.jmx.snmp.SnmpVarBind;
-import com.sun.jmx.snmp.SnmpStatusException;
-
-
-/**
- * <p>
- * This class is a utility class that transforms SNMP GET / SET requests
- * into standard JMX getAttributes() setAttributes() requests.
- * </p>
- *
- * <p>
- * The transformation relies on the metadata information provided by the
- * {@link com.sun.jmx.snmp.agent.SnmpGenericMetaServer} object which is
- * passed as the first parameter to every method. This SnmpGenericMetaServer
- * object is usually a Metadata object generated by <code>mibgen</code>.
- * </p>
- *
- * <p><b><i>
- * This class is used internally by mibgen generated metadata objects and
- * you should never need to use it directly.
- * </b></i></p>
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- **/
-
-public class SnmpGenericObjectServer {
-
-    // ----------------------------------------------------------------------
-    //
-    //    Protected variables
-    //
-    // ----------------------------------------------------------------------
-
-    /**
-     * The MBean server through which the MBeans will be accessed.
-     **/
-    protected final MBeanServer server;
-
-    // ----------------------------------------------------------------------
-    //
-    // Constructors
-    //
-    // ----------------------------------------------------------------------
-
-    /**
-     * Builds a new SnmpGenericObjectServer. Usually there will be a single
-     * object of this type per MIB.
-     *
-     * @param server The MBeanServer in which the MBean accessed by this
-     *               MIB are registered.
-     **/
-    public SnmpGenericObjectServer(MBeanServer server) {
-        this.server = server;
-    }
-
-    /**
-     * Execute an SNMP GET request.
-     *
-     * <p>
-     * This method first builds the list of attributes that need to be
-     * retrieved from the MBean and then calls getAttributes() on the
-     * MBean server. Then it updates the SnmpMibSubRequest with the values
-     * retrieved from the MBean.
-     * </p>
-     *
-     * <p>
-     * The SNMP metadata information is obtained through the given
-     * <code>meta</code> object, which usually is an instance of a
-     * <code>mibgen</code> generated class.
-     * </p>
-     *
-     * <p><b><i>
-     * This method is called internally by <code>mibgen</code> generated
-     * objects and you should never need to call it directly.
-     * </i></b></p>
-     *
-     * @param meta  The metadata object impacted by the subrequest
-     * @param name  The ObjectName of the MBean impacted by this subrequest
-     * @param req   The SNMP subrequest to execute on the MBean
-     * @param depth The depth of the SNMP object in the OID tree.
-     *
-     * @exception SnmpStatusException whenever an SNMP exception must be
-     *      raised. Raising an exception will abort the request.<br>
-     *      Exceptions should never be raised directly, but only by means of
-     * <code>
-     * req.registerGetException(<i>VariableId</i>,<i>SnmpStatusException</i>)
-     * </code>
-     **/
-    public void get(SnmpGenericMetaServer meta, ObjectName name,
-                    SnmpMibSubRequest req, int depth)
-        throws SnmpStatusException {
-
-        // java.lang.System.out.println(">>>>>>>>> GET " + name);
-
-        final int           size     = req.getSize();
-        final Object        data     = req.getUserData();
-        final String[]      nameList = new String[size];
-        final SnmpVarBind[] varList  = new SnmpVarBind[size];
-        final long[]        idList   = new long[size];
-        int   i = 0;
-
-        for (Enumeration<SnmpVarBind> e=req.getElements(); e.hasMoreElements();) {
-            final SnmpVarBind var= e.nextElement();
-            try {
-                final long id = var.oid.getOidArc(depth);
-                nameList[i]   = meta.getAttributeName(id);
-                varList[i]    = var;
-                idList[i]     = id;
-
-                // Check the access rights according to the MIB.
-                // The MBean might be less restrictive (have a getter
-                // while the MIB defines the variable as AFN)
-                //
-                meta.checkGetAccess(id,data);
-
-                //java.lang.System.out.println(nameList[i] + " added.");
-                i++;
-            } catch(SnmpStatusException x) {
-                //java.lang.System.out.println("exception for " + nameList[i]);
-                //x.printStackTrace();
-                req.registerGetException(var,x);
-            }
-        }
-
-        AttributeList result = null;
-        int errorCode = SnmpStatusException.noSuchInstance;
-
-        try {
-            result = server.getAttributes(name,nameList);
-        } catch (InstanceNotFoundException f) {
-            //java.lang.System.out.println(name + ": instance not found.");
-            //f.printStackTrace();
-            result = new AttributeList();
-        } catch (ReflectionException r) {
-            //java.lang.System.out.println(name + ": reflexion error.");
-            //r.printStackTrace();
-            result = new AttributeList();
-        } catch (Exception x) {
-            result = new AttributeList();
-        }
-
-
-        final Iterator<?> it = result.iterator();
-
-        for (int j=0; j < i; j++) {
-            if (!it.hasNext()) {
-                //java.lang.System.out.println(name + "variable[" + j +
-                //                           "] absent");
-                final SnmpStatusException x =
-                    new SnmpStatusException(errorCode);
-                req.registerGetException(varList[j],x);
-                continue;
-            }
-
-            final Attribute att = (Attribute) it.next();
-
-            while ((j < i) && (! nameList[j].equals(att.getName()))) {
-                //java.lang.System.out.println(name + "variable[" +j +
-                //                           "] not found");
-                final SnmpStatusException x =
-                    new SnmpStatusException(errorCode);
-                req.registerGetException(varList[j],x);
-                j++;
-            }
-
-            if ( j == i) break;
-
-            try {
-                varList[j].value =
-                    meta.buildSnmpValue(idList[j],att.getValue());
-            } catch (SnmpStatusException x) {
-                req.registerGetException(varList[j],x);
-            }
-            //java.lang.System.out.println(att.getName() + " retrieved.");
-        }
-        //java.lang.System.out.println(">>>>>>>>> END GET");
-    }
-
-    /**
-     * Get the value of an SNMP variable.
-     *
-     * <p><b><i>
-     * You should never need to use this method directly.
-     * </i></b></p>
-     *
-     * @param meta  The impacted metadata object
-     * @param name  The ObjectName of the impacted MBean
-     * @param id    The OID arc identifying the variable we're trying to set.
-     * @param data  User contextual data allocated through the
-     *        {@link com.sun.jmx.snmp.agent.SnmpUserDataFactory}
-     *
-     * @return The value of the variable.
-     *
-     * @exception SnmpStatusException whenever an SNMP exception must be
-     *      raised. Raising an exception will abort the request. <br>
-     *      Exceptions should never be raised directly, but only by means of
-     * <code>
-     * req.registerGetException(<i>VariableId</i>,<i>SnmpStatusException</i>)
-     * </code>
-     **/
-    public SnmpValue get(SnmpGenericMetaServer meta, ObjectName name,
-                         long id, Object data)
-        throws SnmpStatusException {
-        final String attname = meta.getAttributeName(id);
-        Object result = null;
-
-        try {
-            result = server.getAttribute(name,attname);
-        } catch (MBeanException m) {
-            Exception t = m.getTargetException();
-            if (t instanceof SnmpStatusException)
-                throw (SnmpStatusException) t;
-            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-        } catch (Exception e) {
-            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-        }
-
-        return meta.buildSnmpValue(id,result);
-    }
-
-    /**
-     * Execute an SNMP SET request.
-     *
-     * <p>
-     * This method first builds the list of attributes that need to be
-     * set on the MBean and then calls setAttributes() on the
-     * MBean server. Then it updates the SnmpMibSubRequest with the new
-     * values retrieved from the MBean.
-     * </p>
-     *
-     * <p>
-     * The SNMP metadata information is obtained through the given
-     * <code>meta</code> object, which usually is an instance of a
-     * <code>mibgen</code> generated class.
-     * </p>
-     *
-     * <p><b><i>
-     * This method is called internally by <code>mibgen</code> generated
-     * objects and you should never need to call it directly.
-     * </i></b></p>
-     *
-     * @param meta  The metadata object impacted by the subrequest
-     * @param name  The ObjectName of the MBean impacted by this subrequest
-     * @param req   The SNMP subrequest to execute on the MBean
-     * @param depth The depth of the SNMP object in the OID tree.
-     *
-     * @exception SnmpStatusException whenever an SNMP exception must be
-     *      raised. Raising an exception will abort the request. <br>
-     *      Exceptions should never be raised directly, but only by means of
-     * <code>
-     * req.registerGetException(<i>VariableId</i>,<i>SnmpStatusException</i>)
-     * </code>
-     **/
-    public void set(SnmpGenericMetaServer meta, ObjectName name,
-                    SnmpMibSubRequest req, int depth)
-        throws SnmpStatusException {
-
-        final int size               = req.getSize();
-        final AttributeList attList  = new AttributeList(size);
-        final String[]      nameList = new String[size];
-        final SnmpVarBind[] varList  = new SnmpVarBind[size];
-        final long[]        idList   = new long[size];
-        int   i = 0;
-
-        for (Enumeration<SnmpVarBind> e=req.getElements(); e.hasMoreElements();) {
-            final SnmpVarBind var= e.nextElement();
-            try {
-                final long id = var.oid.getOidArc(depth);
-                final String attname = meta.getAttributeName(id);
-                final Object attvalue=
-                    meta.buildAttributeValue(id,var.value);
-                final Attribute att = new Attribute(attname,attvalue);
-                attList.add(att);
-                nameList[i]   = attname;
-                varList[i]    = var;
-                idList[i]     = id;
-                i++;
-            } catch(SnmpStatusException x) {
-                req.registerSetException(var,x);
-            }
-        }
-
-        AttributeList result;
-        int errorCode = SnmpStatusException.noAccess;
-
-        try {
-            result = server.setAttributes(name,attList);
-        } catch (InstanceNotFoundException f) {
-            result = new AttributeList();
-            errorCode = SnmpStatusException.snmpRspInconsistentName;
-        } catch (ReflectionException r) {
-            errorCode = SnmpStatusException.snmpRspInconsistentName;
-            result = new AttributeList();
-        } catch (Exception x) {
-            result = new AttributeList();
-        }
-
-        final Iterator<?> it = result.iterator();
-
-        for (int j=0; j < i; j++) {
-            if (!it.hasNext()) {
-                final SnmpStatusException x =
-                    new SnmpStatusException(errorCode);
-                req.registerSetException(varList[j],x);
-                continue;
-            }
-
-            final Attribute att = (Attribute) it.next();
-
-            while ((j < i) && (! nameList[j].equals(att.getName()))) {
-                final SnmpStatusException x =
-                    new SnmpStatusException(SnmpStatusException.noAccess);
-                req.registerSetException(varList[j],x);
-                j++;
-            }
-
-            if ( j == i) break;
-
-            try {
-                varList[j].value =
-                    meta.buildSnmpValue(idList[j],att.getValue());
-            } catch (SnmpStatusException x) {
-                req.registerSetException(varList[j],x);
-            }
-
-        }
-    }
-
-    /**
-     * Set the value of an SNMP variable.
-     *
-     * <p><b><i>
-     * You should never need to use this method directly.
-     * </i></b></p>
-     *
-     * @param meta  The impacted metadata object
-     * @param name  The ObjectName of the impacted MBean
-     * @param x     The new requested SnmpValue
-     * @param id    The OID arc identifying the variable we're trying to set.
-     * @param data  User contextual data allocated through the
-     *        {@link com.sun.jmx.snmp.agent.SnmpUserDataFactory}
-     *
-     * @return The new value of the variable after the operation.
-     *
-     * @exception SnmpStatusException whenever an SNMP exception must be
-     *      raised. Raising an exception will abort the request. <br>
-     *      Exceptions should never be raised directly, but only by means of
-     * <code>
-     * req.registerSetException(<i>VariableId</i>,<i>SnmpStatusException</i>)
-     * </code>
-     **/
-    public SnmpValue set(SnmpGenericMetaServer meta, ObjectName name,
-                         SnmpValue x, long id, Object data)
-        throws SnmpStatusException {
-        final String attname = meta.getAttributeName(id);
-        final Object attvalue=
-            meta.buildAttributeValue(id,x);
-        final Attribute att = new Attribute(attname,attvalue);
-
-        Object result = null;
-
-        try {
-            server.setAttribute(name,att);
-            result = server.getAttribute(name,attname);
-        } catch(InvalidAttributeValueException iv) {
-            throw new
-                SnmpStatusException(SnmpStatusException.snmpRspWrongValue);
-        } catch (InstanceNotFoundException f) {
-            throw new
-                SnmpStatusException(SnmpStatusException.snmpRspInconsistentName);
-        } catch (ReflectionException r) {
-            throw new
-                SnmpStatusException(SnmpStatusException.snmpRspInconsistentName);
-        } catch (MBeanException m) {
-            Exception t = m.getTargetException();
-            if (t instanceof SnmpStatusException)
-                throw (SnmpStatusException) t;
-            throw new
-                SnmpStatusException(SnmpStatusException.noAccess);
-        } catch (Exception e) {
-            throw new
-                SnmpStatusException(SnmpStatusException.noAccess);
-        }
-
-        return meta.buildSnmpValue(id,result);
-    }
-
-    /**
-     * Checks whether an SNMP SET request can be successfully performed.
-     *
-     * <p>
-     * For each variable in the subrequest, this method calls
-     * checkSetAccess() on the meta object, and then tries to invoke the
-     * check<i>AttributeName</i>() method on the MBean. If this method
-     * is not defined then it is assumed that the SET won't fail.
-     * </p>
-     *
-     * <p><b><i>
-     * This method is called internally by <code>mibgen</code> generated
-     * objects and you should never need to call it directly.
-     * </i></b></p>
-     *
-     * @param meta  The metadata object impacted by the subrequest
-     * @param name  The ObjectName of the MBean impacted by this subrequest
-     * @param req   The SNMP subrequest to execute on the MBean
-     * @param depth The depth of the SNMP object in the OID tree.
-     *
-     * @exception SnmpStatusException if the requested SET operation must
-     *      be rejected. Raising an exception will abort the request. <br>
-     *      Exceptions should never be raised directly, but only by means of
-     * <code>
-     * req.registerCheckException(<i>VariableId</i>,<i>SnmpStatusException</i>)
-     * </code>
-     *
-     **/
-    public void check(SnmpGenericMetaServer meta, ObjectName name,
-                      SnmpMibSubRequest req, int depth)
-        throws SnmpStatusException {
-
-        final Object data = req.getUserData();
-
-        for (Enumeration<SnmpVarBind> e=req.getElements(); e.hasMoreElements();) {
-            final SnmpVarBind var= e.nextElement();
-            try {
-                final long id = var.oid.getOidArc(depth);
-                // call meta.check() here, and meta.check will call check()
-                check(meta,name,var.value,id,data);
-            } catch(SnmpStatusException x) {
-                req.registerCheckException(var,x);
-            }
-        }
-    }
-
-    /**
-     * Checks whether a SET operation can be performed on a given SNMP
-     * variable.
-     *
-     * @param meta  The impacted metadata object
-     * @param name  The ObjectName of the impacted MBean
-     * @param x     The new requested SnmpValue
-     * @param id    The OID arc identifying the variable we're trying to set.
-     * @param data  User contextual data allocated through the
-     *        {@link com.sun.jmx.snmp.agent.SnmpUserDataFactory}
-     *
-     * <p>
-     * This method calls checkSetAccess() on the meta object, and then
-     * tries to invoke the check<i>AttributeName</i>() method on the MBean.
-     * If this method is not defined then it is assumed that the SET
-     * won't fail.
-     * </p>
-     *
-     * <p><b><i>
-     * This method is called internally by <code>mibgen</code> generated
-     * objects and you should never need to call it directly.
-     * </i></b></p>
-     *
-     * @exception SnmpStatusException if the requested SET operation must
-     *      be rejected. Raising an exception will abort the request. <br>
-     *      Exceptions should never be raised directly, but only by means of
-     * <code>
-     * req.registerCheckException(<i>VariableId</i>,<i>SnmpStatusException</i>)
-     * </code>
-     *
-     **/
-    // XXX xxx ZZZ zzz Maybe we should go through the MBeanInfo here?
-    public void check(SnmpGenericMetaServer meta, ObjectName name,
-                      SnmpValue x, long id, Object data)
-        throws SnmpStatusException {
-
-        meta.checkSetAccess(x,id,data);
-        try {
-            final String attname = meta.getAttributeName(id);
-            final Object attvalue= meta.buildAttributeValue(id,x);
-            final  Object[] params = new Object[1];
-            final  String[] signature = new String[1];
-
-            params[0]    = attvalue;
-            signature[0] = attvalue.getClass().getName();
-            server.invoke(name,"check"+attname,params,signature);
-
-        } catch( SnmpStatusException e) {
-            throw e;
-        }
-        catch (InstanceNotFoundException i) {
-            throw new
-                SnmpStatusException(SnmpStatusException.snmpRspInconsistentName);
-        } catch (ReflectionException r) {
-            // checkXXXX() not defined => do nothing
-        } catch (MBeanException m) {
-            Exception t = m.getTargetException();
-            if (t instanceof SnmpStatusException)
-                throw (SnmpStatusException) t;
-            throw new SnmpStatusException(SnmpStatusException.noAccess);
-        } catch (Exception e) {
-            throw new
-                SnmpStatusException(SnmpStatusException.noAccess);
-        }
-    }
-
-    public void registerTableEntry(SnmpMibTable meta, SnmpOid rowOid,
-                                   ObjectName objname, Object entry)
-        throws SnmpStatusException {
-        if (objname == null)
-           throw new
-             SnmpStatusException(SnmpStatusException.snmpRspInconsistentName);
-        try  {
-            if (entry != null && !server.isRegistered(objname))
-                server.registerMBean(entry, objname);
-        } catch (InstanceAlreadyExistsException e) {
-            throw new
-              SnmpStatusException(SnmpStatusException.snmpRspInconsistentName);
-        } catch (MBeanRegistrationException e) {
-            throw new SnmpStatusException(SnmpStatusException.snmpRspNoAccess);
-        } catch (NotCompliantMBeanException e) {
-            throw new SnmpStatusException(SnmpStatusException.snmpRspGenErr);
-        } catch (RuntimeOperationsException e) {
-            throw new SnmpStatusException(SnmpStatusException.snmpRspGenErr);
-        } catch(Exception e) {
-            throw new SnmpStatusException(SnmpStatusException.snmpRspGenErr);
-        }
-    }
-
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/agent/SnmpIndex.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,191 +0,0 @@
-/*
- * Copyright (c) 1997, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-package com.sun.jmx.snmp.agent;
-
-
-
-// java imports
-//
-import java.io.Serializable;
-import java.util.Vector;
-import java.util.Enumeration;
-
-// jmx imports
-//
-import com.sun.jmx.snmp.SnmpOid;
-
-/**
- * Represents a SNMP index.
- * An <CODE>SnmpIndex</CODE> is represented as a <CODE>Vector</CODE> of <CODE>SnmpOid</CODE>.
- * <P>
- * This class is used internally and by the classes generated by <CODE>mibgen</CODE>.
- * You should not need to use this class directly.
- *
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- */
-
-public class SnmpIndex implements Serializable {
-    private static final long serialVersionUID = 8712159739982192146L;
-
-    /**
-     * Initializes an <CODE>SnmpIndex</CODE> using a vector of object identifiers.
-     * <P>Following the RFC recommendations, every syntax that is used as a
-     * table index should have an object identifier representation. There are
-     * some guidelines on how to map the different syntaxes into an object identifier.
-     * In the different <CODE>SnmpValue</CODE> classes provided, there is a <CODE>toOid</CODE> method to get
-     * the object identifier of the value.
-     *
-     * @param oidList The list of Object Identifiers.
-     */
-    public SnmpIndex(SnmpOid[] oidList) {
-        size= oidList.length;
-        for(int i= 0; i <size; i++) {
-            // The order is important ...
-            //
-            oids.addElement(oidList[i]);
-        }
-    }
-
-    /**
-     * Initializes an <CODE>SnmpIndex</CODE> using the specified Object Identifier.
-     *
-     * @param oid The Object Identifier.
-     */
-    public SnmpIndex(SnmpOid oid) {
-        oids.addElement(oid);
-        size= 1;
-    }
-
-    /**
-     * Gets the number of Object Identifiers the index is made of.
-     *
-     * @return The number of Object Identifiers.
-     */
-    public int getNbComponents() {
-        return size;
-    }
-
-    /**
-     * Gets the index as a vector of Object Identifiers.
-     *
-     * @return The index as a vector.
-     */
-    public Vector<SnmpOid> getComponents() {
-        return oids;
-    }
-
-    /**
-     * Compares two indexes for equality.
-     *
-     * @param index The index to compare <CODE>this</CODE> with.
-     *
-     * @return <CODE>true</CODE> if the two indexes are equal, <CODE>false</CODE> otherwise.
-     */
-    public boolean equals(SnmpIndex index) {
-
-        if (size != index.getNbComponents())
-            return false;
-
-        // The two vectors have the same length.
-        // Compare each single element ...
-        //
-        SnmpOid oid1;
-        SnmpOid oid2;
-        Vector<SnmpOid> components= index.getComponents();
-        for(int i=0; i <size; i++) {
-            oid1= oids.elementAt(i);
-            oid2= components.elementAt(i);
-            if (oid1.equals(oid2) == false)
-                return false;
-        }
-        return true;
-    }
-
-    /**
-     * Compares two indexes.
-     *
-     * @param index The index to compare <CODE>this</CODE> with.
-     *
-     * @return The value 0 if the two OID vectors have the same elements, another value otherwise.
-     */
-    public int compareTo(SnmpIndex index) {
-
-        int length= index.getNbComponents();
-        Vector<SnmpOid> components= index.getComponents();
-        SnmpOid oid1;
-        SnmpOid oid2;
-        int comp;
-        for(int i=0; i < size; i++) {
-            if ( i > length) {
-                // There is no more element in the index
-                //
-                return 1;
-            }
-            // Access the element ...
-            //
-            oid1= oids.elementAt(i);
-            oid2= components.elementAt(i);
-            comp= oid1.compareTo(oid2);
-            if (comp == 0)
-                continue;
-            return comp;
-        }
-        return 0;
-    }
-
-    /**
-     * Returns a <CODE>String</CODE> representation of the index.
-     * The different elements are separated by "//".
-     *
-     * @return A string representation of the index.
-     */
-    @Override
-    public String toString() {
-        final StringBuilder msg= new StringBuilder();
-        for(Enumeration<SnmpOid> e= oids.elements(); e.hasMoreElements(); ) {
-            SnmpOid val= e.nextElement();
-            msg.append("//").append( val.toString());
-        }
-        return msg.toString();
-    }
-
-    // PRIVATE VARIABLES
-    //------------------
-
-    /**
-     * The list of OIDs.
-     * @serial
-     */
-    private Vector<SnmpOid> oids = new Vector<>();
-
-    /**
-     * The number of elements in the index.
-     * @serial
-     */
-    private int size = 0;
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/agent/SnmpMib.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,738 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.jmx.snmp.agent;
-
-import java.io.Serializable;
-import java.util.Enumeration;
-import java.util.logging.Level;
-import java.util.Vector;
-
-import javax.management.ObjectName;
-import javax.management.MBeanServer;
-import javax.management.MalformedObjectNameException;
-import javax.management.InstanceAlreadyExistsException;
-import javax.management.MBeanRegistrationException;
-import javax.management.NotCompliantMBeanException;
-
-import static com.sun.jmx.defaults.JmxProperties.SNMP_ADAPTOR_LOGGER;
-import com.sun.jmx.snmp.SnmpOid;
-import com.sun.jmx.snmp.SnmpVarBind;
-import com.sun.jmx.snmp.SnmpDefinitions;
-import com.sun.jmx.snmp.SnmpStatusException;
-
-/**
- * Abstract class for representing an SNMP MIB.
- * <P>
- * When compiling a SNMP MIB, among all the classes generated by
- * <CODE>mibgen</CODE>, there is one which extends <CODE>SnmpMib</CODE>
- * for representing a whole MIB.
- * <BR>The class is used by the SNMP protocol adaptor as the entry point in
- * the MIB.
- *
- * <p>This generated class can be subclassed in your code in order to
- * plug in your own specific behaviour.
- * </p>
- *
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- */
-@SuppressWarnings("serial") // JDK implementation class
-public abstract class SnmpMib extends SnmpMibAgent implements Serializable {
-
-    /**
-     * Default constructor.
-     * Initializes the OID tree.
-     */
-    public SnmpMib() {
-        root= new SnmpMibOid();
-    }
-
-
-    // --------------------------------------------------------------------
-    // POLYMORHIC METHODS
-    // --------------------------------------------------------------------
-
-    /**
-     * <p>
-     * This callback should return the OID associated to the group
-     * identified by the given <code>groupName</code>.
-     * </p>
-     *
-     * <p>
-     * This method is provided as a hook to plug-in some custom
-     * specific behavior. Although doing so is discouraged you might
-     * want to subclass this method in order to store & provide more metadata
-     * information (mapping OID <-> symbolic name) within the agent,
-     * or to "change" the root of the MIB OID by prefixing the
-     * defaultOid by an application dependant OID string, for instance.
-     * </p>
-     *
-     * <p>
-     * The default implementation of this method is to return the given
-     * <code>defaultOid</code>
-     * </p>
-     *
-     * @param groupName   The java-ized name of the SNMP group.
-     * @param defaultOid  The OID defined in the MIB for that group
-     *                    (in dot notation).
-     *
-     * @return The OID of the group identified by <code>groupName</code>,
-     *         in dot-notation.
-     */
-    protected String getGroupOid(String groupName, String defaultOid) {
-        return defaultOid;
-    }
-
-    /**
-     * <p>
-     * This callback should return the ObjectName associated to the
-     * group identified by the given <code>groupName</code>.
-     * </p>
-     *
-     * <p>
-     * This method is provided as a hook to plug-in some custom
-     * specific behavior. You might want to override this method
-     * in order to provide a different object naming scheme than
-     * that proposed by default by <code>mibgen</code>.
-     * </p>
-     *
-     * <p>
-     * This method is only meaningful if the MIB is registered
-     * in the MBeanServer, otherwise, it will not be called.
-     * </p>
-     *
-     * <p>
-     * The default implementation of this method is to return an ObjectName
-     * built from the given <code>defaultName</code>.
-     * </p>
-     *
-     * @param name  The java-ized name of the SNMP group.
-     * @param oid   The OID returned by getGroupOid() - in dot notation.
-     * @param defaultName The name by default generated by <code>
-     *                    mibgen</code>
-     *
-     * @return The ObjectName of the group identified by <code>name</code>
-     */
-    protected ObjectName getGroupObjectName(String name, String oid,
-                                            String defaultName)
-        throws MalformedObjectNameException {
-        return new ObjectName(defaultName);
-    }
-
-    /**
-     * <p>
-     * Register an SNMP group and its metadata node in the MIB.
-     * </p>
-     *
-     * <p>
-     * This method is provided as a hook to plug-in some custom
-     * specific behavior. You might want to override this method
-     * if you want to set special links between the MBean, its metadata
-     * node, its OID or ObjectName etc..
-     * </p>
-     *
-     * <p>
-     * If the MIB is not registered in the MBeanServer, the <code>
-     * server</code> and <code>groupObjName</code> parameters will be
-     * <code>null</code>.<br>
-     * If the given group MBean is not <code>null</code>, and if the
-     * <code>server</code> and <code>groupObjName</code> parameters are
-     * not null, then this method will also automatically register the
-     * group MBean with the given MBeanServer <code>server</code>.
-     * </p>
-     *
-     * @param groupName  The java-ized name of the SNMP group.
-     * @param groupOid   The OID as returned by getGroupOid() - in dot
-     *                   notation.
-     * @param groupObjName The ObjectName as returned by getGroupObjectName().
-     *                   This parameter may be <code>null</code> if the
-     *                   MIB is not registered in the MBeanServer.
-     * @param node       The metadata node, as returned by the metadata
-     *                   factory method for this group.
-     * @param group      The MBean for this group, as returned by the
-     *                   MBean factory method for this group.
-     * @param server     The MBeanServer in which the groups are to be
-     *                   registered. This parameter will be <code>null</code>
-     *                   if the MIB is not registered, otherwise it is a
-     *                   reference to the MBeanServer in which the MIB is
-     *                   registered.
-     *
-     */
-    protected void registerGroupNode(String groupName,   String groupOid,
-                                     ObjectName groupObjName, SnmpMibNode node,
-                                     Object group, MBeanServer server)
-        throws NotCompliantMBeanException, MBeanRegistrationException,
-        InstanceAlreadyExistsException, IllegalAccessException {
-        root.registerNode(groupOid,node);
-        if (server != null && groupObjName != null && group != null)
-            server.registerMBean(group,groupObjName);
-    }
-
-    /**
-     * <p>
-     * Register an SNMP Table metadata node in the MIB.
-     * </p>
-     *
-     * <p>
-     * <b><i>
-     * This method is used internally and you should never need to
-     * call it directly.</i></b><br> It is used to establish the link
-     * between an SNMP table metadata node and its bean-like counterpart.
-     * <br>
-     * The group metadata nodes will create and register their
-     * underlying table metadata nodes in the MIB using this
-     * method. <br>
-     * The metadata nodes will be later retrieved from the MIB by the
-     * bean-like table objects using the getRegisterTableMeta() method.
-     * </p>
-     *
-     * @param name      The java-ized name of the SNMP table.
-     * @param table     The SNMP table metadata node - usually this
-     *                  corresponds to a <code>mibgen</code> generated
-     *                  object.
-     */
-    public abstract void registerTableMeta(String name, SnmpMibTable table);
-
-    /**
-     * Returns a registered SNMP Table metadata node.
-     *
-     * <p><b><i>
-     * This method is used internally and you should never need to
-     * call it directly.
-     * </i></b></p>
-     *
-     */
-    public abstract SnmpMibTable getRegisteredTableMeta(String name);
-
-    // --------------------------------------------------------------------
-    // PUBLIC METHODS
-    // --------------------------------------------------------------------
-
-    /**
-     * Processes a <CODE>get</CODE> operation.
-     *
-     **/
-    // Implements the method defined in SnmpMibAgent. See SnmpMibAgent
-    // for java-doc
-    //
-    @Override
-    public void get(SnmpMibRequest req) throws SnmpStatusException {
-
-        // Builds the request tree: creation is not allowed, operation
-        // is not atomic.
-
-        final int reqType = SnmpDefinitions.pduGetRequestPdu;
-        SnmpRequestTree handlers = getHandlers(req,false,false,reqType);
-
-        SnmpRequestTree.Handler h = null;
-        SnmpMibNode meta = null;
-
-        if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-            SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, SnmpMib.class.getName(),
-                    "get", "Processing handlers for GET... ");
-        }
-
-        // For each sub-request stored in the request-tree, invoke the
-        // get() method.
-        for (Enumeration<SnmpRequestTree.Handler> eh=handlers.getHandlers();eh.hasMoreElements();) {
-            h = eh.nextElement();
-
-            // Gets the Meta node. It can be either a Group Meta or a
-            // Table Meta.
-            //
-            meta = handlers.getMetaNode(h);
-
-            // Gets the depth of the Meta node in the OID tree
-            final int depth = handlers.getOidDepth(h);
-
-            for (Enumeration<SnmpMibSubRequest> rqs=handlers.getSubRequests(h);
-                 rqs.hasMoreElements();) {
-
-                // Invoke the get() operation.
-                meta.get(rqs.nextElement(),depth);
-            }
-        }
-    }
-
-    /**
-     * Processes a <CODE>set</CODE> operation.
-     *
-     */
-    // Implements the method defined in SnmpMibAgent. See SnmpMibAgent
-    // for java-doc
-    //
-    @Override
-    public void set(SnmpMibRequest req) throws SnmpStatusException {
-
-        SnmpRequestTree handlers = null;
-
-        // Optimization: we're going to get the whole SnmpRequestTree
-        // built in the "check" method, so that we don't have to rebuild
-        // it here.
-        //
-        if (req instanceof SnmpMibRequestImpl)
-            handlers = ((SnmpMibRequestImpl)req).getRequestTree();
-
-        // Optimization didn't work: we have to rebuild the tree.
-        //
-        // Builds the request tree: creation is not allowed, operation
-        // is atomic.
-        //
-        final int reqType = SnmpDefinitions.pduSetRequestPdu;
-        if (handlers == null) handlers = getHandlers(req,false,true,reqType);
-        handlers.switchCreationFlag(false);
-        handlers.setPduType(reqType);
-
-        SnmpRequestTree.Handler h;
-        SnmpMibNode meta;
-
-        if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-            SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, SnmpMib.class.getName(),
-                    "set", "Processing handlers for SET... ");
-        }
-
-        // For each sub-request stored in the request-tree, invoke the
-        // get() method.
-        for (Enumeration<SnmpRequestTree.Handler> eh=handlers.getHandlers();eh.hasMoreElements();) {
-            h = eh.nextElement();
-
-            // Gets the Meta node. It can be either a Group Meta or a
-            // Table Meta.
-            //
-            meta = handlers.getMetaNode(h);
-
-            // Gets the depth of the Meta node in the OID tree
-            final int depth = handlers.getOidDepth(h);
-
-            for (Enumeration<SnmpMibSubRequest> rqs=handlers.getSubRequests(h);
-                 rqs.hasMoreElements();) {
-
-                // Invoke the set() operation
-                meta.set(rqs.nextElement(),depth);
-            }
-        }
-    }
-
-    /**
-     * Checks if a <CODE>set</CODE> operation can be performed.
-     * If the operation cannot be performed, the method will raise a
-     * <CODE>SnmpStatusException</CODE>.
-     *
-     */
-    // Implements the method defined in SnmpMibAgent. See SnmpMibAgent
-    // for java-doc
-    //
-    @Override
-    public void check(SnmpMibRequest req) throws SnmpStatusException {
-
-        final int reqType = SnmpDefinitions.pduWalkRequest;
-        // Builds the request tree: creation is allowed, operation
-        // is atomic.
-        SnmpRequestTree handlers = getHandlers(req,true,true,reqType);
-
-        SnmpRequestTree.Handler h;
-        SnmpMibNode meta;
-
-        if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-            SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, SnmpMib.class.getName(),
-                    "check", "Processing handlers for CHECK... ");
-        }
-
-        // For each sub-request stored in the request-tree, invoke the
-        // check() method.
-        for (Enumeration<SnmpRequestTree.Handler> eh=handlers.getHandlers();eh.hasMoreElements();) {
-            h = eh.nextElement();
-
-            // Gets the Meta node. It can be either a Group Meta or a
-            // Table Meta.
-            //
-            meta = handlers.getMetaNode(h);
-
-            // Gets the depth of the Meta node in the OID tree
-            final int depth = handlers.getOidDepth(h);
-
-            for (Enumeration<SnmpMibSubRequest> rqs=handlers.getSubRequests(h);
-                 rqs.hasMoreElements();) {
-
-                // Invoke the check() operation
-                meta.check(rqs.nextElement(),depth);
-            }
-        }
-
-        // Optimization: we're going to pass the whole SnmpRequestTree
-        // to the "set" method, so that we don't have to rebuild it there.
-        //
-        if (req instanceof SnmpMibRequestImpl) {
-            ((SnmpMibRequestImpl)req).setRequestTree(handlers);
-        }
-
-    }
-
-    /**
-     * Processes a <CODE>getNext</CODE> operation.
-     *
-     */
-    // Implements the method defined in SnmpMibAgent. See SnmpMibAgent
-    // for java-doc
-    //
-    @Override
-    public void getNext(SnmpMibRequest req) throws SnmpStatusException {
-        // Build the request tree for the operation
-        // The subrequest stored in the request tree are valid GET requests
-        SnmpRequestTree handlers = getGetNextHandlers(req);
-
-        SnmpRequestTree.Handler h;
-        SnmpMibNode meta;
-
-        if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-            SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, SnmpMib.class.getName(),
-                    "getNext", "Processing handlers for GET-NEXT... ");
-        }
-
-        // Now invoke get() for each subrequest of the request tree.
-        for (Enumeration<SnmpRequestTree.Handler> eh=handlers.getHandlers();eh.hasMoreElements();) {
-            h = eh.nextElement();
-
-            // Gets the Meta node. It can be either a Group Meta or a
-            // Table Meta.
-            //
-            meta = handlers.getMetaNode(h);
-
-            // Gets the depth of the Meta node in the OID tree
-            int depth = handlers.getOidDepth(h);
-
-            for (Enumeration<SnmpMibSubRequest> rqs=handlers.getSubRequests(h);
-                 rqs.hasMoreElements();) {
-
-                // Invoke the get() operation
-                meta.get(rqs.nextElement(),depth);
-            }
-        }
-    }
-
-
-    /**
-     * Processes a <CODE>getBulk</CODE> operation.
-     * The method implements the <CODE>getBulk</CODE> operation by calling
-     * appropriately the <CODE>getNext</CODE> method.
-     *
-     */
-    // Implements the method defined in SnmpMibAgent. See SnmpMibAgent
-    // for java-doc
-    //
-    @Override
-    public void getBulk(SnmpMibRequest req, int nonRepeat, int maxRepeat)
-        throws SnmpStatusException {
-
-        getBulkWithGetNext(req, nonRepeat, maxRepeat);
-    }
-
-    /**
-     * Gets the root object identifier of the MIB.
-     * <P>In order to be accurate, the method should be called once the
-     * MIB is fully initialized (that is, after a call to <CODE>init</CODE>
-     * or <CODE>preRegister</CODE>).
-     *
-     * @return The root object identifier.
-     */
-    @Override
-    public long[] getRootOid() {
-
-        if( rootOid == null) {
-            Vector<Integer> list= new Vector<>(10);
-
-            // Ask the tree to do the job !
-            //
-            root.getRootOid(list);
-
-            // Now format the result
-            //
-            rootOid= new long[list.size()];
-            int i=0;
-            for(Enumeration<Integer> e= list.elements(); e.hasMoreElements(); ) {
-                Integer val= e.nextElement();
-                rootOid[i++]= val.longValue();
-            }
-        }
-        return rootOid.clone();
-    }
-
-    // --------------------------------------------------------------------
-    // PRIVATE METHODS
-    //---------------------------------------------------------------------
-
-    /**
-     * This method builds the temporary request-tree that will be used to
-     * perform the SNMP request associated with the given vector of varbinds
-     * `list'.
-     *
-     * @param req The SnmpMibRequest object holding the varbind list
-     *             concerning this MIB.
-     * @param createflag Indicates whether the operation allow for creation
-     *        of new instances (ie: it is a SET).
-     * @param atomic Indicates whether the operation is atomic or not.
-     * @param type Request type (from SnmpDefinitions).
-     *
-     * @return The request-tree where the original varbind list has been
-     *         dispatched to the appropriate nodes.
-     */
-    private SnmpRequestTree getHandlers(SnmpMibRequest req,
-                                        boolean createflag, boolean atomic,
-                                        int type)
-        throws SnmpStatusException {
-
-        // Build an empty request tree
-        SnmpRequestTree handlers =
-            new SnmpRequestTree(req,createflag,type);
-
-        int index=0;
-        SnmpVarBind var;
-        final int ver= req.getVersion();
-
-        // For each varbind in the list finds its handling node.
-        for (Enumeration<SnmpVarBind> e= req.getElements(); e.hasMoreElements(); index++) {
-
-            var= e.nextElement();
-
-            try {
-                // Find the handling node for this varbind.
-                root.findHandlingNode(var,var.oid.longValue(false),
-                                      0,handlers);
-            } catch(SnmpStatusException x) {
-
-                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
-                            SnmpMib.class.getName(),
-                            "getHandlers",
-                            "Couldn't find a handling node for " +
-                            var.oid.toString());
-                }
-
-                // If the operation is atomic (Check/Set) or the version
-                // is V1 we must generate an exception.
-                //
-                if (ver == SnmpDefinitions.snmpVersionOne) {
-
-                    if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                        SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
-                                SnmpMib.class.getName(),
-                                "getHandlers", "\tV1: Throwing exception");
-                    }
-
-                    // The index in the exception must correspond to the
-                    // SNMP index ...
-                    //
-                    final SnmpStatusException sse =
-                        new SnmpStatusException(x, index + 1);
-                    sse.initCause(x);
-                    throw sse;
-                } else if ((type == SnmpDefinitions.pduWalkRequest)   ||
-                           (type == SnmpDefinitions.pduSetRequestPdu)) {
-                    final int status =
-                        SnmpRequestTree.mapSetException(x.getStatus(),ver);
-
-                    if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                        SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
-                                SnmpMib.class.getName(),
-                                "getHandlers", "\tSET: Throwing exception");
-                    }
-
-                    final SnmpStatusException sse =
-                        new SnmpStatusException(status, index + 1);
-                    sse.initCause(x);
-                    throw sse;
-                } else if (atomic) {
-
-                    // Should never come here...
-                    if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                        SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
-                                SnmpMib.class.getName(),
-                                "getHandlers", "\tATOMIC: Throwing exception");
-                    }
-
-                    final SnmpStatusException sse =
-                        new SnmpStatusException(x, index + 1);
-                    sse.initCause(x);
-                    throw sse;
-                }
-
-                final int status =
-                    SnmpRequestTree.mapGetException(x.getStatus(),ver);
-
-                if (status == SnmpStatusException.noSuchInstance) {
-
-                    if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                        SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
-                                SnmpMib.class.getName(),
-                                "getHandlers",
-                                "\tGET: Registering noSuchInstance");
-                    }
-
-                    var.value= SnmpVarBind.noSuchInstance;
-
-                } else if (status == SnmpStatusException.noSuchObject) {
-                    if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                        SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
-                                SnmpMib.class.getName(),
-                                "getHandlers",
-                                "\tGET: Registering noSuchObject");
-                    }
-
-                        var.value= SnmpVarBind.noSuchObject;
-
-                } else {
-
-                    if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                        SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
-                                SnmpMib.class.getName(),
-                                "getHandlers",
-                                "\tGET: Registering global error: " + status);
-                    }
-
-                    final SnmpStatusException sse =
-                        new SnmpStatusException(status, index + 1);
-                    sse.initCause(x);
-                    throw sse;
-                }
-            }
-        }
-        return handlers;
-    }
-
-    /**
-     * This method builds the temporary request-tree that will be used to
-     * perform the SNMP GET-NEXT request associated with the given vector
-     * of varbinds `list'.
-     *
-     * @param req The SnmpMibRequest object holding the varbind list
-     *             concerning this MIB.
-     *
-     * @return The request-tree where the original varbind list has been
-     *         dispatched to the appropriate nodes, and where the original
-     *         OIDs have been replaced with the correct "next" OID.
-     */
-    private SnmpRequestTree getGetNextHandlers(SnmpMibRequest req)
-        throws SnmpStatusException {
-
-        // Creates an empty request tree, no entry creation is allowed (false)
-        SnmpRequestTree handlers = new
-            SnmpRequestTree(req,false,SnmpDefinitions.pduGetNextRequestPdu);
-
-        // Sets the getNext flag: if version=V2, status exception are
-        // transformed in  endOfMibView
-        handlers.setGetNextFlag();
-
-        if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-            SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, SnmpMib.class.getName(),
-                    "getGetNextHandlers", "Received MIB request : " + req);
-        }
-        AcmChecker checker = new AcmChecker(req);
-        int index=0;
-        SnmpVarBind var = null;
-        final int ver= req.getVersion();
-        SnmpOid original = null;
-        // For each varbind, finds the handling node.
-        // This function has the side effect of transforming a GET-NEXT
-        // request into a valid GET request, replacing the OIDs in the
-        // original GET-NEXT request with the OID of the first leaf that
-        // follows.
-        for (Enumeration<SnmpVarBind> e= req.getElements(); e.hasMoreElements(); index++) {
-
-            var = e.nextElement();
-            SnmpOid result;
-            try {
-                // Find the node handling the OID that follows the varbind
-                // OID. `result' contains this next leaf OID.
-                //ACM loop.
-                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
-                            SnmpMib.class.getName(),
-                            "getGetNextHandlers", " Next OID of : " + var.oid);
-                }
-                result = new SnmpOid(root.findNextHandlingNode
-                                     (var,var.oid.longValue(false),0,
-                                      0,handlers, checker));
-
-                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
-                            SnmpMib.class.getName(),
-                            "getGetNextHandlers", " is : " + result);
-                }
-                // We replace the varbind original OID with the OID of the
-                // leaf object we have to return.
-                var.oid = result;
-            } catch(SnmpStatusException x) {
-
-                // if (isDebugOn())
-                //    debug("getGetNextHandlers",
-                //        "Couldn't find a handling node for "
-                //        + var.oid.toString());
-
-                if (ver == SnmpDefinitions.snmpVersionOne) {
-                    if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                        SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
-                                SnmpMib.class.getName(),
-                                "getGetNextHandlers",
-                                "\tThrowing exception " + x.toString());
-                    }
-                    // The index in the exception must correspond to the
-                    // SNMP index ...
-                    //
-                    throw new SnmpStatusException(x, index + 1);
-                }
-                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
-                            SnmpMib.class.getName(),
-                            "getGetNextHandlers",
-                            "Exception : " + x.getStatus());
-                }
-
-                var.setSnmpValue(SnmpVarBind.endOfMibView);
-            }
-        }
-        return handlers;
-    }
-
-    // --------------------------------------------------------------------
-    // PROTECTED VARIABLES
-    // --------------------------------------------------------------------
-
-    /**
-     * The top element in the Mib tree.
-     * @serial
-     */
-    protected SnmpMibOid root;
-
-
-    // --------------------------------------------------------------------
-    // PRIVATE VARIABLES
-    // --------------------------------------------------------------------
-
-    /**
-     * The root object identifier of the MIB.
-     */
-    private transient long[] rootOid= null;
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/agent/SnmpMibAgent.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,768 +0,0 @@
-/*
- * Copyright (c) 1998, 2014, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-package com.sun.jmx.snmp.agent;
-
-
-
-// java imports
-//
-import java.io.Serializable;
-import java.util.Vector;
-import java.util.Enumeration;
-
-// jmx imports
-//
-import javax.management.MBeanServer;
-import javax.management.MBeanRegistration;
-import javax.management.ObjectName;
-import javax.management.InstanceNotFoundException;
-import javax.management.ServiceNotFoundException;
-import javax.management.ReflectionException;
-import javax.management.MBeanException;
-import com.sun.jmx.snmp.SnmpVarBind;
-import com.sun.jmx.snmp.SnmpDefinitions;
-import com.sun.jmx.snmp.SnmpStatusException;
-import com.sun.jmx.snmp.SnmpPdu;
-import com.sun.jmx.snmp.SnmpOid;
-import com.sun.jmx.snmp.SnmpEngine;
-
-/**
- * Abstract class for representing an SNMP agent.
- *
- * The class is used by the SNMP protocol adaptor as the entry point in
- * the SNMP agent to query.
- *
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- */
-@SuppressWarnings("serial") // JDK implementation class
-public abstract class SnmpMibAgent
-    implements SnmpMibAgentMBean, MBeanRegistration, Serializable {
-
-    /**
-     * Default constructor.
-     */
-    public SnmpMibAgent() {
-    }
-
-    // ---------------------------------------------------------------------
-    // PUBLIC METHODS
-    //----------------------------------------------------------------------
-
-    /**
-     * Initializes the MIB (with no registration of the MBeans into the
-     * MBean server).
-     *
-     * @exception IllegalAccessException The MIB can not be initialized.
-     */
-    public abstract void init() throws IllegalAccessException;
-
-    /**
-     * Initializes the MIB but each single MBean representing the MIB
-     * is inserted into the MBean server.
-     *
-     * @param server The MBean server to register the service with.
-     * @param name The object name.
-     *
-     * @return The name of the SNMP MIB registered.
-     *
-     * @exception java.lang.Exception
-     */
-    @Override
-    public abstract ObjectName preRegister(MBeanServer server,
-                                           ObjectName name)
-        throws java.lang.Exception;
-
-    /**
-     * Not used in this context.
-     */
-    @Override
-    public void postRegister (Boolean registrationDone) {
-    }
-
-    /**
-     * Not used in this context.
-     */
-    @Override
-    public void preDeregister() throws java.lang.Exception {
-    }
-
-    /**
-     * Not used in this context.
-     */
-    @Override
-    public void postDeregister() {
-    }
-
-    /**
-     * Processes a <CODE>get</CODE> operation.
-     * This method must update the SnmpVarBinds contained in the
-     * <var>{@link SnmpMibRequest} req</var> parameter.
-     *
-     * @param req The SnmpMibRequest object holding the list of variable to
-     *            be retrieved. This list is composed of
-     *            <CODE>SnmpVarBind</CODE> objects.
-     *
-     * @exception SnmpStatusException An error occurred during the operation.
-     */
-    @Override
-    public abstract void get(SnmpMibRequest req)
-        throws SnmpStatusException;
-
-    /**
-     * Processes a <CODE>getNext</CODE> operation.
-     * This method must update the SnmpVarBinds contained in the
-     * <var>{@link SnmpMibRequest} req</var> parameter.
-     *
-     * @param req The SnmpMibRequest object holding the list of
-     *            OIDs from which the next variables should be retrieved.
-     *            This list is composed of <CODE>SnmpVarBind</CODE> objects.
-     *
-     * @exception SnmpStatusException An error occurred during the operation.
-     */
-    @Override
-    public abstract void getNext(SnmpMibRequest req)
-        throws SnmpStatusException;
-
-    /**
-     * Processes a <CODE>getBulk</CODE> operation.
-     * This method must update the SnmpVarBinds contained in the
-     * <var>{@link SnmpMibRequest} req</var> parameter.
-     *
-     * @param req The SnmpMibRequest object holding the list of variable to
-     *            be retrieved. This list is composed of
-     *            <CODE>SnmpVarBind</CODE> objects.
-     *
-     * @param nonRepeat The number of variables, starting with the first
-     *    variable in the variable-bindings, for which a single
-     *    lexicographic successor is requested.
-     *
-     * @param maxRepeat The number of lexicographic successors requested
-     *    for each of the last R variables. R is the number of variables
-     *    following the first <CODE>nonRepeat</CODE> variables for which
-     *    multiple lexicographic successors are requested.
-     *
-     * @exception SnmpStatusException An error occurred during the operation.
-     */
-    @Override
-    public abstract void getBulk(SnmpMibRequest req, int nonRepeat,
-                                 int maxRepeat)
-        throws SnmpStatusException;
-
-    /**
-     * Processes a <CODE>set</CODE> operation.
-     * This method must update the SnmpVarBinds contained in the
-     * <var>{@link SnmpMibRequest} req</var> parameter.
-     * This method is called during the second phase of the SET two-phase
-     * commit.
-     *
-     * @param req The SnmpMibRequest object holding the list of variable to
-     *            be set. This list is composed of
-     *            <CODE>SnmpVarBind</CODE> objects.
-     *
-     * @exception SnmpStatusException An error occurred during the operation.
-     *            Throwing an exception in this method will break the
-     *            atomicity of the SET operation. Care must be taken so that
-     *            the exception is thrown in the {@link #check(SnmpMibRequest)}
-     *            method instead.
-     */
-    @Override
-    public abstract void set(SnmpMibRequest req)
-        throws SnmpStatusException;
-
-
-    /**
-     * Checks if a <CODE>set</CODE> operation can be performed.
-     * If the operation can not be performed, the method should throw an
-     * <CODE>SnmpStatusException</CODE>.
-     * This method is called during the first phase of the SET two-phase
-     * commit.
-     *
-     * @param req The SnmpMibRequest object holding the list of variable to
-     *            be set. This list is composed of
-     *            <CODE>SnmpVarBind</CODE> objects.
-     *
-     * @exception SnmpStatusException The <CODE>set</CODE> operation
-     *    cannot be performed.
-     */
-    @Override
-    public abstract void check(SnmpMibRequest req)
-        throws SnmpStatusException;
-
-    /**
-     * Gets the root object identifier of the MIB.
-     * <P>The root object identifier is the object identifier uniquely
-     * identifying the MIB.
-     *
-     * @return The root object identifier.
-     */
-    public abstract long[] getRootOid();
-
-    // ---------------------------------------------------------------------
-    // GETTERS AND SETTERS
-    // ---------------------------------------------------------------------
-
-    /**
-     * Gets the reference to the MBean server in which the SNMP MIB is
-     * registered.
-     *
-     * @return The MBean server or null if the MIB is not registered in any
-     *     MBean server.
-     */
-    @Override
-    public MBeanServer getMBeanServer() {
-        return server;
-    }
-
-    /**
-     * Gets the reference to the SNMP protocol adaptor to which the MIB is
-     * bound.
-     *
-     * @return The SNMP MIB handler.
-     */
-    @Override
-    public SnmpMibHandler getSnmpAdaptor() {
-        return adaptor;
-    }
-
-    /**
-     * Sets the reference to the SNMP protocol adaptor through which the MIB
-     * will be SNMP accessible and add this new MIB in the SNMP MIB handler.
-     *
-     * @param stack The SNMP MIB handler.
-     */
-    @Override
-    public void setSnmpAdaptor(SnmpMibHandler stack) {
-        if (adaptor != null) {
-            adaptor.removeMib(this);
-        }
-        adaptor = stack;
-        if (adaptor != null) {
-            adaptor.addMib(this);
-        }
-    }
-
-     /**
-     * Sets the reference to the SNMP protocol adaptor through which the MIB
-     * will be SNMP accessible and add this new MIB in the SNMP MIB handler.
-     * This method is to be called to set a specific agent to a specific OID. This can be useful when dealing with MIB overlapping.
-     * Some OID can be implemented in more than one MIB. In this case, the OID nearest the agent will be used on SNMP operations.
-     * @param stack The SNMP MIB handler.
-     * @param oids The set of OIDs this agent implements.
-     *
-     * @since 1.5
-     */
-    @Override
-    public void setSnmpAdaptor(SnmpMibHandler stack, SnmpOid[] oids) {
-        if (adaptor != null) {
-            adaptor.removeMib(this);
-        }
-        adaptor = stack;
-        if (adaptor != null) {
-            adaptor.addMib(this, oids);
-        }
-    }
-
-    /**
-     * Sets the reference to the SNMP protocol adaptor through which the MIB
-     * will be SNMP accessible and adds this new MIB in the SNMP MIB handler.
-     * Adds a new contextualized MIB in the SNMP MIB handler.
-     *
-     * @param stack The SNMP MIB handler.
-     * @param contextName The MIB context name. If null is passed, will be registered in the default context.
-     *
-     * @exception IllegalArgumentException If the parameter is null.
-     *
-     * @since 1.5
-     */
-    @Override
-    public void setSnmpAdaptor(SnmpMibHandler stack, String contextName) {
-        if (adaptor != null) {
-            adaptor.removeMib(this, contextName);
-        }
-        adaptor = stack;
-        if (adaptor != null) {
-            adaptor.addMib(this, contextName);
-        }
-    }
-    /**
-     * Sets the reference to the SNMP protocol adaptor through which the MIB
-     * will be SNMP accessible and adds this new MIB in the SNMP MIB handler.
-     * Adds a new contextualized MIB in the SNMP MIB handler.
-     *
-     * @param stack The SNMP MIB handler.
-     * @param contextName The MIB context name. If null is passed, will be registered in the default context.
-     * @param oids The set of OIDs this agent implements.
-     * @exception IllegalArgumentException If the parameter is null.
-     *
-     * @since 1.5
-     */
-    @Override
-    public void setSnmpAdaptor(SnmpMibHandler stack,
-                               String contextName,
-                               SnmpOid[] oids) {
-        if (adaptor != null) {
-            adaptor.removeMib(this, contextName);
-        }
-        adaptor = stack;
-        if (adaptor != null) {
-            adaptor.addMib(this, contextName, oids);
-        }
-    }
-
-    /**
-     * Gets the object name of the SNMP protocol adaptor to which the MIB
-     * is bound.
-     *
-     * @return The name of the SNMP protocol adaptor.
-     */
-    @Override
-    public ObjectName getSnmpAdaptorName() {
-        return adaptorName;
-    }
-
-    /**
-     * Sets the reference to the SNMP protocol adaptor through which the MIB
-     * will be SNMP accessible and add this new MIB in the SNMP MIB handler
-     * associated to the specified <CODE>name</CODE>.
-     *
-     * @param name The name of the SNMP protocol adaptor.
-     *
-     * @exception InstanceNotFoundException The SNMP protocol adaptor does
-     *     not exist in the MBean server.
-     *
-     * @exception ServiceNotFoundException This SNMP MIB is not registered
-     *     in the MBean server or the requested service is not supported.
-     */
-    @Override
-    public void setSnmpAdaptorName(ObjectName name)
-        throws InstanceNotFoundException, ServiceNotFoundException {
-
-        if (server == null) {
-            throw new ServiceNotFoundException(mibName + " is not registered in the MBean server");
-        }
-        // First remove the reference on the old adaptor server.
-        //
-        if (adaptor != null) {
-            adaptor.removeMib(this);
-        }
-
-        // Then update the reference to the new adaptor server.
-        //
-        Object[] params = {this};
-        String[] signature = {"com.sun.jmx.snmp.agent.SnmpMibAgent"};
-        try {
-            adaptor = (SnmpMibHandler)(server.invoke(name, "addMib", params,
-                                                     signature));
-        } catch (InstanceNotFoundException e) {
-            throw new InstanceNotFoundException(name.toString());
-        } catch (ReflectionException e) {
-            throw new ServiceNotFoundException(name.toString());
-        } catch (MBeanException e) {
-            // Should never occur...
-        }
-
-        adaptorName = name;
-    }
-    /**
-     * Sets the reference to the SNMP protocol adaptor through which the MIB
-     * will be SNMP accessible and add this new MIB in the SNMP MIB handler
-     * associated to the specified <CODE>name</CODE>.
-     * This method is to be called to set a specific agent to a specific OID. This can be useful when dealing with MIB overlapping.
-     * Some OID can be implemented in more than one MIB. In this case, the OID nearer agent will be used on SNMP operations.
-     * @param name The name of the SNMP protocol adaptor.
-     * @param oids The set of OIDs this agent implements.
-     * @exception InstanceNotFoundException The SNMP protocol adaptor does
-     *     not exist in the MBean server.
-     *
-     * @exception ServiceNotFoundException This SNMP MIB is not registered
-     *     in the MBean server or the requested service is not supported.
-     *
-     * @since 1.5
-     */
-    @Override
-    public void setSnmpAdaptorName(ObjectName name, SnmpOid[] oids)
-        throws InstanceNotFoundException, ServiceNotFoundException {
-
-        if (server == null) {
-            throw new ServiceNotFoundException(mibName + " is not registered in the MBean server");
-        }
-        // First remove the reference on the old adaptor server.
-        //
-        if (adaptor != null) {
-            adaptor.removeMib(this);
-        }
-
-        // Then update the reference to the new adaptor server.
-        //
-        Object[] params = {this, oids};
-        String[] signature = {"com.sun.jmx.snmp.agent.SnmpMibAgent",
-        oids.getClass().getName()};
-        try {
-            adaptor = (SnmpMibHandler)(server.invoke(name, "addMib", params,
-                                                     signature));
-        } catch (InstanceNotFoundException e) {
-            throw new InstanceNotFoundException(name.toString());
-        } catch (ReflectionException e) {
-            throw new ServiceNotFoundException(name.toString());
-        } catch (MBeanException e) {
-            // Should never occur...
-        }
-
-        adaptorName = name;
-    }
-    /**
-     * Sets the reference to the SNMP protocol adaptor through which the MIB
-     * will be SNMP accessible and add this new MIB in the SNMP MIB handler
-     * associated to the specified <CODE>name</CODE>.
-     *
-     * @param name The name of the SNMP protocol adaptor.
-     * @param contextName The MIB context name. If null is passed, will be registered in the default context.
-     * @exception InstanceNotFoundException The SNMP protocol adaptor does
-     *     not exist in the MBean server.
-     *
-     * @exception ServiceNotFoundException This SNMP MIB is not registered
-     *     in the MBean server or the requested service is not supported.
-     *
-     * @since 1.5
-     */
-    @Override
-    public void setSnmpAdaptorName(ObjectName name, String contextName)
-        throws InstanceNotFoundException, ServiceNotFoundException {
-
-        if (server == null) {
-            throw new ServiceNotFoundException(mibName + " is not registered in the MBean server");
-        }
-
-        // First remove the reference on the old adaptor server.
-        //
-        if (adaptor != null) {
-            adaptor.removeMib(this, contextName);
-        }
-
-        // Then update the reference to the new adaptor server.
-        //
-        Object[] params = {this, contextName};
-        String[] signature = {"com.sun.jmx.snmp.agent.SnmpMibAgent", "java.lang.String"};
-        try {
-            adaptor = (SnmpMibHandler)(server.invoke(name, "addMib", params,
-                                                     signature));
-        } catch (InstanceNotFoundException e) {
-            throw new InstanceNotFoundException(name.toString());
-        } catch (ReflectionException e) {
-            throw new ServiceNotFoundException(name.toString());
-        } catch (MBeanException e) {
-            // Should never occur...
-        }
-
-        adaptorName = name;
-    }
-
-    /**
-     * Sets the reference to the SNMP protocol adaptor through which the MIB
-     * will be SNMP accessible and add this new MIB in the SNMP MIB handler
-     * associated to the specified <CODE>name</CODE>.
-     *
-     * @param name The name of the SNMP protocol adaptor.
-     * @param contextName The MIB context name. If null is passed, will be registered in the default context.
-     * @param oids The set of OIDs this agent implements.
-     * @exception InstanceNotFoundException The SNMP protocol adaptor does
-     *     not exist in the MBean server.
-     *
-     * @exception ServiceNotFoundException This SNMP MIB is not registered
-     *     in the MBean server or the requested service is not supported.
-     *
-     * @since 1.5
-     */
-    @Override
-    public void setSnmpAdaptorName(ObjectName name,
-                                   String contextName, SnmpOid[] oids)
-        throws InstanceNotFoundException, ServiceNotFoundException {
-
-        if (server == null) {
-            throw new ServiceNotFoundException(mibName + " is not registered in the MBean server");
-        }
-
-        // First remove the reference on the old adaptor server.
-        //
-        if (adaptor != null) {
-            adaptor.removeMib(this, contextName);
-        }
-
-        // Then update the reference to the new adaptor server.
-        //
-        Object[] params = {this, contextName, oids};
-        String[] signature = {"com.sun.jmx.snmp.agent.SnmpMibAgent", "java.lang.String", oids.getClass().getName()};
-        try {
-            adaptor = (SnmpMibHandler)(server.invoke(name, "addMib", params,
-                                                     signature));
-        } catch (InstanceNotFoundException e) {
-            throw new InstanceNotFoundException(name.toString());
-        } catch (ReflectionException e) {
-            throw new ServiceNotFoundException(name.toString());
-        } catch (MBeanException e) {
-            // Should never occur...
-        }
-
-        adaptorName = name;
-    }
-
-    /**
-     * Indicates whether or not the MIB module is bound to a SNMP protocol
-     * adaptor.
-     * As a reminder, only bound MIBs can be accessed through SNMP protocol
-     * adaptor.
-     *
-     * @return <CODE>true</CODE> if the MIB module is bound,
-     *         <CODE>false</CODE> otherwise.
-     */
-    @Override
-    public boolean getBindingState() {
-        if (adaptor == null)
-            return false;
-        else
-            return true;
-    }
-
-    /**
-     * Gets the MIB name.
-     *
-     * @return The MIB name.
-     */
-    @Override
-    public String getMibName() {
-        return mibName;
-    }
-
-    /**
-     * This is a factory method for creating new SnmpMibRequest objects.
-     * @param reqPdu The received PDU.
-     * @param vblist   The vector of SnmpVarBind objects in which the
-     *        MIB concerned by this request is involved.
-     * @param version  The protocol version of the SNMP request.
-     * @param userData User allocated contextual data.
-     *
-     * @return A new SnmpMibRequest object.
-     *
-     * @since 1.5
-     **/
-    public static SnmpMibRequest newMibRequest(SnmpPdu reqPdu,
-                                               Vector<SnmpVarBind> vblist,
-                                               int version,
-                                               Object userData)
-    {
-        return new SnmpMibRequestImpl(null,
-                                      reqPdu,
-                                      vblist,
-                                      version,
-                                      userData,
-                                      null,
-                                      SnmpDefinitions.noAuthNoPriv,
-                                      getSecurityModel(version),
-                                      null,null);
-    }
-    /**
-     * This is a factory method for creating new SnmpMibRequest objects.
-     * @param engine The local engine.
-     * @param reqPdu The received pdu.
-     * @param vblist The vector of SnmpVarBind objects in which the
-     *        MIB concerned by this request is involved.
-     * @param version The protocol version of the SNMP request.
-     * @param userData User allocated contextual data.
-     *
-     * @return A new SnmpMibRequest object.
-     *
-     * @since 1.5
-     **/
-    public static SnmpMibRequest newMibRequest(SnmpEngine engine,
-                                               SnmpPdu reqPdu,
-                                               Vector<SnmpVarBind> vblist,
-                                               int version,
-                                               Object userData,
-                                               String principal,
-                                               int securityLevel,
-                                               int securityModel,
-                                               byte[] contextName,
-                                               byte[] accessContextName) {
-        return new SnmpMibRequestImpl(engine,
-                                      reqPdu,
-                                      vblist,
-                                      version,
-                                      userData,
-                                      principal,
-                                      securityLevel,
-                                      securityModel,
-                                      contextName,
-                                      accessContextName);
-    }
-    // ---------------------------------------------------------------------
-    // PACKAGE METHODS
-    // ---------------------------------------------------------------------
-
-    /**
-     * Processes a <CODE>getBulk</CODE> operation using call to
-     * <CODE>getNext</CODE>.
-     * The method implements the <CODE>getBulk</CODE> operation by calling
-     * appropriately the <CODE>getNext</CODE> method.
-     *
-     * @param req The SnmpMibRequest containing the variable list to be
-     *        retrieved.
-     *
-     * @param nonRepeat The number of variables, starting with the first
-     *    variable in the variable-bindings, for which a single lexicographic
-     *    successor is requested.
-     *
-     * @param maxRepeat The number of lexicographic successors
-     *    requested for each of the last R variables. R is the number of
-     *    variables following the first nonRepeat variables for which
-     *    multiple lexicographic successors are requested.
-     *
-     * @return The variable list containing returned values.
-     *
-     * @exception SnmpStatusException An error occurred during the operation.
-     */
-    void getBulkWithGetNext(SnmpMibRequest req, int nonRepeat, int maxRepeat)
-        throws SnmpStatusException {
-        final Vector<SnmpVarBind> list = req.getSubList();
-
-        // RFC 1905, Section 4.2.3, p14
-        final int L = list.size() ;
-        final int N = Math.max(Math.min(nonRepeat, L), 0) ;
-        final int M = Math.max(maxRepeat, 0) ;
-        final int R = L - N ;
-
-        // Let's build the varBindList for the response pdu
-        //
-        // int errorStatus = SnmpDefinitions.snmpRspNoError ;
-        // int errorIndex = 0 ;
-        if (L != 0) {
-
-            // Non-repeaters and first row of repeaters
-            //
-            getNext(req);
-
-            // Now the remaining repeaters
-            //
-            Vector<SnmpVarBind> repeaters= splitFrom(list, N);
-            SnmpMibRequestImpl repeatedReq =
-                new SnmpMibRequestImpl(req.getEngine(),
-                                       req.getPdu(),
-                                       repeaters,
-                                       SnmpDefinitions.snmpVersionTwo,
-                                       req.getUserData(),
-                                       req.getPrincipal(),
-                                       req.getSecurityLevel(),
-                                       req.getSecurityModel(),
-                                       req.getContextName(),
-                                       req.getAccessContextName());
-            for (int i = 2 ; i <= M ; i++) {
-                getNext(repeatedReq);
-                concatVector(req, repeaters);
-            }
-        }
-    }
-
-
-    // ---------------------------------------------------------------------
-    // PRIVATE METHODS
-    // ---------------------------------------------------------------------
-
-    /**
-     * This method creates a new Vector which does not contain the first
-     * element up to the specified limit.
-     *
-     * @param original The original vector.
-     * @param limit The limit.
-     */
-    private Vector<SnmpVarBind> splitFrom(Vector<SnmpVarBind> original, int limit) {
-
-        int max= original.size();
-        Vector<SnmpVarBind> result= new Vector<>(max - limit);
-        int i= limit;
-
-        // Ok the loop looks a bit strange. But in order to improve the
-        // perf, we try to avoid reference to the limit variable from
-        // within the loop ...
-        //
-        for(Enumeration<SnmpVarBind> e= original.elements(); e.hasMoreElements(); --i) {
-            SnmpVarBind var= e.nextElement();
-            if (i >0)
-                continue;
-            result.addElement(new SnmpVarBind(var.oid, var.value));
-        }
-        return result;
-    }
-
-    private void concatVector(SnmpMibRequest req, Vector<SnmpVarBind> source) {
-        for(Enumeration<SnmpVarBind> e= source.elements(); e.hasMoreElements(); ) {
-            SnmpVarBind var= e.nextElement();
-            // We need to duplicate the SnmpVarBind otherwise it is going
-            // to be overloaded by the next get Next ...
-            req.addVarBind(new SnmpVarBind(var.oid, var.value));
-        }
-    }
-
-    private static int getSecurityModel(int version) {
-        switch(version) {
-        case SnmpDefinitions.snmpVersionOne:
-            return SnmpDefinitions.snmpV1SecurityModel;
-        default:
-            return SnmpDefinitions.snmpV2SecurityModel;
-        }
-    }
-
-    // ---------------------------------------------------------------------
-    // PROTECTED VARIABLES
-    // ---------------------------------------------------------------------
-
-    /**
-     * The object name of the MIB.
-     * @serial
-     */
-    protected String mibName;
-
-    /**
-     * The reference to the MBean server.
-     * @serial
-     */
-    protected MBeanServer server;
-
-    // ---------------------------------------------------------------------
-    // PRIVATE VARIABLES
-    // ---------------------------------------------------------------------
-
-    /**
-     * The object name of the SNMP protocol adaptor.
-     * @serial
-     */
-    private ObjectName adaptorName;
-
-    /**
-     * The reference to the SNMP stack.
-     */
-    private transient SnmpMibHandler adaptor;
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/agent/SnmpMibAgentMBean.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,316 +0,0 @@
-/*
- * Copyright (c) 1999, 2013, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-package com.sun.jmx.snmp.agent;
-
-
-
-// java imports
-//
-import java.util.Vector;
-
-// jmx imports
-//
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-import javax.management.MalformedObjectNameException;
-import javax.management.InstanceNotFoundException;
-import javax.management.ServiceNotFoundException;
-import com.sun.jmx.snmp.SnmpOid;
-import com.sun.jmx.snmp.SnmpStatusException;
-
-/**
- * Exposes the remote management interface of the <CODE>SnmpMibAgent</CODE> MBean.
- *
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- */
-
-public interface SnmpMibAgentMBean {
-
-    // PUBLIC METHODS
-    //---------------
-
-    /**
-     * Processes a <CODE>get</CODE> operation.
-     * This method must not be called from remote.
-     *
-     * @param req The SnmpMibRequest object holding the list of variables to
-     *            be retrieved. This list is composed of
-     *            <CODE>SnmpVarBind</CODE> objects.
-     *
-     * @exception SnmpStatusException An error occurred during the operation.
-     * @see SnmpMibAgent#get(SnmpMibRequest)
-     */
-    public void get(SnmpMibRequest req) throws SnmpStatusException;
-
-    /**
-     * Processes a <CODE>getNext</CODE> operation.
-     * This method must not be called from remote.
-     *
-     * @param req The SnmpMibRequest object holding the list of variables to
-     *            be retrieved. This list is composed of
-     *            <CODE>SnmpVarBind</CODE> objects.
-     *
-     * @exception SnmpStatusException An error occurred during the operation.
-     * @see SnmpMibAgent#getNext(SnmpMibRequest)
-     */
-    public void getNext(SnmpMibRequest req) throws SnmpStatusException;
-
-    /**
-     * Processes a <CODE>getBulk</CODE> operation.
-     * This method must not be called from remote.
-     *
-     * @param req The SnmpMibRequest object holding the list of variables to
-     *            be retrieved. This list is composed of
-     *            <CODE>SnmpVarBind</CODE> objects.
-     *
-     * @param nonRepeat The number of variables, starting with the first
-     *    variable in the variable-bindings, for which a single
-     *    lexicographic successor is requested.
-     *
-     * @param maxRepeat The number of lexicographic successors requested
-     *    for each of the last R variables. R is the number of variables
-     *    following the first <CODE>nonRepeat</CODE> variables for which
-     *    multiple lexicographic successors are requested.
-     *
-     * @exception SnmpStatusException An error occurred during the operation.
-     * @see SnmpMibAgent#getBulk(SnmpMibRequest,int,int)
-     */
-    public void getBulk(SnmpMibRequest req, int nonRepeat, int maxRepeat)
-        throws SnmpStatusException;
-
-    /**
-     * Processes a <CODE>set</CODE> operation.
-     * This method must not be called from remote.
-     *
-     * @param req The SnmpMibRequest object holding the list of variables to
-     *            be set. This list is composed of
-     *            <CODE>SnmpVarBind</CODE> objects.
-     *
-     * @exception SnmpStatusException An error occurred during the operation.
-     * @see SnmpMibAgent#set(SnmpMibRequest)
-     */
-    public void set(SnmpMibRequest req) throws SnmpStatusException;
-
-    /**
-     * Checks if a <CODE>set</CODE> operation can be performed.
-     * If the operation cannot be performed, the method should emit a
-     * <CODE>SnmpStatusException</CODE>.
-     *
-     * @param req The SnmpMibRequest object holding the list of variables to
-     *            be set. This list is composed of
-     *            <CODE>SnmpVarBind</CODE> objects.
-     *
-     * @exception SnmpStatusException The <CODE>set</CODE> operation
-     *    cannot be performed.
-     * @see SnmpMibAgent#check(SnmpMibRequest)
-     */
-    public void check(SnmpMibRequest req) throws SnmpStatusException;
-
-    // GETTERS AND SETTERS
-    //--------------------
-
-    /**
-     * Gets the reference to the MBean server in which the SNMP MIB is
-     * registered.
-     *
-     * @return The MBean server or null if the MIB is not registered in any
-     *         MBean server.
-     */
-    public MBeanServer getMBeanServer();
-
-    /**
-     * Gets the reference to the SNMP protocol adaptor to which the MIB is
-     * bound.
-     * <BR>This method is used for accessing the SNMP MIB handler property
-     * of the SNMP MIB agent in case of a standalone agent.
-     *
-     * @return The SNMP MIB handler.
-     */
-    public SnmpMibHandler getSnmpAdaptor();
-
-    /**
-     * Sets the reference to the SNMP protocol adaptor through which the
-     * MIB will be SNMP accessible and add this new MIB in the SNMP MIB
-     * handler.
-     * <BR>This method is used for setting the SNMP MIB handler property of
-     * the SNMP MIB agent in case of a standalone agent.
-     *
-     * @param stack The SNMP MIB handler.
-     */
-    public void setSnmpAdaptor(SnmpMibHandler stack);
-
-    /**
-     * Sets the reference to the SNMP protocol adaptor through which the MIB
-     * will be SNMP accessible and add this new MIB in the SNMP MIB handler.
-     * This method is to be called to set a specific agent to a specific OID.
-     * This can be useful when dealing with MIB overlapping.
-     * Some OID can be implemented in more than one MIB. In this case, the
-     * OID nearer agent will be used on SNMP operations.
-     * @param stack The SNMP MIB handler.
-     * @param oids The set of OIDs this agent implements.
-     *
-     * @since 1.5
-     */
-    public void setSnmpAdaptor(SnmpMibHandler stack, SnmpOid[] oids);
-
-    /**
-     * Sets the reference to the SNMP protocol adaptor through which the MIB
-     * will be SNMP accessible and add this new MIB in the SNMP MIB handler.
-     * Adds a new contextualized MIB in the SNMP MIB handler.
-     *
-     * @param stack The SNMP MIB handler.
-     * @param contextName The MIB context name. If null is passed, will be
-     *        registered in the default context.
-     *
-     * @exception IllegalArgumentException If the parameter is null.
-     *
-     * @since 1.5
-     */
-    public void setSnmpAdaptor(SnmpMibHandler stack, String contextName);
-
-    /**
-     * Sets the reference to the SNMP protocol adaptor through which the MIB
-     * will be SNMP accessible and adds this new MIB in the SNMP MIB handler.
-     * Adds a new contextualized MIB in the SNMP MIB handler.
-     *
-     * @param stack The SNMP MIB handler.
-     * @param contextName The MIB context name. If null is passed, will be
-     *        registered in the default context.
-     * @param oids The set of OIDs this agent implements.
-     * @exception IllegalArgumentException If the parameter is null.
-     *
-     * @since 1.5
-     */
-    public void setSnmpAdaptor(SnmpMibHandler stack,
-                               String contextName,
-                               SnmpOid[] oids);
-
-    /**
-     * Gets the object name of the SNMP protocol adaptor to which the MIB is
-     * bound.
-     *
-     * @return The name of the SNMP protocol adaptor.
-     */
-    public ObjectName getSnmpAdaptorName();
-
-    /**
-     * Sets the reference to the SNMP protocol adaptor through which the MIB
-     * will be SNMP accessible and add this new MIB in the SNMP MIB handler
-     * associated to the specified <CODE>name</CODE>.
-     *
-     * @param name The object name of the SNMP MIB handler.
-     *
-     * @exception InstanceNotFoundException The MBean does not exist in the
-     *        MBean server.
-     * @exception ServiceNotFoundException This SNMP MIB is not registered
-     *        in the MBean server or the requested service is not supported.
-     */
-    public void setSnmpAdaptorName(ObjectName name)
-        throws InstanceNotFoundException, ServiceNotFoundException;
-
-
-    /**
-     * Sets the reference to the SNMP protocol adaptor through which the MIB
-     * will be SNMP accessible and add this new MIB in the SNMP MIB handler
-     * associated to the specified <CODE>name</CODE>.
-     * This method is to be called to set a specific agent to a specific OID.
-     * This can be useful when dealing with MIB overlapping.
-     * Some OID can be implemented in more than one MIB. In this case, the
-     * OID nearer agent will be used on SNMP operations.
-     * @param name The name of the SNMP protocol adaptor.
-     * @param oids The set of OIDs this agent implements.
-     * @exception InstanceNotFoundException The SNMP protocol adaptor does
-     *     not exist in the MBean server.
-     *
-     * @exception ServiceNotFoundException This SNMP MIB is not registered
-     *     in the MBean server or the requested service is not supported.
-     *
-     * @since 1.5
-     */
-    public void setSnmpAdaptorName(ObjectName name, SnmpOid[] oids)
-        throws InstanceNotFoundException, ServiceNotFoundException;
-
-    /**
-     * Sets the reference to the SNMP protocol adaptor through which the MIB
-     * will be SNMP accessible and add this new MIB in the SNMP MIB handler
-     * associated to the specified <CODE>name</CODE>.
-     *
-     * @param name The name of the SNMP protocol adaptor.
-     * @param contextName The MIB context name. If null is passed, will be
-     *     registered in the default context.
-     * @exception InstanceNotFoundException The SNMP protocol adaptor does
-     *     not exist in the MBean server.
-     *
-     * @exception ServiceNotFoundException This SNMP MIB is not registered
-     *     in the MBean server or the requested service is not supported.
-     *
-     * @since 1.5
-     */
-    public void setSnmpAdaptorName(ObjectName name, String contextName)
-        throws InstanceNotFoundException, ServiceNotFoundException;
-
-     /**
-     * Sets the reference to the SNMP protocol adaptor through which the MIB
-     * will be SNMP accessible and add this new MIB in the SNMP MIB handler
-     * associated to the specified <CODE>name</CODE>.
-     *
-     * @param name The name of the SNMP protocol adaptor.
-     * @param contextName The MIB context name. If null is passed, will be
-     *        registered in the default context.
-     * @param oids The set of OIDs this agent implements.
-     * @exception InstanceNotFoundException The SNMP protocol adaptor does
-     *     not exist in the MBean server.
-     *
-     * @exception ServiceNotFoundException This SNMP MIB is not registered
-     *     in the MBean server or the requested service is not supported.
-     *
-     * @since 1.5
-     */
-    public void setSnmpAdaptorName(ObjectName name,
-                                   String contextName,
-                                   SnmpOid[] oids)
-        throws InstanceNotFoundException, ServiceNotFoundException;
-
-    /**
-     * Indicates whether or not the MIB module is bound to a SNMP protocol
-     * adaptor.
-     * As a reminder, only bound MIBs can be accessed through SNMP protocol
-     * adaptor.
-     *
-     * @return <CODE>true</CODE> if the MIB module is bound,
-     *         <CODE>false</CODE> otherwise.
-     */
-    public boolean getBindingState();
-
-    /**
-     * Gets the MIB name.
-     *
-     * @return The MIB name.
-     */
-    public String getMibName();
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/agent/SnmpMibEntry.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,188 +0,0 @@
-/*
- * Copyright (c) 2000, 2014, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.jmx.snmp.agent;
-
-// java imports
-//
-import com.sun.jmx.snmp.SnmpDefinitions;
-import java.io.Serializable;
-import com.sun.jmx.snmp.SnmpStatusException;
-
-/**
- * Represents a node in an SNMP MIB which corresponds to a table entry
- * meta node.
- * <P>
- * This class is used by the class generated by <CODE>mibgen</CODE>.
- * You should not need to use this class directly.
- *
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- */
-@SuppressWarnings("serial") // JDK implementation class
-public abstract class SnmpMibEntry extends SnmpMibNode
-    implements Serializable {
-
-    /**
-     * Tells whether the given arc identifies a variable (scalar object) in
-     * this entry.
-     *
-     * @param arc An OID arc.
-     *
-     * @return <CODE>true</CODE> if `arc' leads to a variable.
-     */
-    public abstract boolean isVariable(long arc);
-
-    /**
-     * Tells whether the given arc identifies a readable scalar object in
-     * this entry.
-     *
-     * @param arc An OID arc.
-     *
-     * @return <CODE>true</CODE> if `arc' leads to a readable variable.
-     */
-    public abstract boolean isReadable(long arc);
-
-    /**
-     * Get the next OID arc corresponding to a readable scalar variable.
-     *
-     */
-    public long getNextVarId(long id, Object userData)
-        throws SnmpStatusException {
-        long nextvar = super.getNextVarId(id,userData);
-        while (!isReadable(nextvar))
-            nextvar = super.getNextVarId(nextvar,userData);
-        return nextvar;
-    }
-
-    /**
-     * Checks whether the given OID arc identifies a variable (columnar
-     * object).
-     *
-     * @param userData A contextual object containing user-data.
-     *        This object is allocated through the <code>
-     *        {@link com.sun.jmx.snmp.agent.SnmpUserDataFactory}</code>
-     *        for each incoming SNMP request.
-     *
-     * @exception If the given `arc' does not identify any variable in this
-     *    group, throws an SnmpStatusException.
-     */
-    public void validateVarId(long arc, Object userData)
-        throws SnmpStatusException {
-        if (isVariable(arc) == false) {
-            throw new SnmpStatusException(SnmpDefinitions.snmpRspNoSuchName);
-        }
-    }
-
-    /**
-     * Generic handling of the <CODE>get</CODE> operation.
-     * <p>The actual implementation of this method will be generated
-     * by mibgen. Usually, this implementation only delegates the
-     * job to some other provided runtime class, which knows how to
-     * access the MBean. The current toolkit thus provides two
-     * implementations:
-     * <ul><li>The standard implementation will directly access the
-     *         MBean through a java reference,</li>
-     *     <li>The generic implementation will access the MBean through
-     *         the MBean server.</li>
-     * </ul>
-     * <p>Both implementations rely upon specific - and distinct, set of
-     * mibgen generated methods.
-     * <p> You can override this method if you need to implement some
-     * specific policies for minimizing the accesses made to some remote
-     * underlying resources.
-     * <p>
-     *
-     * @param req   The sub-request that must be handled by this node.
-     *
-     * @param depth The depth reached in the OID tree.
-     *
-     * @exception SnmpStatusException An error occurred while accessing
-     *  the MIB node.
-     */
-    abstract public void get(SnmpMibSubRequest req, int depth)
-        throws SnmpStatusException;
-
-    /**
-     * Generic handling of the <CODE>set</CODE> operation.
-     * <p>The actual implementation of this method will be generated
-     * by mibgen. Usually, this implementation only delegates the
-     * job to some other provided runtime class, which knows how to
-     * access the MBean. The current toolkit thus provides two
-     * implementations:
-     * <ul><li>The standard implementation will directly access the
-     *         MBean through a java reference,</li>
-     *     <li>The generic implementation will access the MBean through
-     *         the MBean server.</li>
-     * </ul>
-     * <p>Both implementations rely upon specific - and distinct, set of
-     * mibgen generated methods.
-     * <p> You can override this method if you need to implement some
-     * specific policies for minimizing the accesses made to some remote
-     * underlying resources.
-     * <p>
-     *
-     * @param req   The sub-request that must be handled by this node.
-     *
-     * @param depth The depth reached in the OID tree.
-     *
-     * @exception SnmpStatusException An error occurred while accessing
-     *  the MIB node.
-     */
-    abstract public void set(SnmpMibSubRequest req, int depth)
-        throws SnmpStatusException;
-
-    /**
-     * Generic handling of the <CODE>check</CODE> operation.
-     *
-     * <p>The actual implementation of this method will be generated
-     * by mibgen. Usually, this implementation only delegates the
-     * job to some other provided runtime class, which knows how to
-     * access the MBean. The current toolkit thus provides two
-     * implementations:
-     * <ul><li>The standard implementation will directly access the
-     *         MBean through a java reference,</li>
-     *     <li>The generic implementation will access the MBean through
-     *         the MBean server.</li>
-     * </ul>
-     * <p>Both implementations rely upon specific - and distinct, set of
-     * mibgen generated methods.
-     * <p> You can override this method if you need to implement some
-     * specific policies for minimizing the accesses made to some remote
-     * underlying resources, or if you need to implement some consistency
-     * checks between the different values provided in the varbind list.
-     * <p>
-     *
-     * @param req   The sub-request that must be handled by this node.
-     *
-     * @param depth The depth reached in the OID tree.
-     *
-     * @exception SnmpStatusException An error occurred while accessing
-     *  the MIB node.
-     */
-    abstract public void check(SnmpMibSubRequest req, int depth)
-        throws SnmpStatusException;
-
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/agent/SnmpMibGroup.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,521 +0,0 @@
-/*
- * Copyright (c) 1999, 2014, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.jmx.snmp.agent;
-
-// java imports
-//
-import java.io.Serializable;
-import java.util.Hashtable;
-import java.util.Vector;
-
-// jmx imports
-//
-import com.sun.jmx.snmp.SnmpVarBind;
-import com.sun.jmx.snmp.SnmpStatusException;
-
-
-/**
- * Represents a node in an SNMP MIB which corresponds to a group.
- * This class allows subnodes to be registered below a group, providing
- * support for nested groups. The subnodes are registered at run time
- * when registering the nested groups in the global MIB OID tree.
- * <P>
- * This class is used by the class generated by <CODE>mibgen</CODE>.
- * You should not need to use this class directly.
- *
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- */
-@SuppressWarnings("serial") // JDK implementation class
-public abstract class SnmpMibGroup extends SnmpMibOid
-    implements Serializable {
-
-    // We will register the OID arcs leading to subgroups in this hashtable.
-    // So for each arc in varList, if the arc is also in subgroups, it leads
-    // to a subgroup, if it is not in subgroup, it leads either to a table
-    // or to a variable.
-    protected Hashtable<Long, Long> subgroups = null;
-
-    /**
-     * Tells whether the given arc identifies a table in this group.
-     *
-     * @param arc An OID arc.
-     *
-     * @return <CODE>true</CODE> if `arc' leads to a table.
-     */
-    public abstract boolean      isTable(long arc);
-
-    /**
-     * Tells whether the given arc identifies a variable (scalar object) in
-     * this group.
-     *
-     * @param arc An OID arc.
-     *
-     * @return <CODE>true</CODE> if `arc' leads to a variable.
-     */
-    public abstract boolean      isVariable(long arc);
-
-    /**
-     * Tells whether the given arc identifies a readable scalar object in
-     * this group.
-     *
-     * @param arc An OID arc.
-     *
-     * @return <CODE>true</CODE> if `arc' leads to a readable variable.
-     */
-    public abstract boolean      isReadable(long arc);
-
-
-    /**
-     * Gets the table identified by the given `arc'.
-     *
-     * @param arc An OID arc.
-     *
-     * @return The <CODE>SnmpMibTable</CODE> identified by `arc', or
-     *    <CODE>null</CODE> if `arc' does not identify any table.
-     */
-    public abstract SnmpMibTable getTable(long arc);
-
-    /**
-     * Checks whether the given OID arc identifies a variable (scalar
-     * object).
-     *
-     * @exception If the given `arc' does not identify any variable in this
-     *    group, throws an SnmpStatusException.
-     */
-    public void validateVarId(long arc, Object userData)
-        throws SnmpStatusException {
-        if (isVariable(arc) == false) {
-            throw new SnmpStatusException(SnmpStatusException.noSuchObject);
-        }
-    }
-
-
-    // -------------------------------------------------------------------
-    // We use a hashtable (subgroup) in order to determine whether an
-    // OID arc leads to a subgroup. This implementation can be changed if
-    // needed...
-    // For instance, the subclass could provide a generated isNestedArc()
-    // method in which the subgroup OID arcs would be hardcoded.
-    // However, the generic approach was preferred because at this time
-    // groups and subgroups are dynamically registered in the MIB.
-    //
-    /**
-     * Tell whether the given OID arc identifies a sub-tree
-     * leading to a nested SNMP sub-group. This method is used internally.
-     * You shouldn't need to call it directly.
-     *
-     * @param arc An OID arc.
-     *
-     * @return <CODE>true</CODE> if the given OID arc identifies a subtree
-     * leading to a nested SNMP sub-group.
-     *
-     */
-    public boolean isNestedArc(long arc) {
-        if (subgroups == null) return false;
-        Object obj = subgroups.get(arc);
-        // if the arc is registered in the hashtable,
-        // it leads to a subgroup.
-        return (obj != null);
-    }
-
-    /**
-     * Generic handling of the <CODE>get</CODE> operation.
-     * <p>The actual implementation of this method will be generated
-     * by mibgen. Usually, this implementation only delegates the
-     * job to some other provided runtime class, which knows how to
-     * access the MBean. The current toolkit thus provides two
-     * implementations:
-     * <ul><li>The standard implementation will directly access the
-     *         MBean through a java reference,</li>
-     *     <li>The generic implementation will access the MBean through
-     *         the MBean server.</li>
-     * </ul>
-     * <p>Both implementations rely upon specific - and distinct, set of
-     * mibgen generated methods.
-     * <p> You can override this method if you need to implement some
-     * specific policies for minimizing the accesses made to some remote
-     * underlying resources.
-     * <p>
-     *
-     * @param req   The sub-request that must be handled by this node.
-     *
-     * @param depth The depth reached in the OID tree.
-     *
-     * @exception SnmpStatusException An error occurred while accessing
-     *  the MIB node.
-     */
-    @Override
-    abstract public void get(SnmpMibSubRequest req, int depth)
-        throws SnmpStatusException;
-
-    /**
-     * Generic handling of the <CODE>set</CODE> operation.
-     * <p>The actual implementation of this method will be generated
-     * by mibgen. Usually, this implementation only delegates the
-     * job to some other provided runtime class, which knows how to
-     * access the MBean. The current toolkit thus provides two
-     * implementations:
-     * <ul><li>The standard implementation will directly access the
-     *         MBean through a java reference,</li>
-     *     <li>The generic implementation will access the MBean through
-     *         the MBean server.</li>
-     * </ul>
-     * <p>Both implementations rely upon specific - and distinct, set of
-     * mibgen generated methods.
-     * <p> You can override this method if you need to implement some
-     * specific policies for minimizing the accesses made to some remote
-     * underlying resources.
-     * <p>
-     *
-     * @param req   The sub-request that must be handled by this node.
-     *
-     * @param depth The depth reached in the OID tree.
-     *
-     * @exception SnmpStatusException An error occurred while accessing
-     *  the MIB node.
-     */
-    @Override
-    abstract public void set(SnmpMibSubRequest req, int depth)
-        throws SnmpStatusException;
-
-    /**
-     * Generic handling of the <CODE>check</CODE> operation.
-     *
-     * <p>The actual implementation of this method will be generated
-     * by mibgen. Usually, this implementation only delegates the
-     * job to some other provided runtime class, which knows how to
-     * access the MBean. The current toolkit thus provides two
-     * implementations:
-     * <ul><li>The standard implementation will directly access the
-     *         MBean through a java reference,</li>
-     *     <li>The generic implementation will access the MBean through
-     *         the MBean server.</li>
-     * </ul>
-     * <p>Both implementations rely upon specific - and distinct, set of
-     * mibgen generated methods.
-     * <p> You can override this method if you need to implement some
-     * specific policies for minimizing the accesses made to some remote
-     * underlying resources, or if you need to implement some consistency
-     * checks between the different values provided in the varbind list.
-     * <p>
-     *
-     * @param req   The sub-request that must be handled by this node.
-     *
-     * @param depth The depth reached in the OID tree.
-     *
-     * @exception SnmpStatusException An error occurred while accessing
-     *  the MIB node.
-     */
-    @Override
-    abstract public void check(SnmpMibSubRequest req, int depth)
-        throws SnmpStatusException;
-
-    // --------------------------------------------------------------------
-    // If we reach this node, we are below the root OID, so we just
-    // return.
-    // --------------------------------------------------------------------
-    @Override
-    public void getRootOid(Vector<Integer> result) {
-    }
-
-    // -------------------------------------------------------------------
-    // PACKAGE METHODS
-    // -------------------------------------------------------------------
-
-    // -------------------------------------------------------------------
-    // This method can also be overriden in a subclass to provide a
-    // different implementation of the isNestedArc() method.
-    // => if isNestedArc() is hardcoded, then registerSubArc() becomes
-    //    useless and can become empty.
-    /**
-     * Register an OID arc that identifies a sub-tree
-     * leading to a nested SNMP sub-group. This method is used internally.
-     * You shouldn't ever call it directly.
-     *
-     * @param arc An OID arc.
-     *
-     */
-    void registerNestedArc(long arc) {
-        Long obj = arc;
-        if (subgroups == null) subgroups = new Hashtable<>();
-        // registers the arc in the hashtable.
-        subgroups.put(obj,obj);
-    }
-
-    // -------------------------------------------------------------------
-    // The SnmpMibOid algorithm relies on the fact that for every arc
-    // registered in varList, there is a corresponding node at the same
-    // position in children.
-    // So the trick is to register a null node in children for each variable
-    // in varList, so that the real subgroup nodes can be inserted at the
-    // correct location.
-    // registerObject() should be called for each scalar object and each
-    // table arc by the generated subclass.
-    /**
-     * Register an OID arc that identifies a scalar object or a table.
-     * This method is used internally. You shouldn't ever call it directly.
-     *
-     * @param arc An OID arc.
-     *
-     */
-    protected void registerObject(long arc)
-        throws IllegalAccessException {
-
-        // this will register the variable in both varList and children
-        // The node registered in children will be null, so that the parent
-        // algorithm will behave as if no node were registered. This is a
-        // trick that makes the parent algorithm behave as if only subgroups
-        // were registered in varList and children.
-        long[] oid = new long[1];
-        oid[0] = arc;
-        super.registerNode(oid,0,null);
-    }
-
-    // -------------------------------------------------------------------
-    // registerNode() will be called at runtime when nested groups are
-    // registered in the MIB. So we do know that this method will only
-    // be called to register nested-groups.
-    // We trap registerNode() in order to call registerSubArc()
-    /**
-     * Register a child node of this node in the OID tree.
-     * This method is used internally. You shouldn't ever call it directly.
-     *
-     * @param oid The oid of the node being registered.
-     * @param cursor The position reached in the oid.
-     * @param node The node being registered.
-     *
-     */
-    @Override
-    void registerNode(long[] oid, int cursor ,SnmpMibNode node)
-        throws IllegalAccessException {
-        super.registerNode(oid,cursor,node);
-        if (cursor < 0) return;
-        if (cursor >= oid.length) return;
-        // if we get here, then it means we are registering a subgroup.
-        // We will thus register the sub arc in the subgroups hashtable.
-        registerNestedArc(oid[cursor]);
-    }
-
-    // -------------------------------------------------------------------
-    // see comments in SnmpMibNode
-    // -------------------------------------------------------------------
-    @Override
-    void findHandlingNode(SnmpVarBind varbind,
-                          long[] oid, int depth,
-                          SnmpRequestTree handlers)
-        throws SnmpStatusException {
-
-        int length = oid.length;
-
-        if (handlers == null)
-            throw new SnmpStatusException(SnmpStatusException.snmpRspGenErr);
-
-        final Object data = handlers.getUserData();
-
-        if (depth >= length) {
-            // Nothing is left... the oid is not valid
-            throw new SnmpStatusException(SnmpStatusException.noAccess);
-        }
-
-        long arc = oid[depth];
-
-        if (isNestedArc(arc)) {
-            // This arc leads to a subgroup: delegates the search to the
-            // method defined in SnmpMibOid
-            super.findHandlingNode(varbind,oid,depth,handlers);
-        } else if (isTable(arc)) {
-            // This arc leads to a table: forward the search to the table.
-
-            // Gets the table
-            SnmpMibTable table = getTable(arc);
-
-            // Forward the search to the table
-            table.findHandlingNode(varbind,oid,depth+1,handlers);
-
-        } else {
-            // If it's not a variable, throws an exception
-            validateVarId(arc, data);
-
-            // The trailing .0 is missing in the OID
-            if (depth+2 > length) {
-                throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-            }
-
-            // There are too many arcs left in the OID (there should remain
-            // a single trailing .0)
-            if (depth+2 < length) {
-                throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-            }
-
-            // The last trailing arc is not .0
-            if (oid[depth+1] != 0L) {
-                throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-            }
-
-            // It's one of our variable, register this node.
-            handlers.add(this,depth,varbind);
-        }
-    }
-
-    // -------------------------------------------------------------------
-    // See comments in SnmpMibNode.
-    // -------------------------------------------------------------------
-    @Override
-    long[] findNextHandlingNode(SnmpVarBind varbind,
-                                long[] oid, int pos, int depth,
-                                SnmpRequestTree handlers, AcmChecker checker)
-        throws SnmpStatusException {
-
-        int length = oid.length;
-        SnmpMibNode node = null;
-
-        if (handlers == null) {
-            // This should be considered as a genErr, but we do not want to
-            // abort the whole request, so we're going to throw
-            // a noSuchObject...
-            //
-            throw new SnmpStatusException(SnmpStatusException.noSuchObject);
-        }
-
-        final Object data = handlers.getUserData();
-        final int pduVersion = handlers.getRequestPduVersion();
-
-
-        // The generic case where the end of the OID has been reached is
-        // handled in the superclass
-        // XXX Revisit: this works but it is somewhat convoluted. Just setting
-        //              arc to -1 would work too.
-        if (pos >= length)
-            return super.findNextHandlingNode(varbind,oid,pos,depth,
-                                              handlers, checker);
-
-        // Ok, we've got the arc.
-        long arc = oid[pos];
-
-        long[] result = null;
-
-        // We have a recursive logic. Should we have a loop instead?
-        try {
-
-            if (isTable(arc)) {
-                // If the arc identifies a table, then we need to forward
-                // the search to the table.
-
-                // Gets the table identified by `arc'
-                SnmpMibTable table = getTable(arc);
-
-                // Forward to the table
-                checker.add(depth, arc);
-                try {
-                    result = table.findNextHandlingNode(varbind,oid,pos+1,
-                                                        depth+1,handlers,
-                                                        checker);
-                }catch(SnmpStatusException ex) {
-                    throw new SnmpStatusException(SnmpStatusException.noSuchObject);
-                } finally {
-                    checker.remove(depth);
-                }
-                // Build up the leaf OID
-                result[depth] = arc;
-                return result;
-            } else if (isReadable(arc)) {
-                // If the arc identifies a readable variable, then two cases:
-
-                if (pos == (length - 1)) {
-                    // The end of the OID is reached, so we return the leaf
-                    // corresponding to the variable identified by `arc'
-
-                    // Build up the OID
-                    // result = new SnmpOid(0);
-                    // result.insert((int)arc);
-                    result = new long[depth+2];
-                    result[depth+1] = 0L;
-                    result[depth] = arc;
-
-                    checker.add(depth, result, depth, 2);
-                    try {
-                        checker.checkCurrentOid();
-                    } catch(SnmpStatusException e) {
-                        throw new SnmpStatusException(SnmpStatusException.noSuchObject);
-                    } finally {
-                        checker.remove(depth,2);
-                    }
-
-                    // Registers this node
-                    handlers.add(this,depth,varbind);
-                    return result;
-                }
-
-                // The end of the OID is not yet reached, so we must return
-                // the next leaf following the variable identified by `arc'.
-                // We cannot return the variable because whatever follows in
-                // the OID will be greater or equals to 0, and 0 identifies
-                // the variable itself - so we have indeed to return the
-                // next object.
-                // So we do nothing, because this case is handled at the
-                // end of the if ... else if ... else ... block.
-
-            } else if (isNestedArc(arc)) {
-                // Now if the arc leads to a subgroup, we delegate the
-                // search to the child, just as done in SnmpMibNode.
-                //
-
-                // get the child ( = nested arc node).
-                //
-                final SnmpMibNode child = getChild(arc);
-
-                if (child != null) {
-                    checker.add(depth, arc);
-                    try {
-                        result = child.findNextHandlingNode(varbind,oid,pos+1,
-                                                            depth+1,handlers,
-                                                            checker);
-                        result[depth] = arc;
-                        return result;
-                    } finally {
-                        checker.remove(depth);
-                    }
-                }
-            }
-
-            // The oid is not valid, we will throw an exception in order
-            // to try with the next valid identifier...
-            //
-            throw new SnmpStatusException(SnmpStatusException.noSuchObject);
-
-        } catch (SnmpStatusException e) {
-            // We didn't find anything at the given arc, so we're going
-            // to try with the next valid arc
-            //
-            long[] newOid = new long[1];
-            newOid[0] = getNextVarId(arc,data,pduVersion);
-            return findNextHandlingNode(varbind,newOid,0,depth,
-                                        handlers,checker);
-        }
-    }
-
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/agent/SnmpMibHandler.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,155 +0,0 @@
-/*
- * Copyright (c) 1998, 2007, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-package com.sun.jmx.snmp.agent;
-
-
-
-// java imports
-//
-import java.util.Vector;
-import java.io.IOException;
-
-// jmx imports
-//
-import com.sun.jmx.snmp.SnmpOid;
-import com.sun.jmx.snmp.SnmpStatusException;
-
-/**
- * The logical link between an SNMP MIB and the SNMP communication stack.
- *
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- */
-
-public interface SnmpMibHandler {
-
-    /**
-     * Adds a new MIB in the SNMP MIB handler.
-     * This method is called automatically by {@link com.sun.jmx.snmp.agent.SnmpMibAgent#setSnmpAdaptor(SnmpMibHandler)} and
-     * {@link com.sun.jmx.snmp.agent.SnmpMibAgent#setSnmpAdaptorName(ObjectName)} and should not be called directly.
-     *
-     * @param mib The MIB to add.
-     *
-     * @return A reference on the SNMP MIB handler.
-     *
-     * @exception IllegalArgumentException If the parameter is null.
-     */
-    public SnmpMibHandler addMib(SnmpMibAgent mib) throws IllegalArgumentException;
-
-/**
-     * Adds a new MIB in the SNMP MIB handler.
-     *
-     * @param mib The MIB to add.
-     * @param oids The array of oid used to add the mib. Each oid is a root oid for the mib.
-     * @return A reference on the SNMP MIB handler.
-     *
-     * @exception IllegalArgumentException If the parameter is null.
-     *
-     * @since 1.5
-     */
-    public SnmpMibHandler addMib(SnmpMibAgent mib, SnmpOid[] oids) throws IllegalArgumentException;
-
-    /**
-     * Adds a new contextualized MIB in the SNMP MIB handler.
-     *
-     * @param mib The MIB to add.
-     * @param contextName The MIB context name. If null is passed, will be registered in the default context.
-     *
-     * @return A reference to the SNMP MIB handler.
-     *
-     * @exception IllegalArgumentException If the parameter is null.
-     *
-     * @since 1.5
-     */
-    public SnmpMibHandler addMib(SnmpMibAgent mib, String contextName)
-        throws IllegalArgumentException;
-
-    /**
-     * Adds a new contextualized MIB in the SNMP MIB handler.
-     *
-     * @param mib The MIB to add.
-     * @param contextName The MIB context name. If null is passed, will be registered in the default context.
-     * @param oids The array of oid used to add the mib. Each oid is a root oid for the mib.
-     *
-     * @return A reference to the SNMP MIB handler.
-     *
-     * @exception IllegalArgumentException If the parameter is null.
-     *
-     * @since 1.5
-     */
-    public SnmpMibHandler addMib(SnmpMibAgent mib, String contextName, SnmpOid[] oids)
-        throws IllegalArgumentException;
-
-    /**
-     * Removes the specified MIB from the SNMP protocol adaptor.
-     * This method is called automatically by {@link com.sun.jmx.snmp.agent.SnmpMibAgent#setSnmpAdaptor(SnmpMibHandler)} and
-     * {@link com.sun.jmx.snmp.agent.SnmpMibAgent#setSnmpAdaptorName(ObjectName)} and should not be called directly.
-     *
-     * @param mib The MIB to be removed.
-     *
-     * @return <CODE>true</CODE> if the specified <CODE>mib</CODE> was a MIB included in the SNMP MIB handler,
-     * <CODE>false</CODE> otherwise.
-     */
-    public boolean removeMib(SnmpMibAgent mib);
-  /**
-     * Removes the specified MIB from the SNMP protocol adaptor.
-     * This method is called automatically by {@link com.sun.jmx.snmp.agent.SnmpMibAgent#setSnmpAdaptor(SnmpMibHandler)} and
-     * {@link com.sun.jmx.snmp.agent.SnmpMibAgent#setSnmpAdaptorName(ObjectName)} and should not be called directly.
-     *
-     * @param mib The MIB to be removed.
-     * @param oids The oid the MIB was previously registered for.
-     * @return <CODE>true</CODE> if the specified <CODE>mib</CODE> was a MIB included in the SNMP MIB handler,
-     * <CODE>false</CODE> otherwise.
-     *
-     * @since 1.5
-     */
-    public boolean removeMib(SnmpMibAgent mib, SnmpOid[] oids);
-     /**
-     * Removes the specified MIB from the SNMP protocol adaptor.
-     *
-     * @param mib The MIB to be removed.
-     * @param contextName The context name used at registration time.
-     *
-     * @return <CODE>true</CODE> if the specified <CODE>mib</CODE> was a MIB included in the SNMP MIB handler,
-     * <CODE>false</CODE> otherwise.
-     *
-     * @since 1.5
-     */
-    public boolean removeMib(SnmpMibAgent mib, String contextName);
-     /**
-     * Removes the specified MIB from the SNMP protocol adaptor.
-     *
-     * @param mib The MIB to be removed.
-     * @param contextName The context name used at registration time.
-     * @param oids The oid the MIB was previously registered for.
-     * @return <CODE>true</CODE> if the specified <CODE>mib</CODE> was a MIB included in the SNMP MIB handler,
-     * <CODE>false</CODE> otherwise.
-     *
-     * @since 1.5
-     */
-    public boolean removeMib(SnmpMibAgent mib, String contextName, SnmpOid[] oids);
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/agent/SnmpMibNode.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,406 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-package com.sun.jmx.snmp.agent;
-
-
-
-// java imports
-//
-import java.io.Serializable;
-import java.util.Vector;
-import java.util.Hashtable;
-import java.util.Enumeration;
-
-// jmx imports
-//
-import com.sun.jmx.snmp.SnmpOid;
-import com.sun.jmx.snmp.SnmpValue;
-import com.sun.jmx.snmp.SnmpVarBind;
-import com.sun.jmx.snmp.SnmpDefinitions;
-import com.sun.jmx.snmp.SnmpStatusException;
-
-/**
- * The <CODE>SnmpMibNode</CODE> class represents a node in an SNMP MIB.
- * <P>
- * This class is used internally and by the class generated by
- * <CODE>mibgen</CODE>.
- * You should not need to use this class directly.
- *
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- */
-@SuppressWarnings("serial") // JDK implementation class
-public abstract class SnmpMibNode implements Serializable {
-
-    // ---------------------------------------------------------------------
-    // PUBLIC METHODS
-    //----------------------------------------------------------------------
-
-    /**
-     * Get the next OID arc corresponding to a readable scalar variable,
-     * a branch leading to a subgroub, or a table.
-     *
-     * @param id Id we start from looking for the next.
-     * @param userData A contextual object containing user-data.
-     *        This object is allocated through the <code>
-     *        {@link com.sun.jmx.snmp.agent.SnmpUserDataFactory}</code>
-     *        for each incoming SNMP request.
-     *
-     * @return The next id in this group.
-     *
-     * @exception SnmpStatusException If no id is found after the given id.
-     */
-    public long getNextVarId(long id, Object userData)
-        throws SnmpStatusException {
-        return getNextIdentifier(varList,id);
-    }
-
-    /**
-     * Get the next OID arc corresponding to a readable scalar variable,
-     * a branch leading to a subgroub, or a table, possibly skipping over
-     * those arcs that must not or cannot be returned.
-     *
-     * Calls {@link #getNextVarId(long,java.lang.Object)} until
-     * {@link #skipVariable(long,java.lang.Object,int)} returns false.
-     *
-     * @param id Id we start from looking for the next.
-     * @param userData A contextual object containing user-data.
-     *        This object is allocated through the <code>
-     *        {@link com.sun.jmx.snmp.agent.SnmpUserDataFactory}</code>
-     *        for each incoming SNMP request.
-     * @param pduVersion Protocol version of the original request PDU.
-     *
-     * @return The next id in this group which can be returned using
-     *         the given PDU's protocol version.
-     *
-     * @exception SnmpStatusException If no id is found after the given id.
-     */
-    public long getNextVarId(long id, Object userData, int pduVersion)
-        throws SnmpStatusException {
-        long varid=id;
-        do {
-            varid = getNextVarId(varid,userData);
-        } while (skipVariable(varid,userData,pduVersion));
-
-        return varid;
-    }
-
-    /**
-     * Hook for subclasses.
-     * The default implementation of this method is to always return
-     * false. Subclasses should redefine this method so that it returns
-     * true when:
-     * <ul><li>the variable is a leaf that is not instantiated,</li>
-     * <li>or the variable is a leaf whose type cannot be returned by that
-     *     version of the protocol (e.g. an Counter64 with SNMPv1).</li>
-     * </ul>
-     *
-     * @param id Id we start from looking for the next.
-     * @param userData A contextual object containing user-data.
-     *        This object is allocated through the <code>
-     *        {@link com.sun.jmx.snmp.agent.SnmpUserDataFactory}</code>
-     *        for each incoming SNMP request.
-     * @param pduVersion Protocol version of the original request PDU.
-     *
-     * @return true if the variable must be skipped by the get-next
-     *         algorithm.
-     */
-    protected boolean skipVariable(long id, Object userData, int pduVersion) {
-        return false;
-    }
-
-    /**
-     * Find the node which handles a varbind, and register it in the
-     * SnmpRequestTree. This method is a pure internal method. You should
-     * never try to call it directly.
-     *
-     * @param varbind  The varbind to be handled
-     *
-     * @param oid      The OID array extracted from the varbind
-     *
-     * @param depth    The depth reached in the OID at this step of the
-     *                 processing.
-     *
-     * @param handlers The Hashtable in which the varbind will be registered
-     *                 with its handling node. This hashtable contains
-     *                 <CODE>SnmpRequestTree.Handler</CODE> items.
-     *
-     * @exception SnmpStatusException No handling node was found.
-     **/
-    void findHandlingNode(SnmpVarBind varbind,
-                          long[] oid, int depth,
-                          SnmpRequestTree handlers)
-        throws SnmpStatusException {
-        throw new SnmpStatusException(SnmpStatusException.noSuchObject);
-    }
-
-    /**
-     * Find the node which handles the leaf that immediately follows the
-     * given varbind OID, and register the it in the SnmpRequestTree.
-     * This method is a pure internal method. You should never try to call
-     * it directly.
-     *
-     * @param varbind  The varbind to be handled
-     *
-     * @param oid      The OID array extracted from the varbind
-     *
-     * @param depth    The depth reached in the OID at this step of the
-     *                 processing.
-     *
-     * @param handlers The Hashtable in which the varbind will be registered
-     *                 with its handling node. This hashtable contains
-     *                 SnmpRequestTree.Handler items.
-     *
-     * @return The SnmpOid of the next leaf.
-     *
-     * @exception SnmpStatusException No handling node was found.
-     **/
-    long[] findNextHandlingNode(SnmpVarBind varbind,
-                                 long[] oid, int pos, int depth,
-                                 SnmpRequestTree handlers, AcmChecker checker)
-        throws SnmpStatusException {
-        throw new SnmpStatusException(SnmpStatusException.noSuchObject);
-    }
-
-    /**
-     * Generic handling of the <CODE>get</CODE> operation.
-     *
-     * <p> You can override this method if you need to implement some
-     * specific policies for minimizing the accesses made to some remote
-     * underlying resources.
-     * <p>
-     *
-     * @param req   The sub-request that must be handled by this node.
-     *
-     * @param depth The depth reached in the OID tree.
-     *
-     * @exception SnmpStatusException An error occurred while accessing
-     *  the MIB node.
-     */
-    public abstract void get(SnmpMibSubRequest req, int depth)
-        throws SnmpStatusException;
-
-    /**
-     * Generic handling of the <CODE>set</CODE> operation.
-     * <p> You can override this method if you need to implement some
-     * specific policies for minimizing the accesses made to some remote
-     * underlying resources.
-     * <p>
-     *
-     * @param req   The sub-request that must be handled by this node.
-     *
-     * @param depth The depth reached in the OID tree.
-     *
-     * @exception SnmpStatusException An error occurred while accessing
-     *  the MIB node.
-     */
-    public abstract void set(SnmpMibSubRequest req, int depth)
-        throws SnmpStatusException;
-
-    /**
-     * Generic handling of the <CODE>check</CODE> operation.
-     * <p> You can override this method if you need to implement some
-     * specific policies for minimizing the accesses made to some remote
-     * underlying resources, or if you need to implement some consistency
-     * checks between the different values provided in the varbind list.
-     * <p>
-     *
-     * @param req   The sub-request that must be handled by this node.
-     *
-     * @param depth The depth reached in the OID tree.
-     *
-     * @exception SnmpStatusException An error occurred while accessing
-     *  the MIB node.
-     */
-    public abstract void check(SnmpMibSubRequest req, int depth)
-        throws SnmpStatusException;
-
-    /**
-     * Sorts the specified integer array.
-     *
-     * @param array An integer array.
-     */
-    static public void sort(int array[]) {
-        QuickSort(array, 0, array.length - 1);
-    }
-
-    /**
-     * Computes the root OID of the MIB.
-     */
-    public void getRootOid(Vector<Integer> result) {
-        return;
-    }
-
-    //----------------------------------------------------------------------
-    // PACKAGE METHODS
-    //----------------------------------------------------------------------
-
-    /**
-     * This is a generic version of C.A.R Hoare's Quick Sort
-     * algorithm.  This will handle arrays that are already
-     * sorted, and arrays with duplicate keys.
-     *
-     * If you think of a one dimensional array as going from
-     * the lowest index on the left to the highest index on the right
-     * then the parameters to this function are lowest index or
-     * left and highest index or right.  The first time you call
-     * this function it will be with the parameters 0, a.length - 1.
-     *
-     * @param a An integer array.
-     * @param lo0 Left boundary of array partition.
-     * @param hi0 Right boundary of array partition.
-     */
-    static void QuickSort(int a[], int lo0, int hi0) {
-        int lo = lo0;
-        int hi = hi0;
-        int mid;
-
-        if ( hi0 > lo0) {
-
-            /* Arbitrarily establishing partition element as the midpoint of
-             * the array.
-             */
-            mid = a[ ( lo0 + hi0 ) / 2 ];
-
-            // loop through the array until indices cross
-            while( lo <= hi ) {
-                /* find the first element that is greater than or equal to
-                 * the partition element starting from the left Index.
-                 */
-                while( ( lo < hi0 )  && ( a[lo] < mid ))
-                    ++lo;
-
-                /* find an element that is smaller than or equal to
-                 * the partition element starting from the right Index.
-                 */
-                while( ( hi > lo0 ) && ( a[hi] > mid ))
-                    --hi;
-
-                // if the indexes have not crossed, swap
-                if( lo <= hi ) {
-                    swap(a, lo, hi);
-                    ++lo;
-                    --hi;
-                }
-            }
-
-            /* If the right index has not reached the left side of array
-             * must now sort the left partition.
-             */
-            if( lo0 < hi )
-                QuickSort( a, lo0, hi );
-
-            /* If the left index has not reached the right side of array
-             * must now sort the right partition.
-             */
-            if( lo < hi0 )
-                QuickSort( a, lo, hi0 );
-
-        }
-    }
-
-    //----------------------------------------------------------------------
-    // PROTECTED METHODS
-    //----------------------------------------------------------------------
-
-    /**
-     * This will give the first element greater than <CODE>value</CODE>
-     * in a sorted array.
-     * If there is no element of the array greater than <CODE>value</CODE>,
-     * the method will throw a <CODE>SnmpStatusException</CODE>.
-     *
-     * @param table A sorted integer array.
-     *
-     * @param value The greatest value.
-     *
-     * @exception SnmpStatusException If there is no element greater than
-     *     <CODE>value</CODE>.
-     */
-    final static protected int getNextIdentifier(int table[], long value)
-        throws SnmpStatusException {
-
-        final int[] a = table;
-        final int val= (int) value;
-
-        if (a == null) {
-            throw new SnmpStatusException(SnmpStatusException.noSuchObject);
-        }
-
-        int low= 0;
-        int max= a.length;
-        int curr= low + (max-low)/2;
-        int elmt= 0;
-
-        // Basic check
-        //
-        if (max < 1) {
-            throw new SnmpStatusException(SnmpStatusException.noSuchObject);
-        }
-
-        if (a[max-1] <= val) {
-            throw new SnmpStatusException(SnmpStatusException.noSuchObject);
-        }
-
-        while (low <= max) {
-            elmt= a[curr];
-            if (val == elmt) {
-                // We ned to get the next index ...
-                //
-                curr++;
-                return a[curr];
-            }
-            if (elmt < val) {
-                low= curr +1;
-            } else {
-                max= curr -1;
-            }
-            curr= low + (max-low)/2;
-        }
-        return a[curr];
-    }
-
-
-    //----------------------------------------------------------------------
-    // PRIVATE METHODS
-    //----------------------------------------------------------------------
-
-    final static private void swap(int a[], int i, int j) {
-        int T;
-        T = a[i];
-        a[i] = a[j];
-        a[j] = T;
-    }
-
-    //----------------------------------------------------------------------
-    // PROTECTED VARIABLES
-    //----------------------------------------------------------------------
-
-    /**
-     * Contains the list of variable identifiers.
-     */
-    protected int[] varList;
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/agent/SnmpMibOid.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,566 +0,0 @@
-/*
- * Copyright (c) 1997, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-package com.sun.jmx.snmp.agent;
-
-
-
-// java imports
-//
-import java.io.Serializable;
-import java.util.Vector;
-import java.util.Enumeration;
-
-// jmx imports
-//
-import com.sun.jmx.snmp.SnmpOid;
-import com.sun.jmx.snmp.SnmpVarBind;
-import com.sun.jmx.snmp.SnmpStatusException;
-
-/**
- * Represents a node in an SNMP MIB which is neither a group nor a variable.
- * This class defines a list of sub-nodes and the methods that allow to
- * manipulate the sub-nodes.
- * <P>
- * This class is used internally and by the class generated by
- * <CODE>mibgen</CODE>.
- * You should not need to use this class directly.
- *
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- */
-
-public class SnmpMibOid extends SnmpMibNode implements Serializable {
-    private static final long serialVersionUID = 5012254771107446812L;
-
-    /**
-     * Default constructor.
-     */
-    public SnmpMibOid() {
-    }
-
-    // PUBLIC METHODS
-    //---------------
-
-    /**
-     * Generic handling of the <CODE>get</CODE> operation.
-     *
-     * <p> This method should be overridden in subclasses.
-     * <p>
-     *
-     * @param req   The sub-request that must be handled by this node.
-     *
-     * @param depth The depth reached in the OID tree.
-     *
-     * @exception SnmpStatusException The default implementation (if not
-     *            overridden) is to generate a SnmpStatusException.
-     */
-    @Override
-    public void get(SnmpMibSubRequest req, int depth)
-        throws SnmpStatusException {
-        for (Enumeration<SnmpVarBind> e= req.getElements(); e.hasMoreElements();) {
-            SnmpVarBind var= e.nextElement();
-            SnmpStatusException x =
-                new SnmpStatusException(SnmpStatusException.noSuchObject);
-            req.registerGetException(var,x);
-        }
-    }
-
-    /**
-     * Generic handling of the <CODE>set</CODE> operation.
-     *
-     * <p> This method should be overridden in subclasses.
-     * <p>
-     *
-     * @param req   The sub-request that must be handled by this node.
-     *
-     * @param depth The depth reached in the OID tree.
-     *
-     * @exception SnmpStatusException The default implementation (if not
-     *            overridden) is to generate a SnmpStatusException.
-     */
-    @Override
-    public void set(SnmpMibSubRequest req, int depth)
-        throws SnmpStatusException {
-        for (Enumeration<SnmpVarBind> e= req.getElements(); e.hasMoreElements();) {
-            SnmpVarBind var= e.nextElement();
-            SnmpStatusException x =
-                new SnmpStatusException(SnmpStatusException.noAccess);
-            req.registerSetException(var,x);
-        }
-    }
-
-    /**
-     * Generic handling of the <CODE>check</CODE> operation.
-     *
-     * <p> This method should be overridden in subclasses.
-     * <p>
-     *
-     * @param req   The sub-request that must be handled by this node.
-     *
-     * @param depth The depth reached in the OID tree.
-     *
-     * @exception SnmpStatusException The default implementation (if not
-     *            overridden) is to generate a SnmpStatusException.
-     */
-    @Override
-    public void check(SnmpMibSubRequest req, int depth)
-        throws SnmpStatusException {
-        for (Enumeration<SnmpVarBind> e= req.getElements(); e.hasMoreElements();) {
-            SnmpVarBind var= e.nextElement();
-            SnmpStatusException x =
-                new SnmpStatusException(SnmpStatusException.noAccess);
-            req.registerCheckException(var,x);
-        }
-    }
-
-
-
-    // ---------------------------------------------------------------------
-    //
-    // Implements the method defined in SnmpMibNode.
-    //
-    // ---------------------------------------------------------------------
-    //
-    @Override
-    void findHandlingNode(SnmpVarBind varbind,
-                          long[] oid, int depth,
-                          SnmpRequestTree handlers)
-        throws SnmpStatusException {
-
-
-        final int length = oid.length;
-        SnmpMibNode node = null;
-
-        if (handlers == null)
-            throw new SnmpStatusException(SnmpStatusException.snmpRspGenErr);
-
-        if (depth > length) {
-            // Nothing is left... the oid is not valid
-            throw new SnmpStatusException(SnmpStatusException.noSuchObject);
-        } else if (depth == length) {
-            // The oid is not complete...
-            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-        } else {
-            // Some children variable or subobject is being querried
-            // getChild() will raise an exception if no child is found.
-            //
-            final SnmpMibNode child= getChild(oid[depth]);
-
-            // XXXX zzzz : what about null children?
-            //             (variables for nested groups)
-            // if child==null, then we're dealing with a variable or
-            // a table: we register this node.
-            // This behaviour should be overriden in subclasses,
-            // in particular in group meta classes: the group
-            // meta classes that hold tables should take care
-            // of forwarding this call to all the tables involved.
-            //
-            if (child == null)
-                handlers.add(this,depth,varbind);
-            else
-                child.findHandlingNode(varbind,oid,depth+1,handlers);
-        }
-    }
-
-    // ---------------------------------------------------------------------
-    //
-    // Implements the method defined in SnmpMibNode.
-    //
-    // ---------------------------------------------------------------------
-    //
-    @Override
-    long[] findNextHandlingNode(SnmpVarBind varbind,
-                                long[] oid, int pos, int depth,
-                                SnmpRequestTree handlers,
-                                AcmChecker checker)
-        throws SnmpStatusException {
-
-
-        final int length = oid.length;
-        SnmpMibNode node = null;
-        long[] result = null;
-        if (handlers == null) {
-            // This should be considered as a genErr, but we do not want to
-            // abort the whole request, so we're going to throw
-            // a noSuchObject...
-            //
-            throw new SnmpStatusException(SnmpStatusException.noSuchObject);
-        }
-
-        final Object data = handlers.getUserData();
-        final int pduVersion = handlers.getRequestPduVersion();
-
-        if (pos >= length) {
-            long[] newOid= new long[1];
-            newOid[0]=  getNextVarId(-1,data,pduVersion);
-            result = findNextHandlingNode(varbind,newOid,0,depth,handlers,
-                                          checker);
-            return result;
-        }
-
-        // search the element specified in the oid
-        //
-        long[] newOid= new long[1];
-        long index= oid[pos];
-
-        while (true) {
-
-            try {
-                final SnmpMibNode child = getChild(index);
-                // SnmpOid result = null;
-                if (child == null) {
-                    // shouldn't happen
-                    throw new SnmpStatusException(SnmpStatusException.noSuchObject);
-                    // validateVarId(index);
-                    // handlers.add(this,varbind,depth);
-                    // result = new SnmpOid(0);
-                } else {
-                    checker.add(depth, index);
-                    try {
-                        result = child.findNextHandlingNode(varbind,oid,pos+1,
-                                                            depth+1,handlers,
-                                                            checker);
-                    } finally {
-                        checker.remove(depth);
-                    }
-                }
-
-                // Build up the leaf OID
-                result[depth] = index;
-                return result;
-
-            } catch(SnmpStatusException e) {
-                // If there is no such element go one level up ...
-                //
-                index= getNextVarId(index,data,pduVersion);
-
-                // There is no need to carry the original oid ...
-                newOid[0]=index;
-                pos= 1;
-                oid=newOid;
-            }
-        }
-    }
-
-
-    /**
-     * Computes the root OID of the MIB.
-     */
-    @Override
-    public void getRootOid(Vector<Integer> result) {
-
-        // If a node has several children, let assume that we are one step to
-        // far in order to get the MIB root.
-        //
-        if (nbChildren != 1)
-            return;
-
-        result.addElement(varList[0]);
-
-        // Now query our child.
-        //
-        children.firstElement().getRootOid(result);
-
-    }
-
-    /**
-     * Registers a specific node in the tree.
-     */
-    public void registerNode(String oidString ,SnmpMibNode node)
-        throws IllegalAccessException {
-        SnmpOid oid= new SnmpOid(oidString);
-        registerNode(oid.longValue(), 0, node);
-    }
-
-    // PROTECTED METHODS
-    //------------------
-
-    /**
-     * Registers a specific node in the tree.
-     */
-    void registerNode(long[] oid, int cursor ,SnmpMibNode node)
-        throws IllegalAccessException {
-
-        if (cursor >= oid.length)
-            throw new IllegalAccessException();
-
-        // Check if the node is already defined
-        //
-        long var= oid[cursor];
-
-        //System.out.println("entering registration for val="
-        // + String.valueOf(var) + " position= " + cursor);
-
-        int pos = retrieveIndex(var);
-        if (pos  == nbChildren) {
-            nbChildren++;
-            varList= new int[nbChildren];
-            varList[0]= (int) var;
-            pos =0;
-            if ( (cursor + 1) == oid.length) {
-                // That 's the end of the trip.
-                // Do not forward the registration
-
-                //System.out.println("End of trip for val="
-                //      + String.valueOf(var) + " position= " + cursor);
-                children.insertElementAt(node,pos);
-                return;
-            }
-
-            //System.out.println("Create node for val="
-            //       + String.valueOf(var) + " position= " + cursor);
-            SnmpMibOid child= new SnmpMibOid();
-            children.insertElementAt(child, pos);
-            child.registerNode(oid, cursor + 1, node);
-            return;
-        }
-        if (pos == -1) {
-            // The node is not yet registered
-            //
-            int[] tmp= new int[nbChildren + 1];
-            tmp[nbChildren]= (int) var;
-            System.arraycopy(varList, 0, tmp, 0, nbChildren);
-            varList= tmp;
-            nbChildren++;
-            SnmpMibNode.sort(varList);
-            int newPos = retrieveIndex(var);
-            varList[newPos]= (int) var;
-            if ( (cursor + 1) == oid.length) {
-                // That 's the end of the trip.
-                // Do not forward the registration
-
-                //System.out.println("End of trip for val="
-                //     + String.valueOf(var) + " position= " + cursor);
-                children.insertElementAt(node, newPos);
-                return;
-            }
-            SnmpMibOid child= new SnmpMibOid();
-            // System.out.println("Create node for val=" +
-            //     String.valueOf(var) + " position= " + cursor);
-            children.insertElementAt(child, newPos);
-            child.registerNode(oid, cursor + 1, node);
-        }
-        else {
-            // The node is already registered
-            //
-            SnmpMibNode child= children.elementAt(pos);
-            if ( (cursor + 1) == oid.length ) {
-                //System.out.println("Node already registered val=" +
-                //          String.valueOf(var) + " position= " + cursor);
-                if (child == node) return;
-                if (child != null && node != null) {
-                    // Now we're going to patch the tree the following way:
-                    //   if a subgroup has been registered before its father,
-                    //   we're going to replace the father OID node with
-                    //   the actual group-node and export the children from
-                    //   the temporary OID node to the actual group node.
-                    //
-
-                    if (node instanceof SnmpMibGroup) {
-                        // `node' is a group => replace `child' with `node'
-                        // export the child's subtree to `node'.
-                        //
-                        ((SnmpMibOid)child).exportChildren((SnmpMibOid)node);
-                        children.setElementAt(node,pos);
-                        return;
-
-                    } else if ((node instanceof SnmpMibOid) &&
-                             (child instanceof SnmpMibGroup)) {
-                        // `node' is a temporary node, and `child' is a
-                        //  group => keep child and export the node's
-                        //  subtree to `child'.
-                        //
-                        ((SnmpMibOid)node).exportChildren((SnmpMibOid)child);
-                        return;
-                    } else if (node instanceof SnmpMibOid) {
-                        // `node' and `child' are both temporary OID nodes
-                        // => replace `child' with `node' and export child's
-                        // subtree to `node'.
-                        //
-                        ((SnmpMibOid)child).exportChildren((SnmpMibOid)node);
-                        children.setElementAt(node,pos);
-                        return;
-                    }
-                }
-                children.setElementAt(node,pos);
-            } else {
-                if (child == null)
-                    throw new IllegalAccessException();
-                ((SnmpMibOid)child).registerNode(oid, cursor + 1, node);
-            }
-        }
-    }
-
-    /**
-     * Export this node's children to a brother node that will replace
-     * this node in the OID tree.
-     * This method is a patch that fixes the problem of registering
-     * a subnode before its father node.
-     *
-     **/
-    void exportChildren(SnmpMibOid brother)
-        throws IllegalAccessException {
-
-        if (brother == null) return;
-        final long[] oid = new long[1];
-        for (int i=0; i<nbChildren; i++) {
-            final SnmpMibNode child = children.elementAt(i);
-            if (child == null) continue;
-            oid[0] = varList[i];
-            brother.registerNode(oid,0,child);
-        }
-    }
-
-    // PRIVATE METHODS
-    //----------------
-
-    SnmpMibNode getChild(long id) throws SnmpStatusException {
-
-        // first we need to retrieve the identifier in the list of children
-        //
-        final int pos= getInsertAt(id);
-        if (pos >= nbChildren) {
-            throw new SnmpStatusException(SnmpStatusException.noSuchObject);
-        }
-
-        if (varList[pos] != (int) id) {
-            throw new SnmpStatusException(SnmpStatusException.noSuchObject);
-        }
-
-        // Access the node
-        //
-        SnmpMibNode child = null;
-        try {
-            child = children.elementAtNonSync(pos);
-        } catch(ArrayIndexOutOfBoundsException e) {
-            throw new SnmpStatusException(SnmpStatusException.noSuchObject);
-        }
-        if (child == null) {
-            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-        }
-        return child;
-    }
-
-    private int retrieveIndex(long val) {
-
-        int low= 0;
-        int cursor= (int) val;
-        if (varList == null || varList.length < 1)
-            return nbChildren;
-
-        int max= varList.length -1 ;
-        int curr= low + (max-low)/2;
-        int elmt;
-        while (low <= max) {
-            elmt= varList[curr];
-            if (cursor == elmt) {
-                // We need to get the next index ...
-                //
-                return curr;
-            }
-            if (elmt < cursor) {
-                low= curr +1;
-            } else {
-                max= curr -1;
-            }
-            curr= low + (max-low)/2;
-        }
-        return -1;
-    }
-
-    private int getInsertAt(long val) {
-
-        int low= 0;
-        final int index= (int) val;
-        if (varList == null)
-            return -1;
-        int max= varList.length -1 ;
-        int elmt;
-        //final int[] v = varList;
-
-        //if (index > a[max])
-        //return max +1;
-
-
-        int curr= low + (max-low)/2;
-        while (low <= max) {
-
-            elmt= varList[curr];
-
-            // never know ...we might find something ...
-            //
-            if (index == elmt)
-                return curr;
-
-            if (elmt < index) {
-                low= curr +1;
-            } else {
-                max= curr -1;
-            }
-            curr= low + (max-low)/2;
-        }
-
-        return curr;
-    }
-
-    // PRIVATE VARIABLES
-    //------------------
-
-    /**
-     * Contains the list of sub nodes.
-     */
-    private NonSyncVector<SnmpMibNode> children = new NonSyncVector<>(1);
-
-    /**
-     * The number of sub nodes.
-     */
-    private int nbChildren= 0;
-
-
-    // All the methods of the Vector class are synchronized.
-    // Synchronization is a very expensive operation. In our case it is
-    // not always required...
-    //
-    @SuppressWarnings("serial")  // We will never serialize this
-    class NonSyncVector<E> extends Vector<E> {
-
-        public NonSyncVector(int size) {
-            super(size);
-        }
-
-        final void addNonSyncElement(E obj) {
-            ensureCapacity(elementCount + 1);
-            elementData[elementCount++] = obj;
-        }
-
-        @SuppressWarnings("unchecked")  // cast to E
-        final E elementAtNonSync(int index) {
-            return (E) elementData[index];
-        }
-
-    }
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/agent/SnmpMibRequest.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,175 +0,0 @@
-/*
- * 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.sun.jmx.snmp.agent;
-
-import java.util.Enumeration;
-import java.util.Vector;
-
-import com.sun.jmx.snmp.SnmpVarBind;
-import com.sun.jmx.snmp.SnmpPdu;
-import com.sun.jmx.snmp.SnmpEngine;
-
-/**
- * This interface models the part of a SNMP request that involves
- * a specific MIB. One object implementing this interface will be created
- * for every MIB involved in a SNMP request, and that object will be passed
- * to the SnmpMibAgent in charge of handling that MIB.
- *
- * Objects implementing this interface will be allocated by the SNMP engine.
- * You will never need to implement this interface. You will only use it.
- *
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- */
-public interface SnmpMibRequest {
-    /**
-     * Returns the list of varbind to be handled by the SNMP mib node.
-     *
-     * @return The element of the enumeration are instances of
-     *         {@link com.sun.jmx.snmp.SnmpVarBind}
-     */
-    public Enumeration<SnmpVarBind> getElements();
-
-    /**
-     * Returns the vector of varbind to be handled by the SNMP mib node.
-     * The caller shall not modify this vector.
-     *
-     * @return The element of the vector are instances of
-     *         {@link com.sun.jmx.snmp.SnmpVarBind}
-     */
-    public Vector<SnmpVarBind> getSubList();
-
-    /**
-     * Returns the SNMP protocol version of the original request. If SNMP V1 request are received, the version is upgraded to SNMP V2.
-     *
-     * @return The SNMP protocol version of the original request.
-     */
-    public int getVersion();
-
-    /**
-     * Returns the SNMP protocol version of the original request. No translation is done on the version. The actual received request SNMP version is returned.
-     *
-     * @return The SNMP protocol version of the original request.
-     *
-     * @since 1.5
-     */
-    public int getRequestPduVersion();
-
-    /**
-     * Returns the local engine. This parameter is returned only if <CODE> SnmpV3AdaptorServer </CODE> is the adaptor receiving this request. Otherwise null is returned.
-     * @return the local engine.
-     *
-     * @since 1.5
-     */
-    public SnmpEngine getEngine();
-    /**
-     * Gets the incoming request principal. This parameter is returned only if <CODE> SnmpV3AdaptorServer </CODE> is the adaptor receiving this request. Otherwise null is returned.
-     * @return The request principal.
-     *
-     * @since 1.5
-     **/
-    public String getPrincipal();
-    /**
-     * Gets the incoming request security level. This level is defined in {@link com.sun.jmx.snmp.SnmpEngine SnmpEngine}. This parameter is returned only if <CODE> SnmpV3AdaptorServer </CODE> is the adaptor receiving this request. Otherwise -1 is returned.
-     * @return The security level.
-     *
-     * @since 1.5
-     */
-    public int getSecurityLevel();
-    /**
-     * Gets the incoming request security model. This parameter is returned only if <CODE> SnmpV3AdaptorServer </CODE> is the adaptor receiving this request. Otherwise -1 is returned.
-     * @return The security model.
-     *
-     * @since 1.5
-     */
-    public int getSecurityModel();
-    /**
-     * Gets the incoming request context name. This parameter is returned only if <CODE> SnmpV3AdaptorServer </CODE> is the adaptor receiving this request. Otherwise null is returned.
-     * @return The context name.
-     *
-     * @since 1.5
-     */
-    public byte[] getContextName();
-    /**
-     * Gets the incoming request context name used by Access Control Model in order to allow or deny the access to OIDs. This parameter is returned only if <CODE> SnmpV3AdaptorServer </CODE> is the adaptor receiving this request. Otherwise null is returned.
-     * @return The checked context name.
-     *
-     * @since 1.5
-     */
-    public byte[] getAccessContextName();
-
-    /**
-     * Returns a handle on a user allocated contextual object.
-     * This contextual object is allocated through the SnmpUserDataFactory
-     * on a per SNMP request basis, and is handed back to the user via
-     * SnmpMibRequest (and derivative) objects. It is never accessed by
-     * the system, but might be handed back in multiple threads. It is thus
-     * the user responsibility to make sure he handles this object in a
-     * thread safe manner.
-     */
-    public Object getUserData();
-
-    /**
-     * Returns the varbind index that should be embedded in an
-     * SnmpStatusException for this particular varbind.
-     * This does not necessarily correspond to the "real"
-     * index value that will be returned in the result PDU.
-     *
-     * @param varbind The varbind for which the index value is
-     *        querried. Note that this varbind <b>must</b> have
-     *        been obtained from the enumeration returned by
-     *        <CODE>getElements()</CODE>, or from the vector
-     *        returned by <CODE>getSublist()</CODE>.
-     *
-     * @return The varbind index that should be embedded in an
-     *         SnmpStatusException for this particular varbind.
-     */
-    public int getVarIndex(SnmpVarBind varbind);
-
-    /**
-     * Adds a varbind to this request sublist. This method is used for
-     * internal purposes and you should never need to call it directly.
-     *
-     * @param varbind The varbind to be added in the sublist.
-     *
-     */
-    public void addVarBind(SnmpVarBind varbind);
-
-
-    /**
-     * Returns the number of elements (varbinds) in this request sublist.
-     *
-     * @return The number of elements in the sublist.
-     *
-     **/
-    public int getSize();
-    /**
-     * Returns the SNMP PDU attached to the request.
-     * @return The SNMP PDU.
-     *
-     * @since 1.5
-     **/
-    public SnmpPdu getPdu();
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/agent/SnmpMibRequestImpl.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,257 +0,0 @@
-/*
- * 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.jmx.snmp.agent;
-
-import java.util.Enumeration;
-import java.util.Vector;
-
-
-import com.sun.jmx.snmp.SnmpPdu;
-import com.sun.jmx.snmp.SnmpVarBind;
-import com.sun.jmx.snmp.SnmpEngine;
-
-/**
- * This class implements the SnmpMibRequest interface.
- * It represents the part of a SNMP request that involves a specific
- * MIB. One instance of this class will be created for every MIB
- * involved in a SNMP request, and will be passed to the SnmpMibAgent
- * in charge of handling that MIB.
- *
- * Instances of this class are allocated by the SNMP engine. You will
- * never need to use this class directly. You will only access
- * instances of this class through their SnmpMibRequest interface.
- *
- */
-final class SnmpMibRequestImpl implements SnmpMibRequest {
-
-    /**
-     * @param engine The local engine.
-     * @param reqPdu The received pdu.
-     * @param vblist The vector of SnmpVarBind objects in which the
-     *        MIB concerned by this request is involved.
-     * @param protocolVersion  The protocol version of the SNMP request.
-     * @param userData     User allocated contextual data. This object must
-     *        be allocated on a per SNMP request basis through the
-     *        SnmpUserDataFactory registered with the SnmpAdaptorServer,
-     *        and is handed back to the user through SnmpMibRequest objects.
-     */
-    public SnmpMibRequestImpl(SnmpEngine engine,
-                              SnmpPdu reqPdu,
-                              Vector<SnmpVarBind> vblist,
-                              int protocolVersion,
-                              Object userData,
-                              String principal,
-                              int securityLevel,
-                              int securityModel,
-                              byte[] contextName,
-                              byte[] accessContextName) {
-        varbinds   = vblist;
-        version    = protocolVersion;
-        data       = userData;
-        this.reqPdu = reqPdu;
-        this.engine = engine;
-        this.principal = principal;
-        this.securityLevel = securityLevel;
-        this.securityModel = securityModel;
-        this.contextName = contextName;
-        this.accessContextName = accessContextName;
-    }
-    // -------------------------------------------------------------------
-    // PUBLIC METHODS from SnmpMibRequest
-    // -------------------------------------------------------------------
-
-    /**
-     * Returns the local engine. This parameter is returned only if <CODE> SnmpV3AdaptorServer </CODE> is the adaptor receiving this request. Otherwise null is returned.
-     * @return the local engine.
-     */
-    @Override
-    public SnmpEngine getEngine() {
-        return engine;
-    }
-
-    /**
-     * Gets the incoming request principal. This parameter is returned only if <CODE> SnmpV3AdaptorServer </CODE> is the adaptor receiving this request. Otherwise null is returned.
-     * @return The request principal.
-     **/
-    @Override
-    public String getPrincipal() {
-        return principal;
-    }
-
-    /**
-     * Gets the incoming request security level. This level is defined in {@link com.sun.jmx.snmp.SnmpEngine SnmpEngine}. This parameter is returned only if <CODE> SnmpV3AdaptorServer </CODE> is the adaptor receiving this request. Otherwise -1 is returned.
-     * @return The security level.
-     */
-    @Override
-    public int getSecurityLevel() {
-        return securityLevel;
-    }
-    /**
-     * Gets the incoming request security model. This parameter is returned only if <CODE> SnmpV3AdaptorServer </CODE> is the adaptor receiving this request. Otherwise -1 is returned.
-     * @return The security model.
-     */
-    @Override
-    public int getSecurityModel() {
-        return securityModel;
-    }
-    /**
-     * Gets the incoming request context name. This parameter is returned only if <CODE> SnmpV3AdaptorServer </CODE> is the adaptor receiving this request. Otherwise null is returned.
-     * @return The context name.
-     */
-    @Override
-    public byte[] getContextName() {
-        return contextName;
-    }
-
-    /**
-     * Gets the incoming request context name used by Access Control Model in order to allow or deny the access to OIDs. This parameter is returned only if <CODE> SnmpV3AdaptorServer </CODE> is the adaptor receiving this request. Otherwise null is returned.
-     * @return The checked context.
-     */
-    @Override
-    public byte[] getAccessContextName() {
-        return accessContextName;
-    }
-
-    // -------------------------------------------------------------------
-    // Implements the method defined in SnmpMibRequest interface.
-    // See SnmpMibRequest for the java doc.
-    // -------------------------------------------------------------------
-    @Override
-    public final SnmpPdu getPdu() {
-        return reqPdu;
-    }
-
-    // -------------------------------------------------------------------
-    // Implements the method defined in SnmpMibRequest interface.
-    // See SnmpMibRequest for the java doc.
-    // -------------------------------------------------------------------
-    @Override
-    public final Enumeration<SnmpVarBind> getElements()  {return varbinds.elements();}
-
-    // -------------------------------------------------------------------
-    // Implements the method defined in SnmpMibRequest interface.
-    // See SnmpMibRequest for the java doc.
-    // -------------------------------------------------------------------
-    @Override
-    public final Vector<SnmpVarBind> getSubList()  {return varbinds;}
-
-    // -------------------------------------------------------------------
-    // Implements the method defined in SnmpMibRequest interface.
-    // See SnmpMibRequest for the java doc.
-    // -------------------------------------------------------------------
-    @Override
-    public final int getSize()  {
-        if (varbinds == null) return 0;
-        return varbinds.size();
-    }
-
-    // -------------------------------------------------------------------
-    // Implements the method defined in SnmpMibRequest interface.
-    // See SnmpMibRequest for the java doc.
-    // -------------------------------------------------------------------
-    @Override
-    public final int         getVersion()  {return version;}
-
-    // -------------------------------------------------------------------
-    // Implements the method defined in SnmpMibRequest interface.
-    // See SnmpMibRequest for the java doc.
-    // -------------------------------------------------------------------
-    @Override
-    public final int         getRequestPduVersion()  {return reqPdu.version;}
-
-    // -------------------------------------------------------------------
-    // Implements the method defined in SnmpMibRequest interface.
-    // See SnmpMibRequest for the java doc.
-    // -------------------------------------------------------------------
-    @Override
-    public final Object      getUserData() {return data;}
-
-    // -------------------------------------------------------------------
-    // Implements the method defined in SnmpMibRequest interface.
-    // See SnmpMibRequest for the java doc.
-    // -------------------------------------------------------------------
-    @Override
-    public final int getVarIndex(SnmpVarBind varbind) {
-        return varbinds.indexOf(varbind);
-    }
-
-    // -------------------------------------------------------------------
-    // Implements the method defined in SnmpMibRequest interface.
-    // See SnmpMibRequest for the java doc.
-    // -------------------------------------------------------------------
-    @Override
-    public void addVarBind(SnmpVarBind varbind) {
-        varbinds.addElement(varbind);
-    }
-
-    // -------------------------------------------------------------------
-    // PACKAGE METHODS
-    // -------------------------------------------------------------------
-
-    // -------------------------------------------------------------------
-    // Allow to pass the request tree built during the check() phase
-    // to the set() method. Note: the if the tree is `null', then the
-    // set() method will rebuild a new tree identical to the tree built
-    // in the check() method.
-    //
-    // Passing this tree in the SnmpMibRequestImpl object allows to
-    // optimize the SET requests.
-    //
-    // -------------------------------------------------------------------
-    final void setRequestTree(SnmpRequestTree tree) {this.tree = tree;}
-
-    // -------------------------------------------------------------------
-    // Returns the SnmpRequestTree object built in the first operation
-    // phase for two-phase SNMP requests (like SET).
-    // -------------------------------------------------------------------
-    final SnmpRequestTree getRequestTree() {return tree;}
-
-    // -------------------------------------------------------------------
-    // Returns the underlying vector of SNMP varbinds (used for algorithm
-    // optimization).
-    // -------------------------------------------------------------------
-    final Vector<SnmpVarBind> getVarbinds() {return varbinds;}
-
-    // -------------------------------------------------------------------
-    // Private variables
-    // -------------------------------------------------------------------
-
-    // Ideally these variables should be declared final but it makes
-    // the jdk1.1.x compiler complain (seems to be a compiler bug, jdk1.2
-    // is OK).
-    private Vector<SnmpVarBind> varbinds;
-    private int    version;
-    private Object data;
-    private SnmpPdu reqPdu = null;
-    // Non final variable.
-    private SnmpRequestTree tree = null;
-    private SnmpEngine engine = null;
-    private String principal = null;
-    private int securityLevel = -1;
-    private int securityModel = -1;
-    private byte[] contextName = null;
-    private byte[] accessContextName = null;
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/agent/SnmpMibSubRequest.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,211 +0,0 @@
-/*
- * 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.jmx.snmp.agent;
-
-import java.util.Enumeration;
-import java.util.Vector;
-import com.sun.jmx.snmp.SnmpVarBind;
-import com.sun.jmx.snmp.SnmpStatusException;
-import com.sun.jmx.snmp.SnmpOid;
-// import com.sun.jmx.snmp.SnmpIndex;
-
-/**
- * This interface models an SNMP sub request to be performed on a specific
- * SNMP MIB node. The node involved can be either an SNMP group, an SNMP table,
- * or an SNMP table entry (conceptual row). The conceptual row may or may not
- * already exist. If the row did not exist at the time when the request
- * was received, the <CODE>isNewEntry()</CODE> method will return <CODE>
- * true</CODE>.
- * <p>
- * Objects implementing this interface will be allocated by the SNMP engine.
- * You will never need to implement this interface. You will only use it.
- * </p>
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- */
-public interface SnmpMibSubRequest extends SnmpMibRequest {
-    /**
-     * Return the list of varbind to be handled by the SNMP MIB node.
-     * <p>
-     * <b>Note:</b> <ul>
-     * <i>In case of SET operation, if this node is a table row which
-     * contains a control variable (as identified by the table's
-     * isRowStatus() method) the control variable will not
-     * be included in this list: it will be obtained by calling
-     * getRowStatusVarBind(). This will allow you to handle the control
-     * variable specifically.</i><br>
-     * You will never need to worry about this unless you need to
-     * implement a non standard mechanism for handling row
-     * creation and deletion.
-     * </ul>
-     * <p>
-     * @return The elements of the enumeration are instances of
-     *         {@link com.sun.jmx.snmp.SnmpVarBind}
-     */
-    @Override
-    public Enumeration<SnmpVarBind> getElements();
-
-    /**
-     * Return the list of varbind to be handled by the SNMP MIB node.
-     * <p>
-     * <b>Note:</b> <ul>
-     * <i>In case of SET operation, if this node is a table row which
-     * contains a control variable (as identified by the table's
-     * isRowStatus() method) the control variable will not
-     * be included in this list: it will be obtained by calling
-     * getRowStatusVarBind(). This will allow you to handle the control
-     * variable specifically.</i><br>
-     * You will never need to worry about this unless you need to
-     * implement a non standard mechanism for handling row
-     * creation and deletion.
-     * </ul>
-     * <p>
-     * @return The elements of the vector are instances of
-     *         {@link com.sun.jmx.snmp.SnmpVarBind}
-     */
-    @Override
-    public Vector<SnmpVarBind> getSubList();
-
-    /**
-     * Return the part of the OID identifying the table entry involved.
-     * <p>
-     *
-     * @return {@link com.sun.jmx.snmp.SnmpOid} or <CODE>null</CODE>
-     *         if the request is not directed to an entry.
-     */
-    public SnmpOid     getEntryOid();
-
-    /**
-     * Indicate whether the entry involved is a new entry.
-     * This method will return <CODE>true</CODE> if the entry was not
-     * found when the request was processed. As a consequence, <CODE>
-     * true</CODE> means that either the entry does not exist yet,
-     * or it has been created while processing this request.
-     * The result of this method is only significant when an entry
-     * is involved.
-     *
-     * <p>
-     * @return <CODE>true</CODE> If the entry did not exist,
-     *  or <CODE>false</CODE> if the entry involved was found.
-     */
-    public boolean     isNewEntry();
-
-    /**
-     * Return the varbind that holds the RowStatus variable.
-     * It corresponds to the varbind that was identified by
-     * the <code>isRowStatus()</code> method generated by mibgen
-     * on {@link com.sun.jmx.snmp.agent.SnmpMibTable} derivatives.
-     * <ul><li>In SMIv2, it is the varbind which contains the columnar
-     *         object implementing the RowStatus TEXTUAL-CONVENTION.</li>
-     *      <li>In SMIv1 nothing special is generated</li>
-     *      <ul>You may however subclass the generated table metadata
-     *          class in order to provide your own implementation of
-     *          isRowStatus(), getRowAction(), isRowReady() and
-     *          setRowStatus()
-     *          (see  {@link com.sun.jmx.snmp.agent.SnmpMibTable}).</ul>
-     * </ul>
-     * <p>
-     * @return a varbind that serves to control the table modification.
-     *         <code>null</code> means that no such varbind could be
-     *         identified.<br>
-     *         <b>Note:</b><i>The runtime will only try to identify
-     *         the RowStatus varbind when processing an
-     *         SNMP SET request. In this case, the identified
-     *         varbind will not be included in the set of varbinds
-     *         returned by getSubList() and getElements().
-     *         </i>
-     *
-     **/
-    public SnmpVarBind getRowStatusVarBind();
-
-    /**
-     * This method should be called when a status exception needs to
-     * be raised for a given varbind of an SNMP GET request. This method
-     * performs all the necessary conversions (SNMPv1 <=> SNMPv2) and
-     * propagates the exception if needed:
-     * If the version is SNMP v1, the exception is propagated.
-     * If the version is SNMP v2, the exception is stored in the varbind.
-     * This method also takes care of setting the correct value of the
-     * index field.
-     * <p>
-     *
-     * @param varbind The varbind for which the exception is
-     *        registered. Note that this varbind <b>must</b> have
-     *        been obtained from the enumeration returned by
-     *        <CODE>getElements()</CODE>, or from the vector
-     *        returned by <CODE>getSubList()</CODE>
-     *
-     * @param exception The exception to be registered for the given varbind.
-     *
-     */
-    public void registerGetException(SnmpVarBind varbind,
-                                     SnmpStatusException exception)
-        throws SnmpStatusException;
-
-    /**
-     * This method should be called when a status exception needs to
-     * be raised for a given varbind of an SNMP SET request. This method
-     * performs all the necessary conversions (SNMPv1 <=> SNMPv2) and
-     * propagates the exception if needed.
-     * This method also takes care of setting the correct value of the
-     * index field.
-     * <p>
-     *
-     * @param varbind The varbind for which the exception is
-     *        registered. Note that this varbind <b>must</b> have
-     *        been obtained from the enumeration returned by
-     *        <CODE>getElements()</CODE>, or from the vector
-     *        returned by <CODE>getSubList()</CODE>
-     *
-     * @param exception The exception to be registered for the given varbind.
-     *
-     */
-    public void registerSetException(SnmpVarBind varbind,
-                                     SnmpStatusException exception)
-        throws SnmpStatusException;
-
-    /**
-     * This method should be called when a status exception needs to
-     * be raised when checking a given varbind for an SNMP SET request.
-     * This method performs all the necessary conversions (SNMPv1 <=>
-     * SNMPv2) and propagates the exception if needed.
-     * This method also takes care of setting the correct value of the
-     * index field.
-     * <p>
-     *
-     * @param varbind The varbind for which the exception is
-     *        registered. Note that this varbind <b>must</b> have
-     *        been obtained from the enumeration returned by
-     *        <CODE>getElements()</CODE>, or from the vector
-     *        returned by <CODE>getSubList()</CODE>
-     *
-     * @param exception The exception to be registered for the given varbind.
-     *
-     */
-    public void registerCheckException(SnmpVarBind varbind,
-                                       SnmpStatusException exception)
-        throws SnmpStatusException;
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/agent/SnmpMibTable.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,2561 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.jmx.snmp.agent;
-
-import java.io.Serializable;
-import java.util.Date;
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.Vector;
-import java.util.logging.Level;
-
-import javax.management.ListenerNotFoundException;
-import javax.management.MBeanNotificationInfo;
-import javax.management.Notification;
-import javax.management.NotificationBroadcaster;
-import javax.management.NotificationFilter;
-import javax.management.NotificationListener;
-import javax.management.ObjectName;
-
-import static com.sun.jmx.defaults.JmxProperties.SNMP_ADAPTOR_LOGGER;
-import com.sun.jmx.snmp.EnumRowStatus;
-import com.sun.jmx.snmp.SnmpInt;
-import com.sun.jmx.snmp.SnmpOid;
-import com.sun.jmx.snmp.SnmpStatusException;
-import com.sun.jmx.snmp.SnmpValue;
-import com.sun.jmx.snmp.SnmpVarBind;
-
-/**
- * This class is the base class for SNMP table metadata.
- * <p>
- * Its responsibility is to manage a sorted array of OID indexes
- * according to the SNMP indexing scheme over the "real" table.
- * Each object of this class can be bound to an
- * {@link com.sun.jmx.snmp.agent.SnmpTableEntryFactory} to which it will
- * forward remote entry creation requests, and invoke callbacks
- * when an entry has been successfully added to / removed from
- * the OID index array.
- * </p>
- *
- * <p>
- * For each table defined in the MIB, mibgen will generate a specific
- * class called Table<i>TableName</i> that will implement the
- * SnmpTableEntryFactory interface, and a corresponding
- * <i>TableName</i>Meta class that will extend this class. <br>
- * The Table<i>TableName</i> class corresponds to the MBean view of the
- * table while the <i>TableName</i>Meta class corresponds to the
- * MIB metadata view of the same table.
- * </p>
- *
- * <p>
- * Objects of this class are instantiated by the generated
- * whole MIB class extending {@link com.sun.jmx.snmp.agent.SnmpMib}
- * You should never need to instantiate this class directly.
- * </p>
- *
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- * @see com.sun.jmx.snmp.agent.SnmpMib
- * @see com.sun.jmx.snmp.agent.SnmpMibEntry
- * @see com.sun.jmx.snmp.agent.SnmpTableEntryFactory
- * @see com.sun.jmx.snmp.agent.SnmpTableSupport
- *
- */
-@SuppressWarnings("serial") // JDK implementation class
-public abstract class SnmpMibTable extends SnmpMibNode
-    implements NotificationBroadcaster, Serializable {
-
-    /**
-     * Create a new <CODE>SnmpMibTable</CODE> metadata node.
-     *
-     * <p>
-     * @param mib The SNMP MIB to which the metadata will be linked.
-     */
-    public SnmpMibTable(SnmpMib mib) {
-        this.theMib= mib;
-        setCreationEnabled(false);
-    }
-
-    // -------------------------------------------------------------------
-    // PUBLIC METHODS
-    // -------------------------------------------------------------------
-
-    /**
-     * This method is invoked when the creation of a new entry is requested
-     * by a remote SNMP manager.
-     * <br>By default, remote entry creation is disabled - and this method
-     * will not be called. You can dynamically switch the entry creation
-     * policy by calling <code>setCreationEnabled(true)</code> and <code>
-     * setCreationEnabled(false)</code> on this object.
-     * <p><b><i>
-     * This method is called internally by the SNMP runtime and you
-     * should never need to call it directly. </b></i>However you might want
-     * to extend it in order to implement your own specific application
-     * behaviour, should the default behaviour not be at your convenience.
-     * </p>
-     * <p>
-     * @param req   The SNMP  subrequest requesting this creation
-     * @param rowOid  The OID indexing the conceptual row (entry) for which
-     *                the creation was requested.
-     * @param depth The position of the columnar object arc in the OIDs
-     *              from the varbind list.
-     *
-     * @exception SnmpStatusException if the entry cannot be created.
-     */
-    public abstract void createNewEntry(SnmpMibSubRequest req, SnmpOid rowOid,
-                                        int depth)
-        throws SnmpStatusException;
-
-    /**
-     * Tell whether the specific version of this metadata generated
-     * by <code>mibgen</code> requires entries to be registered with
-     * the MBeanServer. In this case an ObjectName will have to be
-     * passed to addEntry() in order for the table to behave correctly
-     * (case of the generic metadata).
-     * <p>
-     * If that version of the metadata does not require entry to be
-     * registered, then passing an ObjectName becomes optional (null
-     * can be passed instead).
-     *
-     * @return <code>true</code> if registration is required by this
-     *         version of the metadata.
-     */
-    public abstract boolean isRegistrationRequired();
-
-    /**
-     * Tell whether a new entry should be created when a SET operation
-     * is received for an entry that does not exist yet.
-     *
-     * @return true if a new entry must be created, false otherwise.<br>
-     *         [default: returns <CODE>false</CODE>]
-     **/
-    public boolean isCreationEnabled() {
-        return creationEnabled;
-    }
-
-    /**
-     * This method lets you dynamically switch the creation policy.
-     *
-     * <p>
-     * @param remoteCreationFlag Tells whether remote entry creation must
-     *        be enabled or disabled.
-     * <ul><li>
-     * <CODE>setCreationEnabled(true)</CODE> will enable remote entry
-     *      creation via SET operations.</li>
-     * <li>
-     * <CODE>setCreationEnabled(false)</CODE> will disable remote entry
-     *      creation via SET operations.</li>
-     * <p> By default remote entry creation via SET operation is disabled.
-     * </p>
-     * </ul>
-     **/
-    public void setCreationEnabled(boolean remoteCreationFlag) {
-        creationEnabled = remoteCreationFlag;
-    }
-
-    /**
-     * Return <code>true</code> if the conceptual row contains a columnar
-     * object used to control creation/deletion of rows in this table.
-     * <p>
-     * This  columnar object can be either a variable with RowStatus
-     * syntax as defined by RFC 2579, or a plain variable whose
-     * semantics is table specific.
-     * <p>
-     * By default, this function returns <code>false</code>, and it is
-     * assumed that the table has no such control variable.<br>
-     * When <code>mibgen</code> is used over SMIv2 MIBs, it will generate
-     * an <code>hasRowStatus()</code> method returning <code>true</code>
-     * for each table containing an object with RowStatus syntax.
-     * <p>
-     * When this method returns <code>false</code> the default mechanism
-     * for remote entry creation is used.
-     * Otherwise, creation/deletion is performed as specified
-     * by the control variable (see getRowAction() for more details).
-     * <p>
-     * This method is called internally when a SET request involving
-     * this table is processed.
-     * <p>
-     * If you need to implement a control variable which do not use
-     * the RowStatus convention as defined by RFC 2579, you should
-     * subclass the generated table metadata class in order to redefine
-     * this method and make it returns <code>true</code>.<br>
-     * You will then have to redefine the isRowStatus(), mapRowStatus(),
-     * isRowReady(), and setRowStatus() methods to suit your specific
-     * implementation.
-     * <p>
-     * @return <li><code>true</code> if this table contains a control
-     *         variable (eg: a variable with RFC 2579 RowStatus syntax),
-     *         </li>
-     *         <li><code>false</code> if this table does not contain
-     *         any control variable.</li>
-     *
-     **/
-    public boolean hasRowStatus() {
-        return false;
-    }
-
-    // ---------------------------------------------------------------------
-    //
-    // Implements the method defined in SnmpMibNode.
-    //
-    // ---------------------------------------------------------------------
-    /**
-     * Generic handling of the <CODE>get</CODE> operation.
-     * <p> The default implementation of this method is to
-     * <ul>
-     * <li> check whether the entry exists, and if not register an
-     *      exception for each varbind in the list.
-     * <li> call the generated
-     *      <CODE>get(req,oid,depth+1)</CODE> method. </li>
-     * </ul>
-     * <p>
-     * <pre>
-     * public void get(SnmpMibSubRequest req, int depth)
-     *    throws SnmpStatusException {
-     *    boolean         isnew  = req.isNewEntry();
-     *
-     *    // if the entry does not exists, then registers an error for
-     *    // each varbind involved (nb: this should not happen, since
-     *    // the error should already have been detected earlier)
-     *    //
-     *    if (isnew) {
-     *        SnmpVarBind     var = null;
-     *        for (Enumeration e= req.getElements(); e.hasMoreElements();) {
-     *            var = (SnmpVarBind) e.nextElement();
-     *            req.registerGetException(var,noSuchNameException);
-     *        }
-     *    }
-     *
-     *    final SnmpOid oid = req.getEntryOid();
-     *    get(req,oid,depth+1);
-     * }
-     * </pre>
-     * <p> You should not need to override this method in any cases, because
-     * it will eventually call
-     * <CODE>get(SnmpMibSubRequest req, int depth)</CODE> on the generated
-     * derivative of <CODE>SnmpMibEntry</CODE>. If you need to implement
-     * specific policies for minimizing the accesses made to some remote
-     * underlying resources, or if you need to implement some consistency
-     * checks between the different values provided in the varbind list,
-     * you should then rather override
-     * <CODE>get(SnmpMibSubRequest req, int depth)</CODE> on the generated
-     * derivative of <CODE>SnmpMibEntry</CODE>.
-     * <p>
-     *
-     */
-    @Override
-    public void get(SnmpMibSubRequest req, int depth)
-        throws SnmpStatusException {
-
-        final boolean         isnew  = req.isNewEntry();
-        final SnmpMibSubRequest  r      = req;
-
-        // if the entry does not exists, then registers an error for
-        // each varbind involved (nb: should not happen, the error
-        // should have been registered earlier)
-        if (isnew) {
-            SnmpVarBind var;
-            for (Enumeration<SnmpVarBind> e= r.getElements(); e.hasMoreElements();) {
-                var = e.nextElement();
-                r.registerGetException(var,new SnmpStatusException(SnmpStatusException.noSuchInstance));
-            }
-        }
-
-        final SnmpOid     oid    = r.getEntryOid();
-
-        // SnmpIndex   index  = buildSnmpIndex(oid.longValue(false), 0);
-        // get(req,index,depth+1);
-        //
-        get(req,oid,depth+1);
-    }
-
-    // ---------------------------------------------------------------------
-    //
-    // Implements the method defined in SnmpMibNode.
-    //
-    // ---------------------------------------------------------------------
-    /**
-     * Generic handling of the <CODE>check</CODE> operation.
-     * <p> The default implementation of this method is to
-     * <ul>
-     * <li> check whether a new entry must be created, and if remote
-     *      creation of entries is enabled, create it. </li>
-     * <li> call the generated
-     *      <CODE>check(req,oid,depth+1)</CODE> method. </li>
-     * </ul>
-     * <p>
-     * <pre>
-     * public void check(SnmpMibSubRequest req, int depth)
-     *    throws SnmpStatusException {
-     *    final SnmpOid     oid    = req.getEntryOid();
-     *    final int         action = getRowAction(req,oid,depth+1);
-     *
-     *    beginRowAction(req,oid,depth+1,action);
-     *    check(req,oid,depth+1);
-     * }
-     * </pre>
-     * <p> You should not need to override this method in any cases, because
-     * it will eventually call
-     * <CODE>check(SnmpMibSubRequest req, int depth)</CODE> on the generated
-     * derivative of <CODE>SnmpMibEntry</CODE>. If you need to implement
-     * specific policies for minimizing the accesses made to some remote
-     * underlying resources, or if you need to implement some consistency
-     * checks between the different values provided in the varbind list,
-     * you should then rather override
-     * <CODE>check(SnmpMibSubRequest req, int depth)</CODE> on the generated
-     * derivative of <CODE>SnmpMibEntry</CODE>.
-     * <p>
-     *
-     */
-    @Override
-    public void check(SnmpMibSubRequest req, int depth)
-        throws SnmpStatusException {
-        final SnmpOid     oid    = req.getEntryOid();
-        final int         action = getRowAction(req,oid,depth+1);
-
-        if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-            SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, SnmpMibTable.class.getName(),
-                    "check", "Calling beginRowAction");
-        }
-
-        beginRowAction(req,oid,depth+1,action);
-
-        if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-            SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, SnmpMibTable.class.getName(),
-                    "check",
-                    "Calling check for " + req.getSize() + " varbinds");
-        }
-
-        check(req,oid,depth+1);
-
-        if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-            SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, SnmpMibTable.class.getName(),
-                    "check", "check finished");
-        }
-    }
-
-    // ---------------------------------------------------------------------
-    //
-    // Implements the method defined in SnmpMibNode.
-    //
-    // ---------------------------------------------------------------------
-    /**
-     * Generic handling of the <CODE>set</CODE> operation.
-     * <p> The default implementation of this method is to
-     * call the generated
-     * <CODE>set(req,oid,depth+1)</CODE> method.
-     * <p>
-     * <pre>
-     * public void set(SnmpMibSubRequest req, int depth)
-     *    throws SnmpStatusException {
-     *    final SnmpOid oid = req.getEntryOid();
-     *    final int  action = getRowAction(req,oid,depth+1);
-     *
-     *    set(req,oid,depth+1);
-     *    endRowAction(req,oid,depth+1,action);
-     * }
-     * </pre>
-     * <p> You should not need to override this method in any cases, because
-     * it will eventually call
-     * <CODE>set(SnmpMibSubRequest req, int depth)</CODE> on the generated
-     * derivative of <CODE>SnmpMibEntry</CODE>. If you need to implement
-     * specific policies for minimizing the accesses made to some remote
-     * underlying resources, or if you need to implement some consistency
-     * checks between the different values provided in the varbind list,
-     * you should then rather override
-     * <CODE>set(SnmpMibSubRequest req, int depth)</CODE> on the generated
-     * derivative of <CODE>SnmpMibEntry</CODE>.
-     * <p>
-     *
-     */
-    @Override
-    public void set(SnmpMibSubRequest req, int depth)
-        throws SnmpStatusException {
-
-
-        if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-            SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, SnmpMibTable.class.getName(),
-                    "set", "Entering set");
-        }
-
-        final SnmpOid     oid    = req.getEntryOid();
-        final int         action = getRowAction(req,oid,depth+1);
-
-        if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-            SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, SnmpMibTable.class.getName(),
-                    "set", "Calling set for " + req.getSize() + " varbinds");
-        }
-
-        set(req,oid,depth+1);
-
-        if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-            SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, SnmpMibTable.class.getName(),
-                    "set", "Calling endRowAction");
-        }
-
-        endRowAction(req,oid,depth+1,action);
-
-        if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-            SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, SnmpMibTable.class.getName(),
-                    "set", "RowAction finished");
-        }
-
-    }
-
-    /**
-     * Add a new entry in this <CODE>SnmpMibTable</CODE>.
-     * Also triggers the addEntryCB() callback of the
-     * {@link com.sun.jmx.snmp.agent.SnmpTableEntryFactory} interface
-     * if this node is bound to a factory.
-     *
-     * This method assumes that the given entry will not be registered.
-     * If the entry is going to be registered, or if ObjectName's are
-     * required, then
-     * {@link com.sun.jmx.snmp.agent.SnmpMibTable#addEntry(SnmpOid,
-     * ObjectName, Object)} should be preferred.
-     * <br> This function is mainly provided for backward compatibility.
-     *
-     * <p>
-     * @param rowOid The <CODE>SnmpOid</CODE> identifying the table
-     *               row to be added.
-     * @param entry The entry to add.
-     *
-     * @exception SnmpStatusException The entry couldn't be added
-     *            at the position identified by the given
-     *            <code>rowOid</code>, or this version of the metadata
-     *            requires ObjectName's.
-     */
-     // public void addEntry(SnmpIndex index, Object entry)
-     public void addEntry(SnmpOid rowOid, Object entry)
-        throws SnmpStatusException {
-
-         addEntry(rowOid, null, entry);
-    }
-
-    /**
-     * Add a new entry in this <CODE>SnmpMibTable</CODE>.
-     * Also triggers the addEntryCB() callback of the
-     * {@link com.sun.jmx.snmp.agent.SnmpTableEntryFactory} interface
-     * if this node is bound to a factory.
-     *
-     * <p>
-     * @param oid    The <CODE>SnmpOid</CODE> identifying the table
-     *               row to be added.
-     *
-     * @param name  The ObjectName with which this entry is registered.
-     *              This parameter can be omitted if isRegistrationRequired()
-     *              return false.
-     *
-     * @param entry The entry to add.
-     *
-     * @exception SnmpStatusException The entry couldn't be added
-     *            at the position identified by the given
-     *            <code>rowOid</code>, or if this version of the metadata
-     *            requires ObjectName's, and the given name is null.
-     */
-    // protected synchronized void addEntry(SnmpIndex index, ObjectName name,
-    //                                      Object entry)
-    public synchronized void addEntry(SnmpOid oid, ObjectName name,
-                                      Object entry)
-        throws SnmpStatusException {
-
-        if (isRegistrationRequired() == true && name == null)
-            throw new SnmpStatusException(SnmpStatusException.badValue);
-
-        if (size == 0) {
-            //            indexes.addElement(index);
-            // XX oids.addElement(oid);
-            insertOid(0,oid);
-            if (entries != null)
-                entries.addElement(entry);
-            if (entrynames != null)
-                entrynames.addElement(name);
-            size++;
-
-            // triggers callbacks on the entry factory
-            //
-            if (factory != null) {
-                try {
-                    factory.addEntryCb(0,oid,name,entry,this);
-                } catch (SnmpStatusException x) {
-                    removeOid(0);
-                    if (entries != null)
-                        entries.removeElementAt(0);
-                    if (entrynames != null)
-                        entrynames.removeElementAt(0);
-                    throw x;
-                }
-            }
-
-            // sends the notifications
-            //
-            sendNotification(SnmpTableEntryNotification.SNMP_ENTRY_ADDED,
-                             (new Date()).getTime(), entry, name);
-            return;
-        }
-
-        // Get the insertion position ...
-        //
-        int pos= 0;
-        // bug jaw.00356.B : use oid rather than index to get the
-        // insertion point.
-        //
-        pos= getInsertionPoint(oid,true);
-        if (pos == size) {
-            // Add a new element in the vectors ...
-            //
-            //            indexes.addElement(index);
-            // XX oids.addElement(oid);
-            insertOid(tablecount,oid);
-            if (entries != null)
-                entries.addElement(entry);
-            if (entrynames != null)
-                entrynames.addElement(name);
-            size++;
-        } else {
-            // Insert new element ...
-            //
-            try {
-                //                indexes.insertElementAt(index, pos);
-                // XX oids.insertElementAt(oid, pos);
-                insertOid(pos,oid);
-                if (entries != null)
-                    entries.insertElementAt(entry, pos);
-                if (entrynames != null)
-                    entrynames.insertElementAt(name,pos);
-                size++;
-            } catch(ArrayIndexOutOfBoundsException e) {
-            }
-        }
-
-        // triggers callbacks on the entry factory
-        //
-        if (factory != null) {
-            try {
-                factory.addEntryCb(pos,oid,name,entry,this);
-            } catch (SnmpStatusException x) {
-                removeOid(pos);
-                if (entries != null)
-                    entries.removeElementAt(pos);
-                if (entrynames != null)
-                    entrynames.removeElementAt(pos);
-                throw x;
-            }
-        }
-
-        // sends the notifications
-        //
-        sendNotification(SnmpTableEntryNotification.SNMP_ENTRY_ADDED,
-                         (new Date()).getTime(), entry, name);
-    }
-
-    /**
-     * Remove the specified entry from the table.
-     * Also triggers the removeEntryCB() callback of the
-     * {@link com.sun.jmx.snmp.agent.SnmpTableEntryFactory} interface
-     * if this node is bound to a factory.
-     *
-     * <p>
-     * @param rowOid The <CODE>SnmpOid</CODE> identifying the table
-     *               row to remove.
-     *
-     * @param entry The entry to be removed. This parameter is not used
-     *              internally, it is simply passed along to the
-     *              removeEntryCB() callback.
-     *
-     * @exception SnmpStatusException if the specified entry couldn't
-     *            be removed (if the given <code>rowOid</code> is not
-     *            valid for instance).
-     */
-    public synchronized void removeEntry(SnmpOid rowOid, Object entry)
-        throws SnmpStatusException {
-        int pos = findObject(rowOid);
-        if (pos == -1)
-            return;
-        removeEntry(pos,entry);
-    }
-
-    /**
-     * Remove the specified entry from the table.
-     * Also triggers the removeEntryCB() callback of the
-     * {@link com.sun.jmx.snmp.agent.SnmpTableEntryFactory} interface
-     * if this node is bound to a factory.
-     *
-     * <p>
-     * @param rowOid The <CODE>SnmpOid</CODE> identifying the table
-     *               row to remove.
-     *
-     * @exception SnmpStatusException if the specified entry couldn't
-     *            be removed (if the given <code>rowOid</code> is not
-     *            valid for instance).
-     */
-    public void removeEntry(SnmpOid rowOid)
-        throws SnmpStatusException {
-        int pos = findObject(rowOid);
-        if (pos == -1)
-            return;
-        removeEntry(pos,null);
-    }
-
-    /**
-     * Remove the specified entry from the table.
-     * Also triggers the removeEntryCB() callback of the
-     * {@link com.sun.jmx.snmp.agent.SnmpTableEntryFactory} interface
-     * if this node is bound to a factory.
-     *
-     * <p>
-     * @param pos The position of the entry in the table.
-     *
-     * @param entry The entry to be removed. This parameter is not used
-     *              internally, it is simply passed along to the
-     *              removeEntryCB() callback.
-     *
-     * @exception SnmpStatusException if the specified entry couldn't
-     *            be removed.
-     */
-    public synchronized void removeEntry(int pos, Object entry)
-        throws SnmpStatusException {
-        if (pos == -1)
-            return;
-        if (pos >= size) return;
-
-        Object obj = entry;
-        if (entries != null && entries.size() > pos) {
-            obj = entries.elementAt(pos);
-            entries.removeElementAt(pos);
-        }
-
-        ObjectName name = null;
-        if (entrynames != null && entrynames.size() > pos) {
-            name = entrynames.elementAt(pos);
-            entrynames.removeElementAt(pos);
-        }
-
-        final SnmpOid rowOid = tableoids[pos];
-        removeOid(pos);
-        size --;
-
-        if (obj == null) obj = entry;
-
-        if (factory != null)
-            factory.removeEntryCb(pos,rowOid,name,obj,this);
-
-        sendNotification(SnmpTableEntryNotification.SNMP_ENTRY_REMOVED,
-                         (new Date()).getTime(), obj, name);
-    }
-
-    /**
-     * Get the entry corresponding to the specified rowOid.
-     *
-     * <p>
-     * @param rowOid The <CODE>SnmpOid</CODE> identifying the
-     *        row to be retrieved.
-     *
-     * @return The entry.
-     *
-     * @exception SnmpStatusException There is no entry with the specified
-     *      <code>rowOid</code> in the table.
-     */
-    public synchronized Object getEntry(SnmpOid rowOid)
-        throws SnmpStatusException {
-        int pos= findObject(rowOid);
-        if (pos == -1)
-            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-        return entries.elementAt(pos);
-    }
-
-    /**
-     * Get the ObjectName of the entry corresponding to the
-     * specified rowOid.
-     * The result of this method is only meaningful if
-     * isRegistrationRequired() yields true.
-     *
-     * <p>
-     * @param rowOid The <CODE>SnmpOid</CODE> identifying the table
-     *        row whose ObjectName we want to retrieve.
-     *
-     * @return The object name of the entry.
-     *
-     * @exception SnmpStatusException There is no entry with the specified
-     *      <code>rowOid</code> in the table.
-     */
-    public synchronized ObjectName getEntryName(SnmpOid rowOid)
-        throws SnmpStatusException {
-        int pos = findObject(rowOid);
-        if (entrynames == null) return null;
-        if (pos == -1 || pos >= entrynames.size())
-            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-        return entrynames.elementAt(pos);
-    }
-
-    /**
-     * Return the entries stored in this table <CODE>SnmpMibTable</CODE>.
-     * <p>
-     * If the subclass generated by mibgen uses the generic way to access
-     * the entries (i.e. if it goes through the MBeanServer) then some of
-     * the entries may be <code>null</code>. It all depends whether a non
-     * <code>null</code> entry was passed to addEntry().<br>
-     * Otherwise, if it uses the standard way (access the entry directly
-     * through their standard MBean interface) this array will contain all
-     * the entries.
-     * <p>
-     * @return The entries array.
-     */
-    public Object[] getBasicEntries() {
-        Object[] array= new Object[size];
-        entries.copyInto(array);
-        return array;
-    }
-
-    /**
-     * Get the size of the table.
-     *
-     * @return The number of entries currently registered in this table.
-     */
-    public int getSize() {
-        return size;
-    }
-
-    // EVENT STUFF
-    //------------
-
-    /**
-     * Enable to add an SNMP entry listener to this
-     * <CODE>SnmpMibTable</CODE>.
-     *
-     * <p>
-     * @param listener The listener object which will handle the
-     *    notifications emitted by the registered MBean.
-     *
-     * @param filter The filter object. If filter is null, no filtering
-     *    will be performed before handling notifications.
-     *
-     * @param handback The context to be sent to the listener when a
-     *    notification is emitted.
-     *
-     * @exception IllegalArgumentException Listener parameter is null.
-     */
-    @Override
-    public synchronized void
-        addNotificationListener(NotificationListener listener,
-                                NotificationFilter filter, Object handback)  {
-
-        // Check listener
-        //
-        if (listener == null) {
-            throw new java.lang.IllegalArgumentException
-                ("Listener can't be null") ;
-        }
-
-        // looking for listener in handbackTable
-        //
-        Vector<Object> handbackList = handbackTable.get(listener) ;
-        Vector<NotificationFilter> filterList = filterTable.get(listener) ;
-        if ( handbackList == null ) {
-            handbackList = new Vector<>() ;
-            filterList = new Vector<>() ;
-            handbackTable.put(listener, handbackList) ;
-            filterTable.put(listener, filterList) ;
-        }
-
-        // Add the handback and the filter
-        //
-        handbackList.addElement(handback) ;
-        filterList.addElement(filter) ;
-    }
-
-    /**
-     * Enable to remove an SNMP entry listener from this
-     * <CODE>SnmpMibTable</CODE>.
-     *
-     * @param listener The listener object which will handle the
-     *    notifications emitted by the registered MBean.
-     *    This method will remove all the information related to this
-     *    listener.
-     *
-     * @exception ListenerNotFoundException The listener is not registered
-     *    in the MBean.
-     */
-    @Override
-    public synchronized void
-        removeNotificationListener(NotificationListener listener)
-        throws ListenerNotFoundException {
-
-        // looking for listener in handbackTable
-        //
-        java.util.Vector<?> handbackList = handbackTable.get(listener) ;
-        if ( handbackList == null ) {
-            throw new ListenerNotFoundException("listener");
-        }
-
-        // If handback is null, remove the listener entry
-        //
-        handbackTable.remove(listener) ;
-        filterTable.remove(listener) ;
-    }
-
-    /**
-     * Return a <CODE>NotificationInfo</CODE> object containing the
-     * notification class and the notification type sent by the
-     * <CODE>SnmpMibTable</CODE>.
-     */
-    @Override
-    public MBeanNotificationInfo[] getNotificationInfo() {
-
-        String[] types = {SnmpTableEntryNotification.SNMP_ENTRY_ADDED,
-                          SnmpTableEntryNotification.SNMP_ENTRY_REMOVED};
-
-        MBeanNotificationInfo[] notifsInfo = {
-            new MBeanNotificationInfo
-            (types, "com.sun.jmx.snmp.agent.SnmpTableEntryNotification",
-             "Notifications sent by the SnmpMibTable")
-        };
-
-        return notifsInfo;
-    }
-
-
-    /**
-     * Register the factory through which table entries should
-     * be created when remote entry creation is enabled.
-     *
-     * <p>
-     * @param factory The
-     *        {@link com.sun.jmx.snmp.agent.SnmpTableEntryFactory} through
-     *        which entries will be created when a remote SNMP manager
-     *        request the creation of a new entry via an SNMP SET request.
-     */
-    public void registerEntryFactory(SnmpTableEntryFactory factory) {
-        this.factory = factory;
-    }
-
-    // ----------------------------------------------------------------------
-    // PROTECTED METHODS - RowStatus
-    // ----------------------------------------------------------------------
-
-    /**
-     * Return true if the columnar object identified by <code>var</code>
-     * is used to control the addition/deletion of rows in this table.
-     *
-     * <p>
-     * By default, this method assumes that there is no control variable
-     * and always return <code>false</code>
-     * <p>
-     * If this table was defined using SMIv2, and if it contains a
-     * control variable with RowStatus syntax, <code>mibgen</code>
-     * will generate a non default implementation for this method
-     * that will identify the RowStatus control variable.
-     * <p>
-     * You will have to redefine this method if you need to implement
-     * control variables that do not conform to RFC 2579 RowStatus
-     * TEXTUAL-CONVENTION.
-     * <p>
-     * @param rowOid The <CODE>SnmpOid</CODE> identifying the table
-     *               row involved in the operation.
-     *
-     * @param var The OID arc identifying the involved columnar object.
-     *
-     * @param userData A contextual object containing user-data.
-     *        This object is allocated through the <code>
-     *        {@link com.sun.jmx.snmp.agent.SnmpUserDataFactory}</code>
-     *        for each incoming SNMP request.
-     *
-     **/
-    protected boolean isRowStatus(SnmpOid rowOid, long var,
-                                    Object  userData) {
-        return false;
-    }
-
-
-    /**
-     * Return the RowStatus code value specified in this request.
-     * <p>
-     * The RowStatus code value should be one of the values defined
-     * by {@link com.sun.jmx.snmp.EnumRowStatus}. These codes correspond
-     * to RowStatus codes as defined in RFC 2579, plus the <i>unspecified</i>
-     * value which is SNMP Runtime specific.
-     * <p>
-     *
-     * @param req    The sub-request that must be handled by this node.
-     *
-     * @param rowOid The <CODE>SnmpOid</CODE> identifying the table
-     *               row involved in the operation.
-     *
-     * @param depth  The depth reached in the OID tree.
-     *
-     * @return The RowStatus code specified in this request, if any:
-     * <ul>
-     * <li>If the specified row does not exist and this table do
-     *     not use any variable to control creation/deletion of
-     *     rows, then default creation mechanism is assumed and
-     *     <i>createAndGo</i> is returned</li>
-     * <li>Otherwise, if the row exists and this table do not use any
-     *     variable to control creation/deletion of rows,
-     *     <i>unspecified</i> is returned.</li>
-     * <li>Otherwise, if the request does not contain the control variable,
-     *     <i>unspecified</i> is returned.</li>
-     * <li>Otherwise, mapRowStatus() is called to extract the RowStatus
-     *     code from the SnmpVarBind that contains the control variable.</li>
-     * </ul>
-     *
-     * @exception SnmpStatusException if the value of the control variable
-     *            could not be mapped to a RowStatus code.
-     *
-     * @see com.sun.jmx.snmp.EnumRowStatus
-     **/
-    protected int getRowAction(SnmpMibSubRequest req, SnmpOid rowOid,
-                               int depth)
-        throws SnmpStatusException {
-        final boolean     isnew  = req.isNewEntry();
-        final SnmpVarBind vb = req.getRowStatusVarBind();
-        if (vb == null) {
-            if (isnew && ! hasRowStatus())
-                return EnumRowStatus.createAndGo;
-            else return EnumRowStatus.unspecified;
-        }
-
-        try {
-            return mapRowStatus(rowOid, vb, req.getUserData());
-        } catch( SnmpStatusException x) {
-            checkRowStatusFail(req, x.getStatus());
-        }
-        return EnumRowStatus.unspecified;
-    }
-
-    /**
-     * Map the value of the <code>vbstatus</code> varbind to the
-     * corresponding RowStatus code defined in
-     * {@link com.sun.jmx.snmp.EnumRowStatus}.
-     * These codes correspond to RowStatus codes as defined in RFC 2579,
-     * plus the <i>unspecified</i> value which is SNMP Runtime specific.
-     * <p>
-     * By default, this method assumes that the control variable is
-     * an Integer, and it simply returns its value without further
-     * analysis.
-     * <p>
-     * If this table was defined using SMIv2, and if it contains a
-     * control variable with RowStatus syntax, <code>mibgen</code>
-     * will generate a non default implementation for this method.
-     * <p>
-     * You will have to redefine this method if you need to implement
-     * control variables that do not conform to RFC 2579 RowStatus
-     * TEXTUAL-CONVENTION.
-     *
-     * <p>
-     * @param rowOid The <CODE>SnmpOid</CODE> identifying the table
-     *               row involved in the operation.
-     *
-     * @param vbstatus The SnmpVarBind containing the value of the control
-     *           variable, as identified by the isRowStatus() method.
-     *
-     * @param userData A contextual object containing user-data.
-     *        This object is allocated through the <code>
-     *        {@link com.sun.jmx.snmp.agent.SnmpUserDataFactory}</code>
-     *        for each incoming SNMP request.
-     *
-     * @return The RowStatus code mapped from the value contained
-     *     in <code>vbstatus</code>.
-     *
-     * @exception SnmpStatusException if the value of the control variable
-     *            could not be mapped to a RowStatus code.
-     *
-     * @see com.sun.jmx.snmp.EnumRowStatus
-     **/
-    protected int mapRowStatus(SnmpOid rowOid, SnmpVarBind vbstatus,
-                               Object userData)
-        throws SnmpStatusException {
-        final SnmpValue rsvalue = vbstatus.value;
-
-        if (rsvalue instanceof SnmpInt)
-            return ((SnmpInt)rsvalue).intValue();
-        else
-            throw new SnmpStatusException(
-                       SnmpStatusException.snmpRspInconsistentValue);
-    }
-
-    /**
-     * Set the control variable to the specified <code>newStatus</code>
-     * value.
-     *
-     * <p>
-     * This method maps the given <code>newStatus</code> to the appropriate
-     * value for the control variable, then sets the control variable in
-     * the entry identified by <code>rowOid</code>. It returns the new
-     * value of the control variable.
-     * <p>
-     * By default, it is assumed that there is no control variable so this
-     * method does nothing and simply returns <code>null</code>.
-     * <p>
-     * If this table was defined using SMIv2, and if it contains a
-     * control variable with RowStatus syntax, <code>mibgen</code>
-     * will generate a non default implementation for this method.
-     * <p>
-     * You will have to redefine this method if you need to implement
-     * control variables that do not conform to RFC 2579 RowStatus
-     * TEXTUAL-CONVENTION.
-     *
-     * <p>
-     * @param rowOid The <CODE>SnmpOid</CODE> identifying the table
-     *               row involved in the operation.
-     *
-     * @param newStatus The new status for the row: one of the
-     *        RowStatus code defined in
-     *        {@link com.sun.jmx.snmp.EnumRowStatus}. These codes
-     *        correspond to RowStatus codes as defined in RFC 2579,
-     *        plus the <i>unspecified</i> value which is SNMP Runtime specific.
-     *
-     * @param userData A contextual object containing user-data.
-     *        This object is allocated through the <code>
-     *        {@link com.sun.jmx.snmp.agent.SnmpUserDataFactory}</code>
-     *        for each incoming SNMP request.
-     *
-     * @return The new value of the control variable (usually
-     *         <code>new SnmpInt(newStatus)</code>) or <code>null</code>
-     *         if the table do not have any control variable.
-     *
-     * @exception SnmpStatusException If the given <code>newStatus</code>
-     *            could not be set on the specified entry, or if the
-     *            given <code>newStatus</code> is not valid.
-     *
-     * @see com.sun.jmx.snmp.EnumRowStatus
-     **/
-    protected SnmpValue setRowStatus(SnmpOid rowOid, int newStatus,
-                                     Object userData)
-        throws SnmpStatusException {
-        return null;
-    }
-
-    /**
-     * Tell whether the specified row is ready and can be put in the
-     * <i>notInService</i> state.
-     * <p>
-     * This method is called only once, after all the varbind have been
-     * set on a new entry for which <i>createAndWait</i> was specified.
-     * <p>
-     * If the entry is not yet ready, this method should return false.
-     * It will then be the responsibility of the entry to switch its
-     * own state to <i>notInService</i> when it becomes ready.
-     * No further call to <code>isRowReady()</code> will be made.
-     * <p>
-     * By default, this method always return true. <br>
-     * <code>mibgen</code> will not generate any specific implementation
-     * for this method - meaning that by default, a row created using
-     * <i>createAndWait</i> will always be placed in <i>notInService</i>
-     * state at the end of the request.
-     * <p>
-     * If this table was defined using SMIv2, and if it contains a
-     * control variable with RowStatus syntax, <code>mibgen</code>
-     * will generate an implementation for this method that will
-     * delegate the work to the metadata class modelling the conceptual
-     * row, so that you can override the default behaviour by subclassing
-     * that metadata class.
-     * <p>
-     * You will have to redefine this method if this default mechanism
-     * does not suit your needs.
-     *
-     * <p>
-     * @param rowOid The <CODE>SnmpOid</CODE> identifying the table
-     *               row involved in the operation.
-     *
-     * @param userData A contextual object containing user-data.
-     *        This object is allocated through the <code>
-     *        {@link com.sun.jmx.snmp.agent.SnmpUserDataFactory}</code>
-     *        for each incoming SNMP request.
-     *
-     * @return <code>true</code> if the row can be placed in
-     *         <i>notInService</i> state.
-     *
-     * @exception SnmpStatusException An error occurred while trying
-     *            to retrieve the row status, and the operation should
-     *            be aborted.
-     *
-     * @see com.sun.jmx.snmp.EnumRowStatus
-     **/
-    protected boolean isRowReady(SnmpOid rowOid, Object userData)
-        throws SnmpStatusException {
-        return true;
-    }
-
-    /**
-     * Check whether the control variable of the given row can be
-     * switched to the new specified <code>newStatus</code>.
-     * <p>
-     * This method is called during the <i>check</i> phase of a SET
-     * request when the control variable specifies <i>active</i> or
-     * <i>notInService</i>.
-     * <p>
-     * By default it is assumed that nothing prevents putting the
-     * row in the requested state, and this method does nothing.
-     * It is simply provided as a hook so that specific checks can
-     * be implemented.
-     * <p>
-     * Note that if the actual row deletion fails afterward, the
-     * atomicity of the request is no longer guaranteed.
-     *
-     * <p>
-     * @param req    The sub-request that must be handled by this node.
-     *
-     * @param rowOid The <CODE>SnmpOid</CODE> identifying the table
-     *               row involved in the operation.
-     *
-     * @param depth  The depth reached in the OID tree.
-     *
-     * @param newStatus The new status for the row: one of the
-     *        RowStatus code defined in
-     *        {@link com.sun.jmx.snmp.EnumRowStatus}. These codes
-     *        correspond to RowStatus codes as defined in RFC 2579,
-     *        plus the <i>unspecified</i> value which is SNMP Runtime specific.
-     *
-     * @exception SnmpStatusException if switching to this new state
-     *            would fail.
-     *
-     **/
-    protected void checkRowStatusChange(SnmpMibSubRequest req,
-                                        SnmpOid rowOid, int depth,
-                                        int newStatus)
-        throws SnmpStatusException {
-
-    }
-
-    /**
-     * Check whether the specified row can be removed from the table.
-     * <p>
-     * This method is called during the <i>check</i> phase of a SET
-     * request when the control variable specifies <i>destroy</i>
-     * <p>
-     * By default it is assumed that nothing prevents row deletion
-     * and this method does nothing. It is simply provided as a hook
-     * so that specific checks can be implemented.
-     * <p>
-     * Note that if the actual row deletion fails afterward, the
-     * atomicity of the request is no longer guaranteed.
-     *
-     * <p>
-     * @param req    The sub-request that must be handled by this node.
-     *
-     * @param rowOid The <CODE>SnmpOid</CODE> identifying the table
-     *               row involved in the operation.
-     *
-     * @param depth  The depth reached in the OID tree.
-     *
-     * @exception SnmpStatusException if the row deletion must be
-     *            rejected.
-     **/
-    protected void checkRemoveTableRow(SnmpMibSubRequest req, SnmpOid rowOid,
-                                       int depth)
-        throws SnmpStatusException {
-
-    }
-
-    /**
-     * Remove a table row upon a remote manager request.
-     *
-     * This method is called internally when <code>getRowAction()</code>
-     * yields <i>destroy</i> - i.e.: it is only called when a remote
-     * manager requests the removal of a table row.<br>
-     * You should never need to call this function directly.
-     * <p>
-     * By default, this method simply calls <code>removeEntry(rowOid)
-     * </code>.
-     * <p>
-     * You can redefine this method if you need to implement some
-     * specific behaviour when a remote row deletion is invoked.
-     * <p>
-     * Note that specific checks should not be implemented in this
-     * method, but rather in <code>checkRemoveTableRow()</code>.
-     * If <code>checkRemoveTableRow()</code> succeeds and this method
-     * fails afterward, the atomicity of the original SET request can no
-     * longer be guaranteed.
-     * <p>
-     *
-     * @param req    The sub-request that must be handled by this node.
-     *
-     * @param rowOid The <CODE>SnmpOid</CODE> identifying the table
-     *               row involved in the operation.
-     *
-     * @param depth  The depth reached in the OID tree.
-     *
-     * @exception SnmpStatusException if the actual row deletion fails.
-     *            This should not happen since it would break the
-     *            atomicity of the SET request. Specific checks should
-     *            be implemented in <code>checkRemoveTableRow()</code>
-     *            if needed. If the entry does not exists, no exception
-     *            is generated and the method simply returns.
-     *
-     **/
-    protected void removeTableRow(SnmpMibSubRequest req, SnmpOid rowOid,
-                                  int depth)
-        throws SnmpStatusException {
-
-        removeEntry(rowOid);
-    }
-
-    /**
-     * This method takes care of initial RowStatus handling during the
-     * check() phase of a SET request.
-     *
-     * In particular it will:
-     * <ul><li>check that the given <code>rowAction</code> returned by
-     *         <code>getRowAction()</code> is valid.</li>
-     * <li>Then depending on the <code>rowAction</code> specified it will:
-     *     <ul><li>either call <code>createNewEntry()</code> (<code>
-     *         rowAction = <i>createAndGo</i> or <i>createAndWait</i>
-     *         </code>),</li>
-     *     <li>or call <code>checkRemoveTableRow()</code> (<code>
-     *         rowAction = <i>destroy</i></code>),</li>
-     *     <li>or call <code>checkRowStatusChange()</code> (<code>
-     *         rowAction = <i>active</i> or <i>notInService</i></code>),</li>
-     *     <li>or generate a SnmpStatusException if the passed <code>
-     *         rowAction</code> is not correct.</li>
-     * </ul></li></ul>
-     * <p>
-     * In principle, you should not need to redefine this method.
-     * <p>
-     * <code>beginRowAction()</code> is called during the check phase
-     * of a SET request, before actual checking on the varbind list
-     * is performed.
-     *
-     * <p>
-     * @param req    The sub-request that must be handled by this node.
-     *
-     * @param rowOid The <CODE>SnmpOid</CODE> identifying the table
-     *               row involved in the operation.
-     *
-     * @param depth  The depth reached in the OID tree.
-     *
-     * @param rowAction The requested action as returned by <code>
-     *        getRowAction()</code>: one of the RowStatus codes defined in
-     *        {@link com.sun.jmx.snmp.EnumRowStatus}. These codes
-     *        correspond to RowStatus codes as defined in RFC 2579,
-     *        plus the <i>unspecified</i> value which is SNMP Runtime specific.
-     *
-     * @exception SnmpStatusException if the specified <code>rowAction</code>
-     *            is not valid or cannot be executed.
-     *            This should not happen since it would break the
-     *            atomicity of the SET request. Specific checks should
-     *            be implemented in <code>beginRowAction()</code> if needed.
-     *
-     * @see com.sun.jmx.snmp.EnumRowStatus
-     **/
-    protected synchronized void beginRowAction(SnmpMibSubRequest req,
-                              SnmpOid rowOid, int depth, int rowAction)
-        throws SnmpStatusException {
-        final boolean     isnew  = req.isNewEntry();
-        final SnmpOid     oid    = rowOid;
-        final int         action = rowAction;
-
-        switch (action) {
-        case EnumRowStatus.unspecified:
-            if (isnew) {
-                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
-                            SnmpMibTable.class.getName(),
-                            "beginRowAction", "Failed to create row[" +
-                            rowOid + "] : RowStatus = unspecified");
-                }
-                checkRowStatusFail(req,SnmpStatusException.snmpRspNoAccess);
-            }
-            break;
-        case EnumRowStatus.createAndGo:
-        case EnumRowStatus.createAndWait:
-            if (isnew) {
-                if (isCreationEnabled()) {
-                    if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                        SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
-                                SnmpMibTable.class.getName(),
-                                "beginRowAction", "Creating row[" + rowOid +
-                                "] : RowStatus = createAndGo | createAndWait");
-                    }
-                    createNewEntry(req,oid,depth);
-                } else {
-                    if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                        SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
-                                SnmpMibTable.class.getName(),
-                                "beginRowAction", "Can't create row[" + rowOid +
-                                "] : RowStatus = createAndGo | createAndWait " +
-                                "but creation is disabled");
-                    }
-                    checkRowStatusFail(req,
-                       SnmpStatusException.snmpRspNoAccess);
-                }
-            } else {
-                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
-                            SnmpMibTable.class.getName(),
-                            "beginRowAction", "Can't create row[" + rowOid +
-                            "] : RowStatus = createAndGo | createAndWait " +
-                            "but row already exists");
-                }
-                checkRowStatusFail(req,
-                       SnmpStatusException.snmpRspInconsistentValue);
-            }
-            break;
-        case EnumRowStatus.destroy:
-            if (isnew) {
-                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
-                            SnmpMibTable.class.getName(),
-                            "beginRowAction",
-                            "Warning: can't destroy row[" + rowOid +
-                            "] : RowStatus = destroy but row does not exist");
-                }
-            } else if (!isCreationEnabled()) {
-                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
-                            SnmpMibTable.class.getName(),
-                            "beginRowAction",
-                            "Can't destroy row[" + rowOid + "] : " +
-                            "RowStatus = destroy but creation is disabled");
-                }
-                checkRowStatusFail(req,SnmpStatusException.snmpRspNoAccess);
-            }
-            checkRemoveTableRow(req,rowOid,depth);
-            break;
-        case EnumRowStatus.active:
-        case EnumRowStatus.notInService:
-            if (isnew) {
-                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
-                            SnmpMibTable.class.getName(),
-                            "beginRowAction", "Can't switch state of row[" +
-                            rowOid + "] : specified RowStatus = active | " +
-                            "notInService but row does not exist");
-                }
-                checkRowStatusFail(req,
-                        SnmpStatusException.snmpRspInconsistentValue);
-            }
-            checkRowStatusChange(req,rowOid,depth,action);
-            break;
-        case EnumRowStatus.notReady:
-        default:
-            if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
-                        SnmpMibTable.class.getName(),
-                        "beginRowAction", "Invalid RowStatus value for row[" +
-                        rowOid + "] : specified RowStatus = " + action);
-            }
-            checkRowStatusFail(req,
-                    SnmpStatusException.snmpRspInconsistentValue);
-        }
-    }
-
-    /**
-     * This method takes care of final RowStatus handling during the
-     * set() phase of a SET request.
-     *
-     * In particular it will:
-     *     <ul><li>either call <code>setRowStatus(<i>active</i>)</code>
-     *         (<code> rowAction = <i>createAndGo</i> or <i>active</i>
-     *         </code>),</li>
-     *     <li>or call <code>setRowStatus(<i>notInService</i> or <i>
-     *         notReady</i>)</code> depending on the result of <code>
-     *         isRowReady()</code> (<code>rowAction = <i>createAndWait</i>
-     *         </code>),</li>
-     *     <li>or call <code>setRowStatus(<i>notInService</i>)</code>
-     *         (<code> rowAction = <i>notInService</i></code>),
-     *     <li>or call <code>removeTableRow()</code> (<code>
-     *         rowAction = <i>destroy</i></code>),</li>
-     *     <li>or generate a SnmpStatusException if the passed <code>
-     *         rowAction</code> is not correct. This should be avoided
-     *         since it would break SET request atomicity</li>
-     *     </ul>
-     * <p>
-     * In principle, you should not need to redefine this method.
-     * <p>
-     * <code>endRowAction()</code> is called during the set() phase
-     * of a SET request, after the actual set() on the varbind list
-     * has been performed. The varbind containing the control variable
-     * is updated with the value returned by setRowStatus() (if it is
-     * not <code>null</code>).
-     *
-     * <p>
-     * @param req    The sub-request that must be handled by this node.
-     *
-     * @param rowOid The <CODE>SnmpOid</CODE> identifying the table
-     *               row involved in the operation.
-     *
-     * @param depth  The depth reached in the OID tree.
-     *
-     * @param rowAction The requested action as returned by <code>
-     *        getRowAction()</code>: one of the RowStatus codes defined in
-     *        {@link com.sun.jmx.snmp.EnumRowStatus}. These codes
-     *        correspond to RowStatus codes as defined in RFC 2579,
-     *        plus the <i>unspecified</i> value which is SNMP Runtime specific.
-     *
-     * @exception SnmpStatusException if the specified <code>rowAction</code>
-     *            is not valid.
-     *
-     * @see com.sun.jmx.snmp.EnumRowStatus
-     **/
-    protected void endRowAction(SnmpMibSubRequest req, SnmpOid rowOid,
-                               int depth, int rowAction)
-        throws SnmpStatusException {
-        final boolean     isnew  = req.isNewEntry();
-        final SnmpOid     oid    = rowOid;
-        final int         action = rowAction;
-        final Object      data   = req.getUserData();
-        SnmpValue         value  = null;
-
-        switch (action) {
-        case EnumRowStatus.unspecified:
-            break;
-        case EnumRowStatus.createAndGo:
-            if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
-                        SnmpMibTable.class.getName(),
-                        "endRowAction", "Setting RowStatus to 'active' " +
-                        "for row[" + rowOid + "] : requested RowStatus = " +
-                        "createAndGo");
-            }
-            value = setRowStatus(oid,EnumRowStatus.active,data);
-            break;
-        case EnumRowStatus.createAndWait:
-            if (isRowReady(oid,data)) {
-                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
-                            SnmpMibTable.class.getName(),
-                            "endRowAction",
-                            "Setting RowStatus to 'notInService' for row[" +
-                            rowOid + "] : requested RowStatus = createAndWait");
-                }
-                value = setRowStatus(oid,EnumRowStatus.notInService,data);
-            } else {
-                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
-                            SnmpMibTable.class.getName(),
-                            "endRowAction", "Setting RowStatus to 'notReady' " +
-                            "for row[" + rowOid + "] : requested RowStatus = " +
-                            "createAndWait");
-                }
-                value = setRowStatus(oid,EnumRowStatus.notReady,data);
-            }
-            break;
-        case EnumRowStatus.destroy:
-            if (isnew) {
-                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
-                            SnmpMibTable.class.getName(),
-                            "endRowAction",
-                            "Warning: requested RowStatus = destroy, " +
-                            "but row[" + rowOid + "] does not exist");
-                }
-            } else {
-                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
-                            SnmpMibTable.class.getName(),
-                            "endRowAction", "Destroying row[" + rowOid +
-                            "] : requested RowStatus = destroy");
-                }
-            }
-            removeTableRow(req,oid,depth);
-            break;
-        case EnumRowStatus.active:
-            if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
-                        SnmpMibTable.class.getName(),
-                        "endRowAction",
-                        "Setting RowStatus to 'active' for row[" +
-                        rowOid + "] : requested RowStatus = active");
-            }
-            value = setRowStatus(oid,EnumRowStatus.active,data);
-            break;
-        case EnumRowStatus.notInService:
-            if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
-                        SnmpMibTable.class.getName(),
-                        "endRowAction",
-                        "Setting RowStatus to 'notInService' for row[" +
-                        rowOid + "] : requested RowStatus = notInService");
-            }
-            value = setRowStatus(oid,EnumRowStatus.notInService,data);
-            break;
-        case EnumRowStatus.notReady:
-        default:
-            if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
-                        SnmpMibTable.class.getName(),
-                        "endRowAction", "Invalid RowStatus value for row[" +
-                        rowOid + "] : specified RowStatus = " + action);
-            }
-            setRowStatusFail(req,
-                          SnmpStatusException.snmpRspInconsistentValue);
-        }
-        if (value != null) {
-            final SnmpVarBind vb = req.getRowStatusVarBind();
-            if (vb != null) vb.value = value;
-        }
-    }
-
-    // -------------------------------------------------------------------
-    // PROTECTED METHODS - get next
-    // -------------------------------------------------------------------
-
-    /**
-     * Return the next OID arc corresponding to a readable columnar
-     * object in the underlying entry OBJECT-TYPE, possibly skipping over
-     * those objects that must not or cannot be returned.
-     * Calls {@link
-     * #getNextVarEntryId(com.sun.jmx.snmp.SnmpOid,long,java.lang.Object)},
-     * until
-     * {@link #skipEntryVariable(com.sun.jmx.snmp.SnmpOid,long,
-     * java.lang.Object,int)} returns false.
-     *
-     *
-     * @param rowOid The OID index of the row involved in the operation.
-     *
-     * @param var Id of the variable we start from, looking for the next.
-     *
-     * @param userData A contextual object containing user-data.
-     *        This object is allocated through the <code>
-     *        {@link com.sun.jmx.snmp.agent.SnmpUserDataFactory}</code>
-     *        for each incoming SNMP request.
-     *
-     * @param pduVersion Protocol version of the original request PDU.
-     *
-     * @return The next columnar object id which can be returned using
-     *         the given PDU's protocol version.
-     *
-     * @exception SnmpStatusException If no id is found after the given id.
-     *
-     **/
-    protected long getNextVarEntryId(SnmpOid rowOid,
-                                     long var,
-                                     Object userData,
-                                     int pduVersion)
-        throws SnmpStatusException {
-
-        long varid=var;
-        do {
-            varid = getNextVarEntryId(rowOid,varid,userData);
-        } while (skipEntryVariable(rowOid,varid,userData,pduVersion));
-
-        return varid;
-    }
-
-    /**
-     * Hook for subclasses.
-     * The default implementation of this method is to always return
-     * false. Subclasses should redefine this method so that it returns
-     * true when:
-     * <ul><li>the variable is a leaf that is not instantiated,</li>
-     * <li>or the variable is a leaf whose type cannot be returned by that
-     *     version of the protocol (e.g. an Counter64 with SNMPv1).</li>
-     * </ul>
-     *
-     * @param rowOid The OID index of the row involved in the operation.
-     *
-     * @param var Id of the variable we start from, looking for the next.
-     *
-     * @param userData A contextual object containing user-data.
-     *        This object is allocated through the <code>
-     *        {@link com.sun.jmx.snmp.agent.SnmpUserDataFactory}</code>
-     *        for each incoming SNMP request.
-     *
-     * @param pduVersion Protocol version of the original request PDU.
-     *
-     * @return true if the variable must be skipped by the get-next
-     *         algorithm.
-     */
-    protected boolean skipEntryVariable(SnmpOid rowOid,
-                                        long var,
-                                        Object userData,
-                                        int pduVersion) {
-        return false;
-    }
-
-    /**
-     * Get the <CODE>SnmpOid</CODE> index of the row that follows
-     * the given <CODE>oid</CODE> in the table. The given <CODE>
-     * oid</CODE> does not need to be a valid row OID index.
-     *
-     * <p>
-     * @param oid The OID from which the search will begin.
-     *
-     * @param userData A contextual object containing user-data.
-     *        This object is allocated through the <code>
-     *        {@link com.sun.jmx.snmp.agent.SnmpUserDataFactory}</code>
-     *        for each incoming SNMP request.
-     *
-     * @return The next <CODE>SnmpOid</CODE> index.
-     *
-     * @exception SnmpStatusException There is no index following the
-     *     specified <CODE>oid</CODE> in the table.
-     */
-    protected SnmpOid getNextOid(SnmpOid oid, Object userData)
-        throws SnmpStatusException {
-
-        if (size == 0) {
-            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-        }
-
-        final SnmpOid resOid = oid;
-
-        // Just a simple check to speed up retrieval of last element ...
-        //
-        // XX SnmpOid last= (SnmpOid) oids.lastElement();
-        SnmpOid last= tableoids[tablecount-1];
-        if (last.equals(resOid)) {
-            // Last element of the table ...
-            //
-            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-        }
-
-        // First find the oid. This will allow to speed up retrieval process
-        // during smart discovery of table (using the getNext) as the
-        // management station will use the valid index returned during a
-        // previous getNext ...
-        //
-
-        // Returns the position following the position at which resOid
-        // is found, or the position at which resOid should be inserted.
-        //
-        final int newPos = getInsertionPoint(resOid,false);
-
-        // If the position returned is not out of bound, we will find
-        // the next element in the array.
-        //
-        if (newPos > -1 && newPos < size) {
-            try {
-                // XX last = (SnmpOid) oids.elementAt(newPos);
-                last = tableoids[newPos];
-            } catch(ArrayIndexOutOfBoundsException e) {
-                throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-            }
-        } else {
-            // We are dealing with the last element of the table ..
-            //
-            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-        }
-
-
-        return last;
-    }
-
-    /**
-     * Return the first entry OID registered in the table.
-     *
-     * <p>
-     * @param userData A contextual object containing user-data.
-     *        This object is allocated through the <code>
-     *        {@link com.sun.jmx.snmp.agent.SnmpUserDataFactory}</code>
-     *        for each incoming SNMP request.
-     *
-     * @return The <CODE>SnmpOid</CODE> of the first entry in the table.
-     *
-     * @exception SnmpStatusException If the table is empty.
-     */
-    protected SnmpOid getNextOid(Object userData)
-        throws SnmpStatusException {
-        if (size == 0) {
-            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-        }
-        // XX return (SnmpOid) oids.firstElement();
-        return tableoids[0];
-    }
-
-    // -------------------------------------------------------------------
-    // Abstract Protected Methods
-    // -------------------------------------------------------------------
-
-    /**
-     * This method is used internally and is implemented by the
-     * <CODE>SnmpMibTable</CODE> subclasses generated by <CODE>mibgen</CODE>.
-     *
-     * <p> Return the next OID arc corresponding to a readable columnar
-     *     object in the underlying entry OBJECT-TYPE.</p>
-     *
-     * <p>
-     * @param rowOid The OID index of the row involved in the operation.
-     *
-     * @param var Id of the variable we start from, looking for the next.
-     *
-     * @param userData A contextual object containing user-data.
-     *        This object is allocated through the <code>
-     *        {@link com.sun.jmx.snmp.agent.SnmpUserDataFactory}</code>
-     *        for each incoming SNMP request.
-     *
-     * @return The next columnar object id.
-     *
-     * @exception SnmpStatusException If no id is found after the given id.
-     *
-     **/
-    abstract protected long getNextVarEntryId(SnmpOid rowOid, long var,
-                                              Object userData)
-        throws SnmpStatusException;
-
-    /**
-     * This method is used internally and is implemented by the
-     * <CODE>SnmpMibTable</CODE> subclasses generated by <CODE>mibgen</CODE>.
-     *
-     * <p>
-     * @param rowOid The OID index of the row involved in the operation.
-     *
-     * @param var The var we want to validate.
-     *
-     * @param userData A contextual object containing user-data.
-     *        This object is allocated through the <code>
-     *        {@link com.sun.jmx.snmp.agent.SnmpUserDataFactory}</code>
-     *        for each incoming SNMP request.
-     *
-     * @exception SnmpStatusException If this id is not valid.
-     *
-     */
-    abstract protected void validateVarEntryId(SnmpOid rowOid, long var,
-                                               Object userData)
-        throws SnmpStatusException;
-
-    /**
-     *
-     * This method is used internally and is implemented by the
-     * <CODE>SnmpMibTable</CODE> subclasses generated by <CODE>mibgen</CODE>.
-     *
-     * <p>
-     * @param rowOid The OID index of the row involved in the operation.
-     *
-     * @param var The OID arc.
-     *
-     * @param userData A contextual object containing user-data.
-     *        This object is allocated through the <code>
-     *        {@link com.sun.jmx.snmp.agent.SnmpUserDataFactory}</code>
-     *        for each incoming SNMP request.
-     *
-     * @exception SnmpStatusException If this id is not valid.
-     *
-     */
-    abstract protected boolean isReadableEntryId(SnmpOid rowOid, long var,
-                                                 Object userData)
-        throws SnmpStatusException;
-
-    /**
-     * This method is used internally and is implemented by the
-     * <CODE>SnmpMibTable</CODE> subclasses generated by <CODE>mibgen</CODE>.
-     */
-    abstract protected void get(SnmpMibSubRequest req,
-                                SnmpOid rowOid, int depth)
-        throws SnmpStatusException;
-
-    /**
-     * This method is used internally and is implemented by the
-     * <CODE>SnmpMibTable</CODE> subclasses generated by <CODE>mibgen</CODE>.
-     */
-    abstract protected void check(SnmpMibSubRequest req,
-                                  SnmpOid rowOid, int depth)
-        throws SnmpStatusException;
-
-    /**
-     * This method is used internally and is implemented by the
-     * <CODE>SnmpMibTable</CODE> subclasses generated by <CODE>mibgen</CODE>.
-     */
-    abstract protected void set(SnmpMibSubRequest req,
-                                SnmpOid rowOid, int depth)
-        throws SnmpStatusException;
-
-    // ----------------------------------------------------------------------
-    // PACKAGE METHODS
-    // ----------------------------------------------------------------------
-
-    /**
-     * Get the <CODE>SnmpOid</CODE> index of the row that follows the
-     * index extracted from the specified OID array.
-     * Builds the SnmpOid corresponding to the row OID and calls
-     * <code>getNextOid(oid,userData)</code>;
-     *
-     * <p>
-     * @param oid The OID array.
-     *
-     * @param pos The position in the OID array at which the index starts.
-     *
-     * @param userData A contextual object containing user-data.
-     *        This object is allocated through the <code>
-     *        {@link com.sun.jmx.snmp.agent.SnmpUserDataFactory}</code>
-     *        for each incoming SNMP request.
-     *
-     * @return The next <CODE>SnmpOid</CODE>.
-     *
-     * @exception SnmpStatusException There is no index following the
-     *     specified one in the table.
-     */
-    SnmpOid getNextOid(long[] oid, int pos, Object userData)
-        throws SnmpStatusException {
-
-        // Construct the sub-oid starting at pos.
-        // This sub-oid correspond to the oid part just after the entry
-        // variable oid.
-        //
-        final SnmpOid resOid = new SnmpEntryOid(oid,pos);
-
-        return getNextOid(resOid,userData);
-    }
-
-    // ---------------------------------------------------------------------
-    //
-    // Register an exception when checking the RowStatus variable
-    //
-    // ---------------------------------------------------------------------
-
-    static void checkRowStatusFail(SnmpMibSubRequest req, int errorStatus)
-        throws SnmpStatusException {
-
-        final SnmpVarBind statusvb  = req.getRowStatusVarBind();
-        final SnmpStatusException x = new SnmpStatusException(errorStatus);
-        req.registerCheckException(statusvb,x);
-    }
-
-    // ---------------------------------------------------------------------
-    //
-    // Register an exception when checking the RowStatus variable
-    //
-    // ---------------------------------------------------------------------
-
-    static void setRowStatusFail(SnmpMibSubRequest req, int errorStatus)
-        throws SnmpStatusException {
-
-        final SnmpVarBind statusvb  = req.getRowStatusVarBind();
-        final SnmpStatusException x = new SnmpStatusException(errorStatus);
-        req.registerSetException(statusvb,x);
-    }
-
-    // ---------------------------------------------------------------------
-    //
-    // Implements the method defined in SnmpMibNode.
-    //
-    // ---------------------------------------------------------------------
-    @Override
-    final synchronized void findHandlingNode(SnmpVarBind varbind,
-                                             long[] oid, int depth,
-                                             SnmpRequestTree handlers)
-        throws SnmpStatusException {
-
-        final int  length = oid.length;
-
-        if (handlers == null)
-            throw new SnmpStatusException(SnmpStatusException.snmpRspGenErr);
-
-        if (depth >= length)
-            throw new SnmpStatusException(SnmpStatusException.noAccess);
-
-        if (oid[depth] != nodeId)
-            throw new SnmpStatusException(SnmpStatusException.noAccess);
-
-        if (depth+2 >= length)
-            throw new SnmpStatusException(SnmpStatusException.noAccess);
-
-        // Checks that the oid is valid
-        // validateOid(oid,depth);
-
-        // Gets the part of the OID that identifies the entry
-        final SnmpOid entryoid = new SnmpEntryOid(oid, depth+2);
-
-        // Finds the entry: false means that the entry does not exists
-        final Object data = handlers.getUserData();
-        final boolean hasEntry = contains(entryoid, data);
-
-        // Fails if the entry is not found and the table does not
-        // not support creation.
-        // We know that the entry does not exists if (isentry == false).
-        if (!hasEntry) {
-            if (!handlers.isCreationAllowed()) {
-                // we're not doing a set
-                throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-            } else if (!isCreationEnabled())
-                // we're doing a set but creation is disabled.
-                throw new
-                    SnmpStatusException(SnmpStatusException.snmpRspNoAccess);
-        }
-
-        final long   var  = oid[depth+1];
-
-        // Validate the entry id
-        if (hasEntry) {
-            // The entry already exists - validate the id
-            validateVarEntryId(entryoid,var,data);
-        }
-
-        // Registers this node for the identified entry.
-        //
-        if (handlers.isSetRequest() && isRowStatus(entryoid,var,data))
-
-            // We only try to identify the RowStatus for SET operations
-            //
-            handlers.add(this,depth,entryoid,varbind,(!hasEntry),varbind);
-
-        else
-            handlers.add(this,depth,entryoid,varbind,(!hasEntry));
-    }
-
-
-    // ---------------------------------------------------------------------
-    //
-    // Implements the method defined in SnmpMibNode. The algorithm is very
-    // largely inspired from the original getNext() method.
-    //
-    // ---------------------------------------------------------------------
-    @Override
-    final synchronized long[] findNextHandlingNode(SnmpVarBind varbind,
-                                                   long[] oid,
-                                                   int pos,
-                                                   int depth,
-                                                   SnmpRequestTree handlers,
-                                                   AcmChecker checker)
-        throws SnmpStatusException {
-
-            int length = oid.length;
-
-            if (handlers == null) {
-                // This should be considered as a genErr, but we do not want to
-                // abort the whole request, so we're going to throw
-                // a noSuchObject...
-                //
-                throw new SnmpStatusException(SnmpStatusException.noSuchObject);
-            }
-
-            final Object data = handlers.getUserData();
-            final int pduVersion = handlers.getRequestPduVersion();
-
-            long var= -1;
-
-            // If the querried oid contains less arcs than the OID of the
-            // xxxEntry object, we must return the first leaf under the
-            // first columnar object: the best way to do that is to reset
-            // the queried oid:
-            //   oid[0] = nodeId (arc of the xxxEntry object)
-            //   pos    = 0 (points to the arc of the xxxEntry object)
-            // then we just have to proceed...
-            //
-            if (pos >= length) {
-                // this will have the side effect to set
-                //    oid[pos] = nodeId
-                // and
-                //    (pos+1) = length
-                // so we won't fall into the "else if" cases below -
-                // so using "else if" rather than "if ..." is guaranteed
-                // to be safe.
-                //
-                oid = new long[1];
-                oid[0] = nodeId;
-                pos = 0;
-                length = 1;
-            } else if (oid[pos] > nodeId) {
-                // oid[pos] is expected to be the id of the xxxEntry ...
-                // The id requested is greater than the id of the xxxEntry,
-                // so we won't find the next element in this table... (any
-                // element in this table will have a smaller OID)
-                //
-                throw new SnmpStatusException(SnmpStatusException.noSuchObject);
-            } else if (oid[pos] < nodeId) {
-                // we must return the first leaf under the first columnar
-                // object, so we are back to our first case where pos was
-                // out of bounds... => reset the oid to contain only the
-                // arc of the xxxEntry object.
-                //
-                oid = new long[1];
-                oid[0] = nodeId;
-                pos = 0;
-                length = 0;
-            } else if ((pos + 1) < length) {
-                // The arc at the position "pos+1" is the id of the columnar
-                // object (ie: the id of the variable in the table entry)
-                //
-                var = oid[pos+1];
-            }
-
-            // Now that we've got everything right we can begin.
-            SnmpOid entryoid;
-
-            if (pos == (length - 1)) {
-                // pos points to the last arc in the oid, and this arc is
-                // guaranteed to be the xxxEntry id (we have handled all
-                // the other possibilities before)
-                //
-                // We must therefore return the first leaf below the first
-                // columnar object in the table.
-                //
-                // Get the first index. If an exception is raised,
-                // then it means that the table is empty. We thus do not
-                // have to catch the exception - we let it propagate to
-                // the caller.
-                //
-                entryoid = getNextOid(data);
-                var = getNextVarEntryId(entryoid,var,data,pduVersion);
-            } else if ( pos == (length-2)) {
-                // In that case we have (pos+1) = (length-1), so pos
-                // points to the arc of the querried variable (columnar object).
-                // Since the requested oid stops there, it means we have
-                // to return the first leaf under this columnar object.
-                //
-                // So we first get the first index:
-                // Note: if this raises an exception, this means that the table
-                // is empty, so we can let the exception propagate to the caller.
-                //
-                entryoid = getNextOid(data);
-
-                // XXX revisit: not exactly perfect:
-                //     a specific row could be empty.. But we don't know
-                //     how to make the difference! => tradeoff holes
-                //     in tables can't be properly supported (all rows
-                //     must have the same holes)
-                //
-                if (skipEntryVariable(entryoid,var,data,pduVersion)) {
-                    var = getNextVarEntryId(entryoid,var,data,pduVersion);
-                }
-            } else {
-
-                // So now there remain one last case, namely: some part of the
-                // index is provided by the oid...
-                // We build a possibly incomplete and invalid index from
-                // the OID.
-                // The piece of index provided should begin at pos+2
-                //   oid[pos]   = id of the xxxEntry object,
-                //   oid[pos+1] = id of the columnar object,
-                //   oid[pos+2] ... oid[length-1] = piece of index.
-                //
-
-                // We get the next index following the provided index.
-                // If this raises an exception, then it means that we have
-                // reached the last index in the table, and we must then
-                // try with the next columnar object.
-                //
-                // Bug fix 4269251
-                // The SnmpIndex is defined to contain a valid oid:
-                // this is not an SNMP requirement for the getNext request.
-                // So we no more use the SnmpIndex but directly the SnmpOid.
-                //
-                try {
-                    entryoid = getNextOid(oid, pos + 2, data);
-
-                    // If the variable must ne skipped, fall through...
-                    //
-                    // XXX revisit: not exactly perfect:
-                    //     a specific row could be empty.. But we don't know
-                    //     how to make the difference! => tradeoff holes
-                    //     in tables can't be properly supported (all rows
-                    //     must have the same holes)
-                    //
-                    if (skipEntryVariable(entryoid,var,data,pduVersion)) {
-                        throw new SnmpStatusException(SnmpStatusException.noSuchObject);
-                    }
-                } catch(SnmpStatusException se) {
-                    entryoid = getNextOid(data);
-                    var = getNextVarEntryId(entryoid,var,data,pduVersion);
-                }
-            }
-
-            return findNextAccessibleOid(entryoid,
-                                         varbind,
-                                         oid,
-                                         depth,
-                                         handlers,
-                                         checker,
-                                         data,
-                                         var);
-        }
-
-    private long[] findNextAccessibleOid(SnmpOid entryoid,
-                                         SnmpVarBind varbind,long[] oid,
-                                         int depth, SnmpRequestTree handlers,
-                                         AcmChecker checker, Object data,
-                                         long var)
-        throws SnmpStatusException {
-        final int pduVersion = handlers.getRequestPduVersion();
-
-        // Loop on each var (column)
-        while(true) {
-            // This should not happen. If it happens, (bug, or customized
-            // methods returning garbage instead of raising an exception),
-            // it probably means that there is nothing to return anyway.
-            // So we throw the exception.
-            // => will skip to next node in the MIB tree.
-            //
-            if (entryoid == null || var == -1 ) {
-                throw new SnmpStatusException(SnmpStatusException.noSuchObject);
-            }
-
-            // So here we know both the row (entryoid) and the column (var)
-            //
-
-            try {
-                // Raising an exception here will make the catch() clause
-                // switch to the next variable. If `var' is not readable
-                // for this specific entry, it is not readable for any
-                // other entry => skip to next column.
-                //
-                if (!isReadableEntryId(entryoid,var,data)) {
-                    throw new SnmpStatusException(SnmpStatusException.noSuchObject);
-                }
-
-                // Prepare the result and the ACM checker.
-                //
-                final long[] etable  = entryoid.longValue(false);
-                final int    elength = etable.length;
-                final long[] result  = new long[depth + 2 + elength];
-                result[0] = -1 ; // Bug detector!
-
-                // Copy the entryOid at the end of `result'
-                //
-                java.lang.System.arraycopy(etable, 0, result,
-                                           depth+2, elength);
-
-                // Set the node Id and var Id in result.
-                //
-                result[depth] = nodeId;
-                result[depth+1] = var;
-
-                // Append nodeId.varId.<rowOid> to ACM checker.
-                //
-                checker.add(depth,result,depth,elength+2);
-
-                // No we're going to ACM check our OID.
-                try {
-                    checker.checkCurrentOid();
-
-                    // No exception thrown by checker => this is all OK!
-                    // we have it: register the handler and return the
-                    // result.
-                    //
-                    handlers.add(this,depth,entryoid,varbind,false);
-                    return result;
-                } catch(SnmpStatusException e) {
-                    // Skip to the next entry. If an exception is
-                    // thrown, will be catch by enclosing catch
-                    // and a skip is done to the next var.
-                    //
-                    entryoid = getNextOid(entryoid, data);
-                } finally {
-                    // Clean the checker.
-                    //
-                    checker.remove(depth,elength+2);
-                }
-            } catch(SnmpStatusException e) {
-                // Catching an exception here means we have to skip to the
-                // next column.
-                //
-                // Back to the first row.
-                entryoid = getNextOid(data);
-
-                // Find out the next column.
-                //
-                var = getNextVarEntryId(entryoid,var,data,pduVersion);
-
-            }
-
-            // This should not happen. If it happens, (bug, or customized
-            // methods returning garbage instead of raising an exception),
-            // it probably means that there is nothing to return anyway.
-            // No need to continue, we throw an exception.
-            // => will skip to next node in the MIB tree.
-            //
-            if (entryoid == null || var == -1 ) {
-                throw new SnmpStatusException(SnmpStatusException.noSuchObject);
-            }
-        }
-    }
-
-
-    /**
-     * Validate the specified OID.
-     *
-     * <p>
-     * @param oid The OID array.
-     *
-     * @param pos The position in the array.
-     *
-     * @exception SnmpStatusException If the validation fails.
-     */
-    final void validateOid(long[] oid, int pos) throws SnmpStatusException {
-        final int length= oid.length;
-
-        // Control the length of the oid
-        //
-        if (pos +2 >= length) {
-            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-        }
-
-        // Check that the entry identifier is specified
-        //
-        if (oid[pos] != nodeId) {
-            throw new SnmpStatusException(SnmpStatusException.noSuchObject);
-        }
-    }
-
-    // ----------------------------------------------------------------------
-    // PRIVATE METHODS
-    // ----------------------------------------------------------------------
-
-    /**
-     * Enable this <CODE>SnmpMibTable</CODE> to send a notification.
-     *
-     * <p>
-     * @param notification The notification to send.
-     */
-    private synchronized void sendNotification(Notification notification) {
-
-        // loop on listener
-        //
-        for(java.util.Enumeration<NotificationListener> k = handbackTable.keys();
-            k.hasMoreElements(); ) {
-
-            NotificationListener listener = k.nextElement();
-
-            // Get the associated handback list and the associated filter list
-            //
-            java.util.Vector<?> handbackList = handbackTable.get(listener) ;
-            java.util.Vector<NotificationFilter> filterList =
-                filterTable.get(listener) ;
-
-            // loop on handback
-            //
-            java.util.Enumeration<NotificationFilter> f = filterList.elements();
-            for(java.util.Enumeration<?> h = handbackList.elements();
-                h.hasMoreElements(); ) {
-
-                Object handback = h.nextElement();
-                NotificationFilter filter = f.nextElement();
-
-                if ((filter == null) ||
-                     (filter.isNotificationEnabled(notification))) {
-
-                    listener.handleNotification(notification,handback) ;
-                }
-            }
-        }
-    }
-
-    /**
-     * This method is used by the SnmpMibTable to create and send a table
-     * entry notification to all the listeners registered for this kind of
-     * notification.
-     *
-     * <p>
-     * @param type The notification type.
-     *
-     * @param timeStamp The notification emission date.
-     *
-     * @param entry The entry object.
-     */
-    private void sendNotification(String type, long timeStamp,
-                                  Object entry, ObjectName name) {
-
-        synchronized(this) {
-            sequenceNumber = sequenceNumber + 1;
-        }
-
-        SnmpTableEntryNotification notif =
-            new SnmpTableEntryNotification(type, this, sequenceNumber,
-                                           timeStamp, entry, name);
-
-        this.sendNotification(notif) ;
-    }
-
-    /**
-     * Return true if the entry identified by the given OID index
-     * is contained in this table.
-     * <p>
-     * <b>Do not call this method directly</b>.
-     * <p>
-     * This method is provided has a hook for subclasses.
-     * It is called when a get/set request is received in order to
-     * determine whether the specified entry is contained in the table.
-     * You may want to override this method if you need to perform e.g.
-     * lazy evaluation of tables (you need to update the table when a
-     * request is received) or if your table is virtual.
-     * <p>
-     * Note that this method is called by the Runtime from within a
-     * synchronized block.
-     *
-     * @param oid The index part of the OID we're looking for.
-     * @param userData A contextual object containing user-data.
-     *        This object is allocated through the <code>
-     *        {@link com.sun.jmx.snmp.agent.SnmpUserDataFactory}</code>
-     *        for each incoming SNMP request.
-     *
-     * @return <code>true</code> if the entry is found, <code>false</code>
-     *         otherwise.
-     *
-     * @since 1.5
-     **/
-    protected boolean contains(SnmpOid oid, Object userData) {
-        return (findObject(oid) > -1);
-    }
-
-    /**
-     * Look for the given oid in the OID table (tableoids) and returns
-     * its position.
-     *
-     * <p>
-     * @param oid The OID we're looking for.
-     *
-     * @return The position of the OID in the table. -1 if the given
-     *         OID was not found.
-     *
-     **/
-    private int findObject(SnmpOid oid) {
-        int low= 0;
-        int max= size - 1;
-        SnmpOid pos;
-        int comp;
-        int curr= low + (max-low)/2;
-        //System.out.println("Try to retrieve: " + oid.toString());
-        while (low <= max) {
-
-            // XX pos = (SnmpOid) oids.elementAt(curr);
-            pos = tableoids[curr];
-
-            //System.out.println("Compare with" + pos.toString());
-            // never know ...we might find something ...
-            //
-            comp = oid.compareTo(pos);
-            if (comp == 0)
-                return curr;
-
-            if (oid.equals(pos) == true) {
-                return curr;
-            }
-            if (comp > 0) {
-                low = curr + 1;
-            } else {
-                max = curr - 1;
-            }
-            curr = low + (max-low)/2;
-        }
-        return -1;
-    }
-
-    /**
-     * Search the position at which the given oid should be inserted
-     * in the OID table (tableoids).
-     *
-     * <p>
-     * @param oid The OID we would like to insert.
-     *
-     * @param fail Tells whether a SnmpStatusException must be generated
-     *             if the given OID is already present in the table.
-     *
-     * @return The position at which the OID should be inserted in
-     *         the table. When the OID is found, it returns the next
-     *         position. Note that it is not valid to insert twice the
-     *         same OID. This feature is only an optimization to improve
-     *         the getNextOid() behaviour.
-     *
-     * @exception SnmpStatusException if the OID is already present in the
-     *            table and <code>fail</code> is <code>true</code>.
-     *
-     **/
-    private int getInsertionPoint(SnmpOid oid, boolean fail)
-        throws SnmpStatusException {
-
-        final int failStatus = SnmpStatusException.snmpRspNotWritable;
-        int low= 0;
-        int max= size - 1;
-        SnmpOid pos;
-        int comp;
-        int curr= low + (max-low)/2;
-        while (low <= max) {
-
-            // XX pos= (SnmpOid) oids.elementAt(curr);
-            pos= tableoids[curr];
-
-            // never know ...we might find something ...
-            //
-            comp= oid.compareTo(pos);
-
-            if (comp == 0) {
-                if (fail)
-                    throw new SnmpStatusException(failStatus,curr);
-                else
-                    return curr+1;
-            }
-
-            if (comp>0) {
-                low= curr +1;
-            } else {
-                max= curr -1;
-            }
-            curr= low + (max-low)/2;
-        }
-        return curr;
-    }
-
-    /**
-     * Remove the OID located at the given position.
-     *
-     * <p>
-     * @param pos The position at which the OID to be removed is located.
-     *
-     **/
-    private void removeOid(int pos) {
-        if (pos >= tablecount) return;
-        if (pos < 0) return;
-        final int l1 = --tablecount-pos;
-        tableoids[pos] = null;
-        if (l1 > 0)
-            java.lang.System.arraycopy(tableoids,pos+1,tableoids,pos,l1);
-        tableoids[tablecount] = null;
-    }
-
-    /**
-     * Insert an OID at the given position.
-     *
-     * <p>
-     * @param oid The OID to be inserted in the table
-     * @param pos The position at which the OID to be added is located.
-     *
-     **/
-    private void insertOid(int pos, SnmpOid oid) {
-        if (pos >= tablesize || tablecount == tablesize) {
-                // Vector must be enlarged
-
-                // Save old vector
-                final SnmpOid[] olde = tableoids;
-
-                // Allocate larger vectors
-                tablesize += Delta;
-                tableoids = new SnmpOid[tablesize];
-
-                // Check pos validity
-                if (pos > tablecount) pos = tablecount;
-                if (pos < 0) pos = 0;
-
-                final int l1 = pos;
-                final int l2 = tablecount - pos;
-
-                // Copy original vector up to `pos'
-                if (l1 > 0)
-                    java.lang.System.arraycopy(olde,0,tableoids,0,l1);
-
-                // Copy original vector from `pos' to end, leaving
-                // an empty room at `pos' in the new vector.
-                if (l2 > 0)
-                    java.lang.System.arraycopy(olde,l1,tableoids,
-                                               l1+1,l2);
-
-            } else if (pos < tablecount) {
-                // Vector is large enough to accommodate one additional
-                // entry.
-                //
-                // Shift vector, making an empty room at `pos'
-
-                java.lang.System.arraycopy(tableoids,pos,tableoids,
-                                           pos+1,tablecount-pos);
-            }
-
-            // Fill the gap at `pos'
-            tableoids[pos]  = oid;
-            tablecount++;
-    }
-
-
-    // ----------------------------------------------------------------------
-    // PROTECTED VARIABLES
-    // ----------------------------------------------------------------------
-
-    /**
-     * The id of the contained entry object.
-     * @serial
-     */
-    protected int nodeId=1;
-
-    /**
-     * The MIB to which the metadata is linked.
-     * @serial
-     */
-    protected SnmpMib theMib;
-
-    /**
-     * <CODE>true</CODE> if remote creation of entries via SET operations
-     * is enabled.
-     * [default value is <CODE>false</CODE>]
-     * @serial
-     */
-    protected boolean creationEnabled = false;
-
-    /**
-     * The entry factory
-     */
-    protected SnmpTableEntryFactory factory = null;
-
-    // ----------------------------------------------------------------------
-    // PRIVATE VARIABLES
-    // ----------------------------------------------------------------------
-
-    /**
-     * The number of elements in the table.
-     * @serial
-     */
-    private int size=0;
-
-    /**
-     * The list of indexes.
-     * @serial
-     */
-    //    private Vector indexes= new Vector();
-
-    /**
-     * The list of OIDs.
-     * @serial
-     */
-    // private Vector oids= new Vector();
-    private final static int Delta = 16;
-    private int     tablecount     = 0;
-    private int     tablesize      = Delta;
-    private SnmpOid tableoids[]    = new SnmpOid[tablesize];
-
-    /**
-     * The list of entries.
-     * @serial
-     */
-    private final Vector<Object> entries= new Vector<>();
-
-    /**
-     * The list of object names.
-     * @serial
-     */
-    private final Vector<ObjectName> entrynames= new Vector<>();
-
-    /**
-     * Callback handlers
-     */
-    // final Vector callbacks = new Vector();
-
-    /**
-     * Listener hashtable containing the hand-back objects.
-     */
-    private Hashtable<NotificationListener, Vector<Object>> handbackTable =
-            new Hashtable<>();
-
-    /**
-     * Listener hashtable containing the filter objects.
-     */
-    private Hashtable<NotificationListener, Vector<NotificationFilter>>
-            filterTable = new Hashtable<>();
-
-    // PACKAGE VARIABLES
-    //------------------
-    /**
-     * SNMP table sequence number.
-     * The default value is set to 0.
-     */
-    transient long sequenceNumber = 0;
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/agent/SnmpRequestTree.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1091 +0,0 @@
-/*
- * Copyright (c) 2000, 2013, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.sun.jmx.snmp.agent;
-
-import java.util.Vector;
-import java.util.Hashtable;
-import java.util.Enumeration;
-import java.util.Iterator;
-import java.util.NoSuchElementException;
-import java.util.Arrays;
-import java.util.logging.Level;
-
-import static com.sun.jmx.defaults.JmxProperties.SNMP_ADAPTOR_LOGGER;
-import com.sun.jmx.snmp.SnmpVarBind;
-import com.sun.jmx.snmp.SnmpStatusException;
-import com.sun.jmx.snmp.SnmpDefinitions;
-import com.sun.jmx.snmp.SnmpOid;
-import com.sun.jmx.snmp.SnmpPdu;
-import com.sun.jmx.snmp.SnmpEngine;
-
-//  XXX: things to do: use SnmpOid rather than `instance' for future
-//       evolutions.
-//  XXX: Maybe use hashlists rather than vectors for entries?
-//       => in that case, the key should be SnmpOid.toString()
-//
-/**
- * This class is used to register varbinds from a SNMP varbind list with
- * the SnmpMibNode responsible for handling the requests concerning that
- * varbind.
- * This class holds a hashtable of Handler nodes, whith the involved
- * SnmpMibNode as a key.
- * When the involved SnmpMibNode is a group, the sublist of varbind is
- * directly stored in the Handler node.
- * When the involved SnmpMibNode is a table, the sublist is stored in a
- * sorted array indexed by the OID of the entry involved.
- */
-final class SnmpRequestTree {
-
-    // Constructor:
-    // @param  req The SnmpMibRequest that will be segmented in this
-    //         tree. It holds the original varbind vector passed
-    //         by the SnmpSubRequestHandler to this MIB. This
-    //         varbind vector is used to retrieve the "real"
-    //         position of a varbind in the vector. There is no other easy
-    //         way to do this - since as a result of the segmentation the
-    //         original positions will be lost.
-    // @param  creationflag indicates whether the operation involved
-    //         allows for entry creation (ie: it is a SET request).
-    // @param  pdutype indicates the type of the request PDU as defined
-    //         in SnmpDefinitions
-    //
-    SnmpRequestTree(SnmpMibRequest req, boolean creationflag, int pdutype) {
-        this.request = req;
-        this.version  = req.getVersion();
-        this.creationflag = creationflag;
-        this.hashtable = new Hashtable<>();
-        setPduType(pdutype);
-    }
-
-    public static int mapSetException(int errorStatus, int version)
-        throws SnmpStatusException {
-
-        final int errorCode = errorStatus;
-
-        if (version == SnmpDefinitions.snmpVersionOne)
-            return errorCode;
-
-        int mappedErrorCode = errorCode;
-
-        // Now take care of V2 errorCodes that can be stored
-        // in the varbind itself:
-        if (errorCode == SnmpStatusException.noSuchObject)
-            // noSuchObject => notWritable
-            mappedErrorCode = SnmpStatusException.snmpRspNotWritable;
-
-        else if (errorCode == SnmpStatusException.noSuchInstance)
-            // noSuchInstance => notWritable
-            mappedErrorCode = SnmpStatusException.snmpRspNotWritable;
-
-        return mappedErrorCode;
-    }
-
-    public static int mapGetException(int errorStatus, int version)
-        throws SnmpStatusException {
-
-        final int errorCode = errorStatus;
-        if (version == SnmpDefinitions.snmpVersionOne)
-            return errorCode;
-
-        int mappedErrorCode = errorCode;
-
-        // Now take care of V2 errorCodes that can be stored
-        // in the varbind itself:
-        if (errorCode ==
-            SnmpStatusException.noSuchObject)
-            // noSuchObject => noSuchObject
-            mappedErrorCode = errorCode;
-
-        else if (errorCode ==
-                 SnmpStatusException.noSuchInstance)
-            // noSuchInstance => noSuchInstance
-            mappedErrorCode = errorCode;
-
-        // Now we're going to try to transform every other
-        // global code in either noSuchInstance or noSuchObject,
-        // so that the get can return a partial result.
-        //
-        // Only noSuchInstance or noSuchObject can be stored
-        // in the varbind itself.
-        //
-
-        // According to RFC 1905: noAccess is emitted when the
-        // the access is denied because it is not in the MIB view...
-        //
-        else if (errorCode ==
-                 SnmpStatusException.noAccess)
-            // noAccess => noSuchInstance
-            mappedErrorCode = SnmpStatusException.noSuchInstance;
-
-        // According to RFC 1905: (my interpretation because it is not
-        // really clear) The specified variable name exists - but the
-        // variable does not exists and cannot be created under the
-        // present circumstances (probably because the request specifies
-        // another variable/value which is incompatible, or because the
-        // value of some other variable in the MIB prevents the creation)
-        //
-        // Note that this error should never be raised in a GET context
-        // but who knows?
-        //
-        else if (errorCode == SnmpStatusException.snmpRspInconsistentName)
-            // inconsistentName => noSuchInstance
-            mappedErrorCode = SnmpStatusException.noSuchInstance;
-
-        // All the errors comprised between snmpRspWrongType and
-        // snmpRspInconsistentValue concern values: so we're going
-        // to assume the OID was correct, and reply with noSuchInstance.
-        //
-        // Note that this error should never be raised in a GET context
-        // but who knows?
-        //
-        else if ((errorCode >= SnmpStatusException.snmpRspWrongType) &&
-                 (errorCode <= SnmpStatusException.snmpRspInconsistentValue))
-            mappedErrorCode = SnmpStatusException.noSuchInstance;
-
-        // We're going to assume the OID was correct, and reply
-        // with noSuchInstance.
-        //
-        else if (errorCode == SnmpStatusException.readOnly)
-            mappedErrorCode = SnmpStatusException.noSuchInstance;
-
-        // For all other errors but genErr, we're going to reply with
-        // noSuchObject
-        //
-        else if (errorCode != SnmpStatusException.snmpRspAuthorizationError &&
-                 errorCode != SnmpStatusException.snmpRspGenErr)
-            mappedErrorCode = SnmpStatusException.noSuchObject;
-
-        // Only genErr will abort the GET and be returned as global
-        // error.
-        //
-        return mappedErrorCode;
-
-    }
-
-    //-------------------------------------------------------------------
-    // This class is a package implementation of the enumeration of
-    // SnmSubRequest associated with an Handler node.
-    //-------------------------------------------------------------------
-
-    static final class Enum implements Enumeration<SnmpMibSubRequest> {
-        Enum(SnmpRequestTree hlist,Handler h) {
-            handler = h;
-            this.hlist = hlist;
-            size = h.getSubReqCount();
-        }
-        private final Handler handler;
-        private final SnmpRequestTree hlist;
-        private int   entry = 0;
-        private int   iter  = 0;
-        private int   size  = 0;
-
-        @Override
-        public boolean hasMoreElements() {
-            return iter < size;
-        }
-
-        @Override
-        public SnmpMibSubRequest nextElement() throws NoSuchElementException  {
-            if (iter == 0) {
-                if (handler.sublist != null) {
-                    iter++;
-                    return hlist.getSubRequest(handler);
-                }
-            }
-            iter ++;
-            if (iter > size) throw new NoSuchElementException();
-            SnmpMibSubRequest result = hlist.getSubRequest(handler,entry);
-            entry++;
-            return result;
-        }
-    }
-
-    //-------------------------------------------------------------------
-    // This class is a package implementation of the SnmpMibSubRequest
-    // interface. It can only be instantiated by SnmpRequestTree.
-    //-------------------------------------------------------------------
-
-    static final class SnmpMibSubRequestImpl implements SnmpMibSubRequest {
-        SnmpMibSubRequestImpl(SnmpMibRequest global, Vector<SnmpVarBind> sublist,
-                           SnmpOid entryoid, boolean isnew,
-                           boolean getnextflag, SnmpVarBind rs) {
-            this.global = global;
-            varbinds           = sublist;
-            this.version       = global.getVersion();
-            this.entryoid      = entryoid;
-            this.isnew         = isnew;
-            this.getnextflag   = getnextflag;
-            this.statusvb      = rs;
-        }
-
-        final private Vector<SnmpVarBind> varbinds;
-        final private SnmpMibRequest global;
-        final private int            version;
-        final private boolean        isnew;
-        final private SnmpOid        entryoid;
-        final private boolean        getnextflag;
-        final private SnmpVarBind    statusvb;
-
-        // -------------------------------------------------------------
-        // Implements the method defined in SnmpMibRequest interface.
-        // See SnmpMibRequest for the java doc.
-        // -------------------------------------------------------------
-        @Override
-        public Enumeration<SnmpVarBind> getElements() {
-            return varbinds.elements();
-        }
-
-        // -------------------------------------------------------------
-        // Implements the method defined in SnmpMibRequest interface.
-        // See SnmpMibRequest for the java doc.
-        // -------------------------------------------------------------
-        @Override
-        public Vector<SnmpVarBind> getSubList() {
-            return varbinds;
-        }
-
-        // -------------------------------------------------------------
-        // Implements the method defined in SnmpMibRequest interface.
-        // See SnmpMibRequest for the java doc.
-        // -------------------------------------------------------------
-        @Override
-        public final int getSize()  {
-            if (varbinds == null) return 0;
-            return varbinds.size();
-        }
-
-        // -------------------------------------------------------------
-        // Implements the method defined in SnmpMibRequest interface.
-        // See SnmpMibRequest for the java doc.
-        // -------------------------------------------------------------
-        @Override
-        public void addVarBind(SnmpVarBind varbind) {
-            // XXX not sure we must also add the varbind in the global
-            //     request? or whether we should raise an exception:
-            //     in principle, this method should not be called!
-            varbinds.addElement(varbind);
-            global.addVarBind(varbind);
-        }
-
-        // -------------------------------------------------------------
-        // Implements the method defined in SnmpMibSubRequest interface.
-        // See SnmpMibSubRequest for the java doc.
-        // -------------------------------------------------------------
-        @Override
-        public boolean isNewEntry() {
-            return isnew;
-        }
-
-        // -------------------------------------------------------------
-        // Implements the method defined in SnmpMibSubRequest interface.
-        // See SnmpMibSubRequest for the java doc.
-        // -------------------------------------------------------------
-        @Override
-        public SnmpOid getEntryOid() {
-            return entryoid;
-        }
-
-        // -------------------------------------------------------------
-        // Implements the method defined in SnmpMibRequest interface.
-        // See SnmpMibRequest for the java doc.
-        // -------------------------------------------------------------
-        @Override
-        public int getVarIndex(SnmpVarBind varbind) {
-            if (varbind == null) return 0;
-            return global.getVarIndex(varbind);
-        }
-
-        // -------------------------------------------------------------
-        // Implements the method defined in SnmpMibRequest interface.
-        // See SnmpMibRequest for the java doc.
-        // -------------------------------------------------------------
-        @Override
-        public Object getUserData() { return global.getUserData(); }
-
-
-        // -------------------------------------------------------------
-        // Implements the method defined in SnmpMibSubRequest interface.
-        // See SnmpMibSubRequest for the java doc.
-        // -------------------------------------------------------------
-
-        @Override
-        public void registerGetException(SnmpVarBind var,
-                                         SnmpStatusException exception)
-            throws SnmpStatusException {
-            // The index in the exception must correspond to
-            // the SNMP index ...
-            //
-            if (version == SnmpDefinitions.snmpVersionOne)
-                throw new SnmpStatusException(exception, getVarIndex(var)+1);
-
-            if (var == null)
-                throw exception;
-
-            // If we're doing a getnext ==> endOfMibView
-            if (getnextflag) {
-                var.value = SnmpVarBind.endOfMibView;
-                return;
-            }
-
-            final int errorCode = mapGetException(exception.getStatus(),
-                                                  version);
-
-            // Now take care of V2 errorCodes that can be stored
-            // in the varbind itself:
-            if (errorCode ==
-                SnmpStatusException.noSuchObject)
-                // noSuchObject => noSuchObject
-                var.value= SnmpVarBind.noSuchObject;
-
-            else if (errorCode ==
-                     SnmpStatusException.noSuchInstance)
-                // noSuchInstance => noSuchInstance
-                var.value= SnmpVarBind.noSuchInstance;
-
-            else
-                throw new SnmpStatusException(errorCode, getVarIndex(var)+1);
-
-        }
-
-        // -------------------------------------------------------------
-        // Implements the method defined in SnmpMibSubRequest interface.
-        // See SnmpMibSubRequest for the java doc.
-        // -------------------------------------------------------------
-        @Override
-        public void registerSetException(SnmpVarBind var,
-                                         SnmpStatusException exception)
-            throws SnmpStatusException {
-            // The index in the exception must correspond to
-            // the SNMP index ...
-            //
-            if (version == SnmpDefinitions.snmpVersionOne)
-                throw new SnmpStatusException(exception, getVarIndex(var)+1);
-
-            // Although the first pass of check() did not fail,
-            // the set() phase could not be carried out correctly.
-            // Since we don't know how to make an "undo", and some
-            // assignation may already have been performed, we're going
-            // to throw an snmpRspUndoFailed.
-            //
-            throw new SnmpStatusException(SnmpDefinitions.snmpRspUndoFailed,
-                                          getVarIndex(var)+1);
-        }
-
-        // -------------------------------------------------------------
-        // Implements the method defined in SnmpMibSubRequest interface.
-        // See SnmpMibSubRequest for the java doc.
-        // -------------------------------------------------------------
-        @Override
-        public void registerCheckException(SnmpVarBind var,
-                                           SnmpStatusException exception)
-            throws SnmpStatusException {
-            // The index in the exception must correspond to
-            // the SNMP index ...
-            //
-            // We throw the exception in order to abort the SET operation
-            // in an atomic way.
-            final int errorCode = exception.getStatus();
-            final int mappedErrorCode = mapSetException(errorCode,
-                                                        version);
-
-            if (errorCode != mappedErrorCode)
-                throw new
-                    SnmpStatusException(mappedErrorCode, getVarIndex(var)+1);
-            else
-                throw new SnmpStatusException(exception, getVarIndex(var)+1);
-        }
-
-        // -------------------------------------------------------------
-        // Implements the method defined in SnmpMibRequest interface.
-        // See SnmpMibRequest for the java doc.
-        // -------------------------------------------------------------
-        @Override
-        public int getVersion() {
-            return version;
-        }
-
-        @Override
-        public SnmpVarBind getRowStatusVarBind() {
-            return statusvb;
-        }
-
-        @Override
-        public SnmpPdu getPdu() {
-            return global.getPdu();
-        }
-
-        @Override
-        public int getRequestPduVersion() {
-            return global.getRequestPduVersion();
-        }
-
-        @Override
-        public SnmpEngine getEngine() {
-            return global.getEngine();
-        }
-
-        @Override
-        public String getPrincipal() {
-            return global.getPrincipal();
-        }
-
-        @Override
-        public int getSecurityLevel() {
-            return global.getSecurityLevel();
-        }
-
-        @Override
-        public int getSecurityModel() {
-            return global.getSecurityModel();
-        }
-
-        @Override
-        public byte[] getContextName() {
-            return global.getContextName();
-        }
-
-        @Override
-        public byte[] getAccessContextName() {
-            return global.getAccessContextName();
-        }
-    }
-
-    //-------------------------------------------------------------------
-    // This class implements a node in the SnmpRequestTree.
-    // It stores:
-    //    o The SnmpMibNode involved (key)
-    //    o The sublist of varbind directly handled by this node
-    //    o A vector of sublists concerning the entries (existing or not)
-    //      of the SnmpMIbNode (when it is a table).
-    //-------------------------------------------------------------------
-
-    static final class Handler {
-        SnmpMibNode meta;       // The meta  which handles the sublist.
-        int         depth;      // The depth of the meta node.
-        Vector<SnmpVarBind> sublist; // The sublist of varbinds to be handled.
-        // List        entryoids;  // Sorted array of entry oids
-        // List        entrylists; // Sorted array of entry lists
-        // List        isentrynew; // Sorted array of booleans
-        SnmpOid[]     entryoids  = null; // Sorted array of entry oids
-        Vector<SnmpVarBind>[] entrylists = null; // Sorted array of entry lists
-        boolean[]     isentrynew = null; // Sorted array of booleans
-        SnmpVarBind[] rowstatus  = null; // RowStatus varbind, if any
-        int entrycount = 0;
-        int entrysize  = 0;
-
-        final int type; // request PDU type as defined in SnmpDefinitions
-        final private static int Delta = 10;
-
-        public Handler(int pduType) {
-            this.type = pduType;
-        }
-
-        /**
-         * Adds a varbind in this node sublist.
-         */
-        public void addVarbind(SnmpVarBind varbind) {
-            if (sublist == null) sublist = new Vector<>();
-            sublist.addElement(varbind);
-        }
-
-        /**
-         * register an entry for the given oid at the given position with
-         * the given sublist.
-         */
-        @SuppressWarnings("unchecked")
-        // We need this because of new Vector[n] instead of
-        // new Vector<SnmpVarBind>[n], which is illegal.
-        void add(int pos,SnmpOid oid, Vector<SnmpVarBind> v, boolean isnew,
-                 SnmpVarBind statusvb) {
-
-            if (entryoids == null) {
-                // Vectors are null: Allocate new vectors
-
-                entryoids  = new SnmpOid[Delta];
-                entrylists = (Vector<SnmpVarBind>[])new Vector<?>[Delta];
-                isentrynew = new boolean[Delta];
-                rowstatus  = new SnmpVarBind[Delta];
-                entrysize  = Delta;
-                pos = 0;
-
-            } else if (pos >= entrysize || entrycount == entrysize) {
-                // Vectors must be enlarged
-
-                // Save old vectors
-                SnmpOid[]     olde = entryoids;
-                Vector<SnmpVarBind>[]      oldl = entrylists;
-                boolean[]     oldn = isentrynew;
-                SnmpVarBind[] oldr = rowstatus;
-
-                // Allocate larger vectors
-                entrysize += Delta;
-                entryoids =  new SnmpOid[entrysize];
-                entrylists = (Vector<SnmpVarBind>[])new Vector<?>[entrysize];
-                isentrynew = new boolean[entrysize];
-                rowstatus  = new SnmpVarBind[entrysize];
-
-                // Check pos validity
-                if (pos > entrycount) pos = entrycount;
-                if (pos < 0) pos = 0;
-
-                final int l1 = pos;
-                final int l2 = entrycount - pos;
-
-                // Copy original vectors up to `pos'
-                if (l1 > 0) {
-                    java.lang.System.arraycopy(olde,0,entryoids,
-                                               0,l1);
-                    java.lang.System.arraycopy(oldl,0,entrylists,
-                                               0,l1);
-                    java.lang.System.arraycopy(oldn,0,isentrynew,
-                                               0,l1);
-                    java.lang.System.arraycopy(oldr,0,rowstatus,
-                                               0,l1);
-                }
-
-                // Copy original vectors from `pos' to end, leaving
-                // an empty room at `pos' in the new vectors.
-                if (l2 > 0) {
-                    final int l3 = l1+1;
-                    java.lang.System.arraycopy(olde,l1,entryoids,
-                                               l3,l2);
-                    java.lang.System.arraycopy(oldl,l1,entrylists,
-                                               l3,l2);
-                    java.lang.System.arraycopy(oldn,l1,isentrynew,
-                                               l3,l2);
-                    java.lang.System.arraycopy(oldr,l1,rowstatus,
-                                               l3,l2);
-                }
-
-
-            } else if (pos < entrycount) {
-                // Vectors are large enough to accommodate one additional
-                // entry.
-                //
-                // Shift vectors, making an empty room at `pos'
-                final int l1 = pos+1;
-                final int l2 = entrycount - pos;
-
-                java.lang.System.arraycopy(entryoids,pos,entryoids,
-                                           l1,l2);
-                java.lang.System.arraycopy(entrylists,pos,entrylists,
-                                           l1,l2);
-                java.lang.System.arraycopy(isentrynew,pos,isentrynew,
-                                           l1,l2);
-                java.lang.System.arraycopy(rowstatus,pos,rowstatus,
-                                           l1,l2);
-            }
-
-            // Fill the gap at `pos'
-            entryoids[pos]  = oid;
-            entrylists[pos] = v;
-            isentrynew[pos] = isnew;
-            rowstatus[pos]  = statusvb;
-            entrycount++;
-        }
-
-        public void addVarbind(SnmpVarBind varbind, SnmpOid entryoid,
-                               boolean isnew, SnmpVarBind statusvb)
-            throws SnmpStatusException {
-            Vector<SnmpVarBind> v = null;
-            SnmpVarBind rs = statusvb;
-
-            if (entryoids == null) {
-//              entryoids = new ArrayList();
-//              entrylists = new ArrayList();
-//              isentrynew = new ArrayList();
-                v = new Vector<>();
-//              entryoids.add(entryoid);
-//              entrylists.add(v);
-//              isentrynew.add(new Boolean(isnew));
-                add(0,entryoid,v,isnew,rs);
-            } else {
-                // int pos = findOid(entryoids,entryoid);
-                // int pos = findOid(entryoids,entrycount,entryoid);
-                final int pos =
-                    getInsertionPoint(entryoids,entrycount,entryoid);
-                if (pos > -1 && pos < entrycount &&
-                    entryoid.compareTo(entryoids[pos]) == 0) {
-                    v  = entrylists[pos];
-                    rs = rowstatus[pos];
-                } else {
-                    // if (pos == -1 || pos >= entryoids.size() ) {
-                    // if (pos == -1 || pos >= entrycount ) {
-                    // pos = getInsertionPoint(entryoids,entryoid);
-                    // pos = getInsertionPoint(entryoids,entrycount,entryoid);
-                    v = new Vector<>();
-//                  entryoids.add(pos,entryoid);
-//                  entrylists.add(pos,v);
-//                  isentrynew.add(pos,new Boolean(isnew));
-                    add(pos,entryoid,v,isnew,rs);
-                }
-//              } else v = (Vector) entrylists.get(pos);
-                    // } else v = entrylists[pos];
-                if (statusvb != null) {
-                    if ((rs != null) && (rs != statusvb) &&
-                        ((type == SnmpDefinitions.pduWalkRequest) ||
-                         (type == SnmpDefinitions.pduSetRequestPdu))) {
-                        throw new SnmpStatusException(
-                              SnmpStatusException.snmpRspInconsistentValue);
-                    }
-                    rowstatus[pos] = statusvb;
-                }
-            }
-
-            // We do not include the status variable in the varbind,
-            // because we're going to set it separately...
-            //
-            if (statusvb != varbind)
-                v.addElement(varbind);
-        }
-
-        public int getSubReqCount() {
-            int count = 0;
-            if (sublist != null) count++;
-//          if (entryoids != null) count += entryoids.size();
-            if (entryoids != null) count += entrycount;
-            return count;
-        }
-
-        public Vector<SnmpVarBind> getSubList() {
-            return sublist;
-        }
-
-        public int getEntryPos(SnmpOid entryoid) {
-            // return findOid(entryoids,entryoid);
-            return findOid(entryoids,entrycount,entryoid);
-        }
-
-        public SnmpOid getEntryOid(int pos) {
-            if (entryoids == null) return null;
-            // if (pos == -1 || pos >= entryoids.size() ) return null;
-            if (pos == -1 || pos >= entrycount ) return null;
-            // return (SnmpOid) entryoids.get(pos);
-            return entryoids[pos];
-        }
-
-        public boolean isNewEntry(int pos) {
-            if (entryoids == null) return false;
-            // if (pos == -1 || pos >= entryoids.size() ) return false;
-            if (pos == -1 || pos >= entrycount ) return false;
-            // return ((Boolean)isentrynew.get(pos)).booleanValue();
-            return isentrynew[pos];
-        }
-
-        public SnmpVarBind getRowStatusVarBind(int pos) {
-            if (entryoids == null) return null;
-            // if (pos == -1 || pos >= entryoids.size() ) return false;
-            if (pos == -1 || pos >= entrycount ) return null;
-            // return ((Boolean)isentrynew.get(pos)).booleanValue();
-            return rowstatus[pos];
-        }
-
-        public Vector<SnmpVarBind> getEntrySubList(int pos) {
-            if (entrylists == null) return null;
-            // if (pos == -1 || pos >= entrylists.size() ) return null;
-            if (pos == -1 || pos >= entrycount ) return null;
-            // return (Vector) entrylists.get(pos);
-            return entrylists[pos];
-        }
-
-        public Iterator<SnmpOid> getEntryOids() {
-            if (entryoids == null) return null;
-            // return entryoids.iterator();
-            return Arrays.asList(entryoids).iterator();
-        }
-
-        public int getEntryCount() {
-            if (entryoids == null) return 0;
-            // return entryoids.size();
-            return entrycount;
-        }
-
-    }
-
-
-    //-------------------------------------------------------------------
-    //-------------------------------------------------------------------
-    // Public interface
-    //-------------------------------------------------------------------
-    //-------------------------------------------------------------------
-
-    //-------------------------------------------------------------------
-    // Returns the contextual object containing user-data allocated
-    // through the SnmpUserDataFactory for this request.
-    //-------------------------------------------------------------------
-
-    public Object getUserData() { return request.getUserData(); }
-
-    //-------------------------------------------------------------------
-    // Tells whether creation of new entries is allowed with respect
-    // to the operation involved (GET=>false/SET=>true)
-    //-------------------------------------------------------------------
-
-    public boolean isCreationAllowed() {
-        return creationflag;
-    }
-
-    //-------------------------------------------------------------------
-    // Tells whether we are currently processing a SET request (check/set)
-    //-------------------------------------------------------------------
-
-    public boolean isSetRequest() {
-        return setreqflag;
-    }
-
-    //-------------------------------------------------------------------
-    // Returns the protocol version in which the original request is
-    // evaluated.
-    //-------------------------------------------------------------------
-
-    public int getVersion() {
-        return version;
-    }
-
-    //-------------------------------------------------------------------
-    // Returns the actual protocol version of the request PDU.
-    //-------------------------------------------------------------------
-
-    public int getRequestPduVersion() {
-        return request.getRequestPduVersion();
-    }
-
-    //-------------------------------------------------------------------
-    // Returns the SnmpMibNode associated with the given handler
-    //-------------------------------------------------------------------
-
-    public SnmpMibNode getMetaNode(Handler handler) {
-        return handler.meta;
-    }
-
-    //-------------------------------------------------------------------
-    // Indicates the depth of the arc in the OID that identifies the
-    // SnmpMibNode associated with the given handler
-    //-------------------------------------------------------------------
-
-    public int getOidDepth(Handler handler) {
-        return handler.depth;
-    }
-
-    //-------------------------------------------------------------------
-    // returns an enumeration of the SnmpMibSubRequest's to be invoked on
-    // the SnmpMibNode associated with a given Handler node.
-    // If this node is a group, there will be a single subrequest.
-    // If it is a table, there will be one subrequest per entry involved.
-    //-------------------------------------------------------------------
-
-    public Enumeration<SnmpMibSubRequest> getSubRequests(Handler handler) {
-        return new Enum(this,handler);
-    }
-
-    //-------------------------------------------------------------------
-    // returns an enumeration of the Handlers stored in the Hashtable.
-    //-------------------------------------------------------------------
-
-    public Enumeration<Handler> getHandlers() {
-        return hashtable.elements();
-    }
-
-    //-------------------------------------------------------------------
-    // adds a varbind to a handler node sublist
-    //-------------------------------------------------------------------
-
-    public void add(SnmpMibNode meta, int depth, SnmpVarBind varbind)
-        throws SnmpStatusException {
-        registerNode(meta,depth,null,varbind,false,null);
-    }
-
-    //-------------------------------------------------------------------
-    // adds an entry varbind to a handler node sublist
-    //-------------------------------------------------------------------
-
-    public void add(SnmpMibNode meta, int depth, SnmpOid entryoid,
-                    SnmpVarBind varbind, boolean isnew)
-        throws SnmpStatusException {
-        registerNode(meta,depth,entryoid,varbind,isnew,null);
-    }
-
-    //-------------------------------------------------------------------
-    // adds an entry varbind to a handler node sublist - specifying the
-    // varbind which holds the row status
-    //-------------------------------------------------------------------
-
-    public void add(SnmpMibNode meta, int depth, SnmpOid entryoid,
-                    SnmpVarBind varbind, boolean isnew,
-                    SnmpVarBind statusvb)
-        throws SnmpStatusException {
-        registerNode(meta,depth,entryoid,varbind,isnew,statusvb);
-    }
-
-
-    //-------------------------------------------------------------------
-    //-------------------------------------------------------------------
-    // Protected interface
-    //-------------------------------------------------------------------
-    //-------------------------------------------------------------------
-
-    //-------------------------------------------------------------------
-    // Type of the request (see SnmpDefinitions)
-    //-------------------------------------------------------------------
-
-    void setPduType(int pduType) {
-        type = pduType;
-        setreqflag = ((pduType == SnmpDefinitions.pduWalkRequest) ||
-            (pduType == SnmpDefinitions.pduSetRequestPdu));
-    }
-
-    //-------------------------------------------------------------------
-    // We deal with a GET-NEXT request
-    //-------------------------------------------------------------------
-
-    void setGetNextFlag() {
-        getnextflag = true;
-    }
-
-    //-------------------------------------------------------------------
-    // Tell whether creation is allowed.
-    //-------------------------------------------------------------------
-    void switchCreationFlag(boolean flag) {
-        creationflag = flag;
-    }
-
-
-    //-------------------------------------------------------------------
-    // Returns the subrequest handled by the SnmpMibNode itself
-    // (in principle, only for Groups)
-    //-------------------------------------------------------------------
-
-    SnmpMibSubRequest getSubRequest(Handler handler) {
-        if (handler == null) return null;
-        return new SnmpMibSubRequestImpl(request,handler.getSubList(),
-                                      null,false,getnextflag,null);
-    }
-
-    //-------------------------------------------------------------------
-    // Returns the subrequest associated with the entry identified by
-    // the given entry (only for tables)
-    //-------------------------------------------------------------------
-
-    SnmpMibSubRequest getSubRequest(Handler handler, SnmpOid oid) {
-        if (handler == null) return null;
-        final int pos = handler.getEntryPos(oid);
-        if (pos == -1) return null;
-        return new SnmpMibSubRequestImpl(request,
-                                         handler.getEntrySubList(pos),
-                                         handler.getEntryOid(pos),
-                                         handler.isNewEntry(pos),
-                                         getnextflag,
-                                         handler.getRowStatusVarBind(pos));
-    }
-
-    //-------------------------------------------------------------------
-    // Returns the subrequest associated with the entry identified by
-    // the given entry (only for tables). The `entry' parameter is an
-    // index relative to the position of the entry in the handler sublist.
-    //-------------------------------------------------------------------
-
-    SnmpMibSubRequest getSubRequest(Handler handler, int entry) {
-        if (handler == null) return null;
-        return new
-            SnmpMibSubRequestImpl(request,handler.getEntrySubList(entry),
-                                  handler.getEntryOid(entry),
-                                  handler.isNewEntry(entry),getnextflag,
-                                  handler.getRowStatusVarBind(entry));
-    }
-
-    //-------------------------------------------------------------------
-    //-------------------------------------------------------------------
-    // Private section
-    //-------------------------------------------------------------------
-    //-------------------------------------------------------------------
-
-
-    //-------------------------------------------------------------------
-    // stores a handler node in the Hashtable
-    //-------------------------------------------------------------------
-
-    private void put(Object key, Handler handler) {
-        if (handler == null) return;
-        if (key == null) return;
-        if (hashtable == null) hashtable = new Hashtable<Object, Handler>();
-        hashtable.put(key,handler);
-    }
-
-    //-------------------------------------------------------------------
-    // finds a handler node in the Hashtable
-    //-------------------------------------------------------------------
-
-    private Handler get(Object key) {
-        if (key == null) return null;
-        if (hashtable == null) return null;
-        return hashtable.get(key);
-    }
-
-    //-------------------------------------------------------------------
-    // Search for the given oid in `oids'. If none is found, returns -1
-    // otherwise, returns the index at which the oid is located.
-    //-------------------------------------------------------------------
-
-    private static int findOid(SnmpOid[] oids, int count, SnmpOid oid) {
-        final int size = count;
-        int low= 0;
-        int max= size - 1;
-        int curr= low + (max-low)/2;
-        //System.out.println("Try to retrieve: " + oid.toString());
-        while (low <= max) {
-
-            final SnmpOid pos = oids[curr];
-
-            //System.out.println("Compare with" + pos.toString());
-            // never know ...we might find something ...
-            //
-            final int comp = oid.compareTo(pos);
-            if (comp == 0)
-                return curr;
-
-            if (oid.equals(pos)) {
-                return curr;
-            }
-            if (comp > 0) {
-                low = curr + 1;
-            } else {
-                max = curr - 1;
-            }
-            curr = low + (max-low)/2;
-        }
-        return -1;
-    }
-
-    //-------------------------------------------------------------------
-    // Return the index at which the given oid should be inserted in the
-    // `oids' array.
-    //-------------------------------------------------------------------
-
-    private static int getInsertionPoint(SnmpOid[] oids, int count,
-                                         SnmpOid oid) {
-        final SnmpOid[] localoids = oids;
-        final int size = count;
-        int low= 0;
-        int max= size - 1;
-        int curr= low + (max-low)/2;
-
-
-        while (low <= max) {
-
-            final SnmpOid pos = localoids[curr];
-
-            // never know ...we might find something ...
-            //
-            final int comp= oid.compareTo(pos);
-
-            // In the calling method we will have to check for this case...
-            //    if (comp == 0)
-            //       return -1;
-            // Returning curr instead of -1 avoids having to call
-            // findOid() first and getInsertionPoint() afterwards.
-            // We can simply call getInsertionPoint() and then checks whether
-            // there's an OID at the returned position which equals the
-            // given OID.
-            if (comp == 0)
-                return curr;
-
-            if (comp>0) {
-                low= curr +1;
-            } else {
-                max= curr -1;
-            }
-            curr= low + (max-low)/2;
-        }
-        return curr;
-    }
-
-    //-------------------------------------------------------------------
-    // adds a varbind in a handler node sublist
-    //-------------------------------------------------------------------
-
-    private void registerNode(SnmpMibNode meta, int depth, SnmpOid entryoid,
-                              SnmpVarBind varbind, boolean isnew,
-                              SnmpVarBind statusvb)
-        throws SnmpStatusException {
-        if (meta == null) {
-            SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
-                    SnmpRequestTree.class.getName(),
-                    "registerNode", "meta-node is null!");
-            return;
-        }
-        if (varbind == null) {
-            SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
-                    SnmpRequestTree.class.getName(),
-                    "registerNode", "varbind is null!");
-            return ;
-        }
-
-        final Object key = meta;
-
-        // retrieve the handler node associated with the given meta,
-        // if any
-        Handler handler = get(key);
-
-        // If no handler node was found for that meta, create one.
-        if (handler == null) {
-            // if (isDebugOn())
-            //    debug("registerNode", "adding node for " +
-            //          varbind.oid.toString());
-            handler = new Handler(type);
-            handler.meta  = meta;
-            handler.depth = depth;
-            put(key,handler);
-        }
-        // else {
-        //   if (isDebugOn())
-        //      debug("registerNode","found node for " +
-        //            varbind.oid.toString());
-        // }
-
-        // Adds the varbind in the handler node's sublist.
-        if (entryoid == null)
-            handler.addVarbind(varbind);
-        else
-            handler.addVarbind(varbind,entryoid,isnew,statusvb);
-    }
-
-
-    //-------------------------------------------------------------------
-    // private variables
-    //-------------------------------------------------------------------
-
-    private Hashtable<Object, Handler> hashtable = null;
-                                             // Hashtable of Handler objects
-    private SnmpMibRequest request = null;   // The original list of varbinds
-    private int       version      = 0;      // The protocol version
-    private boolean   creationflag = false;  // Does the operation allow
-                                             // creation of entries
-    private boolean   getnextflag  = false;  // Does the operation allow
-                                             // creation of entries
-    private int       type         = 0;      // Request PDU type as defined
-                                             // in SnmpDefinitions
-    private boolean   setreqflag   = false;  // True if we're processing a
-                                             // SET request (check/set).
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/agent/SnmpStandardMetaServer.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,119 +0,0 @@
-/*
- * Copyright (c) 2000, 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.jmx.snmp.agent;
-
-// jmx imports
-//
-import com.sun.jmx.snmp.SnmpValue;
-import com.sun.jmx.snmp.SnmpStatusException;
-
-/**
- * <p>
- * This interface defines the methods that must be implemented by an
- * SNMP metadata object that needs to interact with an
- * {@link com.sun.jmx.snmp.agent.SnmpStandardObjectServer} object.
- * </p>
- * <p>
- * All these methods are usually generated by <code>mibgen</code> when
- * run in standard-metadata mode (default).
- * </p>
- * <p><b><i>
- * This interface is used internally between the generated Metadata and
- * the SNMP runtime and you shouldn't need to worry about it, because
- * you will never have to use it directly.
- * </b></i></p>
- *
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- **/
-public interface SnmpStandardMetaServer {
-    /**
-     * Returns the value of the scalar object identified by the given
-     * OID arc.
-     *
-     * @param arc OID arc of the querried scalar object.
-     *
-     * @return The <CODE>SnmpValue</CODE> of the scalar object identified
-     *         by <CODE>arc</CODE>.
-     *
-     * @param userData A contextual object containing user-data.
-     *        This object is allocated through the <code>
-     *        {@link com.sun.jmx.snmp.agent.SnmpUserDataFactory}</code>
-     *        for each incoming SNMP request.
-     *
-     * @exception SnmpStatusException If the arc is not valid, or if
-     *    access is denied.
-     *
-     **/
-    public SnmpValue get(long arc, Object userData)
-        throws SnmpStatusException ;
-
-    /**
-     * Sets the value of the scalar object identified by the given
-     * OID arc.
-     *
-     * @param x New value for the scalar object identified by
-     *    <CODE>arc</CODE>
-     *
-     * @param arc OID arc of the scalar object whose value is set.
-     *
-     * @return The new <CODE>SnmpValue</CODE> of the scalar object
-     *    identified by <CODE>arc</CODE>.
-     *
-     * @param userData A contextual object containing user-data.
-     *        This object is allocated through the <code>
-     *        {@link com.sun.jmx.snmp.agent.SnmpUserDataFactory}</code>
-     *        for each incoming SNMP request.
-     *
-     * @exception SnmpStatusException If the arc is not valid, or if
-     *    access is denied.
-     *
-     **/
-    public SnmpValue set(SnmpValue x, long arc, Object userData)
-        throws SnmpStatusException ;
-
-    /**
-     * Checks that the new desired value of the scalar object identified
-     * by the given OID arc is valid.
-     *
-     * @param x New value for the scalar object identified by
-     *    <CODE>arc</CODE>
-     *
-     * @param arc OID arc of the scalar object whose value is set.
-     *
-     * @param userData A contextual object containing user-data.
-     *        This object is allocated through the <code>
-     *        {@link com.sun.jmx.snmp.agent.SnmpUserDataFactory}</code>
-     *        for each incoming SNMP request.
-     *
-     * @exception SnmpStatusException If the arc is not valid, or if
-     *    access is denied, or if the new desired value is not valid.
-     *
-     **/
-    public void check(SnmpValue x, long arc, Object userData)
-        throws SnmpStatusException ;
-
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/agent/SnmpStandardObjectServer.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,256 +0,0 @@
-/*
- * 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.sun.jmx.snmp.agent;
-
-// java imports
-//
-import java.io.Serializable;
-import java.util.Enumeration;
-import com.sun.jmx.snmp.SnmpVarBind;
-import com.sun.jmx.snmp.SnmpStatusException;
-
-// SNMP Runtime imports
-//
-
-/**
- * <p>
- * This class is a utility class that transform SNMP GET / SET requests
- * into series of get<i>AttributeName</i>() set<i>AttributeName</i>()
- * invoked on the MBean.
- * </p>
- *
- * <p>
- * The transformation relies on the metadata information provided by the
- * {@link com.sun.jmx.snmp.agent.SnmpStandardMetaServer} object which is
- * passed as first parameter to every method. This SnmpStandardMetaServer
- * object is usually a Metadata object generated by <code>mibgen</code>.
- * </p>
- *
- * <p>
- * The MBean is not invoked directly by this class but through the
- * metadata object which holds a reference on it.
- * </p>
- *
- * <p><b><i>
- * This class is used internally by mibgen generated metadata objects and
- * you should never need to use it directly.
- * </b></i></p>
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- **/
-
-public class SnmpStandardObjectServer implements Serializable {
-    private static final long serialVersionUID = -4641068116505308488L;
-
-    /**
-     * Generic handling of the <CODE>get</CODE> operation.
-     * <p> The default implementation of this method is to loop over the
-     * varbind list associated with the sub-request and to call
-     * <CODE>get(var.oid.getOidArc(depth), data);</CODE>
-     * <pre>
-     * public void get(SnmpStandardMetaServer meta, SnmpMibSubRequest req,
-     *                 int depth)
-     *    throws SnmpStatusException {
-     *
-     *    final Object data = req.getUserData();
-     *
-     *    for (Enumeration e= req.getElements(); e.hasMoreElements();) {
-     *
-     *        final SnmpVarBind var= (SnmpVarBind) e.nextElement();
-     *
-     *        try {
-     *            // This method will generate a SnmpStatusException
-     *            // if `depth' is out of bounds.
-     *            //
-     *            final long id = var.oid.getOidArc(depth);
-     *            var.value = meta.get(id, data);
-     *        } catch(SnmpStatusException x) {
-     *            req.registerGetException(var,x);
-     *        }
-     *    }
-     * }
-     * </pre>
-     * <p> You can override this method if you need to implement some
-     * specific policies for minimizing the accesses made to some remote
-     * underlying resources.
-     * <p>
-     *
-     * @param meta  A pointer to the generated meta-data object which
-     *              implements the <code>SnmpStandardMetaServer</code>
-     *              interface.
-     *
-     * @param req   The sub-request that must be handled by this node.
-     *
-     * @param depth The depth reached in the OID tree.
-     *
-     * @exception SnmpStatusException An error occurred while accessing
-     *  the MIB node.
-     */
-    public void get(SnmpStandardMetaServer meta, SnmpMibSubRequest req,
-                    int depth)
-        throws SnmpStatusException {
-
-        final Object data = req.getUserData();
-
-        for (Enumeration<SnmpVarBind> e= req.getElements(); e.hasMoreElements();) {
-            final SnmpVarBind var= e.nextElement();
-            try {
-                final long id = var.oid.getOidArc(depth);
-                var.value = meta.get(id, data);
-            } catch(SnmpStatusException x) {
-                req.registerGetException(var,x);
-            }
-        }
-    }
-
-    /**
-     * Generic handling of the <CODE>set</CODE> operation.
-     * <p> The default implementation of this method is to loop over the
-     * varbind list associated with the sub-request and to call
-     * <CODE>set(var.value, var.oid.getOidArc(depth), data);</CODE>
-     * <pre>
-     * public void set(SnmpStandardMetaServer meta, SnmpMibSubRequest req,
-     *                 int depth)
-     *    throws SnmpStatusException {
-     *
-     *    final Object data = req.getUserData();
-     *
-     *    for (Enumeration e= req.getElements(); e.hasMoreElements();) {
-     *
-     *        final SnmpVarBind var= (SnmpVarBind) e.nextElement();
-     *
-     *        try {
-     *            // This method will generate a SnmpStatusException
-     *            // if `depth' is out of bounds.
-     *            //
-     *            final long id = var.oid.getOidArc(depth);
-     *            var.value = meta.set(var.value, id, data);
-     *        } catch(SnmpStatusException x) {
-     *            req.registerSetException(var,x);
-     *        }
-     *    }
-     * }
-     * </pre>
-     * <p> You can override this method if you need to implement some
-     * specific policies for minimizing the accesses made to some remote
-     * underlying resources.
-     * <p>
-     *
-     * @param meta  A pointer to the generated meta-data object which
-     *              implements the <code>SnmpStandardMetaServer</code>
-     *              interface.
-     *
-     * @param req   The sub-request that must be handled by this node.
-     *
-     * @param depth The depth reached in the OID tree.
-     *
-     * @exception SnmpStatusException An error occurred while accessing
-     *  the MIB node.
-     */
-    public void set(SnmpStandardMetaServer meta, SnmpMibSubRequest req,
-                    int depth)
-        throws SnmpStatusException {
-
-        final Object data = req.getUserData();
-
-        for (Enumeration<SnmpVarBind> e= req.getElements(); e.hasMoreElements();) {
-            SnmpVarBind var = e.nextElement();
-            try {
-                // This method will generate a SnmpStatusException
-                // if `depth' is out of bounds.
-                //
-                final long id = var.oid.getOidArc(depth);
-                var.value = meta.set(var.value, id, data);
-            } catch(SnmpStatusException x) {
-                req.registerSetException(var,x);
-            }
-        }
-    }
-
-    /**
-     * Generic handling of the <CODE>check</CODE> operation.
-     * <p> The default implementation of this method is to loop over the
-     * varbind list associated with the sub-request and to call
-     * <CODE>check(var.value, var.oid.getOidArc(depth), data);</CODE>
-     * <pre>
-     * public void check(SnmpStandardMetaServer meta, SnmpMibSubRequest req,
-     *                   int depth)
-     *    throws SnmpStatusException {
-     *
-     *    final Object data = req.getUserData();
-     *
-     *    for (Enumeration e= req.getElements(); e.hasMoreElements();) {
-     *
-     *        final SnmpVarBind var= (SnmpVarBind) e.nextElement();
-     *
-     *        try {
-     *            // This method will generate a SnmpStatusException
-     *            // if `depth' is out of bounds.
-     *            //
-     *            final long id = var.oid.getOidArc(depth);
-     *            meta.check(var.value, id, data);
-     *        } catch(SnmpStatusException x) {
-     *            req.registerCheckException(var,x);
-     *        }
-     *    }
-     * }
-     * </pre>
-     * <p> You can override this method if you need to implement some
-     * specific policies for minimizing the accesses made to some remote
-     * underlying resources, or if you need to implement some consistency
-     * checks between the different values provided in the varbind list.
-     * <p>
-     *
-     * @param meta  A pointer to the generated meta-data object which
-     *              implements the <code>SnmpStandardMetaServer</code>
-     *              interface.
-     *
-     * @param req   The sub-request that must be handled by this node.
-     *
-     * @param depth The depth reached in the OID tree.
-     *
-     * @exception SnmpStatusException An error occurred while accessing
-     *  the MIB node.
-     */
-    public void check(SnmpStandardMetaServer meta, SnmpMibSubRequest req,
-                      int depth)
-        throws SnmpStatusException {
-
-        final Object data = req.getUserData();
-
-        for (Enumeration<SnmpVarBind> e= req.getElements(); e.hasMoreElements();) {
-            final SnmpVarBind var = e.nextElement();
-            try {
-                // This method will generate a SnmpStatusException
-                // if `depth' is out of bounds.
-                //
-                final long id = var.oid.getOidArc(depth);
-                meta.check(var.value,id,data);
-            } catch(SnmpStatusException x) {
-                req.registerCheckException(var,x);
-            }
-        }
-    }
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/agent/SnmpTableCallbackHandler.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +0,0 @@
-/*
- * Copyright (c) 2000, 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.sun.jmx.snmp.agent;
-
-import javax.management.ObjectName;
-import com.sun.jmx.snmp.SnmpStatusException;
-import com.sun.jmx.snmp.SnmpOid;
-import com.sun.jmx.snmp.agent.SnmpMibTable;
-
-/**
- * This interface ensures the synchronization between Metadata table objects
- * and bean-like table objects.
- *
- * It is used between mibgen generated table meta and table classes.
- * <p><b><i>
- * You should never need to use this interface directly.
- * </p></b></i>
- *
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- **/
-public interface SnmpTableCallbackHandler {
-    /**
-     * This method is called by the SNMP runtime after a new entry
-     * has been added to the table.
-     *
-     * If an SnmpStatusException is raised, the entry will be removed
-     * and the operation will be aborted. In this case, the removeEntryCb()
-     * callback will not be called.
-     *
-     * <p><b><i>
-     * You should never need to use this method directly.
-     * </p></b></i>
-     *
-     **/
-    public void addEntryCb(int pos, SnmpOid row, ObjectName name,
-                           Object entry, SnmpMibTable meta)
-        throws SnmpStatusException;
-
-    /**
-     * This method is called by the SNMP runtime after a new entry
-     * has been removed from the table.
-     *
-     * If raised, SnmpStatusException will be ignored.
-     *
-     * <p><b><i>
-     * You should never need to use this method directly.
-     * </p></b></i>
-     *
-     **/
-    public void removeEntryCb(int pos, SnmpOid row, ObjectName name,
-                              Object entry, SnmpMibTable meta)
-        throws SnmpStatusException;
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/agent/SnmpTableEntryFactory.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,91 +0,0 @@
-/*
- * Copyright (c) 2000, 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.jmx.snmp.agent;
-
-import com.sun.jmx.snmp.SnmpStatusException;
-import com.sun.jmx.snmp.SnmpOid;
-import com.sun.jmx.snmp.agent.SnmpMibTable;
-import com.sun.jmx.snmp.agent.SnmpMibSubRequest;
-
-/**
- * This interface is implemented by mibgen generated table objects
- * inheriting from {@link com.sun.jmx.snmp.agent.SnmpTableSupport}.
- * <p>
- * It is used internally by the metadata whenever a remote SNMP manager
- * requests the creation of a new entry through an SNMP SET.
- * </p>
- * <p>
- * At creation, the mibgen generated table object retrieves its
- * corresponding metadata from the MIB and registers with
- * this metadata as a SnmpTableEntryFactory.
- * </p>
- *
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- **/
-
-public interface SnmpTableEntryFactory extends SnmpTableCallbackHandler {
-
-    /**
-     * This method is called by the SNMP runtime whenever a new entry
-     * creation is requested by a remote manager.
-     *
-     * The factory is responsible for instantiating the appropriate MBean
-     * and for registering it with the appropriate metadata object.
-     *
-     * Usually this method will:
-     * <ul>
-     * <li>Check whether the creation can be accepted
-     * <li>Instantiate a new entry
-     * <li>Possibly register this entry with the MBeanServer, if needed.
-     * <li>Call <code>addEntry()</code> on the given <code>meta</code> object.
-     * </ul>
-     * This method is usually generated by <code>mibgen</code> on table
-     * objects (inheriting from
-     * {@link com.sun.jmx.snmp.agent.SnmpTableSupport}). <br>
-     *
-     * <p><b><i>
-     * This method is called internally by the SNMP runtime whenever a
-     * new entry creation is requested by a remote SNMP manager.
-     * You should never need to call this method directlty.
-     * </i></b></p>
-     *
-     * @param request The SNMP subrequest containing the sublist of varbinds
-     *                for the new entry.
-     * @param rowOid  The OID indexing the conceptual row (entry) for which
-     *                the creation was requested.
-     * @param depth   The depth reached in the OID tree (the position at
-     *                which the columnar object ids start in the OIDs
-     *                included in the varbind).
-     * @param meta    The metadata object impacted by the subrequest
-     *
-     * @exception SnmpStatusException The new entry cannot be created.
-     *
-     **/
-    public void createNewEntry(SnmpMibSubRequest request, SnmpOid rowOid,
-                               int depth, SnmpMibTable meta)
-        throws SnmpStatusException;
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/agent/SnmpTableEntryNotification.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,141 +0,0 @@
-/*
- * Copyright (c) 1998, 2007, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-package com.sun.jmx.snmp.agent;
-
-
-
-// jmx imports
-//
-import javax.management.Notification;
-import javax.management.ObjectName;
-
-/**
- * Represents a notification emitted when an
- * entry is added or deleted from an SNMP table.
- * <P>
- * The <CODE>SnmpTableEntryNotification</CODE> object contains
- * the reference to the entry added or removed from the table.
- * <P>
- * The list of notifications fired by the <CODE>SnmpMibTable</CODE> is
- * the following:
- * <UL>
- * <LI>A new entry has been added to the SNMP table.
- * <LI>An existing entry has been removed from the SNMP table.
-  </UL>
- *
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- */
-
-public class SnmpTableEntryNotification extends Notification {
-
-    /**
-     * Creates and initializes a table entry notification object.
-     *
-     * @param type The notification type.
-     * @param source The notification producer.
-     * @param sequenceNumber The notification sequence number within the
-     *                  source object.
-     * @param timeStamp The notification emission date.
-     * @param entry     The entry object (may be null if the entry is
-     *                  registered in the MBeanServer).
-     * @param entryName The ObjectName entry object (may be null if the
-     *                  entry is not registered in the MBeanServer).
-     * @since 1.5
-     */
-    SnmpTableEntryNotification(String type, Object source,
-                               long sequenceNumber, long timeStamp,
-                               Object entry, ObjectName entryName) {
-
-        super(type, source, sequenceNumber, timeStamp);
-        this.entry = entry;
-        this.name  = entryName;
-    }
-
-    /**
-     * Gets the entry object.
-     * May be null if the entry is registered in the MBeanServer, and the
-     * MIB is using the generic MetaData (see mibgen).
-     *
-     * @return The entry.
-     */
-    public Object getEntry() {
-        return entry;
-    }
-
-    /**
-     * Gets the ObjectName of the entry.
-     * May be null if the entry is not registered in the MBeanServer.
-     *
-     * @return The ObjectName of the entry.
-     * @since 1.5
-     */
-    public ObjectName getEntryName() {
-        return name;
-    }
-
-    // PUBLIC VARIABLES
-    //-----------------
-
-    /**
-     * Notification type denoting that a new entry has been added to the
-     * SNMP table.
-     * <BR>The value of this notification type is
-     * <CODE>jmx.snmp.table.entry.added</CODE>.
-     */
-    public static final String SNMP_ENTRY_ADDED =
-        "jmx.snmp.table.entry.added";
-
-    /**
-     * Notification type denoting that an entry has been removed from the
-     * SNMP table.
-     * <BR>The value of this notification type is
-     * <CODE>jmx.snmp.table.entry.removed</CODE>.
-     */
-    public static final String SNMP_ENTRY_REMOVED =
-        "jmx.snmp.table.entry.removed";
-
-    // PRIVATE VARIABLES
-    //------------------
-
-    /**
-     * The entry object.
-     * @serial
-     */
-    private final Object entry;
-
-    /**
-     * The entry name.
-     * @serial
-     * @since 1.5
-     */
-    private final ObjectName name;
-
-    // Ensure compatibility
-    //
-    private static final long serialVersionUID = 5832592016227890252L;
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/agent/SnmpTableSupport.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,572 +0,0 @@
-/*
- * Copyright (c) 2000, 2014, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.jmx.snmp.agent;
-
-
-
-// java imports
-//
-import java.io.Serializable;
-import java.util.Date;
-import java.util.Vector;
-import java.util.Enumeration;
-import java.util.List;
-import java.util.ArrayList;
-
-// jmx imports
-//
-import javax.management.Notification;
-import javax.management.ObjectName;
-import javax.management.NotificationFilter;
-import javax.management.NotificationListener;
-import javax.management.NotificationBroadcaster;
-import javax.management.MBeanNotificationInfo;
-import javax.management.ListenerNotFoundException;
-import com.sun.jmx.snmp.SnmpOid;
-import com.sun.jmx.snmp.SnmpValue;
-import com.sun.jmx.snmp.SnmpVarBind;
-import com.sun.jmx.snmp.SnmpStatusException;
-
-/**
- * This class is an abstraction for an SNMP table.
- * It is the base class for implementing SNMP tables in the
- * MBean world.
- *
- * <p>
- * Its responsibility is to synchronize the MBean view of the table
- * (Table of entries) with the MIB view (array of OID indexes). Each
- * object of this class will be bound to the Metadata object which
- * manages the same SNMP Table within the MIB.
- * </p>
- *
- * <p>
- * For each table defined in a MIB, mibgen will generate a specific
- * class called Table<i>TableName</i> that will subclass this class, and
- * a corresponding <i>TableName</i>Meta class extending SnmpMibTable
- * and corresponding to the MIB view of the same table.
- * </p>
- *
- * <p>
- * Objects of this class are instantiated by MBeans representing
- * the SNMP Group to which the table belong.
- * </p>
- *
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- * @see com.sun.jmx.snmp.agent.SnmpTableEntryFactory
- * @see com.sun.jmx.snmp.agent.SnmpMibTable
- *
- */
-@SuppressWarnings("serial") // JDK implementation class
-public abstract class SnmpTableSupport implements SnmpTableEntryFactory,
-// NPCTE fix for bugId 4499265, esc 0, MR 04 sept 2001
-//  SnmpTableCallbackHandler {
-    SnmpTableCallbackHandler, Serializable {
-// end of NPCTE fix for bugId 4499265
-
-    //-----------------------------------------------------------------
-    //
-    //  Protected Variables
-    //
-    //-----------------------------------------------------------------
-
-    /**
-     * The list of entries
-     **/
-    protected List<Object> entries;
-
-    /**
-     * The associated metadata object
-     **/
-    protected SnmpMibTable meta;
-
-    /**
-     * The MIB to which this table belongs
-     **/
-    protected SnmpMib      theMib;
-
-    //-----------------------------------------------------------------
-    //
-    //  Private Variables
-    //
-    //-----------------------------------------------------------------
-
-    /**
-     * This variable is initialized while binding this object to its
-     * corresponding meta object.
-     **/
-    private boolean registrationRequired = false;
-
-
-
-    //-----------------------------------------------------------------
-    //
-    //  Constructor
-    //
-    //-----------------------------------------------------------------
-
-    /**
-     * Initializes the table.
-     * The steps are these:
-     * <ul><li> allocate an array for storing entry object,</li>
-     *     <li> retrieve the corresponding metadata object
-     *          from the MIB,
-     *     <li> bind this object to the corresponding metadata object
-     *          from the MIB.</li>
-     * </ul>
-     *
-     * @param mib The MIB to which this table belong.
-     *
-     **/
-    protected SnmpTableSupport(SnmpMib mib) {
-        theMib  = mib;
-        meta    = getRegisteredTableMeta(mib);
-        bindWithTableMeta();
-        entries = allocateTable();
-    }
-
-
-    //-----------------------------------------------------------------
-    //
-    //  Implementation of the SnmpTableEntryFactory interface
-    //
-    //-----------------------------------------------------------------
-
-    /**
-     * Creates a new entry in the table.
-     *
-     * This factory method is generated by mibgen and used internally.
-     * It is part of the
-     * {@link com.sun.jmx.snmp.agent.SnmpTableEntryFactory} interface.
-     * You may subclass this method to implement any specific behaviour
-     * your application requires.
-     *
-     * @exception SnmpStatusException if the entry cannot be created.
-     **/
-    public abstract void createNewEntry(SnmpMibSubRequest request,
-                                        SnmpOid rowOid, int depth,
-                                        SnmpMibTable meta)
-        throws SnmpStatusException;
-
-
-    //-----------------------------------------------------------------
-    //
-    //  Public methods
-    //
-    //-----------------------------------------------------------------
-
-    /**
-     * Returns the entry located at the given position in the table.
-     *
-     * @return The entry located at the given position, <code>null</code>
-     *         if no entry can be found at this position.
-     **/
-    // XXXX xxxx zzz ZZZZ => public? or protected?
-    public Object getEntry(int pos) {
-        if (entries == null) return null;
-        return entries.get(pos);
-    }
-
-    /**
-     * Returns the number of entries registered in the table.
-     *
-     * @return The number of entries registered in the table.
-     **/
-    public int getSize() {
-        return meta.getSize();
-    }
-
-    /**
-     * This method lets you dynamically switch the creation policy.
-     *
-     * <CODE>setCreationEnabled()</CODE> will switch the policy of
-     *      remote entry creation via SET operations, by calling
-     *      <code>setCreationEnabled()</code> on the metadata object
-     *      associated with this table.
-     * <BR> By default remote entry creation via SET operation is disabled.
-     *
-     * @param remoteCreationFlag Tells whether remote entry creation must
-     *        be enabled or disabled.
-     * <li>
-     * <CODE>setCreationEnabled(true)</CODE> will enable remote entry
-     *      creation via SET operations.</li>
-     * <li>
-     * <CODE>setCreationEnabled(false)</CODE> will disable remote entry
-     *      creation via SET operations.</li>
-     * <p> By default remote entry creation via SET operation is disabled.
-     * </p>
-     *
-     * @see com.sun.jmx.snmp.agent.SnmpMibTable
-     *
-     **/
-    public void setCreationEnabled(boolean remoteCreationFlag) {
-        meta.setCreationEnabled(remoteCreationFlag);
-    }
-
-    /**
-     * Tells whether a new entry should be created when a SET operation
-     * is received for an entry that does not exist yet.
-     * This method calls <code>isCreationEnabled()</code> on the metadata
-     * object associated with this table.
-     *
-     * @return true if a new entry must be created, false otherwise.<br>
-     *         [default: returns <CODE>false</CODE>]
-     *
-     * @see com.sun.jmx.snmp.agent.SnmpMibTable
-     **/
-    public boolean isCreationEnabled() {
-        return meta.isCreationEnabled();
-    }
-
-    /**
-     * Tells whether the metadata object to which this table is linked
-     * requires entries to be registered. In this case passing an
-     * ObjectName when registering entries will be mandatory.
-     *
-     * @return <code>true</code> if the associated metadata requires entries
-     *         to be registered (mibgen generated generic metadata).
-     **/
-    public boolean isRegistrationRequired() {
-        return registrationRequired;
-    }
-
-    /**
-     * Builds an entry SnmpIndex from its row OID.
-     *
-     * This method is generated by mibgen and used internally.
-     *
-     * @param rowOid The SnmpOid object identifying a table entry.
-     *
-     * @return The SnmpIndex of the entry identified by <code>rowOid</code>.
-     *
-     * @exception SnmpStatusException if the index cannot be built from the
-     *            given OID.
-     **/
-    public SnmpIndex buildSnmpIndex(SnmpOid rowOid)
-        throws SnmpStatusException {
-        return buildSnmpIndex(rowOid.longValue(false), 0);
-    }
-
-    /**
-     * Builds an SnmpOid from an SnmpIndex object.
-     *
-     * This method is generated by mibgen and used internally.
-     *
-     * @param index An SnmpIndex object identifying a table entry.
-     *
-     * @return The SnmpOid form of the given entry index.
-     *
-     * @exception SnmpStatusException if the given index is not valid.
-     **/
-    public abstract SnmpOid buildOidFromIndex(SnmpIndex index)
-        throws SnmpStatusException;
-
-    /**
-     * Builds the default ObjectName of an entry from the SnmpIndex
-     * identifying this entry. No access is made on the entry itself.
-     *
-     * This method is generated by mibgen and used internally.
-     * You can subclass this method if you want to change the default
-     * ObjectName policy. This is only meaningfull when entries
-     * are registered MBeans.
-     *
-     * @param index The SnmpIndex identifying the entry from which we
-     *              want to build the default ObjectName.
-     *
-     * @return The default ObjectName for the entry identified by
-     *         the given index.
-     *
-     * @exception SnmpStatusException if the given index is not valid.
-     **/
-    public abstract ObjectName buildNameFromIndex(SnmpIndex index)
-        throws SnmpStatusException;
-
-
-    //-----------------------------------------------------------------
-    //
-    //  Implementation of the SnmpTableEntryFactory interface
-    //
-    //-----------------------------------------------------------------
-
-    /**
-     * This callback is called by  the associated metadata object
-     * when a new table entry has been registered in the
-     * table metadata.
-     *
-     * This method will update the <code>entries</code> list.
-     *
-     * @param pos   The position at which the new entry was inserted
-     *              in the table.
-     * @param row   The row OID of the new entry
-     * @param name  The ObjectName of the new entry (as specified by the
-     *              factory)
-     * @param entry The new entry (as returned by the factory)
-     * @param meta  The table metadata object.
-     *
-     **/
-    public void addEntryCb(int pos, SnmpOid row, ObjectName name,
-                           Object entry, SnmpMibTable meta)
-        throws SnmpStatusException {
-        try {
-            if (entries != null) entries.add(pos,entry);
-        } catch (Exception e) {
-            throw new SnmpStatusException(SnmpStatusException.noSuchName);
-        }
-    }
-
-    /**
-     * This callback is called by  the associated metadata object
-     * when a new table entry has been removed from the
-     * table metadata.
-     *
-     * This method will update the <code>entries</code> list.
-     *
-     * @param pos   The position from which the entry was deleted
-     * @param row   The row OID of the deleted entry
-     * @param name  The ObjectName of the deleted entry (may be null if
-     *              ObjectName's were not required)
-     * @param entry The deleted entry (may be null if only ObjectName's
-     *              were required)
-     * @param meta  The table metadata object.
-     *
-     **/
-    public void removeEntryCb(int pos, SnmpOid row, ObjectName name,
-                              Object entry, SnmpMibTable meta)
-        throws SnmpStatusException {
-        try {
-            if (entries != null) entries.remove(pos);
-        } catch (Exception e) {
-        }
-    }
-
-
-
-    /**
-     * Enables to add an SNMP entry listener to this
-     * <CODE>SnmpMibTable</CODE>.
-     *
-     * @param listener The listener object which will handle the
-     *    notifications emitted by the registered MBean.
-     *
-     * @param filter The filter object. If filter is null, no filtering
-     *    will be performed before handling notifications.
-     *
-     * @param handback The context to be sent to the listener when a
-     *    notification is emitted.
-     *
-     * @exception IllegalArgumentException Listener parameter is null.
-     */
-    public void
-        addNotificationListener(NotificationListener listener,
-                                NotificationFilter filter, Object handback) {
-        meta.addNotificationListener(listener,filter,handback);
-    }
-
-    /**
-     * Enables to remove an SNMP entry listener from this
-     * <CODE>SnmpMibTable</CODE>.
-     *
-     * @param listener The listener object which will handle the
-     *    notifications emitted by the registered MBean.
-     *    This method will remove all the information related to this
-     *    listener.
-     *
-     * @exception ListenerNotFoundException The listener is not registered
-     *    in the MBean.
-     */
-    public synchronized void
-        removeNotificationListener(NotificationListener listener)
-        throws ListenerNotFoundException {
-        meta.removeNotificationListener(listener);
-    }
-
-    /**
-     * Returns a <CODE>NotificationInfo</CODE> object containing the
-     * notification class and the notification type sent by the
-     * <CODE>SnmpMibTable</CODE>.
-     */
-    public MBeanNotificationInfo[] getNotificationInfo() {
-        return meta.getNotificationInfo();
-    }
-
-    //-----------------------------------------------------------------
-    //
-    //  Protected Abstract methods
-    //
-    //-----------------------------------------------------------------
-
-    /**
-     * Builds an SnmpIndex object from the index part of an OID.
-     *
-     * This method is generated by mibgen and used internally.
-     *
-     * @param oid The OID from which to build the index, represented
-     *        as an array of long.
-     * @param start The position where to start from in the OID array.
-     *
-     * @return The SnmpOid form of the given entry index.
-     *
-     * @exception SnmpStatusException if the given index is not valid.
-     **/
-    protected abstract SnmpIndex buildSnmpIndex(long oid[], int start )
-        throws SnmpStatusException;
-
-    /**
-     * Returns the metadata object associated with this table.
-     *
-     * This method is generated by mibgen and used internally.
-     *
-     * @param mib The SnmpMib object holding the Metadata corresponding
-     *            to this table.
-     *
-     * @return The metadata object associated with this table.
-     *         Returns <code>null</code> if this implementation of the
-     *         MIB doesn't support this table.
-     **/
-    protected abstract SnmpMibTable getRegisteredTableMeta(SnmpMib mib);
-
-
-    //-----------------------------------------------------------------
-    //
-    //  Protected methods
-    //
-    //-----------------------------------------------------------------
-
-    /**
-     * Allocates an ArrayList for storing table entries.
-     *
-     * This method is called within the constructor at object creation.
-     * Any object implementing the {@link java.util.List} interface can
-     * be used.
-     *
-     * @return A new list in which to store entries. If <code>null</code>
-     *         is returned then no entry will be stored in the list
-     *         and getEntry() will always return null.
-     **/
-    protected List<Object> allocateTable() {
-        return new ArrayList<Object>();
-    }
-
-    /**
-     * Add an entry in this table.
-     *
-     * This method registers an entry in the table and perform
-     * synchronization with the associated table metadata object.
-     *
-     * This method assumes that the given entry will not be registered,
-     * or will be registered with its default ObjectName built from the
-     * associated  SnmpIndex.
-     * <p>
-     * If the entry is going to be registered, then
-     * {@link com.sun.jmx.snmp.agent.SnmpTableSupport#addEntry(SnmpIndex, ObjectName, Object)} should be preferred.
-     * <br> This function is mainly provided for backward compatibility.
-     *
-     * @param index The SnmpIndex built from the given entry.
-     * @param entry The entry that should be added in the table.
-     *
-     * @exception SnmpStatusException if the entry cannot be registered with
-     *            the given index.
-     **/
-    protected void addEntry(SnmpIndex index, Object entry)
-        throws SnmpStatusException {
-        SnmpOid oid = buildOidFromIndex(index);
-        ObjectName name = null;
-        if (isRegistrationRequired()) {
-            name = buildNameFromIndex(index);
-        }
-        meta.addEntry(oid,name,entry);
-    }
-
-    /**
-     * Add an entry in this table.
-     *
-     * This method registers an entry in the table and performs
-     * synchronization with the associated table metadata object.
-     *
-     * @param index The SnmpIndex built from the given entry.
-     * @param name  The ObjectName with which this entry will be registered.
-     * @param entry The entry that should be added in the table.
-     *
-     * @exception SnmpStatusException if the entry cannot be registered with
-     *            the given index.
-     **/
-    protected void addEntry(SnmpIndex index, ObjectName name, Object entry)
-        throws SnmpStatusException {
-        SnmpOid oid = buildOidFromIndex(index);
-        meta.addEntry(oid,name,entry);
-    }
-
-    /**
-     * Remove an entry from this table.
-     *
-     * This method unregisters an entry from the table and performs
-     * synchronization with the associated table metadata object.
-     *
-     * @param index The SnmpIndex identifying the entry.
-     * @param entry The entry that should be removed in the table. This
-     *              parameter is optional and can be omitted if it doesn't
-     *              need to be passed along to the
-     *              <code>removeEntryCb()</code> callback defined in the
-     *              {@link com.sun.jmx.snmp.agent.SnmpTableCallbackHandler}
-     *              interface.
-     *
-     * @exception SnmpStatusException if the entry cannot be unregistered.
-     **/
-    protected void removeEntry(SnmpIndex index, Object entry)
-        throws SnmpStatusException {
-        SnmpOid oid = buildOidFromIndex(index);
-        meta.removeEntry(oid,entry);
-    }
-
-    // protected void removeEntry(ObjectName name, Object entry)
-    //  throws SnmpStatusException {
-    //  meta.removeEntry(name,entry);
-    // }
-
-    /**
-     * Returns the entries in the table.
-     *
-     * @return An Object[] array containing the entries registered in the
-     *         table.
-     **/
-    protected Object[] getBasicEntries() {
-        if (entries == null) return null;
-        Object[] array= new Object[entries.size()];
-        entries.toArray(array);
-        return array;
-    }
-
-    /**
-     * Binds this table with its associated metadata, registering itself
-     * as an SnmpTableEntryFactory.
-     **/
-    protected void bindWithTableMeta() {
-        if (meta == null) return;
-        registrationRequired = meta.isRegistrationRequired();
-        meta.registerEntryFactory(this);
-    }
-
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/agent/SnmpUserDataFactory.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,124 +0,0 @@
-/*
- * Copyright (c) 2000, 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.jmx.snmp.agent;
-
-import com.sun.jmx.snmp.SnmpPduPacket;
-import com.sun.jmx.snmp.SnmpPdu;
-import com.sun.jmx.snmp.SnmpStatusException;
-
-/**
- * This interface is provided to enable fine customization of the SNMP
- * agent behaviour.
- *
- * <p>You will not need to implement this interface except if your agent
- * needs extra customization requiring some contextual information.</p>
- *
- * <p>If an SnmpUserDataFactory is set on the SnmpAdaptorServer, then a new
- * object containing user-data will be allocated through this factory
- * for each incoming request. This object will be passed along to
- * the SnmpMibAgent within SnmpMibRequest objects. By default, no
- * SnmpUserDataFactory is set on the SnmpAdaptorServer, and the contextual
- * object passed to SnmpMibAgent is null.</p>
- *
- * <p>You can use this feature to obtain on contextual information
- * (such as community string etc...) or to implement a caching
- * mechanism, or for whatever purpose might be required by your specific
- * agent implementation.</p>
- *
- * <p>The sequence <code>allocateUserData() / releaseUserData()</code> can
- * also be used to implement a caching mechanism:
- * <ul>
- * <li><code>allocateUserData()</code> could be used to allocate
- *         some cache space,</li>
- * <li>and <code>releaseUserData()</code> could be used to flush it.</li>
- * </ul></p>
- *
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- * @see com.sun.jmx.snmp.agent.SnmpMibRequest
- * @see com.sun.jmx.snmp.agent.SnmpMibAgent
- * @see com.sun.jmx.snmp.daemon.SnmpAdaptorServer
- *
- **/
-public interface SnmpUserDataFactory {
-    /**
-     * Called by the <CODE>SnmpAdaptorServer</CODE> adaptor.
-     * Allocate a contextual object containing some user data. This method
-     * is called once for each incoming SNMP request. The scope
-     * of this object will be the whole request. Since the request can be
-     * handled in several threads, the user should make sure that this
-     * object can be accessed in a thread-safe manner. The SNMP framework
-     * will never access this object directly - it will simply pass
-     * it to the <code>SnmpMibAgent</code> within
-     * <code>SnmpMibRequest</code> objects - from where it can be retrieved
-     * through the {@link com.sun.jmx.snmp.agent.SnmpMibRequest#getUserData() getUserData()} accessor.
-     * <code>null</code> is considered to be a valid return value.
-     *
-     * This method is called just after the SnmpPduPacket has been
-     * decoded.
-     *
-     * @param requestPdu The SnmpPduPacket received from the SNMP manager.
-     *        <b>This parameter is owned by the SNMP framework and must be
-     *        considered as transient.</b> If you wish to keep some of its
-     *        content after this method returns (by storing it in the
-     *        returned object for instance) you should clone that
-     *        information.
-     *
-     * @return A newly allocated user-data contextual object, or
-     *         <code>null</code>
-     * @exception SnmpStatusException If an SnmpStatusException is thrown,
-     *            the request will be aborted.
-     *
-     * @since 1.5
-     **/
-    public Object allocateUserData(SnmpPdu requestPdu)
-        throws SnmpStatusException;
-
-    /**
-     * Called by the <CODE>SnmpAdaptorServer</CODE> adaptor.
-     * Release a previously allocated contextual object containing user-data.
-     * This method is called just before the responsePdu is sent back to the
-     * manager. It gives the user a chance to alter the responsePdu packet
-     * before it is encoded, and to free any resources that might have
-     * been allocated when creating the contextual object.
-     *
-     * @param userData The contextual object being released.
-     * @param responsePdu The SnmpPduPacket that will be sent back to the
-     *        SNMP manager.
-     *        <b>This parameter is owned by the SNMP framework and must be
-     *        considered as transient.</b> If you wish to keep some of its
-     *        content after this method returns you should clone that
-     *        information.
-     *
-     * @exception SnmpStatusException If an SnmpStatusException is thrown,
-     *            the responsePdu is dropped and nothing is returned to
-     *            to the manager.
-     *
-     * @since 1.5
-     **/
-    public void releaseUserData(Object userData, SnmpPdu responsePdu)
-        throws SnmpStatusException;
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/agent/package.html	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-<HTML>
-<HEAD>
-<!--
-
-Copyright (c) 1999, 2003, 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
-particular file as subject to the "Classpath" exception as provided
-by Oracle in the LICENSE file that accompanied this code.
-
-This code is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-version 2 for more details (a copy is included in the LICENSE file that
-accompanied this code).
-
-You should have received a copy of the GNU General Public License version
-2 along with this work; if not, write to the Free Software Foundation,
-Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
-Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-or visit www.oracle.com if you need additional information or have any
-questions.
--->
-</HEAD>
-<BODY>
-Provides the classes for creating an <B>SNMP agent</B>.
-<p><b>This API is a Sun Microsystems internal API  and is subject 
-   to change without notice.</b></p>
-</BODY>
-</HTML>
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/daemon/ClientHandler.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,133 +0,0 @@
-/*
- * Copyright (c) 1999, 2006, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-package com.sun.jmx.snmp.daemon;
-
-
-
-// java import
-//
-import java.io.*;
-import java.util.logging.Level;
-
-// jmx import
-//
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-
-// jmx RI import
-//
-import static com.sun.jmx.defaults.JmxProperties.SNMP_ADAPTOR_LOGGER;
-
-/**
- * The <CODE>ClientHandler</CODE> class is the base class of each
- * adaptor.<p>
- */
-
-abstract class ClientHandler implements Runnable {
-
-    public ClientHandler(CommunicatorServer server, int id, MBeanServer f, ObjectName n) {
-        adaptorServer = server ;
-        requestId = id ;
-        mbs = f ;
-        objectName = n ;
-        interruptCalled = false ;
-        dbgTag = makeDebugTag() ;
-        //if (mbs == null ){
-        //thread = new Thread (this) ;
-        thread =  createThread(this);
-
-        //} else {
-        //thread = mbs.getThreadAllocatorSrvIf().obtainThread(objectName,this) ;
-        //}
-        // Note: the thread will be started by the subclass.
-    }
-
-    // thread service
-    Thread createThread(Runnable r) {
-        return new Thread(this);
-    }
-
-    public void interrupt() {
-        SNMP_ADAPTOR_LOGGER.entering(dbgTag, "interrupt");
-        interruptCalled = true ;
-        if (thread != null) {
-            thread.interrupt() ;
-        }
-        SNMP_ADAPTOR_LOGGER.exiting(dbgTag, "interrupt");
-    }
-
-
-    public void join() {
-        if (thread != null) {
-        try {
-            thread.join() ;
-        }
-        catch(InterruptedException x) {
-        }
-        }
-    }
-
-    public void run() {
-
-        try {
-            //
-            // Notify the server we are now active
-            //
-            adaptorServer.notifyClientHandlerCreated(this) ;
-
-            //
-            // Call protocol specific sequence
-            //
-            doRun() ;
-        }
-        finally {
-            //
-            // Now notify the adaptor server that the handler is terminating.
-            // This is important because the server may be blocked waiting for
-            // a handler to terminate.
-            //
-            adaptorServer.notifyClientHandlerDeleted(this) ;
-        }
-    }
-
-    //
-    // The protocol-dependent part of the request
-    //
-    public abstract void doRun() ;
-
-    protected CommunicatorServer adaptorServer = null ;
-    protected int requestId = -1 ;
-    protected MBeanServer mbs = null ;
-    protected ObjectName objectName = null ;
-    protected Thread thread = null ;
-    protected boolean interruptCalled = false ;
-    protected String dbgTag = null ;
-
-    protected String makeDebugTag() {
-        return "ClientHandler[" + adaptorServer.getProtocol() + ":" + adaptorServer.getPort() + "][" + requestId + "]";
-    }
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/daemon/CommunicationException.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,77 +0,0 @@
-/*
- * Copyright (c) 1999, 2007, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.jmx.snmp.daemon;
-
-// java import
-//
-import java.io.PrintStream;
-import java.io.PrintWriter;
-
-/**
- * Represents exceptions raised due to communications problems,
- * for example when a managed object server is out of reach.<p>
- *
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- */
-
-public class CommunicationException extends javax.management.JMRuntimeException {
-
-    /* Serial version */
-    private static final long serialVersionUID = -2499186113233316177L;
-
-    /**
-     * Constructs a CommunicationException with a target exception.
-     */
-    public CommunicationException(Throwable target) {
-        super(target.getMessage());
-        initCause(target);
-    }
-
-    /**
-     * Constructs a CommunicationException with a target exception
-     * and a detail message.
-     */
-    public CommunicationException(Throwable target, String msg) {
-        super(msg);
-        initCause(target);
-    }
-
-    /**
-     * Constructs a CommunicationException with a detail message.
-     */
-    public CommunicationException(String msg) {
-        super(msg);
-    }
-
-    /**
-     * Get the thrown target exception.
-     */
-    public Throwable getTargetException() {
-        return getCause();
-    }
-
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/daemon/CommunicatorServer.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1373 +0,0 @@
-/*
- * Copyright (c) 1999, 2013, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-package com.sun.jmx.snmp.daemon;
-
-
-
-// java import
-//
-import java.io.ObjectInputStream;
-import java.io.IOException;
-import java.net.InetAddress;
-import java.util.logging.Level;
-import java.util.Vector;
-import java.util.NoSuchElementException;
-
-// jmx import
-//
-import javax.management.MBeanServer;
-import javax.management.MBeanRegistration;
-import javax.management.ObjectName;
-import javax.management.NotificationListener;
-import javax.management.NotificationFilter;
-import javax.management.NotificationBroadcaster;
-import javax.management.NotificationBroadcasterSupport;
-import javax.management.MBeanNotificationInfo;
-import javax.management.AttributeChangeNotification;
-import javax.management.ListenerNotFoundException;
-
-import static com.sun.jmx.defaults.JmxProperties.SNMP_ADAPTOR_LOGGER;
-
-// JSR 160 import
-//
-// XXX Revisit:
-//   used to import com.sun.jmx.snmp.MBeanServerForwarder
-// Now using JSR 160 instead. => this is an additional
-// dependency to JSR 160.
-//
-import javax.management.remote.MBeanServerForwarder;
-
-/**
- * Defines generic behavior for the server part of a connector or an adaptor.
- * Most connectors or adaptors extend <CODE>CommunicatorServer</CODE>
- * and inherit this behavior. Connectors or adaptors that do not fit into
- * this model do not extend <CODE>CommunicatorServer</CODE>.
- * <p>
- * A <CODE>CommunicatorServer</CODE> is an active object, it listens for
- * client requests  and processes them in its own thread. When necessary, a
- * <CODE>CommunicatorServer</CODE> creates other threads to process multiple
- * requests concurrently.
- * <p>
- * A <CODE>CommunicatorServer</CODE> object can be stopped by calling the
- * <CODE>stop</CODE> method. When it is stopped, the
- * <CODE>CommunicatorServer</CODE> no longer listens to client requests and
- * no longer holds any thread or communication resources.
- * It can be started again by calling the <CODE>start</CODE> method.
- * <p>
- * A <CODE>CommunicatorServer</CODE> has a <CODE>State</CODE> attribute
- * which reflects its  activity.
- * <p>
- * <TABLE>
- * <TR><TH>CommunicatorServer</TH>      <TH>State</TH></TR>
- * <TR><TD><CODE>stopped</CODE></TD>    <TD><CODE>OFFLINE</CODE></TD></TR>
- * <TR><TD><CODE>starting</CODE></TD>    <TD><CODE>STARTING</CODE></TD></TR>
- * <TR><TD><CODE>running</CODE></TD>     <TD><CODE>ONLINE</CODE></TD></TR>
- * <TR><TD><CODE>stopping</CODE></TD>     <TD><CODE>STOPPING</CODE></TD></TR>
- * </TABLE>
- * <p>
- * The <CODE>STARTING</CODE> state marks the transition
- * from <CODE>OFFLINE</CODE> to <CODE>ONLINE</CODE>.
- * <p>
- * The <CODE>STOPPING</CODE> state marks the transition from
- * <CODE>ONLINE</CODE> to <CODE>OFFLINE</CODE>. This occurs when the
- * <CODE>CommunicatorServer</CODE> is finishing or interrupting active
- * requests.
- * <p>
- * When a <CODE>CommunicatorServer</CODE> is unregistered from the MBeanServer,
- * it is stopped automatically.
- * <p>
- * When the value of the <CODE>State</CODE> attribute changes the
- * <CODE>CommunicatorServer</CODE> sends a
- * <tt>{@link javax.management.AttributeChangeNotification}</tt> to the
- * registered listeners, if any.
- *
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- */
-
-public abstract class CommunicatorServer
-    implements Runnable, MBeanRegistration, NotificationBroadcaster,
-               CommunicatorServerMBean {
-
-    //
-    // States of a CommunicatorServer
-    //
-
-    /**
-     * Represents an <CODE>ONLINE</CODE> state.
-     */
-    public static final int ONLINE = 0 ;
-
-    /**
-     * Represents an <CODE>OFFLINE</CODE> state.
-     */
-    public static final int OFFLINE = 1 ;
-
-    /**
-     * Represents a <CODE>STOPPING</CODE> state.
-     */
-    public static final int STOPPING = 2 ;
-
-    /**
-     * Represents a <CODE>STARTING</CODE> state.
-     */
-    public static final int STARTING = 3 ;
-
-    //
-    // Types of connectors.
-    //
-
-    /**
-     * Indicates that it is an RMI connector type.
-     */
-    //public static final int RMI_TYPE = 1 ;
-
-    /**
-     * Indicates that it is an HTTP connector type.
-     */
-    //public static final int HTTP_TYPE = 2 ;
-
-    /**
-     * Indicates that it is an HTML connector type.
-     */
-    //public static final int HTML_TYPE = 3 ;
-
-    /**
-     * Indicates that it is an SNMP connector type.
-     */
-    public static final int SNMP_TYPE = 4 ;
-
-    /**
-     * Indicates that it is an HTTPS connector type.
-     */
-    //public static final int HTTPS_TYPE = 5 ;
-
-    //
-    // Package variables
-    //
-
-    /**
-     * The state of the connector server.
-     */
-     transient volatile int state = OFFLINE ;
-
-    /**
-     * The object name of the connector server.
-     * @serial
-     */
-    ObjectName objectName ;
-
-    MBeanServer topMBS;
-    MBeanServer bottomMBS;
-
-    /**
-     */
-    transient String dbgTag = null ;
-
-    /**
-     * The maximum number of clients that the CommunicatorServer can
-     * process concurrently.
-     * @serial
-     */
-    int maxActiveClientCount = 1 ;
-
-    /**
-     */
-    transient int servedClientCount = 0 ;
-
-    /**
-     * The host name used by this CommunicatorServer.
-     * @serial
-     */
-    String host = null ;
-
-    /**
-     * The port number used by this CommunicatorServer.
-     * @serial
-     */
-    int port = -1 ;
-
-
-    //
-    // Private fields
-    //
-
-    /* This object controls access to the "state" and "interrupted" variables.
-       If held at the same time as the lock on "this", the "this" lock must
-       be taken first.  */
-    private transient Object stateLock = new Object();
-
-    private transient Vector<ClientHandler>
-            clientHandlerVector = new Vector<>() ;
-
-    private transient Thread mainThread = null ;
-
-    private volatile boolean stopRequested = false ;
-    private boolean interrupted = false;
-    private transient Exception startException = null;
-
-    // Notifs count, broadcaster and info
-    private transient long notifCount = 0;
-    private transient NotificationBroadcasterSupport notifBroadcaster =
-        new NotificationBroadcasterSupport();
-    private transient MBeanNotificationInfo[] notifInfos = null;
-
-
-    /**
-     * Instantiates a <CODE>CommunicatorServer</CODE>.
-     *
-     * @param connectorType Indicates the connector type. Possible values are:
-     * SNMP_TYPE.
-     *
-     * @exception <CODE>java.lang.IllegalArgumentException</CODE>
-     *            This connector type is not correct.
-     */
-    public CommunicatorServer(int connectorType)
-        throws IllegalArgumentException {
-        switch (connectorType) {
-        case SNMP_TYPE :
-            //No op. int Type deciding debugging removed.
-            break;
-        default:
-            throw new IllegalArgumentException("Invalid connector Type") ;
-        }
-        dbgTag = makeDebugTag() ;
-    }
-
-    protected Thread createMainThread() {
-        return new Thread (this, makeThreadName());
-    }
-
-    /**
-     * Starts this <CODE>CommunicatorServer</CODE>.
-     * <p>
-     * Has no effect if this <CODE>CommunicatorServer</CODE> is
-     * <CODE>ONLINE</CODE> or <CODE>STOPPING</CODE>.
-     * @param timeout Time in ms to wait for the connector to start.
-     *        If <code>timeout</code> is positive, wait for at most
-     *        the specified time. An infinite timeout can be specified
-     *        by passing a <code>timeout</code> value equals
-     *        <code>Long.MAX_VALUE</code>. In that case the method
-     *        will wait until the connector starts or fails to start.
-     *        If timeout is negative or zero, returns as soon as possible
-     *        without waiting.
-     * @exception CommunicationException if the connectors fails to start.
-     * @exception InterruptedException if the thread is interrupted or the
-     *            timeout expires.
-     */
-    public void start(long timeout)
-        throws CommunicationException, InterruptedException {
-        boolean start;
-
-        synchronized (stateLock) {
-            if (state == STOPPING) {
-                // Fix for bug 4352451:
-                //     "java.net.BindException: Address in use".
-                waitState(OFFLINE, 60000);
-            }
-            start = (state == OFFLINE);
-            if (start) {
-                changeState(STARTING);
-                stopRequested = false;
-                interrupted = false;
-                startException = null;
-            }
-        }
-
-        if (!start) {
-            if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-                SNMP_ADAPTOR_LOGGER.logp(Level.FINER, dbgTag,
-                    "start","Connector is not OFFLINE");
-            }
-            return;
-        }
-
-        if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-            SNMP_ADAPTOR_LOGGER.logp(Level.FINER, dbgTag,
-                "start","--> Start connector ");
-        }
-
-        mainThread = createMainThread();
-
-        mainThread.start() ;
-
-        if (timeout > 0) waitForStart(timeout);
-    }
-
-    /**
-     * Starts this <CODE>CommunicatorServer</CODE>.
-     * <p>
-     * Has no effect if this <CODE>CommunicatorServer</CODE> is
-     * <CODE>ONLINE</CODE> or <CODE>STOPPING</CODE>.
-     */
-    @Override
-    public void start() {
-        try {
-            start(0);
-        } catch (InterruptedException x) {
-            // cannot happen because of `0'
-            if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-                SNMP_ADAPTOR_LOGGER.logp(Level.FINER, dbgTag,
-                    "start","interrupted", x);
-            }
-        }
-    }
-
-    /**
-     * Stops this <CODE>CommunicatorServer</CODE>.
-     * <p>
-     * Has no effect if this <CODE>CommunicatorServer</CODE> is
-     * <CODE>OFFLINE</CODE> or  <CODE>STOPPING</CODE>.
-     */
-    @Override
-    public void stop() {
-        synchronized (stateLock) {
-            if (state == OFFLINE || state == STOPPING) {
-                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-                    SNMP_ADAPTOR_LOGGER.logp(Level.FINER, dbgTag,
-                        "stop","Connector is not ONLINE");
-                }
-                return;
-            }
-            changeState(STOPPING);
-            //
-            // Stop the connector thread
-            //
-            if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-                SNMP_ADAPTOR_LOGGER.logp(Level.FINER, dbgTag,
-                    "stop","Interrupt main thread");
-            }
-            stopRequested = true ;
-            if (!interrupted) {
-                interrupted = true;
-                mainThread.interrupt();
-            }
-        }
-
-        //
-        // Call terminate on each active client handler
-        //
-        if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-            SNMP_ADAPTOR_LOGGER.logp(Level.FINER, dbgTag,
-                "stop","terminateAllClient");
-        }
-        terminateAllClient() ;
-
-        // ----------------------
-        // changeState
-        // ----------------------
-        synchronized (stateLock) {
-            if (state == STARTING)
-                changeState(OFFLINE);
-        }
-    }
-
-    /**
-     * Tests whether the <CODE>CommunicatorServer</CODE> is active.
-     *
-     * @return True if connector is <CODE>ONLINE</CODE>; false otherwise.
-     */
-    @Override
-    public boolean isActive() {
-        synchronized (stateLock) {
-            return (state == ONLINE);
-        }
-    }
-
-    /**
-     * <p>Waits until either the State attribute of this MBean equals the
-     * specified <VAR>wantedState</VAR> parameter,
-     * or the specified  <VAR>timeOut</VAR> has elapsed.
-     * The method <CODE>waitState</CODE> returns with a boolean value
-     * indicating whether the specified <VAR>wantedState</VAR> parameter
-     * equals the value of this MBean's State attribute at the time the method
-     * terminates.</p>
-     *
-     * <p>Two special cases for the <VAR>timeOut</VAR> parameter value are:</p>
-     * <UL><LI> if <VAR>timeOut</VAR> is negative then <CODE>waitState</CODE>
-     *     returns immediately (i.e. does not wait at all),</LI>
-     * <LI> if <VAR>timeOut</VAR> equals zero then <CODE>waitState</CODE>
-     *     waits untill the value of this MBean's State attribute
-     *     is the same as the <VAR>wantedState</VAR> parameter (i.e. will wait
-     *     indefinitely if this condition is never met).</LI></UL>
-     *
-     * @param wantedState The value of this MBean's State attribute to wait
-     *        for. <VAR>wantedState</VAR> can be one of:
-     * <ul>
-     * <li><CODE>CommunicatorServer.OFFLINE</CODE>,</li>
-     * <li><CODE>CommunicatorServer.ONLINE</CODE>,</li>
-     * <li><CODE>CommunicatorServer.STARTING</CODE>,</li>
-     * <li><CODE>CommunicatorServer.STOPPING</CODE>.</li>
-     * </ul>
-     * @param timeOut The maximum time to wait for, in milliseconds,
-     *        if positive.
-     * Infinite time out if 0, or no waiting at all if negative.
-     *
-     * @return true if the value of this MBean's State attribute is the
-     *      same as the <VAR>wantedState</VAR> parameter; false otherwise.
-     */
-    @Override
-    public boolean waitState(int wantedState, long timeOut) {
-        if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-            SNMP_ADAPTOR_LOGGER.logp(Level.FINER, dbgTag,
-                "waitState", wantedState + "(0on,1off,2st) TO=" + timeOut +
-                  " ; current state = " + getStateString());
-        }
-
-        long endTime = 0;
-        if (timeOut > 0)
-            endTime = System.currentTimeMillis() + timeOut;
-
-        synchronized (stateLock) {
-            while (state != wantedState) {
-                if (timeOut < 0) {
-                    if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-                        SNMP_ADAPTOR_LOGGER.logp(Level.FINER, dbgTag,
-                            "waitState", "timeOut < 0, return without wait");
-                    }
-                    return false;
-                } else {
-                    try {
-                        if (timeOut > 0) {
-                            long toWait = endTime - System.currentTimeMillis();
-                            if (toWait <= 0) {
-                                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-                                    SNMP_ADAPTOR_LOGGER.logp(Level.FINER, dbgTag,
-                                        "waitState", "timed out");
-                                }
-                                return false;
-                            }
-                            stateLock.wait(toWait);
-                        } else {  // timeOut == 0
-                            stateLock.wait();
-                        }
-                    } catch (InterruptedException e) {
-                        if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-                            SNMP_ADAPTOR_LOGGER.logp(Level.FINER, dbgTag,
-                                "waitState", "wait interrupted");
-                        }
-                        return (state == wantedState);
-                    }
-                }
-            }
-            if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-                SNMP_ADAPTOR_LOGGER.logp(Level.FINER, dbgTag,
-                    "waitState","returning in desired state");
-            }
-            return true;
-        }
-    }
-
-    /**
-     * <p>Waits until the communicator is started or timeout expires.
-     *
-     * @param timeout Time in ms to wait for the connector to start.
-     *        If <code>timeout</code> is positive, wait for at most
-     *        the specified time. An infinite timeout can be specified
-     *        by passing a <code>timeout</code> value equals
-     *        <code>Long.MAX_VALUE</code>. In that case the method
-     *        will wait until the connector starts or fails to start.
-     *        If timeout is negative or zero, returns as soon as possible
-     *        without waiting.
-     *
-     * @exception CommunicationException if the connectors fails to start.
-     * @exception InterruptedException if the thread is interrupted or the
-     *            timeout expires.
-     *
-     */
-    private void waitForStart(long timeout)
-        throws CommunicationException, InterruptedException {
-        if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-            SNMP_ADAPTOR_LOGGER.logp(Level.FINER, dbgTag,
-                "waitForStart", "Timeout=" + timeout +
-                 " ; current state = " + getStateString());
-        }
-
-        final long startTime = System.currentTimeMillis();
-
-        synchronized (stateLock) {
-            while (state == STARTING) {
-                // Time elapsed since startTime...
-                //
-                final long elapsed = System.currentTimeMillis() - startTime;
-
-                // wait for timeout - elapsed.
-                // A timeout of Long.MAX_VALUE is equivalent to something
-                // like 292271023 years - which is pretty close to
-                // forever as far as we are concerned ;-)
-                //
-                final long remainingTime = timeout-elapsed;
-
-                // If remainingTime is negative, the timeout has elapsed.
-                //
-                if (remainingTime < 0) {
-                    if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-                        SNMP_ADAPTOR_LOGGER.logp(Level.FINER, dbgTag,
-                            "waitForStart", "timeout < 0, return without wait");
-                    }
-                    throw new InterruptedException("Timeout expired");
-                }
-
-                // We're going to wait until someone notifies on the
-                // the stateLock object, or until the timeout expires,
-                // or until the thread is interrupted.
-                //
-                try {
-                    stateLock.wait(remainingTime);
-                } catch (InterruptedException e) {
-                    if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-                        SNMP_ADAPTOR_LOGGER.logp(Level.FINER, dbgTag,
-                            "waitForStart", "wait interrupted");
-                    }
-
-                    // If we are now ONLINE, then no need to rethrow the
-                    // exception... we're simply going to exit the while
-                    // loop. Otherwise, throw the InterruptedException.
-                    //
-                    if (state != ONLINE) throw e;
-                }
-            }
-
-            // We're no longer in STARTING state
-            //
-            if (state == ONLINE) {
-                // OK, we're started, everything went fine, just return
-                //
-                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-                    SNMP_ADAPTOR_LOGGER.logp(Level.FINER, dbgTag,
-                        "waitForStart", "started");
-                }
-                return;
-            } else if (startException instanceof CommunicationException) {
-                // There was some exception during the starting phase.
-                // Cast and throw...
-                //
-                throw (CommunicationException)startException;
-            } else if (startException instanceof InterruptedException) {
-                // There was some exception during the starting phase.
-                // Cast and throw...
-                //
-                throw (InterruptedException)startException;
-            } else if (startException != null) {
-                // There was some exception during the starting phase.
-                // Wrap and throw...
-                //
-                throw new CommunicationException(startException,
-                                                 "Failed to start: "+
-                                                 startException);
-            } else {
-                // We're not ONLINE, and there's no exception...
-                // Something went wrong but we don't know what...
-                //
-                throw new CommunicationException("Failed to start: state is "+
-                                                 getStringForState(state));
-            }
-        }
-    }
-
-    /**
-     * Gets the state of this <CODE>CommunicatorServer</CODE> as an integer.
-     *
-     * @return <CODE>ONLINE</CODE>, <CODE>OFFLINE</CODE>,
-     *         <CODE>STARTING</CODE> or <CODE>STOPPING</CODE>.
-     */
-    @Override
-    public int getState() {
-        synchronized (stateLock) {
-            return state ;
-        }
-    }
-
-    /**
-     * Gets the state of this <CODE>CommunicatorServer</CODE> as a string.
-     *
-     * @return One of the strings "ONLINE", "OFFLINE", "STARTING" or
-     *         "STOPPING".
-     */
-    @Override
-    public String getStateString() {
-        return getStringForState(state) ;
-    }
-
-    /**
-     * Gets the host name used by this <CODE>CommunicatorServer</CODE>.
-     *
-     * @return The host name used by this <CODE>CommunicatorServer</CODE>.
-     */
-    @Override
-    public String getHost() {
-        try {
-            host = InetAddress.getLocalHost().getHostName();
-        } catch (Exception e) {
-            host = "Unknown host";
-        }
-        return host ;
-    }
-
-    /**
-     * Gets the port number used by this <CODE>CommunicatorServer</CODE>.
-     *
-     * @return The port number used by this <CODE>CommunicatorServer</CODE>.
-     */
-    @Override
-    public int getPort() {
-        synchronized (stateLock) {
-            return port ;
-        }
-    }
-
-    /**
-     * Sets the port number used by this <CODE>CommunicatorServer</CODE>.
-     *
-     * @param port The port number used by this
-     *             <CODE>CommunicatorServer</CODE>.
-     *
-     * @exception java.lang.IllegalStateException This method has been invoked
-     * while the communicator was ONLINE or STARTING.
-     */
-    @Override
-    public void setPort(int port) throws java.lang.IllegalStateException {
-        synchronized (stateLock) {
-            if ((state == ONLINE) || (state == STARTING))
-                throw new IllegalStateException("Stop server before " +
-                                                "carrying out this operation");
-            this.port = port;
-            dbgTag = makeDebugTag();
-        }
-    }
-
-    /**
-     * Gets the protocol being used by this <CODE>CommunicatorServer</CODE>.
-     * @return The protocol as a string.
-     */
-    @Override
-    public abstract String getProtocol();
-
-    /**
-     * Gets the number of clients that have been processed by this
-     * <CODE>CommunicatorServer</CODE>  since its creation.
-     *
-     * @return The number of clients handled by this
-     *         <CODE>CommunicatorServer</CODE>
-     *         since its creation. This counter is not reset by the
-     *         <CODE>stop</CODE> method.
-     */
-    int getServedClientCount() {
-        return servedClientCount ;
-    }
-
-    /**
-     * Gets the number of clients currently being processed by this
-     * <CODE>CommunicatorServer</CODE>.
-     *
-     * @return The number of clients currently being processed by this
-     *         <CODE>CommunicatorServer</CODE>.
-     */
-    int getActiveClientCount() {
-        int result = clientHandlerVector.size() ;
-        return result ;
-    }
-
-    /**
-     * Gets the maximum number of clients that this
-     * <CODE>CommunicatorServer</CODE> can  process concurrently.
-     *
-     * @return The maximum number of clients that this
-     *         <CODE>CommunicatorServer</CODE> can
-     *         process concurrently.
-     */
-    int getMaxActiveClientCount() {
-        return maxActiveClientCount ;
-    }
-
-    /**
-     * Sets the maximum number of clients this
-     * <CODE>CommunicatorServer</CODE> can process concurrently.
-     *
-     * @param c The number of clients.
-     *
-     * @exception java.lang.IllegalStateException This method has been invoked
-     * while the communicator was ONLINE or STARTING.
-     */
-    void setMaxActiveClientCount(int c)
-        throws java.lang.IllegalStateException {
-        synchronized (stateLock) {
-            if ((state == ONLINE) || (state == STARTING)) {
-                throw new IllegalStateException(
-                          "Stop server before carrying out this operation");
-            }
-            maxActiveClientCount = c ;
-        }
-    }
-
-    /**
-     * For SNMP Runtime internal use only.
-     */
-    void notifyClientHandlerCreated(ClientHandler h) {
-        clientHandlerVector.addElement(h) ;
-    }
-
-    /**
-     * For SNMP Runtime internal use only.
-     */
-    synchronized void notifyClientHandlerDeleted(ClientHandler h) {
-        clientHandlerVector.removeElement(h);
-        notifyAll();
-    }
-
-    /**
-     * The number of times the communicator server will attempt
-     * to bind before giving up.
-     **/
-    protected int getBindTries() {
-        return 50;
-    }
-
-    /**
-     * The delay, in ms, during which the communicator server will sleep before
-     * attempting to bind again.
-     **/
-    protected long getBindSleepTime() {
-        return 100;
-    }
-
-    /**
-     * For SNMP Runtime internal use only.
-     * <p>
-     * The <CODE>run</CODE> method executed by this connector's main thread.
-     */
-    @Override
-    public void run() {
-
-        // Fix jaw.00667.B
-        // It seems that the init of "i" and "success"
-        // need to be done outside the "try" clause...
-        // A bug in Java 2 production release ?
-        //
-        int i = 0;
-        boolean success = false;
-
-        // ----------------------
-        // Bind
-        // ----------------------
-        try {
-            // Fix for bug 4352451: "java.net.BindException: Address in use".
-            //
-            final int  bindRetries = getBindTries();
-            final long sleepTime   = getBindSleepTime();
-            while (i < bindRetries && !success) {
-                try {
-                    // Try socket connection.
-                    //
-                    doBind();
-                    success = true;
-                } catch (CommunicationException ce) {
-                    i++;
-                    try {
-                        Thread.sleep(sleepTime);
-                    } catch (InterruptedException ie) {
-                        throw ie;
-                    }
-                }
-            }
-            // Retry last time to get correct exception.
-            //
-            if (!success) {
-                // Try socket connection.
-                //
-                doBind();
-            }
-
-        } catch(Exception x) {
-            if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, dbgTag,
-                    "run", "Got unexpected exception", x);
-            }
-            synchronized(stateLock) {
-                startException = x;
-                changeState(OFFLINE);
-            }
-            if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-                SNMP_ADAPTOR_LOGGER.logp(Level.FINER, dbgTag,
-                    "run","State is OFFLINE");
-            }
-            doError(x);
-            return;
-        }
-
-        try {
-            // ----------------------
-            // State change
-            // ----------------------
-            changeState(ONLINE) ;
-            if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-                SNMP_ADAPTOR_LOGGER.logp(Level.FINER, dbgTag,
-                    "run","State is ONLINE");
-            }
-
-            // ----------------------
-            // Main loop
-            // ----------------------
-            while (!stopRequested) {
-                servedClientCount++;
-                doReceive() ;
-                waitIfTooManyClients() ;
-                doProcess() ;
-            }
-            if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-                SNMP_ADAPTOR_LOGGER.logp(Level.FINER, dbgTag,
-                    "run","Stop has been requested");
-            }
-
-        } catch(InterruptedException x) {
-            if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, dbgTag,
-                    "run","Interrupt caught");
-            }
-            changeState(STOPPING);
-        } catch(Exception x) {
-            if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, dbgTag,
-                    "run","Got unexpected exception", x);
-            }
-            changeState(STOPPING);
-        } finally {
-            synchronized (stateLock) {
-                interrupted = true;
-                Thread.interrupted();
-            }
-
-            // ----------------------
-            // unBind
-            // ----------------------
-            try {
-                doUnbind() ;
-                waitClientTermination() ;
-                changeState(OFFLINE);
-                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-                    SNMP_ADAPTOR_LOGGER.logp(Level.FINER, dbgTag,
-                        "run","State is OFFLINE");
-                }
-            } catch(Exception x) {
-                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, dbgTag,
-                        "run","Got unexpected exception", x);
-                }
-                changeState(OFFLINE);
-            }
-
-        }
-    }
-
-    /**
-     */
-    protected abstract void doError(Exception e) throws CommunicationException;
-
-    //
-    // To be defined by the subclass.
-    //
-    // Each method below is called by run() and must be subclassed.
-    // If the method sends an exception (Communication or Interrupt), this
-    // will end up the run() method and switch the connector offline.
-    //
-    // If it is a CommunicationException, run() will call
-    //       Debug.printException().
-    //
-    // All these methods should propagate the InterruptedException to inform
-    // run() that the connector must be switch OFFLINE.
-    //
-    //
-    //
-    // doBind() should do all what is needed before calling doReceive().
-    // If doBind() throws an exception, doUnbind() is not to be called
-    // and run() ends up.
-    //
-
-    /**
-     */
-    protected abstract void doBind()
-        throws CommunicationException, InterruptedException ;
-
-    /**
-     * <CODE>doReceive()</CODE> should block until a client is available.
-     * If this method throws an exception, <CODE>doProcess()</CODE> is not
-     * called but <CODE>doUnbind()</CODE> is called then <CODE>run()</CODE>
-     * stops.
-     */
-    protected abstract void doReceive()
-        throws CommunicationException, InterruptedException ;
-
-    /**
-     * <CODE>doProcess()</CODE> is called after <CODE>doReceive()</CODE>:
-     * it should process the requests of the incoming client.
-     * If it throws an exception, <CODE>doUnbind()</CODE> is called and
-     * <CODE>run()</CODE> stops.
-     */
-    protected abstract void doProcess()
-        throws CommunicationException, InterruptedException ;
-
-    /**
-     * <CODE>doUnbind()</CODE> is called whenever the connector goes
-     * <CODE>OFFLINE</CODE>, except if <CODE>doBind()</CODE> has thrown an
-     * exception.
-     */
-    protected abstract void doUnbind()
-        throws CommunicationException, InterruptedException ;
-
-    /**
-     * Get the <code>MBeanServer</code> object to which incoming requests are
-     * sent.  This is either the MBean server in which this connector is
-     * registered, or an <code>MBeanServerForwarder</code> leading to that
-     * server.
-     */
-    public synchronized MBeanServer getMBeanServer() {
-        return topMBS;
-    }
-
-    /**
-     * Set the <code>MBeanServer</code> object to which incoming
-     * requests are sent.  This must be either the MBean server in
-     * which this connector is registered, or an
-     * <code>MBeanServerForwarder</code> leading to that server.  An
-     * <code>MBeanServerForwarder</code> <code>mbsf</code> leads to an
-     * MBean server <code>mbs</code> if
-     * <code>mbsf.getMBeanServer()</code> is either <code>mbs</code>
-     * or an <code>MBeanServerForwarder</code> leading to
-     * <code>mbs</code>.
-     *
-     * @exception IllegalArgumentException if <code>newMBS</code> is neither
-     * the MBean server in which this connector is registered nor an
-     * <code>MBeanServerForwarder</code> leading to that server.
-     *
-     * @exception IllegalStateException This method has been invoked
-     * while the communicator was ONLINE or STARTING.
-     */
-    public synchronized void setMBeanServer(MBeanServer newMBS)
-            throws IllegalArgumentException, IllegalStateException {
-        synchronized (stateLock) {
-            if (state == ONLINE || state == STARTING)
-                throw new IllegalStateException("Stop server before " +
-                                                "carrying out this operation");
-        }
-        final String error =
-            "MBeanServer argument must be MBean server where this " +
-            "server is registered, or an MBeanServerForwarder " +
-            "leading to that server";
-        Vector<MBeanServer> seenMBS = new Vector<>();
-        for (MBeanServer mbs = newMBS;
-             mbs != bottomMBS;
-             mbs = ((MBeanServerForwarder) mbs).getMBeanServer()) {
-            if (!(mbs instanceof MBeanServerForwarder))
-                throw new IllegalArgumentException(error);
-            if (seenMBS.contains(mbs))
-                throw new IllegalArgumentException("MBeanServerForwarder " +
-                                                   "loop");
-            seenMBS.addElement(mbs);
-        }
-        topMBS = newMBS;
-    }
-
-    //
-    // To be called by the subclass if needed
-    //
-    /**
-     * For internal use only.
-     */
-    ObjectName getObjectName() {
-        return objectName ;
-    }
-
-    /**
-     * For internal use only.
-     */
-    void changeState(int newState) {
-        int oldState;
-        synchronized (stateLock) {
-            if (state == newState)
-                return;
-            oldState = state;
-            state = newState;
-            stateLock.notifyAll();
-        }
-        sendStateChangeNotification(oldState, newState);
-    }
-
-    /**
-     * Returns the string used in debug traces.
-     */
-    String makeDebugTag() {
-        return "CommunicatorServer["+ getProtocol() + ":" + getPort() + "]" ;
-    }
-
-    /**
-     * Returns the string used to name the connector thread.
-     */
-    String makeThreadName() {
-        String result ;
-
-        if (objectName == null)
-            result = "CommunicatorServer" ;
-        else
-            result = objectName.toString() ;
-
-        return result ;
-    }
-
-    /**
-     * This method blocks if there are too many active clients.
-     * Call to <CODE>wait()</CODE> is terminated when a client handler
-     * thread calls <CODE>notifyClientHandlerDeleted(this)</CODE> ;
-     */
-    private synchronized void waitIfTooManyClients()
-        throws InterruptedException {
-        while (getActiveClientCount() >= maxActiveClientCount) {
-            if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-                SNMP_ADAPTOR_LOGGER.logp(Level.FINER, dbgTag,
-                    "waitIfTooManyClients","Waiting for a client to terminate");
-            }
-            wait();
-        }
-    }
-
-    /**
-     * This method blocks until there is no more active client.
-     */
-    private void waitClientTermination() {
-        int s = clientHandlerVector.size() ;
-        if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-            if (s >= 1) {
-                SNMP_ADAPTOR_LOGGER.logp(Level.FINER, dbgTag,
-                "waitClientTermination","waiting for " +
-                      s + " clients to terminate");
-            }
-        }
-
-        // The ClientHandler will remove themselves from the
-        // clientHandlerVector at the end of their run() method, by
-        // calling notifyClientHandlerDeleted().
-        // Since the clientHandlerVector is modified by the ClientHandler
-        // threads we must avoid using Enumeration or Iterator to loop
-        // over this array. We must also take care of NoSuchElementException
-        // which could be thrown if the last ClientHandler removes itself
-        // between the call to clientHandlerVector.isEmpty() and the call
-        // to clientHandlerVector.firstElement().
-        // What we *MUST NOT DO* is locking the clientHandlerVector, because
-        // this would most probably cause a deadlock.
-        //
-        while (! clientHandlerVector.isEmpty()) {
-            try {
-                clientHandlerVector.firstElement().join();
-            } catch (NoSuchElementException x) {
-                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-                    SNMP_ADAPTOR_LOGGER.logp(Level.FINER, dbgTag,
-                        "waitClientTermination","No elements left",  x);
-                }
-            }
-        }
-
-        if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-            if (s >= 1) {
-                SNMP_ADAPTOR_LOGGER.logp(Level.FINER, dbgTag,
-                    "waitClientTermination","Ok, let's go...");
-            }
-        }
-    }
-
-    /**
-     * Call <CODE>interrupt()</CODE> on each pending client.
-     */
-    private void terminateAllClient() {
-        final int s = clientHandlerVector.size() ;
-        if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-            if (s >= 1) {
-                SNMP_ADAPTOR_LOGGER.logp(Level.FINER, dbgTag,
-                    "terminateAllClient","Interrupting " + s + " clients");
-            }
-        }
-
-        // The ClientHandler will remove themselves from the
-        // clientHandlerVector at the end of their run() method, by
-        // calling notifyClientHandlerDeleted().
-        // Since the clientHandlerVector is modified by the ClientHandler
-        // threads we must avoid using Enumeration or Iterator to loop
-        // over this array.
-        // We cannot use the same logic here than in waitClientTermination()
-        // because there is no guarantee that calling interrupt() on the
-        // ClientHandler will actually terminate the ClientHandler.
-        // Since we do not want to wait for the actual ClientHandler
-        // termination, we cannot simply loop over the array until it is
-        // empty (this might result in calling interrupt() endlessly on
-        // the same client handler. So what we do is simply take a snapshot
-        // copy of the vector and loop over the copy.
-        // What we *MUST NOT DO* is locking the clientHandlerVector, because
-        // this would most probably cause a deadlock.
-        //
-        final  ClientHandler[] handlers =
-                clientHandlerVector.toArray(new ClientHandler[0]);
-         for (ClientHandler h : handlers) {
-             try {
-                 h.interrupt() ;
-             } catch (Exception x) {
-                 if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-                     SNMP_ADAPTOR_LOGGER.logp(Level.FINER, dbgTag,
-                             "terminateAllClient",
-                             "Failed to interrupt pending request. " +
-                             "Ignore the exception.", x);
-                 }
-            }
-        }
-    }
-
-    /**
-     * Controls the way the CommunicatorServer service is deserialized.
-     */
-    private void readObject(ObjectInputStream stream)
-        throws IOException, ClassNotFoundException {
-
-        // Call the default deserialization of the object.
-        //
-        stream.defaultReadObject();
-
-        // Call the specific initialization for the CommunicatorServer service.
-        // This is for transient structures to be initialized to specific
-        // default values.
-        //
-        stateLock = new Object();
-        state = OFFLINE;
-        stopRequested = false;
-        servedClientCount = 0;
-        clientHandlerVector = new Vector<>();
-        mainThread = null;
-        notifCount = 0;
-        notifInfos = null;
-        notifBroadcaster = new NotificationBroadcasterSupport();
-        dbgTag = makeDebugTag();
-    }
-
-
-    //
-    // NotificationBroadcaster
-    //
-
-    /**
-     * Adds a listener for the notifications emitted by this
-     * CommunicatorServer.
-     * There is only one type of notifications sent by the CommunicatorServer:
-     * they are <tt>{@link javax.management.AttributeChangeNotification}</tt>,
-     * sent when the <tt>State</tt> attribute of this CommunicatorServer
-     * changes.
-     *
-     * @param listener The listener object which will handle the emitted
-     *        notifications.
-     * @param filter The filter object. If filter is null, no filtering
-     *        will be performed before handling notifications.
-     * @param handback An object which will be sent back unchanged to the
-     *        listener when a notification is emitted.
-     *
-     * @exception IllegalArgumentException Listener parameter is null.
-     */
-    @Override
-    public void addNotificationListener(NotificationListener listener,
-                                        NotificationFilter filter,
-                                        Object handback)
-        throws java.lang.IllegalArgumentException {
-
-        if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-            SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, dbgTag,
-                "addNotificationListener","Adding listener "+ listener +
-                  " with filter "+ filter + " and handback "+ handback);
-        }
-        notifBroadcaster.addNotificationListener(listener, filter, handback);
-    }
-
-    /**
-     * Removes the specified listener from this CommunicatorServer.
-     * Note that if the listener has been registered with different
-     * handback objects or notification filters, all entries corresponding
-     * to the listener will be removed.
-     *
-     * @param listener The listener object to be removed.
-     *
-     * @exception ListenerNotFoundException The listener is not registered.
-     */
-    @Override
-    public void removeNotificationListener(NotificationListener listener)
-        throws ListenerNotFoundException {
-
-        if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-            SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, dbgTag,
-                "removeNotificationListener","Removing listener "+ listener);
-        }
-        notifBroadcaster.removeNotificationListener(listener);
-    }
-
-    /**
-     * Returns an array of MBeanNotificationInfo objects describing
-     * the notification types sent by this CommunicatorServer.
-     * There is only one type of notifications sent by the CommunicatorServer:
-     * it is <tt>{@link javax.management.AttributeChangeNotification}</tt>,
-     * sent when the <tt>State</tt> attribute of this CommunicatorServer
-     * changes.
-     */
-    @Override
-    public MBeanNotificationInfo[] getNotificationInfo() {
-
-        // Initialize notifInfos on first call to getNotificationInfo()
-        //
-        if (notifInfos == null) {
-            notifInfos = new MBeanNotificationInfo[1];
-            String[] notifTypes = {
-                AttributeChangeNotification.ATTRIBUTE_CHANGE};
-            notifInfos[0] = new MBeanNotificationInfo( notifTypes,
-                     AttributeChangeNotification.class.getName(),
-                     "Sent to notify that the value of the State attribute "+
-                     "of this CommunicatorServer instance has changed.");
-        }
-
-        return notifInfos.clone();
-    }
-
-    /**
-     *
-     */
-    private void sendStateChangeNotification(int oldState, int newState) {
-
-        String oldStateString = getStringForState(oldState);
-        String newStateString = getStringForState(newState);
-        String message = new StringBuffer().append(dbgTag)
-            .append(" The value of attribute State has changed from ")
-            .append(oldState).append(" (").append(oldStateString)
-            .append(") to ").append(newState).append(" (")
-            .append(newStateString).append(").").toString();
-
-        notifCount++;
-        AttributeChangeNotification notif =
-            new AttributeChangeNotification(this,    // source
-                         notifCount,                 // sequence number
-                         System.currentTimeMillis(), // time stamp
-                         message,                    // message
-                         "State",                    // attribute name
-                         "int",                      // attribute type
-                         oldState,                   // old value
-                         newState );                 // new value
-        if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-            SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, dbgTag,
-                "sendStateChangeNotification","Sending AttributeChangeNotification #"
-                    + notifCount + " with message: "+ message);
-        }
-        notifBroadcaster.sendNotification(notif);
-    }
-
-    /**
-     *
-     */
-    private static String getStringForState(int s) {
-        switch (s) {
-        case ONLINE:   return "ONLINE";
-        case STARTING: return "STARTING";
-        case OFFLINE:  return "OFFLINE";
-        case STOPPING: return "STOPPING";
-        default:       return "UNDEFINED";
-        }
-    }
-
-
-    //
-    // MBeanRegistration
-    //
-
-    /**
-     * Preregister method of connector.
-     *
-     *@param server The <CODE>MBeanServer</CODE> in which the MBean will
-     *       be registered.
-     *@param name The object name of the MBean.
-     *
-     *@return  The name of the MBean registered.
-     *
-     *@exception java.langException This exception should be caught by
-     *           the <CODE>MBeanServer</CODE> and re-thrown
-     *           as an <CODE>MBeanRegistrationException</CODE>.
-     */
-    @Override
-    public ObjectName preRegister(MBeanServer server, ObjectName name)
-            throws java.lang.Exception {
-        objectName = name;
-        synchronized (this) {
-            if (bottomMBS != null) {
-                throw new IllegalArgumentException("connector already " +
-                                                   "registered in an MBean " +
-                                                   "server");
-            }
-            topMBS = bottomMBS = server;
-        }
-        dbgTag = makeDebugTag();
-        return name;
-    }
-
-    /**
-     *
-     *@param registrationDone Indicates whether or not the MBean has been
-     *       successfully registered in the <CODE>MBeanServer</CODE>.
-     *       The value false means that the registration phase has failed.
-     */
-    @Override
-    public void postRegister(Boolean registrationDone) {
-        if (!registrationDone.booleanValue()) {
-            synchronized (this) {
-                topMBS = bottomMBS = null;
-            }
-        }
-    }
-
-    /**
-     * Stop the connector.
-     *
-     * @exception java.langException This exception should be caught by
-     *            the <CODE>MBeanServer</CODE> and re-thrown
-     *            as an <CODE>MBeanRegistrationException</CODE>.
-     */
-    @Override
-    public void preDeregister() throws java.lang.Exception {
-        synchronized (this) {
-            topMBS = bottomMBS = null;
-        }
-        objectName = null ;
-        final int cstate = getState();
-        if ((cstate == ONLINE) || ( cstate == STARTING)) {
-            stop() ;
-        }
-    }
-
-    /**
-     * Do nothing.
-     */
-    @Override
-    public void postDeregister(){
-    }
-
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/daemon/CommunicatorServerMBean.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,171 +0,0 @@
-/*
- * Copyright (c) 1999, 2007, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-package com.sun.jmx.snmp.daemon;
-
-
-
-/**
- * Defines generic behaviour for the server
- * part of a connector or an adaptor. Most connectors or adaptors extend <CODE>CommunicatorServer</CODE>
- * and inherit this behaviour. Connectors or adaptors that do not fit into this model do not extend
- * <CODE>CommunicatorServer</CODE>.
- * <p>
- * An <CODE>CommunicatorServer</CODE> is an active object, it listens for client requests
- * and processes them in its own thread. When necessary, a <CODE>CommunicatorServer</CODE>
- * creates other threads to process multiple requests concurrently.
- * <p>
- * A <CODE>CommunicatorServer</CODE> object can be stopped by calling the <CODE>stop</CODE>
- * method. When it is stopped, the <CODE>CommunicatorServer</CODE> no longer listens to client
- * requests and no longer holds any thread or communication resources.
- * It can be started again by calling the <CODE>start</CODE> method.
- * <p>
- * A <CODE>CommunicatorServer</CODE> has a <CODE>state</CODE> property which reflects its
- * activity.
- * <p>
- * <TABLE>
- * <TR><TH>CommunicatorServer</TH>            <TH>State</TH></TR>
- * <TR><TD><CODE>stopped</CODE></TD>          <TD><CODE>OFFLINE</CODE></TD></TR>
- * <TR><TD><CODE>starting</CODE></TD>         <TD><CODE>STARTING</CODE></TD></TR>
- * <TR><TD><CODE>running</CODE></TD>          <TD><CODE>ONLINE</CODE></TD></TR>
- * <TR><TD><CODE>stopping</CODE></TD>         <TD><CODE>STOPPING</CODE></TD></TR>
- * </TABLE>
- * <p>
- * The <CODE>STARTING</CODE> state marks the transition from <CODE>OFFLINE</CODE> to
- * <CODE>ONLINE</CODE>.
- * <p>
- * The <CODE>STOPPING</CODE> state marks the transition from <CODE>ONLINE</CODE> to
- * <CODE>OFFLINE</CODE>. This occurs when the <CODE>CommunicatorServer</CODE> is
- * finishing or interrupting active requests.
- * <p>
- * A <CODE>CommunicatorServer</CODE> may serve several clients concurrently. The
- * number of concurrent clients can be limited using the property
- * <CODE>maxActiveClientCount</CODE>. The default value of this property is
- * defined by the subclasses.
- * <p>
- * When a <CODE>CommunicatorServer</CODE> is unregistered from the MBeanServer,
- * it is stopped automatically.
- *
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- */
-
-public interface CommunicatorServerMBean {
-
-    /**
-     * Starts this <CODE>CommunicatorServer</CODE>.
-     * <p>
-     * Has no effect if this <CODE>CommunicatorServer</CODE> is <CODE>ONLINE</CODE> or
-     * <CODE>STOPPING</CODE>.
-     */
-    public void start() ;
-
-    /**
-     * Stops this <CODE>CommunicatorServer</CODE>.
-     * <p>
-     * Has no effect if this <CODE>CommunicatorServer</CODE> is <CODE>OFFLINE</CODE> or
-     * <CODE>STOPPING</CODE>.
-     */
-    public void stop() ;
-
-    /**
-     * Tests if the <CODE>CommunicatorServer</CODE> is active.
-     *
-     * @return True if connector is <CODE>ONLINE</CODE>; false otherwise.
-     */
-    public boolean isActive() ;
-
-    /**
-     * Waits untill either the State attribute of this MBean equals the specified <VAR>state</VAR> parameter,
-     * or the specified  <VAR>timeOut</VAR> has elapsed. The method <CODE>waitState</CODE> returns with a boolean value indicating whether
-     * the specified <VAR>state</VAR> parameter equals the value of this MBean's State attribute at the time the method terminates.
-     *
-     * Two special cases for the <VAR>timeOut</VAR> parameter value are:
-     * <UL><LI> if <VAR>timeOut</VAR> is negative then <CODE>waitState</CODE> returns immediately (i.e. does not wait at all),</LI>
-     * <LI> if <VAR>timeOut</VAR> equals zero then <CODE>waitState</CODE> waits untill the value of this MBean's State attribute
-     * is the same as the <VAR>state</VAR> parameter (i.e. will wait indefinitely if this condition is never met).</LI></UL>
-     *
-     * @param state The value of this MBean's State attribute
-     *        to wait for. <VAR>state</VAR> can be one of:
-     * <ul>
-     * <li><CODE>CommunicatorServer.OFFLINE</CODE>,</li>
-     * <li><CODE>CommunicatorServer.ONLINE</CODE>,</li>
-     * <li><CODE>CommunicatorServer.STARTING</CODE>,</li>
-     * <li><CODE>CommunicatorServer.STOPPING</CODE>.</li>
-     * </ul>
-     * @param timeOut The maximum time to wait for, in
-     *        milliseconds, if positive.
-     * Infinite time out if 0, or no waiting at all if negative.
-     *
-     * @return true if the value of this MBean's State attribute is the
-     *  same as the <VAR>state</VAR> parameter; false otherwise.
-     */
-    public boolean waitState(int state , long timeOut) ;
-
-    /**
-     * Gets the state of this <CODE>CommunicatorServer</CODE> as an integer.
-     *
-     * @return <CODE>ONLINE</CODE>, <CODE>OFFLINE</CODE>, <CODE>STARTING</CODE> or <CODE>STOPPING</CODE>.
-     */
-    public int getState() ;
-
-    /**
-     * Gets the state of this <CODE>CommunicatorServer</CODE> as a string.
-     *
-     * @return One of the strings "ONLINE", "OFFLINE", "STARTING" or "STOPPING".
-     */
-    public String getStateString() ;
-
-    /**
-     * Gets the host name used by this <CODE>CommunicatorServer</CODE>.
-     *
-     * @return The host name used by this <CODE>CommunicatorServer</CODE>.
-     */
-    public String getHost() ;
-
-    /**
-     * Gets the port number used by this <CODE>CommunicatorServer</CODE>.
-     *
-     * @return The port number used by this <CODE>CommunicatorServer</CODE>.
-     */
-    public int getPort() ;
-
-    /**
-     * Sets the port number used by this <CODE>CommunicatorServer</CODE>.
-     *
-     * @param port The port number used by this <CODE>CommunicatorServer</CODE>.
-     *
-     * @exception java.lang.IllegalStateException This method has been invoked
-     * while the communicator was ONLINE or STARTING.
-     */
-    public void setPort(int port) throws java.lang.IllegalStateException ;
-
-    /**
-     * Gets the protocol being used by this <CODE>CommunicatorServer</CODE>.
-     * @return The protocol as a string.
-     */
-    public abstract String getProtocol() ;
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/daemon/SnmpAdaptorServer.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,2746 +0,0 @@
-/*
- * Copyright (c) 1997, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-package com.sun.jmx.snmp.daemon;
-
-
-// java imports
-//
-import java.util.Vector;
-import java.util.Enumeration;
-import java.util.logging.Level;
-import java.net.DatagramSocket;
-import java.net.DatagramPacket;
-import java.net.InetAddress;
-import java.net.SocketException;
-import java.net.UnknownHostException;
-import java.io.ObjectInputStream;
-import java.io.IOException;
-import java.io.InterruptedIOException;
-
-
-// jmx imports
-//
-import javax.management.MBeanServer;
-import javax.management.MBeanRegistration;
-import javax.management.ObjectName;
-import static com.sun.jmx.defaults.JmxProperties.SNMP_ADAPTOR_LOGGER;
-import com.sun.jmx.snmp.SnmpIpAddress;
-import com.sun.jmx.snmp.SnmpMessage;
-import com.sun.jmx.snmp.SnmpOid;
-import com.sun.jmx.snmp.SnmpPduFactory;
-import com.sun.jmx.snmp.SnmpPduPacket;
-import com.sun.jmx.snmp.SnmpPduRequest;
-import com.sun.jmx.snmp.SnmpPduTrap;
-import com.sun.jmx.snmp.SnmpTimeticks;
-import com.sun.jmx.snmp.SnmpVarBind;
-import com.sun.jmx.snmp.SnmpVarBindList;
-import com.sun.jmx.snmp.SnmpDefinitions;
-import com.sun.jmx.snmp.SnmpStatusException;
-import com.sun.jmx.snmp.SnmpTooBigException;
-import com.sun.jmx.snmp.InetAddressAcl;
-import com.sun.jmx.snmp.SnmpPeer;
-import com.sun.jmx.snmp.SnmpParameters;
-// SNMP Runtime imports
-//
-import com.sun.jmx.snmp.SnmpPduFactoryBER;
-import com.sun.jmx.snmp.agent.SnmpMibAgent;
-import com.sun.jmx.snmp.agent.SnmpMibHandler;
-import com.sun.jmx.snmp.agent.SnmpUserDataFactory;
-import com.sun.jmx.snmp.agent.SnmpErrorHandlerAgent;
-
-import com.sun.jmx.snmp.IPAcl.SnmpAcl;
-
-import com.sun.jmx.snmp.tasks.ThreadService;
-
-/**
- * Implements an adaptor on top of the SNMP protocol.
- * <P>
- * When this SNMP protocol adaptor is started it creates a datagram socket
- * and is able to receive requests and send traps or inform requests.
- * When it is stopped, the socket is closed and neither requests
- * and nor traps/inform request are processed.
- * <P>
- * The default port number of the socket is 161. This default value can be
- * changed by specifying a port number:
- * <UL>
- * <LI>in the object constructor</LI>
- * <LI>using the {@link com.sun.jmx.snmp.daemon.CommunicatorServer#setPort
- *     setPort} method before starting the adaptor</LI>
- * </UL>
- * The default object name is defined by {@link
- * com.sun.jmx.snmp.ServiceName#DOMAIN com.sun.jmx.snmp.ServiceName.DOMAIN}
- * and {@link com.sun.jmx.snmp.ServiceName#SNMP_ADAPTOR_SERVER
- * com.sun.jmx.snmp.ServiceName.SNMP_ADAPTOR_SERVER}.
- * <P>
- * The SNMP protocol adaptor supports versions 1 and 2 of the SNMP protocol
- * in a stateless way: when it receives a v1 request, it replies with a v1
- * response, when it receives a v2 request it replies with a v2 response.
- * <BR>The method {@link #snmpV1Trap snmpV1Trap} sends traps using SNMP v1
- * format.
- * The method {@link #snmpV2Trap snmpV2Trap} sends traps using SNMP v2 format.
- * The method {@link #snmpInformRequest snmpInformRequest} sends inform
- * requests using SNMP v2 format.
- * <P>
- * To receive data packets, the SNMP protocol adaptor uses a buffer
- * which size can be configured using the property <CODE>bufferSize</CODE>
- * (default value is 1024).
- * Packets which do not fit into the buffer are rejected.
- * Increasing <CODE>bufferSize</CODE> allows the exchange of bigger packets.
- * However, the underlying networking system may impose a limit on the size
- * of UDP packets.
- * Packets which size exceed this limit will be rejected, no matter what
- * the value of <CODE>bufferSize</CODE> actually is.
- * <P>
- * An SNMP protocol adaptor may serve several managers concurrently. The
- * number of concurrent managers can be limited using the property
- * <CODE>maxActiveClientCount</CODE>.
- * <p>
- * The SNMP protocol adaptor specifies a default value (10) for the
- * <CODE>maxActiveClientCount</CODE> property. When the adaptor is stopped,
- * the active requests are interrupted and an error result is sent to
- * the managers.
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- */
-
-public class SnmpAdaptorServer extends CommunicatorServer
-    implements SnmpAdaptorServerMBean, MBeanRegistration, SnmpDefinitions,
-               SnmpMibHandler {
-
-    // PRIVATE VARIABLES
-    //------------------
-
-    /**
-     * Port number for sending SNMP traps.
-     * <BR>The default value is 162.
-     */
-    private int                 trapPort = 162;
-
-    /**
-     * Port number for sending SNMP inform requests.
-     * <BR>The default value is 162.
-     */
-    private int                 informPort = 162;
-
-    /**
-     * The <CODE>InetAddress</CODE> used when creating the datagram socket.
-     * <BR>It is specified when creating the SNMP protocol adaptor.
-     * If not specified, the local host machine is used.
-     */
-    InetAddress address = null;
-
-    /**
-     * The IP address based ACL used by this SNMP protocol adaptor.
-     */
-    private InetAddressAcl ipacl = null;
-
-    /**
-     * The factory object.
-     */
-    private SnmpPduFactory pduFactory = null;
-
-    /**
-     * The user-data factory object.
-     */
-    private SnmpUserDataFactory userDataFactory = null;
-
-    /**
-     * Indicates if the SNMP protocol adaptor sends a response in case
-     * of authentication failure
-     */
-    private boolean authRespEnabled = true;
-
-    /**
-     * Indicates if authentication traps are enabled.
-     */
-    private boolean authTrapEnabled = true;
-
-    /**
-     * The enterprise OID.
-     * <BR>The default value is "1.3.6.1.4.1.42".
-     */
-    private SnmpOid enterpriseOid = new SnmpOid("1.3.6.1.4.1.42");
-
-    /**
-     * The buffer size of the SNMP protocol adaptor.
-     * This buffer size is used for both incoming request and outgoing
-     * inform requests.
-     * <BR>The default value is 1024.
-     */
-    int bufferSize = 1024;
-
-    private transient long            startUpTime     = 0;
-    private transient DatagramSocket  socket          = null;
-    transient DatagramSocket          trapSocket      = null;
-    private transient SnmpSession     informSession   = null;
-    private transient DatagramPacket  packet          = null;
-    transient Vector<SnmpMibAgent>    mibs            = new Vector<>();
-    private transient SnmpMibTree     root;
-
-    /**
-     * Whether ACL must be used.
-     */
-    private transient boolean         useAcl = true;
-
-
-    // SENDING SNMP INFORMS STUFF
-    //---------------------------
-
-    /**
-     * Number of times to try an inform request before giving up.
-     * The default number is 3.
-     */
-    private int maxTries = 3 ;
-
-    /**
-     * The amount of time to wait for an inform response from the manager.
-     * The default amount of time is 3000 millisec.
-     */
-    private int timeout = 3 * 1000 ;
-
-    // VARIABLES REQUIRED FOR IMPLEMENTING SNMP GROUP (MIBII)
-    //-------------------------------------------------------
-
-    /**
-     * The <CODE>snmpOutTraps</CODE> value defined in MIB-II.
-     */
-    int snmpOutTraps=0;
-
-    /**
-     * The <CODE>snmpOutGetResponses</CODE> value defined in MIB-II.
-     */
-    private int snmpOutGetResponses=0;
-
-    /**
-     * The <CODE>snmpOutGenErrs</CODE> value defined in MIB-II.
-     */
-    private int snmpOutGenErrs=0;
-
-    /**
-     * The <CODE>snmpOutBadValues</CODE> value defined in MIB-II.
-     */
-    private int snmpOutBadValues=0;
-
-    /**
-     * The <CODE>snmpOutNoSuchNames</CODE> value defined in MIB-II.
-     */
-    private int snmpOutNoSuchNames=0;
-
-    /**
-     * The <CODE>snmpOutTooBigs</CODE> value defined in MIB-II.
-     */
-    private int snmpOutTooBigs=0;
-
-    /**
-     * The <CODE>snmpOutPkts</CODE> value defined in MIB-II.
-     */
-    int snmpOutPkts=0;
-
-    /**
-     * The <CODE>snmpInASNParseErrs</CODE> value defined in MIB-II.
-     */
-    private int snmpInASNParseErrs=0;
-
-    /**
-     * The <CODE>snmpInBadCommunityUses</CODE> value defined in MIB-II.
-     */
-    private int snmpInBadCommunityUses=0;
-
-    /**
-     * The <CODE>snmpInBadCommunityNames</CODE> value defined in MIB-II.
-     */
-    private int snmpInBadCommunityNames=0;
-
-    /**
-     * The <CODE>snmpInBadVersions</CODE> value defined in MIB-II.
-     */
-    private int snmpInBadVersions=0;
-
-    /**
-     * The <CODE>snmpInGetRequests</CODE> value defined in MIB-II.
-     */
-    private int snmpInGetRequests=0;
-
-    /**
-     * The <CODE>snmpInGetNexts</CODE> value defined in MIB-II.
-     */
-    private int snmpInGetNexts=0;
-
-    /**
-     * The <CODE>snmpInSetRequests</CODE> value defined in MIB-II.
-     */
-    private int snmpInSetRequests=0;
-
-    /**
-     * The <CODE>snmpInPkts</CODE> value defined in MIB-II.
-     */
-    private int snmpInPkts=0;
-
-    /**
-     * The <CODE>snmpInTotalReqVars</CODE> value defined in MIB-II.
-     */
-    private int snmpInTotalReqVars=0;
-
-    /**
-     * The <CODE>snmpInTotalSetVars</CODE> value defined in MIB-II.
-     */
-    private int snmpInTotalSetVars=0;
-
-    /**
-     * The <CODE>snmpInTotalSetVars</CODE> value defined in rfc 1907 MIB-II.
-     */
-    private int snmpSilentDrops=0;
-
-    private static final String InterruptSysCallMsg =
-        "Interrupted system call";
-    static final SnmpOid sysUpTimeOid = new SnmpOid("1.3.6.1.2.1.1.3.0") ;
-    static final SnmpOid snmpTrapOidOid = new SnmpOid("1.3.6.1.6.3.1.1.4.1.0");
-
-    private ThreadService threadService;
-
-    private static int threadNumber = 6;
-
-    static {
-        String s = System.getProperty("com.sun.jmx.snmp.threadnumber");
-
-        if (s != null) {
-            try {
-                threadNumber = Integer.parseInt(System.getProperty(s));
-            } catch (Exception e) {
-                SNMP_ADAPTOR_LOGGER.logp(Level.FINER,
-                        SnmpAdaptorServer.class.getName(),
-                        "<static init>",
-                        "Got wrong value for com.sun.jmx.snmp.threadnumber: " +
-                        s + ". Use the default value: " + threadNumber);
-            }
-        }
-    }
-
-    // PUBLIC CONSTRUCTORS
-    //--------------------
-
-    /**
-     * Initializes this SNMP protocol adaptor using the default port (161).
-     * Use the {@link com.sun.jmx.snmp.IPAcl.SnmpAcl} default
-     * implementation of the <CODE>InetAddressAcl</CODE> interface.
-     */
-    public SnmpAdaptorServer() {
-        this(true, null, com.sun.jmx.snmp.ServiceName.SNMP_ADAPTOR_PORT,
-             null) ;
-    }
-
-    /**
-     * Initializes this SNMP protocol adaptor using the specified port.
-     * Use the {@link com.sun.jmx.snmp.IPAcl.SnmpAcl} default
-     * implementation of the <CODE>InetAddressAcl</CODE> interface.
-     *
-     * @param port The port number for sending SNMP responses.
-     */
-    public SnmpAdaptorServer(int port) {
-        this(true, null, port, null) ;
-    }
-
-    /**
-     * Initializes this SNMP protocol adaptor using the default port (161)
-     * and the specified IP address based ACL implementation.
-     *
-     * @param acl The <CODE>InetAddressAcl</CODE> implementation.
-     *        <code>null</code> means no ACL - everybody is authorized.
-     *
-     * @since 1.5
-     */
-    public SnmpAdaptorServer(InetAddressAcl acl) {
-        this(false, acl, com.sun.jmx.snmp.ServiceName.SNMP_ADAPTOR_PORT,
-             null) ;
-    }
-
-    /**
-     * Initializes this SNMP protocol adaptor using the default port (161)
-     * and the
-     * specified <CODE>InetAddress</CODE>.
-     * Use the {@link com.sun.jmx.snmp.IPAcl.SnmpAcl} default
-     * implementation of the <CODE>InetAddressAcl</CODE> interface.
-     *
-     * @param addr The IP address to bind.
-     */
-    public SnmpAdaptorServer(InetAddress addr) {
-        this(true, null, com.sun.jmx.snmp.ServiceName.SNMP_ADAPTOR_PORT,
-             addr) ;
-    }
-
-    /**
-     * Initializes this SNMP protocol adaptor using the specified port and the
-     * specified IP address based ACL implementation.
-     *
-     * @param acl The <CODE>InetAddressAcl</CODE> implementation.
-     *        <code>null</code> means no ACL - everybody is authorized.
-     * @param port The port number for sending SNMP responses.
-     *
-     * @since 1.5
-     */
-    public SnmpAdaptorServer(InetAddressAcl acl, int port) {
-        this(false, acl, port, null) ;
-    }
-
-    /**
-     * Initializes this SNMP protocol adaptor using the specified port and the
-     * specified <CODE>InetAddress</CODE>.
-     * Use the {@link com.sun.jmx.snmp.IPAcl.SnmpAcl} default
-     * implementation of the <CODE>InetAddressAcl</CODE> interface.
-     *
-     * @param port The port number for sending SNMP responses.
-     * @param addr The IP address to bind.
-     */
-    public SnmpAdaptorServer(int port, InetAddress addr) {
-        this(true, null, port, addr) ;
-    }
-
-    /**
-     * Initializes this SNMP protocol adaptor using the specified IP
-     * address based ACL implementation and the specified
-     * <CODE>InetAddress</CODE>.
-     *
-     * @param acl The <CODE>InetAddressAcl</CODE> implementation.
-     * @param addr The IP address to bind.
-     *
-     * @since 1.5
-     */
-    public SnmpAdaptorServer(InetAddressAcl acl, InetAddress addr) {
-        this(false, acl, com.sun.jmx.snmp.ServiceName.SNMP_ADAPTOR_PORT,
-             addr) ;
-    }
-
-    /**
-     * Initializes this SNMP protocol adaptor using the specified port, the
-     * specified  address based ACL implementation and the specified
-     * <CODE>InetAddress</CODE>.
-     *
-     * @param acl The <CODE>InetAddressAcl</CODE> implementation.
-     * @param port The port number for sending SNMP responses.
-     * @param addr The IP address to bind.
-     *
-     * @since 1.5
-     */
-    public SnmpAdaptorServer(InetAddressAcl acl, int port, InetAddress addr) {
-        this(false, acl, port, addr);
-    }
-
-    /**
-     * Initializes this SNMP protocol adaptor using the specified port and the
-     * specified <CODE>InetAddress</CODE>.
-     * This constructor allows to initialize an SNMP adaptor without using
-     * the ACL mechanism (by setting the <CODE>useAcl</CODE> parameter to
-     * false).
-     * <br>This constructor must be used in particular with a platform that
-     * does not support the <CODE>java.security.acl</CODE> package like pJava.
-     *
-     * @param useAcl Specifies if this new SNMP adaptor uses the ACL mechanism.
-     * If the specified parameter is set to <CODE>true</CODE>, this
-     * constructor is equivalent to
-     * <CODE>SnmpAdaptorServer((int)port,(InetAddress)addr)</CODE>.
-     * @param port The port number for sending SNMP responses.
-     * @param addr The IP address to bind.
-     */
-    public SnmpAdaptorServer(boolean useAcl, int port, InetAddress addr) {
-        this(useAcl,null,port,addr);
-    }
-
-    // If forceAcl is `true' and InetAddressAcl is null, then a default
-    // SnmpAcl object is created.
-    //
-    private SnmpAdaptorServer(boolean forceAcl, InetAddressAcl acl,
-                              int port, InetAddress addr) {
-        super(CommunicatorServer.SNMP_TYPE) ;
-
-
-        // Initialize the ACL implementation.
-        //
-        if (acl == null && forceAcl) {
-            try {
-                acl = new SnmpAcl("SNMP protocol adaptor IP ACL");
-            } catch (UnknownHostException e) {
-                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, dbgTag,
-                        "constructor", "UnknowHostException when creating ACL",e);
-                }
-            }
-        } else {
-            this.useAcl = (acl!=null) || forceAcl;
-        }
-
-        init(acl, port, addr) ;
-    }
-
-    // GETTERS AND SETTERS
-    //--------------------
-
-    /**
-     * Gets the number of managers that have been processed by this
-     * SNMP protocol adaptor  since its creation.
-     *
-     * @return The number of managers handled by this SNMP protocol adaptor
-     * since its creation. This counter is not reset by the <CODE>stop</CODE>
-     * method.
-     */
-    @Override
-    public int getServedClientCount() {
-        return super.getServedClientCount();
-    }
-
-    /**
-     * Gets the number of managers currently being processed by this
-     * SNMP protocol adaptor.
-     *
-     * @return The number of managers currently being processed by this
-     * SNMP protocol adaptor.
-     */
-    @Override
-    public int getActiveClientCount() {
-        return super.getActiveClientCount();
-    }
-
-    /**
-     * Gets the maximum number of managers that this SNMP protocol adaptor can
-     * process concurrently.
-     *
-     * @return The maximum number of managers that this SNMP protocol adaptor
-     *         can process concurrently.
-     */
-    @Override
-    public int getMaxActiveClientCount() {
-        return super.getMaxActiveClientCount();
-    }
-
-    /**
-     * Sets the maximum number of managers this SNMP protocol adaptor can
-     * process concurrently.
-     *
-     * @param c The number of managers.
-     *
-     * @exception java.lang.IllegalStateException This method has been invoked
-     * while the communicator was <CODE>ONLINE</CODE> or <CODE>STARTING</CODE>.
-     */
-    @Override
-    public void setMaxActiveClientCount(int c)
-        throws java.lang.IllegalStateException {
-        super.setMaxActiveClientCount(c);
-    }
-
-    /**
-     * Returns the Ip address based ACL used by this SNMP protocol adaptor.
-     * @return The <CODE>InetAddressAcl</CODE> implementation.
-     *
-     * @since 1.5
-     */
-    @Override
-    public InetAddressAcl getInetAddressAcl() {
-        return ipacl;
-    }
-
-    /**
-     * Returns the port used by this SNMP protocol adaptor for sending traps.
-     * By default, port 162 is used.
-     *
-     * @return The port number for sending SNMP traps.
-     */
-    @Override
-    public Integer getTrapPort() {
-        return trapPort;
-    }
-
-    /**
-     * Sets the port used by this SNMP protocol adaptor for sending traps.
-     *
-     * @param port The port number for sending SNMP traps.
-     */
-    @Override
-    public void setTrapPort(Integer port) {
-        setTrapPort(port.intValue());
-    }
-
-    /**
-     * Sets the port used by this SNMP protocol adaptor for sending traps.
-     *
-     * @param port The port number for sending SNMP traps.
-     */
-    public void setTrapPort(int port) {
-        int val= port ;
-        if (val < 0) throw new
-            IllegalArgumentException("Trap port cannot be a negative value");
-        trapPort= val ;
-    }
-
-    /**
-     * Returns the port used by this SNMP protocol adaptor for sending
-     * inform requests. By default, port 162 is used.
-     *
-     * @return The port number for sending SNMP inform requests.
-     */
-    @Override
-    public int getInformPort() {
-        return informPort;
-    }
-
-    /**
-     * Sets the port used by this SNMP protocol adaptor for sending
-     * inform requests.
-     *
-     * @param port The port number for sending SNMP inform requests.
-     */
-    @Override
-    public void setInformPort(int port) {
-        if (port < 0)
-            throw new IllegalArgumentException("Inform request port "+
-                                               "cannot be a negative value");
-        informPort= port ;
-    }
-
-    /**
-     * Returns the protocol of this SNMP protocol adaptor.
-     *
-     * @return The string "snmp".
-     */
-    @Override
-    public String getProtocol() {
-        return "snmp";
-    }
-
-    /**
-     * Returns the buffer size of this SNMP protocol adaptor.
-     * This buffer size is used for both incoming request and outgoing
-     * inform requests.
-     * By default, buffer size 1024 is used.
-     *
-     * @return The buffer size.
-     */
-    @Override
-    public Integer getBufferSize() {
-        return bufferSize;
-    }
-
-    /**
-     * Sets the buffer size of this SNMP protocol adaptor.
-     * This buffer size is used for both incoming request and outgoing
-     * inform requests.
-     *
-     * @param s The buffer size.
-     *
-     * @exception java.lang.IllegalStateException This method has been invoked
-     * while the communicator was <CODE>ONLINE</CODE> or <CODE>STARTING</CODE>.
-     */
-    @Override
-    public void setBufferSize(Integer s)
-        throws java.lang.IllegalStateException {
-        if ((state == ONLINE) || (state == STARTING)) {
-            throw new IllegalStateException("Stop server before carrying out"+
-                                            " this operation");
-        }
-        bufferSize = s.intValue() ;
-    }
-
-    /**
-     * Gets the number of times to try sending an inform request before
-     * giving up.
-     * By default, a maximum of 3 tries is used.
-     * @return The maximun number of tries.
-     */
-    @Override
-    final public int getMaxTries() {
-        return maxTries;
-    }
-
-    /**
-     * Changes the maximun number of times to try sending an inform
-     * request before giving up.
-     * @param newMaxTries The maximun number of tries.
-     */
-    @Override
-    final public synchronized void setMaxTries(int newMaxTries) {
-        if (newMaxTries < 0)
-            throw new IllegalArgumentException();
-        maxTries = newMaxTries;
-    }
-
-    /**
-     * Gets the timeout to wait for an inform response from the manager.
-     * By default, a timeout of 3 seconds is used.
-     * @return The value of the timeout property.
-     */
-    @Override
-    final public int getTimeout() {
-        return timeout;
-    }
-
-    /**
-     * Changes the timeout to wait for an inform response from the manager.
-     * @param newTimeout The timeout (in milliseconds).
-     */
-    @Override
-    final public synchronized void setTimeout(int newTimeout) {
-        if (newTimeout < 0)
-            throw new IllegalArgumentException();
-        timeout= newTimeout;
-    }
-
-    /**
-     * Returns the message factory of this SNMP protocol adaptor.
-     *
-     * @return The factory object.
-     */
-    @Override
-    public SnmpPduFactory getPduFactory() {
-        return pduFactory ;
-    }
-
-    /**
-     * Sets the message factory of this SNMP protocol adaptor.
-     *
-     * @param factory The factory object (null means the default factory).
-     */
-    @Override
-    public void setPduFactory(SnmpPduFactory factory) {
-        if (factory == null)
-            pduFactory = new SnmpPduFactoryBER() ;
-        else
-            pduFactory = factory ;
-    }
-
-    /**
-     * Set the user-data factory of this SNMP protocol adaptor.
-     *
-     * @param factory The factory object (null means no factory).
-     * @see com.sun.jmx.snmp.agent.SnmpUserDataFactory
-     */
-    @Override
-    public void setUserDataFactory(SnmpUserDataFactory factory) {
-        userDataFactory = factory ;
-    }
-
-    /**
-     * Get the user-data factory associated with this SNMP protocol adaptor.
-     *
-     * @return The factory object (null means no factory).
-     * @see com.sun.jmx.snmp.agent.SnmpUserDataFactory
-     */
-    @Override
-    public SnmpUserDataFactory getUserDataFactory() {
-        return userDataFactory;
-    }
-
-    /**
-     * Returns <CODE>true</CODE> if authentication traps are enabled.
-     * <P>
-     * When this feature is enabled, the SNMP protocol adaptor sends
-     * an <CODE>authenticationFailure</CODE> trap each time an
-     * authentication fails.
-     * <P>
-     * The default behaviour is to send authentication traps.
-     *
-     * @return <CODE>true</CODE> if authentication traps are enabled,
-     *         <CODE>false</CODE> otherwise.
-     */
-    @Override
-    public boolean getAuthTrapEnabled() {
-        return authTrapEnabled ;
-    }
-
-    /**
-     * Sets the flag indicating if traps need to be sent in case of
-     * authentication failure.
-     *
-     * @param enabled Flag indicating if traps need to be sent.
-     */
-    @Override
-    public void setAuthTrapEnabled(boolean enabled) {
-        authTrapEnabled = enabled ;
-    }
-
-    /**
-     * Returns <code>true</code> if this SNMP protocol adaptor sends a
-     * response in case of authentication failure.
-     * <P>
-     * When this feature is enabled, the SNMP protocol adaptor sends a
-     * response with <CODE>noSuchName</CODE> or <CODE>readOnly</CODE> when
-     * the authentication failed. If the flag is disabled, the
-     * SNMP protocol adaptor trashes the PDU silently.
-     * <P>
-     * The default behavior is to send responses.
-     *
-     * @return <CODE>true</CODE> if responses are sent.
-     */
-    @Override
-    public boolean getAuthRespEnabled() {
-        return authRespEnabled ;
-    }
-
-    /**
-     * Sets the flag indicating if responses need to be sent in case of
-     * authentication failure.
-     *
-     * @param enabled Flag indicating if responses need to be sent.
-     */
-    @Override
-    public void setAuthRespEnabled(boolean enabled) {
-        authRespEnabled = enabled ;
-    }
-
-    /**
-     * Returns the enterprise OID. It is used by
-     * {@link #snmpV1Trap snmpV1Trap} to fill the 'enterprise' field of the
-     * trap request.
-     *
-     * @return The OID in string format "x.x.x.x".
-     */
-    @Override
-    public String getEnterpriseOid() {
-        return enterpriseOid.toString() ;
-    }
-
-    /**
-     * Sets the enterprise OID.
-     *
-     * @param oid The OID in string format "x.x.x.x".
-     *
-     * @exception IllegalArgumentException The string format is incorrect
-     */
-    @Override
-    public void setEnterpriseOid(String oid) throws IllegalArgumentException {
-        enterpriseOid = new SnmpOid(oid) ;
-    }
-
-    /**
-     * Returns the names of the MIBs available in this SNMP protocol adaptor.
-     *
-     * @return An array of MIB names.
-     */
-    @Override
-    public String[] getMibs() {
-        String[] result = new String[mibs.size()] ;
-        int i = 0 ;
-        for (Enumeration<SnmpMibAgent> e = mibs.elements() ; e.hasMoreElements() ;) {
-            SnmpMibAgent mib = e.nextElement() ;
-            result[i++] = mib.getMibName();
-        }
-        return result ;
-    }
-
-    // GETTERS FOR SNMP GROUP (MIBII)
-    //-------------------------------
-
-    /**
-     * Returns the <CODE>snmpOutTraps</CODE> value defined in MIB-II.
-     *
-     * @return The <CODE>snmpOutTraps</CODE> value.
-     */
-    @Override
-    public Long getSnmpOutTraps() {
-        return (long)snmpOutTraps;
-    }
-
-    /**
-     * Returns the <CODE>snmpOutGetResponses</CODE> value defined in MIB-II.
-     *
-     * @return The <CODE>snmpOutGetResponses</CODE> value.
-     */
-    @Override
-    public Long getSnmpOutGetResponses() {
-        return (long)snmpOutGetResponses;
-    }
-
-    /**
-     * Returns the <CODE>snmpOutGenErrs</CODE> value defined in MIB-II.
-     *
-     * @return The <CODE>snmpOutGenErrs</CODE> value.
-     */
-    @Override
-    public Long getSnmpOutGenErrs() {
-        return (long)snmpOutGenErrs;
-    }
-
-    /**
-     * Returns the <CODE>snmpOutBadValues</CODE> value defined in MIB-II.
-     *
-     * @return The <CODE>snmpOutBadValues</CODE> value.
-     */
-    @Override
-    public Long getSnmpOutBadValues() {
-        return (long)snmpOutBadValues;
-    }
-
-    /**
-     * Returns the <CODE>snmpOutNoSuchNames</CODE> value defined in MIB-II.
-     *
-     * @return The <CODE>snmpOutNoSuchNames</CODE> value.
-     */
-    @Override
-    public Long getSnmpOutNoSuchNames() {
-        return (long)snmpOutNoSuchNames;
-    }
-
-    /**
-     * Returns the <CODE>snmpOutTooBigs</CODE> value defined in MIB-II.
-     *
-     * @return The <CODE>snmpOutTooBigs</CODE> value.
-     */
-    @Override
-    public Long getSnmpOutTooBigs() {
-        return (long)snmpOutTooBigs;
-    }
-
-    /**
-     * Returns the <CODE>snmpInASNParseErrs</CODE> value defined in MIB-II.
-     *
-     * @return The <CODE>snmpInASNParseErrs</CODE> value.
-     */
-    @Override
-    public Long getSnmpInASNParseErrs() {
-        return (long)snmpInASNParseErrs;
-    }
-
-    /**
-     * Returns the <CODE>snmpInBadCommunityUses</CODE> value defined in MIB-II.
-     *
-     * @return The <CODE>snmpInBadCommunityUses</CODE> value.
-     */
-    @Override
-    public Long getSnmpInBadCommunityUses() {
-        return (long)snmpInBadCommunityUses;
-    }
-
-    /**
-     * Returns the <CODE>snmpInBadCommunityNames</CODE> value defined in
-     * MIB-II.
-     *
-     * @return The <CODE>snmpInBadCommunityNames</CODE> value.
-     */
-    @Override
-    public Long getSnmpInBadCommunityNames() {
-        return (long)snmpInBadCommunityNames;
-    }
-
-    /**
-     * Returns the <CODE>snmpInBadVersions</CODE> value defined in MIB-II.
-     *
-     * @return The <CODE>snmpInBadVersions</CODE> value.
-     */
-    @Override
-    public Long getSnmpInBadVersions() {
-        return (long)snmpInBadVersions;
-    }
-
-    /**
-     * Returns the <CODE>snmpOutPkts</CODE> value defined in MIB-II.
-     *
-     * @return The <CODE>snmpOutPkts</CODE> value.
-     */
-    @Override
-    public Long getSnmpOutPkts() {
-        return (long)snmpOutPkts;
-    }
-
-    /**
-     * Returns the <CODE>snmpInPkts</CODE> value defined in MIB-II.
-     *
-     * @return The <CODE>snmpInPkts</CODE> value.
-     */
-    @Override
-    public Long getSnmpInPkts() {
-        return (long)snmpInPkts;
-    }
-
-    /**
-     * Returns the <CODE>snmpInGetRequests</CODE> value defined in MIB-II.
-     *
-     * @return The <CODE>snmpInGetRequests</CODE> value.
-     */
-    @Override
-    public Long getSnmpInGetRequests() {
-        return (long)snmpInGetRequests;
-    }
-
-    /**
-     * Returns the <CODE>snmpInGetNexts</CODE> value defined in MIB-II.
-     *
-     * @return The <CODE>snmpInGetNexts</CODE> value.
-     */
-    @Override
-    public Long getSnmpInGetNexts() {
-        return (long)snmpInGetNexts;
-    }
-
-    /**
-     * Returns the <CODE>snmpInSetRequests</CODE> value defined in MIB-II.
-     *
-     * @return The <CODE>snmpInSetRequests</CODE> value.
-     */
-    @Override
-    public Long getSnmpInSetRequests() {
-        return (long)snmpInSetRequests;
-    }
-
-    /**
-     * Returns the <CODE>snmpInTotalSetVars</CODE> value defined in MIB-II.
-     *
-     * @return The <CODE>snmpInTotalSetVars</CODE> value.
-     */
-    @Override
-    public Long getSnmpInTotalSetVars() {
-        return (long)snmpInTotalSetVars;
-    }
-
-    /**
-     * Returns the <CODE>snmpInTotalReqVars</CODE> value defined in MIB-II.
-     *
-     * @return The <CODE>snmpInTotalReqVars</CODE> value.
-     */
-    @Override
-    public Long getSnmpInTotalReqVars() {
-        return (long)snmpInTotalReqVars;
-    }
-
-    /**
-     * Returns the <CODE>snmpSilentDrops</CODE> value defined in RFC
-     * 1907 NMPv2-MIB .
-     *
-     * @return The <CODE>snmpSilentDrops</CODE> value.
-     *
-     * @since 1.5
-     */
-    @Override
-    public Long getSnmpSilentDrops() {
-        return (long)snmpSilentDrops;
-    }
-
-    /**
-     * Returns the <CODE>snmpProxyDrops</CODE> value defined in RFC
-     * 1907 NMPv2-MIB .
-     *
-     * @return The <CODE>snmpProxyDrops</CODE> value.
-     *
-     * @since 1.5
-     */
-    @Override
-    public Long getSnmpProxyDrops() {
-        return 0L;
-    }
-
-
-    // PUBLIC METHODS
-    //---------------
-
-    /**
-     * Allows the MBean to perform any operations it needs before being
-     * registered in the MBean server.
-     * If the name of the SNMP protocol adaptor MBean is not specified,
-     * it is initialized with the default value:
-     * {@link com.sun.jmx.snmp.ServiceName#DOMAIN
-     *   com.sun.jmx.snmp.ServiceName.DOMAIN}:{@link
-     * com.sun.jmx.snmp.ServiceName#SNMP_ADAPTOR_SERVER
-     * com.sun.jmx.snmp.ServiceName.SNMP_ADAPTOR_SERVER}.
-     * If any exception is raised, the SNMP protocol adaptor MBean will
-     * not be registered in the MBean server.
-     *
-     * @param server The MBean server to register the service with.
-     * @param name The object name.
-     *
-     * @return The name of the SNMP protocol adaptor registered.
-     *
-     * @exception java.lang.Exception
-     */
-    @Override
-    public ObjectName preRegister(MBeanServer server, ObjectName name)
-        throws java.lang.Exception {
-
-        if (name == null) {
-            name = new ObjectName(server.getDefaultDomain() + ":" +
-                             com.sun.jmx.snmp.ServiceName.SNMP_ADAPTOR_SERVER);
-        }
-        return (super.preRegister(server, name));
-    }
-
-    /**
-     * Not used in this context.
-     */
-    @Override
-    public void postRegister (Boolean registrationDone) {
-        super.postRegister(registrationDone);
-    }
-
-    /**
-     * Not used in this context.
-     */
-    @Override
-    public void preDeregister() throws java.lang.Exception {
-        super.preDeregister();
-    }
-
-    /**
-     * Not used in this context.
-     */
-    @Override
-    public void postDeregister() {
-        super.postDeregister();
-    }
-
-    /**
-     * Adds a new MIB in the SNMP MIB handler.
-     *
-     * @param mib The MIB to add.
-     *
-     * @return A reference to the SNMP MIB handler.
-     *
-     * @exception IllegalArgumentException If the parameter is null.
-     */
-    @Override
-    public SnmpMibHandler addMib(SnmpMibAgent mib)
-        throws IllegalArgumentException {
-        if (mib == null) {
-            throw new IllegalArgumentException() ;
-        }
-
-        if(!mibs.contains(mib))
-            mibs.addElement(mib);
-
-        root.register(mib);
-
-        return this;
-    }
-
-    /**
-     * Adds a new MIB in the SNMP MIB handler.
-     * This method is to be called to set a specific agent to a specific OID.
-     * This can be useful when dealing with MIB overlapping.
-     * Some OID can be implemented in more than one MIB. In this case,
-     * the OID nearer agent will be used on SNMP operations.
-     *
-     * @param mib The MIB to add.
-     * @param oids The set of OIDs this agent implements.
-     *
-     * @return A reference to the SNMP MIB handler.
-     *
-     * @exception IllegalArgumentException If the parameter is null.
-     *
-     * @since 1.5
-     */
-    @Override
-    public SnmpMibHandler addMib(SnmpMibAgent mib, SnmpOid[] oids)
-        throws IllegalArgumentException {
-        if (mib == null) {
-            throw new IllegalArgumentException() ;
-        }
-
-        //If null oid array, just add it to the mib.
-        if(oids == null)
-            return addMib(mib);
-
-        if(!mibs.contains(mib))
-            mibs.addElement(mib);
-
-        for (int i = 0; i < oids.length; i++) {
-            root.register(mib, oids[i].longValue());
-        }
-        return this;
-    }
-
-    /**
-     * Adds a new MIB in the SNMP MIB handler. In SNMP V1 and V2 the
-     * <CODE>contextName</CODE> is useless and this method
-     * is equivalent to <CODE>addMib(SnmpMibAgent mib)</CODE>.
-     *
-     * @param mib The MIB to add.
-     * @param contextName The MIB context name.
-     * @return A reference on the SNMP MIB handler.
-     *
-     * @exception IllegalArgumentException If the parameter is null.
-     *
-     * @since 1.5
-     */
-    @Override
-    public SnmpMibHandler addMib(SnmpMibAgent mib, String contextName)
-        throws IllegalArgumentException {
-        return addMib(mib);
-    }
-
-    /**
-     * Adds a new MIB in the SNMP MIB handler. In SNMP V1 and V2 the
-     * <CODE>contextName</CODE> is useless and this method
-     * is equivalent to <CODE>addMib(SnmpMibAgent mib, SnmpOid[] oids)</CODE>.
-     *
-     * @param mib The MIB to add.
-     * @param contextName The MIB context. If null is passed, will be
-     *        registered in the default context.
-     * @param oids The set of OIDs this agent implements.
-     *
-     * @return A reference to the SNMP MIB handler.
-     *
-     * @exception IllegalArgumentException If the parameter is null.
-     *
-     * @since 1.5
-     */
-    @Override
-    public SnmpMibHandler addMib(SnmpMibAgent mib,
-                                 String contextName,
-                                 SnmpOid[] oids)
-        throws IllegalArgumentException {
-
-        return addMib(mib, oids);
-    }
-
-    /**
-     * Removes the specified MIB from the SNMP protocol adaptor.
-     * In SNMP V1 and V2 the <CODE>contextName</CODE> is useless and this
-     * method is equivalent to <CODE>removeMib(SnmpMibAgent mib)</CODE>.
-     *
-     * @param mib The MIB to be removed.
-     * @param contextName The context name used at registration time.
-     *
-     * @return <CODE>true</CODE> if the specified <CODE>mib</CODE> was
-     * a MIB included in the SNMP MIB handler, <CODE>false</CODE>
-     * otherwise.
-     *
-     * @since 1.5
-     */
-    @Override
-    public boolean removeMib(SnmpMibAgent mib, String contextName) {
-        return removeMib(mib);
-    }
-
-    /**
-     * Removes the specified MIB from the SNMP protocol adaptor.
-     *
-     * @param mib The MIB to be removed.
-     *
-     * @return <CODE>true</CODE> if the specified <CODE>mib</CODE> was a MIB
-     *         included in the SNMP MIB handler, <CODE>false</CODE> otherwise.
-     */
-    @Override
-    public boolean removeMib(SnmpMibAgent mib) {
-        root.unregister(mib);
-        return (mibs.removeElement(mib)) ;
-    }
-
-    /**
-     * Removes the specified MIB from the SNMP protocol adaptor.
-     *
-     * @param mib The MIB to be removed.
-     * @param oids The oid the MIB was previously registered for.
-     * @return <CODE>true</CODE> if the specified <CODE>mib</CODE> was
-     * a MIB included in the SNMP MIB handler, <CODE>false</CODE>
-     * otherwise.
-     *
-     * @since 1.5
-     */
-    @Override
-    public boolean removeMib(SnmpMibAgent mib, SnmpOid[] oids) {
-        root.unregister(mib, oids);
-        return (mibs.removeElement(mib)) ;
-    }
-
-     /**
-     * Removes the specified MIB from the SNMP protocol adaptor.
-     *
-     * @param mib The MIB to be removed.
-     * @param contextName The context name used at registration time.
-     * @param oids The oid the MIB was previously registered for.
-     * @return <CODE>true</CODE> if the specified <CODE>mib</CODE> was
-     * a MIB included in the SNMP MIB handler, <CODE>false</CODE>
-     * otherwise.
-     *
-     * @since 1.5
-     */
-    @Override
-    public boolean removeMib(SnmpMibAgent mib,
-                             String contextName,
-                             SnmpOid[] oids) {
-        return removeMib(mib, oids);
-    }
-
-    // SUBCLASSING OF COMMUNICATOR SERVER
-    //-----------------------------------
-
-    /**
-     * Creates the datagram socket.
-     */
-    @Override
-    protected void doBind()
-        throws CommunicationException, InterruptedException {
-
-        try {
-            synchronized (this) {
-                socket = new DatagramSocket(port, address) ;
-            }
-            dbgTag = makeDebugTag();
-        } catch (SocketException e) {
-            if (e.getMessage().equals(InterruptSysCallMsg))
-                throw new InterruptedException(e.toString()) ;
-            else {
-                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, dbgTag,
-                        "doBind", "cannot bind on port " + port);
-                }
-                throw new CommunicationException(e) ;
-            }
-        }
-    }
-
-    /**
-     * Return the actual port to which the adaptor is bound.
-     * Can be different from the port given at construction time if
-     * that port number was 0.
-     * @return the actual port to which the adaptor is bound.
-     **/
-    @Override
-    public int getPort() {
-        synchronized (this) {
-            if (socket != null) return socket.getLocalPort();
-        }
-        return super.getPort();
-    }
-
-    /**
-     * Closes the datagram socket.
-     */
-    @Override
-    protected void doUnbind()
-        throws CommunicationException, InterruptedException {
-        if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-            SNMP_ADAPTOR_LOGGER.logp(Level.FINER, dbgTag,
-                "doUnbind","Finally close the socket");
-        }
-        synchronized (this) {
-            if (socket != null) {
-                socket.close() ;
-                socket = null ;
-                // Important to inform finalize() that the socket is closed...
-            }
-        }
-        closeTrapSocketIfNeeded() ;
-        closeInformSocketIfNeeded() ;
-    }
-
-    private void createSnmpRequestHandler(SnmpAdaptorServer server,
-                                          int id,
-                                          DatagramSocket s,
-                                          DatagramPacket p,
-                                          SnmpMibTree tree,
-                                          Vector<SnmpMibAgent> m,
-                                          InetAddressAcl a,
-                                          SnmpPduFactory factory,
-                                          SnmpUserDataFactory dataFactory,
-                                          MBeanServer f,
-                                          ObjectName n) {
-        final SnmpRequestHandler handler =
-            new SnmpRequestHandler(this, id, s, p, tree, m, a, factory,
-                                   dataFactory, f, n);
-        threadService.submitTask(handler);
-    }
-
-    /**
-     * Reads a packet from the datagram socket and creates a request
-     * handler which decodes and processes the request.
-     */
-    @Override
-    protected void doReceive()
-        throws CommunicationException, InterruptedException {
-
-        // Let's wait for something to be received.
-        //
-        try {
-            packet = new DatagramPacket(new byte[bufferSize], bufferSize) ;
-            socket.receive(packet);
-            int state = getState();
-
-            if(state != ONLINE) {
-                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-                    SNMP_ADAPTOR_LOGGER.logp(Level.FINER, dbgTag,
-                        "doReceive","received a message but state not online, returning.");
-                }
-                return;
-            }
-
-            createSnmpRequestHandler(this, servedClientCount, socket,
-                                     packet, root, mibs, ipacl, pduFactory,
-                                     userDataFactory, topMBS, objectName);
-        } catch (SocketException e) {
-            // Let's check if we have been interrupted by stop().
-            //
-            if (e.getMessage().equals(InterruptSysCallMsg))
-                throw new InterruptedException(e.toString()) ;
-            else
-                throw new CommunicationException(e) ;
-        } catch (InterruptedIOException e) {
-            throw new InterruptedException(e.toString()) ;
-        } catch (CommunicationException e) {
-            throw e ;
-        } catch (Exception e) {
-            throw new CommunicationException(e) ;
-        }
-        if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-            SNMP_ADAPTOR_LOGGER.logp(Level.FINER, dbgTag,
-                "doReceive", "received a message");
-        }
-    }
-
-    @Override
-    protected void doError(Exception e) throws CommunicationException {
-    }
-
-    /**
-     * Not used in this context.
-     */
-    @Override
-    protected void doProcess()
-        throws CommunicationException, InterruptedException {
-    }
-
-
-    /**
-     * The number of times the communicator server will attempt
-     * to bind before giving up.
-     * We attempt only once...
-     * @return 1
-     **/
-    @Override
-    protected int getBindTries() {
-        return 1;
-    }
-
-    /**
-     * Stops this SNMP protocol adaptor.
-     * Closes the datagram socket.
-     * <p>
-     * Has no effect if this SNMP protocol adaptor is <CODE>OFFLINE</CODE> or
-     * <CODE>STOPPING</CODE>.
-     */
-    @Override
-    public void stop(){
-
-        final int port = getPort();
-        if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-            SNMP_ADAPTOR_LOGGER.logp(Level.FINER, dbgTag,
-                "stop", "Stopping: using port " + port);
-        }
-        if ((state == ONLINE) || (state == STARTING)){
-            super.stop();
-            try {
-                DatagramSocket sn = new DatagramSocket(0);
-                try {
-                    byte[] ob = new byte[1];
-
-                    DatagramPacket pk;
-                    if (address != null)
-                        pk = new DatagramPacket(ob , 1, address, port);
-                    else
-                        pk = new DatagramPacket(ob , 1,
-                                 java.net.InetAddress.getLocalHost(), port);
-
-                    if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-                        SNMP_ADAPTOR_LOGGER.logp(Level.FINER, dbgTag,
-                            "stop", "Sending: using port " + port);
-                    }
-                    sn.send(pk);
-                } finally {
-                    sn.close();
-                }
-            } catch (Throwable e){
-                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, dbgTag,
-                        "stop", "Got unexpected Throwable", e);
-                }
-            }
-        }
-    }
-
-    // SENDING SNMP TRAPS STUFF
-    //-------------------------
-
-    /**
-     * Sends a trap using SNMP V1 trap format.
-     * <BR>The trap is sent to each destination defined in the ACL file
-     * (if available).
-     * If no ACL file or no destinations are available, the trap is sent
-     * to the local host.
-     *
-     * @param generic The generic number of the trap.
-     * @param specific The specific number of the trap.
-     * @param varBindList A list of <CODE>SnmpVarBind</CODE> instances or null.
-     *
-     * @exception IOException An I/O error occurred while sending the trap.
-     * @exception SnmpStatusException If the trap exceeds the limit defined
-     *            by <CODE>bufferSize</CODE>.
-     */
-    @Override
-    public void snmpV1Trap(int generic, int specific,
-                           SnmpVarBindList varBindList)
-        throws IOException, SnmpStatusException {
-
-        if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-            SNMP_ADAPTOR_LOGGER.logp(Level.FINER, dbgTag,
-                "snmpV1Trap", "generic=" + generic +
-                  ", specific=" + specific);
-        }
-
-        // First, make an SNMP V1 trap pdu
-        //
-        SnmpPduTrap pdu = new SnmpPduTrap() ;
-        pdu.address = null ;
-        pdu.port = trapPort ;
-        pdu.type = pduV1TrapPdu ;
-        pdu.version = snmpVersionOne ;
-        pdu.community = null ;
-        pdu.enterprise = enterpriseOid ;
-        pdu.genericTrap = generic ;
-        pdu.specificTrap = specific ;
-        pdu.timeStamp = getSysUpTime();
-
-        if (varBindList != null) {
-            pdu.varBindList = new SnmpVarBind[varBindList.size()] ;
-            varBindList.copyInto(pdu.varBindList);
-        }
-        else
-            pdu.varBindList = null ;
-
-        // If the local host cannot be determined, we put 0.0.0.0 in agentAddr
-        try {
-            if (address != null)
-                pdu.agentAddr = handleMultipleIpVersion(address.getAddress());
-            else pdu.agentAddr =
-              handleMultipleIpVersion(InetAddress.getLocalHost().getAddress());
-        } catch (UnknownHostException e) {
-            byte[] zeroedAddr = new byte[4];
-            pdu.agentAddr = handleMultipleIpVersion(zeroedAddr) ;
-        }
-
-        // Next, send the pdu to all destinations defined in ACL
-        //
-        sendTrapPdu(pdu) ;
-    }
-
-    private SnmpIpAddress handleMultipleIpVersion(byte[] address) {
-        if(address.length == 4)
-          return new SnmpIpAddress(address);
-        else {
-            if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, dbgTag,
-                    "handleMultipleIPVersion",
-                      "Not an IPv4 address, return null");
-            }
-            return null;
-        }
-    }
-
-    /**
-     * Sends a trap using SNMP V1 trap format.
-     * <BR>The trap is sent to the specified <CODE>InetAddress</CODE>
-     * destination using the specified community string (and the ACL file
-     * is not used).
-     *
-     * @param addr The <CODE>InetAddress</CODE> destination of the trap.
-     * @param cs The community string to be used for the trap.
-     * @param generic The generic number of the trap.
-     * @param specific The specific number of the trap.
-     * @param varBindList A list of <CODE>SnmpVarBind</CODE> instances or null.
-     *
-     * @exception IOException An I/O error occurred while sending the trap.
-     * @exception SnmpStatusException If the trap exceeds the limit defined
-     *            by <CODE>bufferSize</CODE>.
-     */
-    @Override
-    public void snmpV1Trap(InetAddress addr, String cs, int generic,
-                           int specific, SnmpVarBindList varBindList)
-        throws IOException, SnmpStatusException {
-
-        if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-            SNMP_ADAPTOR_LOGGER.logp(Level.FINER, dbgTag,
-                "snmpV1Trap", "generic=" + generic + ", specific=" +
-                  specific);
-        }
-
-        // First, make an SNMP V1 trap pdu
-        //
-        SnmpPduTrap pdu = new SnmpPduTrap() ;
-        pdu.address = null ;
-        pdu.port = trapPort ;
-        pdu.type = pduV1TrapPdu ;
-        pdu.version = snmpVersionOne ;
-
-        if(cs != null)
-            pdu.community = cs.getBytes();
-        else
-            pdu.community = null ;
-
-        pdu.enterprise = enterpriseOid ;
-        pdu.genericTrap = generic ;
-        pdu.specificTrap = specific ;
-        pdu.timeStamp = getSysUpTime();
-
-        if (varBindList != null) {
-            pdu.varBindList = new SnmpVarBind[varBindList.size()] ;
-            varBindList.copyInto(pdu.varBindList);
-        }
-        else
-            pdu.varBindList = null ;
-
-        // If the local host cannot be determined, we put 0.0.0.0 in agentAddr
-        try {
-            if (address != null)
-                pdu.agentAddr = handleMultipleIpVersion(address.getAddress());
-            else pdu.agentAddr =
-              handleMultipleIpVersion(InetAddress.getLocalHost().getAddress());
-        } catch (UnknownHostException e) {
-            byte[] zeroedAddr = new byte[4];
-            pdu.agentAddr = handleMultipleIpVersion(zeroedAddr) ;
-        }
-
-        // Next, send the pdu to the specified destination
-        //
-        if(addr != null)
-            sendTrapPdu(addr, pdu) ;
-        else
-            sendTrapPdu(pdu);
-    }
-
-    /**
-     * Sends a trap using SNMP V1 trap format.
-     * <BR>The trap is sent to the specified <CODE>InetAddress</CODE>
-     * destination using the specified parameters (and the ACL file is not
-     * used).
-     * Note that if the specified <CODE>InetAddress</CODE> destination is null,
-     * then the ACL file mechanism is used.
-     *
-     * @param addr The <CODE>InetAddress</CODE> destination of the trap.
-     * @param agentAddr The agent address to be used for the trap.
-     * @param cs The community string to be used for the trap.
-     * @param enterpOid The enterprise OID to be used for the trap.
-     * @param generic The generic number of the trap.
-     * @param specific The specific number of the trap.
-     * @param varBindList A list of <CODE>SnmpVarBind</CODE> instances or null.
-     * @param time The time stamp (overwrite the current time).
-     *
-     * @exception IOException An I/O error occurred while sending the trap.
-     * @exception SnmpStatusException If the trap exceeds the limit defined
-     *            by <CODE>bufferSize</CODE>.
-     *
-     * @since 1.5
-     */
-    public void snmpV1Trap(InetAddress addr,
-                           SnmpIpAddress agentAddr,
-                           String cs,
-                           SnmpOid enterpOid,
-                           int generic,
-                           int specific,
-                           SnmpVarBindList varBindList,
-                           SnmpTimeticks time)
-        throws IOException, SnmpStatusException {
-        snmpV1Trap(addr,
-                   trapPort,
-                   agentAddr,
-                   cs,
-                   enterpOid,
-                   generic,
-                   specific,
-                   varBindList,
-                   time);
-    }
-
-    /**
-     * Sends a trap using SNMP V1 trap format.
-     * <BR>The trap is sent to the specified <CODE>SnmpPeer</CODE> destination.
-     * The community string used is the one located in the
-     * <CODE>SnmpPeer</CODE> parameters
-     * (<CODE>SnmpParameters.getRdCommunity() </CODE>).
-     *
-     * @param peer The <CODE>SnmpPeer</CODE> destination of the trap.
-     * @param agentAddr The agent address to be used for the trap.
-     * @param enterpOid The enterprise OID to be used for the trap.
-     * @param generic The generic number of the trap.
-     * @param specific The specific number of the trap.
-     * @param varBindList A list of <CODE>SnmpVarBind</CODE> instances or null.
-     * @param time The time stamp (overwrite the current time).
-     *
-     * @exception IOException An I/O error occurred while sending the trap.
-     * @exception SnmpStatusException If the trap exceeds the limit
-     * defined by <CODE>bufferSize</CODE>.
-     *
-     * @since 1.5
-     */
-    @Override
-    public void snmpV1Trap(SnmpPeer peer,
-                           SnmpIpAddress agentAddr,
-                           SnmpOid enterpOid,
-                           int generic,
-                           int specific,
-                           SnmpVarBindList varBindList,
-                           SnmpTimeticks time)
-        throws IOException, SnmpStatusException {
-
-        SnmpParameters p = (SnmpParameters) peer.getParams();
-        snmpV1Trap(peer.getDestAddr(),
-                   peer.getDestPort(),
-                   agentAddr,
-                   p.getRdCommunity(),
-                   enterpOid,
-                   generic,
-                   specific,
-                   varBindList,
-                   time);
-    }
-
-    private void snmpV1Trap(InetAddress addr,
-                            int port,
-                            SnmpIpAddress agentAddr,
-                            String cs,
-                            SnmpOid enterpOid,
-                            int generic,
-                            int specific,
-                            SnmpVarBindList varBindList,
-                            SnmpTimeticks time)
-        throws IOException, SnmpStatusException {
-
-        if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-            SNMP_ADAPTOR_LOGGER.logp(Level.FINER, dbgTag,
-                "snmpV1Trap", "generic=" + generic + ", specific=" +
-                  specific);
-        }
-
-        // First, make an SNMP V1 trap pdu
-        //
-        SnmpPduTrap pdu = new SnmpPduTrap() ;
-        pdu.address = null ;
-        pdu.port = port ;
-        pdu.type = pduV1TrapPdu ;
-        pdu.version = snmpVersionOne ;
-
-        //Diff start
-        if(cs != null)
-            pdu.community = cs.getBytes();
-        else
-            pdu.community = null ;
-        //Diff end
-
-        // Diff start
-        if(enterpOid != null)
-            pdu.enterprise = enterpOid;
-        else
-            pdu.enterprise = enterpriseOid ;
-        //Diff end
-        pdu.genericTrap = generic ;
-        pdu.specificTrap = specific ;
-        //Diff start
-        if(time != null)
-            pdu.timeStamp = time.longValue();
-        else
-            pdu.timeStamp = getSysUpTime();
-        //Diff end
-
-        if (varBindList != null) {
-            pdu.varBindList = new SnmpVarBind[varBindList.size()] ;
-            varBindList.copyInto(pdu.varBindList);
-        }
-        else
-            pdu.varBindList = null ;
-
-        if (agentAddr == null) {
-            // If the local host cannot be determined,
-            // we put 0.0.0.0 in agentAddr
-            try {
-                final InetAddress inetAddr =
-                    (address!=null)?address:InetAddress.getLocalHost();
-                agentAddr = handleMultipleIpVersion(inetAddr.getAddress());
-            }  catch (UnknownHostException e) {
-                byte[] zeroedAddr = new byte[4];
-                agentAddr = handleMultipleIpVersion(zeroedAddr);
-            }
-        }
-
-        pdu.agentAddr = agentAddr;
-
-        // Next, send the pdu to the specified destination
-        //
-        // Diff start
-        if(addr != null)
-            sendTrapPdu(addr, pdu) ;
-        else
-            sendTrapPdu(pdu);
-
-        //End diff
-    }
-
-    /**
-     * Sends a trap using SNMP V2 trap format.
-     * <BR>The trap is sent to the specified <CODE>SnmpPeer</CODE> destination.
-     * <BR>The community string used is the one located in the
-     * <CODE>SnmpPeer</CODE> parameters
-     * (<CODE>SnmpParameters.getRdCommunity() </CODE>).
-     * <BR>The variable list included in the outgoing trap is composed of
-     * the following items:
-     * <UL>
-     * <LI><CODE>sysUpTime.0</CODE> with the value specified by
-     *     <CODE>time</CODE></LI>
-     * <LI><CODE>snmpTrapOid.0</CODE> with the value specified by
-     *     <CODE>trapOid</CODE></LI>
-     * <LI><CODE>all the (oid,values)</CODE> from the specified
-     *     <CODE>varBindList</CODE></LI>
-     * </UL>
-     *
-     * @param peer The <CODE>SnmpPeer</CODE> destination of the trap.
-     * @param trapOid The OID identifying the trap.
-     * @param varBindList A list of <CODE>SnmpVarBind</CODE> instances or null.
-     * @param time The time stamp (overwrite the current time).
-     *
-     * @exception IOException An I/O error occurred while sending the trap.
-     * @exception SnmpStatusException If the trap exceeds the limit
-     * defined by <CODE>bufferSize</CODE>.
-     *
-     * @since 1.5
-     */
-    @Override
-    public void snmpV2Trap(SnmpPeer peer,
-                           SnmpOid trapOid,
-                           SnmpVarBindList varBindList,
-                           SnmpTimeticks time)
-        throws IOException, SnmpStatusException {
-
-        SnmpParameters p = (SnmpParameters) peer.getParams();
-        snmpV2Trap(peer.getDestAddr(),
-                   peer.getDestPort(),
-                   p.getRdCommunity(),
-                   trapOid,
-                   varBindList,
-                   time);
-    }
-
-    /**
-     * Sends a trap using SNMP V2 trap format.
-     * <BR>The trap is sent to each destination defined in the ACL file
-     * (if available). If no ACL file or no destinations are available,
-     * the trap is sent to the local host.
-     * <BR>The variable list included in the outgoing trap is composed of
-     * the following items:
-     * <UL>
-     * <LI><CODE>sysUpTime.0</CODE> with its current value</LI>
-     * <LI><CODE>snmpTrapOid.0</CODE> with the value specified by
-     *     <CODE>trapOid</CODE></LI>
-     * <LI><CODE>all the (oid,values)</CODE> from the specified
-     *     <CODE>varBindList</CODE></LI>
-     * </UL>
-     *
-     * @param trapOid The OID identifying the trap.
-     * @param varBindList A list of <CODE>SnmpVarBind</CODE> instances or null.
-     *
-     * @exception IOException An I/O error occurred while sending the trap.
-     * @exception SnmpStatusException If the trap exceeds the limit defined
-     *            by <CODE>bufferSize</CODE>.
-     */
-    @Override
-    public void snmpV2Trap(SnmpOid trapOid, SnmpVarBindList varBindList)
-        throws IOException, SnmpStatusException {
-
-        if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-            SNMP_ADAPTOR_LOGGER.logp(Level.FINER, dbgTag,
-                "snmpV2Trap", "trapOid=" + trapOid);
-        }
-
-        // First, make an SNMP V2 trap pdu
-        // We clone varBindList and insert sysUpTime and snmpTrapOid
-        //
-        SnmpPduRequest pdu = new SnmpPduRequest() ;
-        pdu.address = null ;
-        pdu.port = trapPort ;
-        pdu.type = pduV2TrapPdu ;
-        pdu.version = snmpVersionTwo ;
-        pdu.community = null ;
-
-        SnmpVarBindList fullVbl ;
-        if (varBindList != null)
-            fullVbl = varBindList.clone() ;
-        else
-            fullVbl = new SnmpVarBindList(2) ;
-        SnmpTimeticks sysUpTimeValue = new SnmpTimeticks(getSysUpTime()) ;
-        fullVbl.insertElementAt(new SnmpVarBind(snmpTrapOidOid, trapOid), 0) ;
-        fullVbl.insertElementAt(new SnmpVarBind(sysUpTimeOid, sysUpTimeValue),
-                                0);
-        pdu.varBindList = new SnmpVarBind[fullVbl.size()] ;
-        fullVbl.copyInto(pdu.varBindList) ;
-
-        // Next, send the pdu to all destinations defined in ACL
-        //
-        sendTrapPdu(pdu) ;
-    }
-
-    /**
-     * Sends a trap using SNMP V2 trap format.
-     * <BR>The trap is sent to the specified <CODE>InetAddress</CODE>
-     * destination using the specified community string (and the ACL file
-     * is not used).
-     * <BR>The variable list included in the outgoing trap is composed of
-     * the following items:
-     * <UL>
-     * <LI><CODE>sysUpTime.0</CODE> with its current value</LI>
-     * <LI><CODE>snmpTrapOid.0</CODE> with the value specified by
-     *     <CODE>trapOid</CODE></LI>
-     * <LI><CODE>all the (oid,values)</CODE> from the specified
-     *     <CODE>varBindList</CODE></LI>
-     * </UL>
-     *
-     * @param addr The <CODE>InetAddress</CODE> destination of the trap.
-     * @param cs The community string to be used for the trap.
-     * @param trapOid The OID identifying the trap.
-     * @param varBindList A list of <CODE>SnmpVarBind</CODE> instances or null.
-     *
-     * @exception IOException An I/O error occurred while sending the trap.
-     * @exception SnmpStatusException If the trap exceeds the limit
-     *            defined by <CODE>bufferSize</CODE>.
-     */
-    @Override
-    public void snmpV2Trap(InetAddress addr, String cs, SnmpOid trapOid,
-                           SnmpVarBindList varBindList)
-        throws IOException, SnmpStatusException {
-
-        if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-            SNMP_ADAPTOR_LOGGER.logp(Level.FINER, dbgTag,
-                "snmpV2Trap", "trapOid=" + trapOid);
-        }
-
-        // First, make an SNMP V2 trap pdu
-        // We clone varBindList and insert sysUpTime and snmpTrapOid
-        //
-        SnmpPduRequest pdu = new SnmpPduRequest() ;
-        pdu.address = null ;
-        pdu.port = trapPort ;
-        pdu.type = pduV2TrapPdu ;
-        pdu.version = snmpVersionTwo ;
-
-        if(cs != null)
-            pdu.community = cs.getBytes();
-        else
-            pdu.community = null;
-
-        SnmpVarBindList fullVbl ;
-        if (varBindList != null)
-            fullVbl = varBindList.clone() ;
-        else
-            fullVbl = new SnmpVarBindList(2) ;
-        SnmpTimeticks sysUpTimeValue = new SnmpTimeticks(getSysUpTime()) ;
-        fullVbl.insertElementAt(new SnmpVarBind(snmpTrapOidOid, trapOid), 0) ;
-        fullVbl.insertElementAt(new SnmpVarBind(sysUpTimeOid, sysUpTimeValue),
-                                0);
-        pdu.varBindList = new SnmpVarBind[fullVbl.size()] ;
-        fullVbl.copyInto(pdu.varBindList) ;
-
-        // Next, send the pdu to the specified destination
-        //
-        if(addr != null)
-            sendTrapPdu(addr, pdu);
-        else
-            sendTrapPdu(pdu);
-    }
-
-    /**
-     * Sends a trap using SNMP V2 trap format.
-     * <BR>The trap is sent to the specified <CODE>InetAddress</CODE>
-     * destination using the specified parameters (and the ACL file is not
-     * used).
-     * Note that if the specified <CODE>InetAddress</CODE> destination is null,
-     * then the ACL file mechanism is used.
-     * <BR>The variable list included in the outgoing trap is composed of the
-     * following items:
-     * <UL>
-     * <LI><CODE>sysUpTime.0</CODE> with the value specified by
-     *     <CODE>time</CODE></LI>
-     * <LI><CODE>snmpTrapOid.0</CODE> with the value specified by
-     *     <CODE>trapOid</CODE></LI>
-     * <LI><CODE>all the (oid,values)</CODE> from the specified
-     *     <CODE>varBindList</CODE></LI>
-     * </UL>
-     *
-     * @param addr The <CODE>InetAddress</CODE> destination of the trap.
-     * @param cs The community string to be used for the trap.
-     * @param trapOid The OID identifying the trap.
-     * @param varBindList A list of <CODE>SnmpVarBind</CODE> instances or null.
-     * @param time The time stamp (overwrite the current time).
-     *
-     * @exception IOException An I/O error occurred while sending the trap.
-     * @exception SnmpStatusException If the trap exceeds the limit
-     * defined by <CODE>bufferSize</CODE>.
-     *
-     * @since 1.5
-     */
-    public void snmpV2Trap(InetAddress addr,
-                           String cs,
-                           SnmpOid trapOid,
-                           SnmpVarBindList varBindList,
-                           SnmpTimeticks time)
-        throws IOException, SnmpStatusException {
-
-        snmpV2Trap(addr,
-                   trapPort,
-                   cs,
-                   trapOid,
-                   varBindList,
-                   time);
-    }
-
-    private void snmpV2Trap(InetAddress addr,
-                            int port,
-                            String cs,
-                            SnmpOid trapOid,
-                            SnmpVarBindList varBindList,
-                            SnmpTimeticks time)
-        throws IOException, SnmpStatusException {
-
-        if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-            final StringBuilder strb = new StringBuilder()
-                .append("trapOid=").append(trapOid)
-                .append("\ncommunity=").append(cs)
-                .append("\naddr=").append(addr)
-                .append("\nvarBindList=").append(varBindList)
-                .append("\ntime=").append(time)
-                .append("\ntrapPort=").append(port);
-            SNMP_ADAPTOR_LOGGER.logp(Level.FINER, dbgTag,
-                "snmpV2Trap", strb.toString());
-        }
-
-        // First, make an SNMP V2 trap pdu
-        // We clone varBindList and insert sysUpTime and snmpTrapOid
-        //
-        SnmpPduRequest pdu = new SnmpPduRequest() ;
-        pdu.address = null ;
-        pdu.port = port ;
-        pdu.type = pduV2TrapPdu ;
-        pdu.version = snmpVersionTwo ;
-
-        if(cs != null)
-            pdu.community = cs.getBytes();
-        else
-            pdu.community = null;
-
-        SnmpVarBindList fullVbl ;
-        if (varBindList != null)
-            fullVbl = varBindList.clone() ;
-        else
-            fullVbl = new SnmpVarBindList(2) ;
-
-        // Only difference with other
-        SnmpTimeticks sysUpTimeValue;
-        if(time != null)
-            sysUpTimeValue = time;
-        else
-            sysUpTimeValue = new SnmpTimeticks(getSysUpTime()) ;
-        //End of diff
-
-        fullVbl.insertElementAt(new SnmpVarBind(snmpTrapOidOid, trapOid), 0) ;
-        fullVbl.insertElementAt(new SnmpVarBind(sysUpTimeOid, sysUpTimeValue),
-                                0);
-        pdu.varBindList = new SnmpVarBind[fullVbl.size()] ;
-        fullVbl.copyInto(pdu.varBindList) ;
-
-        // Next, send the pdu to the specified destination
-        //
-        // Diff start
-        if(addr != null)
-            sendTrapPdu(addr, pdu) ;
-        else
-            sendTrapPdu(pdu);
-        //End diff
-    }
-
-    /**
-     * Send the specified trap PDU to the passed <CODE>InetAddress</CODE>.
-     * @param address The destination address.
-     * @param pdu The pdu to send.
-     * @exception IOException An I/O error occurred while sending the trap.
-     * @exception SnmpStatusException If the trap exceeds the limit
-     * defined by <CODE>bufferSize</CODE>.
-     *
-     * @since 1.5
-     */
-    @Override
-    public void snmpPduTrap(InetAddress address, SnmpPduPacket pdu)
-            throws IOException, SnmpStatusException {
-
-        if(address != null)
-            sendTrapPdu(address, pdu);
-        else
-            sendTrapPdu(pdu);
-    }
-
-    /**
-     * Send the specified trap PDU to the passed <CODE>SnmpPeer</CODE>.
-     * @param peer The destination peer. The Read community string is used of
-     * <CODE>SnmpParameters</CODE> is used as the trap community string.
-     * @param pdu The pdu to send.
-     * @exception IOException An I/O error occurred while sending the trap.
-     * @exception SnmpStatusException If the trap exceeds the limit defined
-     * by <CODE>bufferSize</CODE>.
-     * @since 1.5
-     */
-    @Override
-    public void snmpPduTrap(SnmpPeer peer,
-                            SnmpPduPacket pdu)
-        throws IOException, SnmpStatusException {
-        if(peer != null) {
-            pdu.port = peer.getDestPort();
-            sendTrapPdu(peer.getDestAddr(), pdu);
-        }
-        else {
-            pdu.port = getTrapPort().intValue();
-            sendTrapPdu(pdu);
-        }
-    }
-
-    /**
-     * Send the specified trap PDU to every destinations from the ACL file.
-     */
-    private void sendTrapPdu(SnmpPduPacket pdu)
-     throws SnmpStatusException, IOException {
-
-        // Make an SNMP message from the pdu
-        //
-        SnmpMessage msg = null ;
-        try {
-            msg = (SnmpMessage)pduFactory.encodeSnmpPdu(pdu, bufferSize) ;
-            if (msg == null) {
-                throw new SnmpStatusException(
-                          SnmpDefinitions.snmpRspAuthorizationError) ;
-            }
-        }
-        catch (SnmpTooBigException x) {
-            if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, dbgTag,
-                    "sendTrapPdu", "Trap pdu is too big. " +
-                     "Trap hasn't been sent to anyone" );
-            }
-            throw new SnmpStatusException(SnmpDefinitions.snmpRspTooBig) ;
-            // FIXME: is the right exception to throw ?
-            // We could simply forward SnmpTooBigException ?
-        }
-
-        // Now send the SNMP message to each destination
-        //
-        int sendingCount = 0 ;
-        openTrapSocketIfNeeded() ;
-        if (ipacl != null) {
-            Enumeration<InetAddress> ed = ipacl.getTrapDestinations() ;
-            while (ed.hasMoreElements()) {
-                msg.address = ed.nextElement() ;
-                Enumeration<String> ec = ipacl.getTrapCommunities(msg.address) ;
-                while (ec.hasMoreElements()) {
-                    msg.community = ec.nextElement().getBytes() ;
-                    try {
-                        sendTrapMessage(msg) ;
-                        sendingCount++ ;
-                    }
-                    catch (SnmpTooBigException x) {
-                        if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                            SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, dbgTag,
-                                "sendTrapPdu", "Trap pdu is too big. " +
-                                 "Trap hasn't been sent to "+msg.address);
-                        }
-                    }
-                }
-            }
-        }
-
-        // If there is no destination defined or if everything has failed
-        // we tried to send the trap to the local host (as suggested by
-        // mister Olivier Reisacher).
-        //
-        if (sendingCount == 0) {
-            try {
-                msg.address = InetAddress.getLocalHost() ;
-                sendTrapMessage(msg) ;
-            } catch (SnmpTooBigException x) {
-                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, dbgTag,
-                        "sendTrapPdu", "Trap pdu is too big. " +
-                         "Trap hasn't been sent.");
-                }
-            } catch (UnknownHostException e) {
-                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, dbgTag,
-                        "sendTrapPdu", "Trap pdu is too big. " +
-                         "Trap hasn't been sent.");
-                }
-            }
-        }
-
-        closeTrapSocketIfNeeded() ;
-    }
-
-    /**
-     * Send the specified trap PDU to the specified destination.
-     */
-    private void sendTrapPdu(InetAddress addr, SnmpPduPacket pdu)
-        throws SnmpStatusException, IOException {
-
-        // Make an SNMP message from the pdu
-        //
-        SnmpMessage msg = null ;
-        try {
-            msg = (SnmpMessage)pduFactory.encodeSnmpPdu(pdu, bufferSize) ;
-            if (msg == null) {
-                throw new SnmpStatusException(
-                          SnmpDefinitions.snmpRspAuthorizationError) ;
-            }
-        } catch (SnmpTooBigException x) {
-            if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, dbgTag,
-                    "sendTrapPdu", "Trap pdu is too big. " +
-                     "Trap hasn't been sent to the specified host.");
-            }
-            throw new SnmpStatusException(SnmpDefinitions.snmpRspTooBig) ;
-            // FIXME: is the right exception to throw ?
-            // We could simply forward SnmpTooBigException ?
-        }
-
-        // Now send the SNMP message to specified destination
-        //
-        openTrapSocketIfNeeded() ;
-        if (addr != null) {
-            msg.address = addr;
-            try {
-                sendTrapMessage(msg) ;
-            } catch (SnmpTooBigException x) {
-                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, dbgTag,
-                        "sendTrapPdu", "Trap pdu is too big. " +
-                         "Trap hasn't been sent to " +  msg.address);
-                }
-            }
-        }
-
-        closeTrapSocketIfNeeded() ;
-    }
-
-    /**
-     * Send the specified message on trapSocket.
-     */
-    private void sendTrapMessage(SnmpMessage msg)
-        throws IOException, SnmpTooBigException {
-
-        byte[] buffer = new byte[bufferSize] ;
-        DatagramPacket packet = new DatagramPacket(buffer, buffer.length) ;
-        int encodingLength = msg.encodeMessage(buffer) ;
-        packet.setLength(encodingLength) ;
-        packet.setAddress(msg.address) ;
-        packet.setPort(msg.port) ;
-        if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-            SNMP_ADAPTOR_LOGGER.logp(Level.FINER, dbgTag,
-                "sendTrapMessage", "sending trap to " + msg.address + ":" +
-                  msg.port);
-        }
-        trapSocket.send(packet) ;
-        if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-            SNMP_ADAPTOR_LOGGER.logp(Level.FINER, dbgTag,
-                "sendTrapMessage", "sent to " + msg.address + ":" +
-                  msg.port);
-        }
-        snmpOutTraps++;
-        snmpOutPkts++;
-    }
-
-    /**
-     * Open trapSocket if it's not already done.
-     */
-    synchronized void openTrapSocketIfNeeded() throws SocketException {
-        if (trapSocket == null) {
-            trapSocket = new DatagramSocket(0, address) ;
-            if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-                SNMP_ADAPTOR_LOGGER.logp(Level.FINER, dbgTag,
-                    "openTrapSocketIfNeeded", "using port " +
-                      trapSocket.getLocalPort() + " to send traps");
-            }
-        }
-    }
-
-    /**
-     * Close trapSocket if the SNMP protocol adaptor is not ONLINE.
-     */
-    synchronized void closeTrapSocketIfNeeded() {
-        if ((trapSocket != null) && (state != ONLINE)) {
-            trapSocket.close() ;
-            trapSocket = null ;
-        }
-    }
-
-    // SENDING SNMP INFORMS STUFF
-    //---------------------------
-
-    /**
-     * Sends an inform using SNMP V2 inform request format.
-     * <BR>The inform request is sent to each destination defined in the ACL
-     * file (if available).
-     * If no ACL file or no destinations are available, the inform request is
-     * sent to the local host.
-     * <BR>The variable list included in the outgoing inform is composed of
-     * the following items:
-     * <UL>
-     * <LI><CODE>sysUpTime.0</CODE> with its current value</LI>
-     * <LI><CODE>snmpTrapOid.0</CODE> with the value specified by
-     *     <CODE>trapOid</CODE></LI>
-     * <LI><CODE>all the (oid,values)</CODE> from the specified
-     *     <CODE>varBindList</CODE></LI>
-     * </UL>
-     * To send an inform request, the SNMP adaptor server must be active.
-     *
-     * @param cb The callback that is invoked when a request is complete.
-     * @param trapOid The OID identifying the trap.
-     * @param varBindList A list of <CODE>SnmpVarBind</CODE> instances or null.
-     *
-     * @return A vector of {@link com.sun.jmx.snmp.daemon.SnmpInformRequest}
-     *         objects.
-     *         <P>If there is no destination host for this inform request,
-     *         the returned vector will be empty.
-     *
-     * @exception IllegalStateException  This method has been invoked while
-     *            the SNMP adaptor server was not active.
-     * @exception IOException An I/O error occurred while sending the
-     *            inform request.
-     * @exception SnmpStatusException If the inform request exceeds the
-     *            limit defined by <CODE>bufferSize</CODE>.
-     */
-    @Override
-    public Vector<SnmpInformRequest> snmpInformRequest(SnmpInformHandler cb,
-                                                       SnmpOid trapOid,
-                                                       SnmpVarBindList varBindList)
-        throws IllegalStateException, IOException, SnmpStatusException {
-
-        if (!isActive()) {
-            throw new IllegalStateException(
-               "Start SNMP adaptor server before carrying out this operation");
-        }
-        if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-            SNMP_ADAPTOR_LOGGER.logp(Level.FINER, dbgTag,
-                "snmpInformRequest", "trapOid=" + trapOid);
-        }
-
-        // First, make an SNMP inform pdu:
-        // We clone varBindList and insert sysUpTime and snmpTrapOid variables.
-        //
-        SnmpVarBindList fullVbl ;
-        if (varBindList != null)
-            fullVbl = varBindList.clone() ;
-        else
-            fullVbl = new SnmpVarBindList(2) ;
-        SnmpTimeticks sysUpTimeValue = new SnmpTimeticks(getSysUpTime()) ;
-        fullVbl.insertElementAt(new SnmpVarBind(snmpTrapOidOid, trapOid), 0) ;
-        fullVbl.insertElementAt(new SnmpVarBind(sysUpTimeOid, sysUpTimeValue),
-                                0);
-
-        // Next, send the pdu to the specified destination
-        //
-        openInformSocketIfNeeded() ;
-
-        // Now send the SNMP message to each destination
-        //
-        Vector<SnmpInformRequest> informReqList = new Vector<>();
-        InetAddress addr;
-        String cs;
-        if (ipacl != null) {
-            Enumeration<InetAddress> ed = ipacl.getInformDestinations() ;
-            while (ed.hasMoreElements()) {
-                addr = ed.nextElement() ;
-                Enumeration<String> ec = ipacl.getInformCommunities(addr) ;
-                while (ec.hasMoreElements()) {
-                    cs = ec.nextElement() ;
-                    informReqList.addElement(
-                       informSession.makeAsyncRequest(addr, cs, cb,
-                                              fullVbl,getInformPort())) ;
-                }
-            }
-        }
-
-        return informReqList ;
-    }
-
-    /**
-     * Sends an inform using SNMP V2 inform request format.
-     * <BR>The inform is sent to the specified <CODE>InetAddress</CODE>
-     * destination
-     * using the specified community string.
-     * <BR>The variable list included in the outgoing inform is composed
-     *     of the following items:
-     * <UL>
-     * <LI><CODE>sysUpTime.0</CODE> with its current value</LI>
-     * <LI><CODE>snmpTrapOid.0</CODE> with the value specified by
-     *      <CODE>trapOid</CODE></LI>
-     * <LI><CODE>all the (oid,values)</CODE> from the specified
-     *     <CODE>varBindList</CODE></LI>
-     * </UL>
-     * To send an inform request, the SNMP adaptor server must be active.
-     *
-     * @param addr The <CODE>InetAddress</CODE> destination for this inform
-     *             request.
-     * @param cs The community string to be used for the inform request.
-     * @param cb The callback that is invoked when a request is complete.
-     * @param trapOid The OID identifying the trap.
-     * @param varBindList A list of <CODE>SnmpVarBind</CODE> instances or null.
-     *
-     * @return The inform request object.
-     *
-     * @exception IllegalStateException  This method has been invoked
-     *            while the SNMP adaptor server was not active.
-     * @exception IOException An I/O error occurred while sending the
-     *            inform request.
-     * @exception SnmpStatusException If the inform request exceeds the
-     *            limit defined by <CODE>bufferSize</CODE>.
-     */
-    @Override
-    public SnmpInformRequest snmpInformRequest(InetAddress addr,
-                                               String cs,
-                                               SnmpInformHandler cb,
-                                               SnmpOid trapOid,
-                                               SnmpVarBindList varBindList)
-        throws IllegalStateException, IOException, SnmpStatusException {
-
-        return snmpInformRequest(addr,
-                                 getInformPort(),
-                                 cs,
-                                 cb,
-                                 trapOid,
-                                 varBindList);
-    }
-
-    /**
-     * Sends an inform using SNMP V2 inform request format.
-     * <BR>The inform is sent to the specified <CODE>SnmpPeer</CODE>
-     *     destination.
-     * <BR>The community string used is the one located in the
-     *     <CODE>SnmpPeer</CODE> parameters
-     *     (<CODE>SnmpParameters.getInformCommunity() </CODE>).
-     * <BR>The variable list included in the outgoing inform is composed
-     *     of the following items:
-     * <UL>
-     * <LI><CODE>sysUpTime.0</CODE> with its current value</LI>
-     * <LI><CODE>snmpTrapOid.0</CODE> with the value specified by
-     *     <CODE>trapOid</CODE></LI>
-     * <LI><CODE>all the (oid,values)</CODE> from the specified
-     *     <CODE>varBindList</CODE></LI>
-     * </UL>
-     * To send an inform request, the SNMP adaptor server must be active.
-     *
-     * @param peer The <CODE>SnmpPeer</CODE> destination for this inform
-     *             request.
-     * @param cb The callback that is invoked when a request is complete.
-     * @param trapOid The OID identifying the trap.
-     * @param varBindList A list of <CODE>SnmpVarBind</CODE> instances or null.
-     *
-     * @return The inform request object.
-     *
-     * @exception IllegalStateException  This method has been invoked while
-     *            the SNMP adaptor server was not active.
-     * @exception IOException An I/O error occurred while sending the
-     *            inform request.
-     * @exception SnmpStatusException If the inform request exceeds the
-     *            limit defined by <CODE>bufferSize</CODE>.
-     *
-     * @since 1.5
-     */
-    @Override
-    public SnmpInformRequest snmpInformRequest(SnmpPeer peer,
-                                               SnmpInformHandler cb,
-                                               SnmpOid trapOid,
-                                               SnmpVarBindList varBindList)
-        throws IllegalStateException, IOException, SnmpStatusException {
-
-        SnmpParameters p = (SnmpParameters) peer.getParams();
-        return snmpInformRequest(peer.getDestAddr(),
-                                 peer.getDestPort(),
-                                 p.getInformCommunity(),
-                                 cb,
-                                 trapOid,
-                                 varBindList);
-    }
-
-    /**
-     * Method that maps an SNMP error status in the passed protocolVersion
-     * according to the provided pdu type.
-     * @param errorStatus The error status to convert.
-     * @param protocolVersion The protocol version.
-     * @param reqPduType The pdu type.
-     */
-    public static int mapErrorStatus(int errorStatus,
-                                     int protocolVersion,
-                                     int reqPduType) {
-        return SnmpSubRequestHandler.mapErrorStatus(errorStatus,
-                                                    protocolVersion,
-                                                    reqPduType);
-    }
-
-    private SnmpInformRequest snmpInformRequest(InetAddress addr,
-                                                int port,
-                                                String cs,
-                                                SnmpInformHandler cb,
-                                                SnmpOid trapOid,
-                                                SnmpVarBindList varBindList)
-        throws IllegalStateException, IOException, SnmpStatusException {
-
-        if (!isActive()) {
-            throw new IllegalStateException(
-              "Start SNMP adaptor server before carrying out this operation");
-        }
-        if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-            SNMP_ADAPTOR_LOGGER.logp(Level.FINER, dbgTag,
-                "snmpInformRequest", "trapOid=" + trapOid);
-        }
-
-        // First, make an SNMP inform pdu:
-        // We clone varBindList and insert sysUpTime and snmpTrapOid variables.
-        //
-        SnmpVarBindList fullVbl ;
-        if (varBindList != null)
-            fullVbl = varBindList.clone() ;
-        else
-            fullVbl = new SnmpVarBindList(2) ;
-        SnmpTimeticks sysUpTimeValue = new SnmpTimeticks(getSysUpTime()) ;
-        fullVbl.insertElementAt(new SnmpVarBind(snmpTrapOidOid, trapOid), 0) ;
-        fullVbl.insertElementAt(new SnmpVarBind(sysUpTimeOid, sysUpTimeValue),
-                                0);
-
-        // Next, send the pdu to the specified destination
-        //
-        openInformSocketIfNeeded() ;
-        return informSession.makeAsyncRequest(addr, cs, cb, fullVbl, port) ;
-    }
-
-
-    /**
-     * Open informSocket if it's not already done.
-     */
-    synchronized void openInformSocketIfNeeded() throws SocketException {
-        if (informSession == null) {
-            informSession = new SnmpSession(this) ;
-            if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-                SNMP_ADAPTOR_LOGGER.logp(Level.FINER, dbgTag,
-                   "openInformSocketIfNeeded",
-                      "to send inform requests and receive inform responses");
-            }
-        }
-    }
-
-    /**
-     * Close informSocket if the SNMP protocol adaptor is not ONLINE.
-     */
-    synchronized void closeInformSocketIfNeeded() {
-        if ((informSession != null) && (state != ONLINE)) {
-            informSession.destroySession() ;
-            informSession = null ;
-        }
-    }
-
-    /**
-     * Gets the IP address to bind.
-     * This getter is used to initialize the DatagramSocket in the
-     * SnmpSocket object created for the inform request stuff.
-     */
-    InetAddress getAddress() {
-        return address;
-    }
-
-
-    // PROTECTED METHODS
-    //------------------
-
-    /**
-     * Finalizer of the SNMP protocol adaptor objects.
-     * This method is called by the garbage collector on an object
-     * when garbage collection determines that there are no more
-     * references to the object.
-     * <P>Closes the datagram socket associated to this SNMP protocol adaptor.
-     */
-    @Override
-    protected void finalize() {
-        try {
-            if (socket != null) {
-                socket.close() ;
-                socket = null ;
-            }
-
-            threadService.terminate();
-        } catch (Exception e) {
-            if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-                SNMP_ADAPTOR_LOGGER.logp(Level.FINER, dbgTag,
-                   "finalize", "Exception in finalizer", e);
-            }
-        }
-    }
-
-    // PACKAGE METHODS
-    //----------------
-
-    /**
-     * Returns the string used in debug traces.
-     */
-    @Override
-    String makeDebugTag() {
-        return "SnmpAdaptorServer["+ getProtocol() + ":" + getPort() + "]";
-    }
-
-    void updateRequestCounters(int pduType) {
-        switch(pduType)  {
-
-        case pduGetRequestPdu:
-            snmpInGetRequests++;
-            break;
-        case pduGetNextRequestPdu:
-            snmpInGetNexts++;
-            break;
-        case pduSetRequestPdu:
-            snmpInSetRequests++;
-            break;
-        default:
-            break;
-        }
-        snmpInPkts++ ;
-    }
-
-    void updateErrorCounters(int errorStatus) {
-        switch(errorStatus) {
-
-        case snmpRspNoError:
-            snmpOutGetResponses++;
-            break;
-        case snmpRspGenErr:
-            snmpOutGenErrs++;
-            break;
-        case snmpRspBadValue:
-            snmpOutBadValues++;
-            break;
-        case snmpRspNoSuchName:
-            snmpOutNoSuchNames++;
-            break;
-        case snmpRspTooBig:
-            snmpOutTooBigs++;
-            break;
-        default:
-            break;
-        }
-        snmpOutPkts++ ;
-    }
-
-    void updateVarCounters(int pduType, int n) {
-        switch(pduType) {
-
-        case pduGetRequestPdu:
-        case pduGetNextRequestPdu:
-        case pduGetBulkRequestPdu:
-            snmpInTotalReqVars += n ;
-            break ;
-        case pduSetRequestPdu:
-            snmpInTotalSetVars += n ;
-            break ;
-        }
-    }
-
-    void incSnmpInASNParseErrs(int n) {
-        snmpInASNParseErrs += n ;
-    }
-
-    void incSnmpInBadVersions(int n) {
-        snmpInBadVersions += n ;
-    }
-
-    void incSnmpInBadCommunityUses(int n) {
-        snmpInBadCommunityUses += n ;
-    }
-
-    void incSnmpInBadCommunityNames(int n) {
-        snmpInBadCommunityNames += n ;
-    }
-
-    void incSnmpSilentDrops(int n) {
-        snmpSilentDrops += n ;
-    }
-    // PRIVATE METHODS
-    //----------------
-
-    /**
-     * Returns the time (in hundreths of second) elapsed since the SNMP
-     * protocol adaptor startup.
-     */
-    long getSysUpTime() {
-        return (System.currentTimeMillis() - startUpTime) / 10 ;
-    }
-
-    /**
-     * Control the way the SnmpAdaptorServer service is deserialized.
-     */
-    private void readObject(ObjectInputStream stream)
-        throws IOException, ClassNotFoundException {
-
-        // Call the default deserialization of the object.
-        //
-        stream.defaultReadObject();
-
-        // Call the specific initialization for the SnmpAdaptorServer service.
-        // This is for transient structures to be initialized to specific
-        // default values.
-        //
-        mibs      = new Vector<>() ;
-    }
-
-    /**
-     * Common initializations.
-     */
-    private void init(InetAddressAcl acl, int p, InetAddress a) {
-
-        root= new SnmpMibTree();
-
-        // The default Agent is initialized with a SnmpErrorHandlerAgent agent.
-        root.setDefaultAgent(new SnmpErrorHandlerAgent());
-
-        // For the trap time, use the time the agent started ...
-        //
-        startUpTime= java.lang.System.currentTimeMillis();
-        maxActiveClientCount = 10;
-
-        // Create the default message factory
-        pduFactory = new SnmpPduFactoryBER() ;
-
-        port = p ;
-        ipacl = acl ;
-        address = a ;
-
-        if ((ipacl == null) && (useAcl == true))
-            throw new IllegalArgumentException("ACL object cannot be null") ;
-
-        threadService = new ThreadService(threadNumber);
-    }
-
-    SnmpMibAgent getAgentMib(SnmpOid oid) {
-        return root.getAgentMib(oid);
-    }
-
-    @Override
-    protected Thread createMainThread() {
-        final Thread t = super.createMainThread();
-        t.setDaemon(true);
-        return t;
-    }
-
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/daemon/SnmpAdaptorServerMBean.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,702 +0,0 @@
-/*
- * Copyright (c) 1999, 2013, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-package com.sun.jmx.snmp.daemon;
-
-// java import
-import java.util.Vector;
-import java.io.IOException;
-import java.net.InetAddress;
-
-// jmx imports
-//
-import com.sun.jmx.snmp.SnmpPduFactory;
-import com.sun.jmx.snmp.SnmpStatusException;
-import com.sun.jmx.snmp.SnmpVarBindList;
-import com.sun.jmx.snmp.SnmpOid;
-import com.sun.jmx.snmp.SnmpTimeticks;
-import com.sun.jmx.snmp.SnmpIpAddress;
-import com.sun.jmx.snmp.SnmpPduPacket;
-import com.sun.jmx.snmp.InetAddressAcl;
-import com.sun.jmx.snmp.SnmpPeer;
-
-// SNMP Runtime imports
-//
-import com.sun.jmx.snmp.agent.SnmpMibAgent;
-import com.sun.jmx.snmp.agent.SnmpMibHandler;
-import com.sun.jmx.snmp.agent.SnmpUserDataFactory;
-
-/**
- * Exposes the remote management interface of the {@link SnmpAdaptorServer} MBean.
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- */
-
-public interface SnmpAdaptorServerMBean extends CommunicatorServerMBean {
-
-    // GETTERS AND SETTERS
-    //--------------------
-
-    /**
-     * Returns the Ip address based ACL used by this SNMP protocol adaptor.
-     * @return The <CODE>InetAddressAcl</CODE> implementation.
-     *
-     * @since 1.5
-     */
-    public InetAddressAcl getInetAddressAcl();
-    /**
-     * Returns the port used by this SNMP protocol adaptor for sending traps.
-     * By default, port 162 is used.
-     *
-     * @return The port number for sending SNMP traps.
-     */
-    public Integer getTrapPort();
-
-    /**
-     * Sets the port used by this SNMP protocol adaptor for sending traps.
-     *
-     * @param port The port number for sending SNMP traps.
-     */
-    public void setTrapPort(Integer port);
-
-    /**
-     * Returns the port used by this SNMP protocol adaptor for sending inform requests.
-     * By default, port 162 is used.
-     *
-     * @return The port number for sending SNMP inform requests.
-     */
-    public int getInformPort();
-
-    /**
-     * Sets the port used by this SNMP protocol adaptor for sending inform requests.
-     *
-     * @param port The port number for sending SNMP inform requests.
-     */
-    public void setInformPort(int port);
-
-    /**
-     * Gets the number of managers that have been processed by this SNMP protocol adaptor
-     * since its creation.
-     *
-     * @return The number of managers handled by this SNMP protocol adaptor
-     * since its creation. This counter is not reset by the <CODE>stop</CODE> method.
-     */
-    public int getServedClientCount();
-
-    /**
-     * Gets the number of managers currently being processed by this
-     * SNMP protocol adaptor.
-     *
-     * @return The number of managers currently being processed by this
-     * SNMP protocol adaptor.
-     */
-    public int getActiveClientCount();
-
-    /**
-     * Gets the maximum number of managers that this SNMP protocol adaptor can
-     * process concurrently.
-     *
-     * @return The maximum number of managers that this SNMP protocol adaptor can
-     * process concurrently.
-     */
-    public int getMaxActiveClientCount();
-
-    /**
-     * Sets the maximum number of managers this SNMP protocol adaptor can
-     * process concurrently.
-     *
-     * @param c The number of managers.
-     *
-     * @exception java.lang.IllegalStateException This method has been invoked
-     * while the communicator was <CODE>ONLINE</CODE> or <CODE>STARTING</CODE>.
-     */
-    public void setMaxActiveClientCount(int c) throws java.lang.IllegalStateException;
-
-    /**
-     * Returns the protocol of this SNMP protocol adaptor.
-     *
-     * @return The string "snmp".
-     */
-    @Override
-    public String getProtocol();
-
-    /**
-     * Returns the buffer size of this SNMP protocol adaptor.
-     * By default, buffer size 1024 is used.
-     *
-     * @return The buffer size.
-     */
-    public Integer getBufferSize();
-
-    /**
-     * Sets the buffer size of this SNMP protocol adaptor.
-     *
-     * @param s The buffer size.
-     *
-     * @exception java.lang.IllegalStateException This method has been invoked
-     * while the communicator was <CODE>ONLINE</CODE> or <CODE>STARTING</CODE>.
-     */
-    public void setBufferSize(Integer s) throws java.lang.IllegalStateException;
-
-    /**
-     * Gets the number of times to try sending an inform request before giving up.
-     * @return The maximun number of tries.
-     */
-    public int getMaxTries();
-
-    /**
-     * Changes the maximun number of times to try sending an inform request before giving up.
-     * @param newMaxTries The maximun number of tries.
-     */
-    public void setMaxTries(int newMaxTries);
-
-    /**
-     * Gets the timeout to wait for an inform response from the manager.
-     * @return The value of the timeout property.
-     */
-    public int getTimeout();
-
-    /**
-     * Changes the timeout to wait for an inform response from the manager.
-     * @param newTimeout The timeout (in milliseconds).
-     */
-    public void setTimeout(int newTimeout);
-
-    /**
-     * Returns the message factory of this SNMP protocol adaptor.
-     *
-     * @return The factory object.
-     */
-    public SnmpPduFactory getPduFactory();
-
-    /**
-     * Sets the message factory of this SNMP protocol adaptor.
-     *
-     * @param factory The factory object (null means the default factory).
-     */
-    public void setPduFactory(SnmpPduFactory factory);
-
-
-    /**
-     * Set the user-data factory of this SNMP protocol adaptor.
-     *
-     * @param factory The factory object (null means no factory).
-     * @see com.sun.jmx.snmp.agent.SnmpUserDataFactory
-     */
-    public void setUserDataFactory(SnmpUserDataFactory factory);
-
-    /**
-     * Get the user-data factory associated with this SNMP protocol adaptor.
-     *
-     * @return The factory object (null means no factory).
-     * @see com.sun.jmx.snmp.agent.SnmpUserDataFactory
-     */
-    public SnmpUserDataFactory getUserDataFactory();
-
-    /**
-     * Returns <CODE>true</CODE> if authentication traps are enabled.
-     * <P>
-     * When this feature is enabled, the SNMP protocol adaptor sends
-     * an <CODE>authenticationFailure</CODE> trap each time an authentication fails.
-     * <P>
-     * The default behaviour is to send authentication traps.
-     *
-     * @return <CODE>true</CODE> if authentication traps are enabled, <CODE>false</CODE> otherwise.
-     */
-    public boolean getAuthTrapEnabled();
-
-    /**
-     * Sets the flag indicating if traps need to be sent in case of authentication failure.
-     *
-     * @param enabled Flag indicating if traps need to be sent.
-     */
-    public void setAuthTrapEnabled(boolean enabled);
-
-    /**
-     * Returns <code>true</code> if this SNMP protocol adaptor sends a response in case
-     * of authentication failure.
-     * <P>
-     * When this feature is enabled, the SNMP protocol adaptor sends a response with <CODE>noSuchName</CODE>
-     * or <CODE>readOnly</CODE> when the authentication failed. If the flag is disabled, the
-     * SNMP protocol adaptor trashes the PDU silently.
-     * <P>
-     * The default behavior is to send responses.
-     *
-     * @return <code>true</code> if responses are sent.
-     */
-    public boolean getAuthRespEnabled();
-
-    /**
-     * Sets the flag indicating if responses need to be sent in case of authentication failure.
-     *
-     * @param enabled Flag indicating if responses need to be sent.
-     */
-    public void setAuthRespEnabled(boolean enabled);
-
-    /**
-     * Returns the enterprise OID. It is used by {@link #snmpV1Trap snmpV1Trap} to fill
-     * the 'enterprise' field of the trap request.
-     *
-     * @return The OID in string format "x.x.x.x".
-     */
-    public String getEnterpriseOid();
-
-    /**
-     * Sets the enterprise OID.
-     *
-     * @param oid The OID in string format "x.x.x.x".
-     *
-     * @exception IllegalArgumentException The string format is incorrect
-     */
-    public void setEnterpriseOid(String oid) throws IllegalArgumentException;
-
-    /**
-     * Returns the names of the MIBs available in this SNMP protocol adaptor.
-     *
-     * @return An array of MIB names.
-     */
-    public String[] getMibs();
-
-    // GETTERS FOR SNMP GROUP (MIBII)
-    //-------------------------------
-
-    /**
-     * Returns the <CODE>snmpOutTraps</CODE> value defined in MIB-II.
-     *
-     * @return The <CODE>snmpOutTraps</CODE> value.
-     */
-    public Long getSnmpOutTraps();
-
-    /**
-     * Returns the <CODE>snmpOutGetResponses</CODE> value defined in MIB-II.
-     *
-     * @return The <CODE>snmpOutGetResponses</CODE> value.
-     */
-    public Long getSnmpOutGetResponses();
-
-    /**
-     * Returns the <CODE>snmpOutGenErrs</CODE> value defined in MIB-II.
-     *
-     * @return The <CODE>snmpOutGenErrs</CODE> value.
-     */
-    public Long getSnmpOutGenErrs();
-
-    /**
-     * Returns the <CODE>snmpOutBadValues</CODE> value defined in MIB-II.
-     *
-     * @return The <CODE>snmpOutBadValues</CODE> value.
-     */
-    public Long getSnmpOutBadValues();
-
-    /**
-     * Returns the <CODE>snmpOutNoSuchNames</CODE> value defined in MIB-II.
-     *
-     * @return The <CODE>snmpOutNoSuchNames</CODE> value.
-     */
-    public Long getSnmpOutNoSuchNames();
-
-    /**
-     * Returns the <CODE>snmpOutTooBigs</CODE> value defined in MIB-II.
-     *
-     * @return The <CODE>snmpOutTooBigs</CODE> value.
-     */
-    public Long getSnmpOutTooBigs();
-
-    /**
-     * Returns the <CODE>snmpInASNParseErrs</CODE> value defined in MIB-II.
-     *
-     * @return The <CODE>snmpInASNParseErrs</CODE> value.
-     */
-    public Long getSnmpInASNParseErrs();
-
-    /**
-     * Returns the <CODE>snmpInBadCommunityUses</CODE> value defined in MIB-II.
-     *
-     * @return The <CODE>snmpInBadCommunityUses</CODE> value.
-     */
-    public Long getSnmpInBadCommunityUses();
-
-    /**
-     * Returns the <CODE>snmpInBadCommunityNames</CODE> value defined in MIB-II.
-     *
-     * @return The <CODE>snmpInBadCommunityNames</CODE> value.
-     */
-    public Long getSnmpInBadCommunityNames();
-
-    /**
-     * Returns the <CODE>snmpInBadVersions</CODE> value defined in MIB-II.
-     *
-     * @return The <CODE>snmpInBadVersions</CODE> value.
-     */
-    public Long getSnmpInBadVersions();
-
-    /**
-     * Returns the <CODE>snmpOutPkts</CODE> value defined in MIB-II.
-     *
-     * @return The <CODE>snmpOutPkts</CODE> value.
-     */
-    public Long getSnmpOutPkts();
-
-    /**
-     * Returns the <CODE>snmpInPkts</CODE> value defined in MIB-II.
-     *
-     * @return The <CODE>snmpInPkts</CODE> value.
-     */
-    public Long getSnmpInPkts();
-
-    /**
-     * Returns the <CODE>snmpInGetRequests</CODE> value defined in MIB-II.
-     *
-     * @return The <CODE>snmpInGetRequests</CODE> value.
-     */
-    public Long getSnmpInGetRequests();
-
-    /**
-     * Returns the <CODE>snmpInGetNexts</CODE> value defined in MIB-II.
-     *
-     * @return The <CODE>snmpInGetNexts</CODE> value.
-     */
-    public Long getSnmpInGetNexts();
-
-    /**
-     * Returns the <CODE>snmpInSetRequests</CODE> value defined in MIB-II.
-     *
-     * @return The <CODE>snmpInSetRequests</CODE> value.
-     */
-    public Long getSnmpInSetRequests();
-
-    /**
-     * Returns the <CODE>snmpInTotalSetVars</CODE> value defined in MIB-II.
-     *
-     * @return The <CODE>snmpInTotalSetVars</CODE> value.
-     */
-    public Long getSnmpInTotalSetVars();
-
-    /**
-     * Returns the <CODE>snmpInTotalReqVars</CODE> value defined in MIB-II.
-     *
-     * @return The <CODE>snmpInTotalReqVars</CODE> value.
-     */
-    public Long getSnmpInTotalReqVars();
-
-    /**
-     * Returns the <CODE>snmpSilentDrops</CODE> value defined in rfc 1907 NMPv2-MIB .
-     *
-     * @return The <CODE>snmpSilentDrops</CODE> value.
-     *
-     * @since 1.5
-     */
-    public Long getSnmpSilentDrops();
-
-    /**
-     * Returns the <CODE>snmpProxyDrops</CODE> value defined in rfc 1907 NMPv2-MIB .
-     *
-     * @return The <CODE>snmpProxyDrops</CODE> value.
-     *
-     * @since 1.5
-     */
-    public Long getSnmpProxyDrops();
-
-    // PUBLIC METHODS
-    //---------------
-
-    /**
-     * Adds a new MIB in the SNMP MIB handler.
-     * This method is called automatically by {@link com.sun.jmx.snmp.agent.SnmpMibAgent#setSnmpAdaptor(SnmpMibHandler)}
-     * and {@link com.sun.jmx.snmp.agent.SnmpMibAgent#setSnmpAdaptorName(ObjectName)}
-     * and should not be called directly.
-     *
-     * @param mib The MIB to add.
-     *
-     * @return A reference to the SNMP MIB handler.
-     *
-     * @exception IllegalArgumentException If the parameter is null.
-     */
-    public SnmpMibHandler addMib(SnmpMibAgent mib) throws IllegalArgumentException;
-
-    /**
-     * Adds a new MIB in the SNMP MIB handler.
-     *
-     * @param mib The MIB to add.
-     * @param oids The set of OIDs this agent implements.
-     *
-     * @return A reference to the SNMP MIB handler.
-     *
-     * @exception IllegalArgumentException If the parameter is null.
-     *
-     * @since 1.5
-     */
-    public SnmpMibHandler addMib(SnmpMibAgent mib, SnmpOid[] oids) throws IllegalArgumentException;
-
-    /**
-     * Removes the specified MIB from the SNMP protocol adaptor.
-     * This method is called automatically by {@link com.sun.jmx.snmp.agent.SnmpMibAgent#setSnmpAdaptor(SnmpMibHandler)}
-     * and {@link com.sun.jmx.snmp.agent.SnmpMibAgent#setSnmpAdaptorName(ObjectName)}
-     * and should not be called directly.
-     *
-     * @param mib The MIB to be removed.
-     *
-     * @return <code>true</code> if the specified <CODE>mib</CODE> was a MIB included in the SNMP MIB handler,
-     * <code>false</code> otherwise.
-     */
-    public boolean removeMib(SnmpMibAgent mib);
-
-    /**
-     * Sends a trap using SNMP V1 trap format.
-     * <BR>The trap is sent to each destination defined in the ACL file (if available).
-     * If no ACL file or no destinations are available, the trap is sent to the local host.
-     *
-     * @param generic The generic number of the trap.
-     * @param specific The specific number of the trap.
-     * @param varBindList A list of <CODE>SnmpVarBind</CODE> instances or null.
-     *
-     * @exception IOException An I/O error occurred while sending the trap.
-     * @exception SnmpStatusException If the trap exceeds the limit defined by <CODE>bufferSize</CODE>.
-     */
-    public void snmpV1Trap(int generic, int specific, SnmpVarBindList varBindList) throws IOException, SnmpStatusException;
-
-
-    /**
-     * Sends a trap using SNMP V1 trap format.
-     * <BR>The trap is sent to the specified <CODE>InetAddress</CODE> destination
-     * using the specified community string (and the ACL file is not used).
-     *
-     * @param address The <CODE>InetAddress</CODE> destination of the trap.
-     * @param cs The community string to be used for the trap.
-     * @param generic The generic number of the trap.
-     * @param specific The specific number of the trap.
-     * @param varBindList A list of <CODE>SnmpVarBind</CODE> instances or null.
-     *
-     * @exception IOException An I/O error occurred while sending the trap.
-     * @exception SnmpStatusException If the trap exceeds the limit defined by <CODE>bufferSize</CODE>.
-     */
-    public void snmpV1Trap(InetAddress address, String cs, int generic, int specific, SnmpVarBindList varBindList)
-        throws IOException, SnmpStatusException;
-
-
-    /**
-     * Sends a trap using SNMP V1 trap format.
-     * <BR>The trap is sent to the specified <CODE>SnmpPeer</CODE> destination.
-     * The community string used is the one located in the <CODE>SnmpPeer</CODE> parameters (<CODE>SnmpParameters.getRdCommunity() </CODE>).
-     *
-     * @param peer The <CODE>SnmpPeer</CODE> destination of the trap.
-     * @param agentAddr The agent address to be used for the trap.
-     * @param enterpOid The enterprise OID to be used for the trap.
-     * @param generic The generic number of the trap.
-     * @param specific The specific number of the trap.
-     * @param varBindList A list of <CODE>SnmpVarBind</CODE> instances or null.
-     * @param time The time stamp (overwrite the current time).
-     *
-     * @exception IOException An I/O error occurred while sending the trap.
-     * @exception SnmpStatusException If the trap exceeds the limit defined by <CODE>bufferSize</CODE>.
-     *
-     * @since 1.5
-     */
-    public void snmpV1Trap(SnmpPeer peer,
-                           SnmpIpAddress agentAddr,
-                           SnmpOid enterpOid,
-                           int generic,
-                           int specific,
-                           SnmpVarBindList varBindList,
-                           SnmpTimeticks time) throws IOException, SnmpStatusException;
-
-    /**
-     * Sends a trap using SNMP V2 trap format.
-     * <BR>The trap is sent to the specified <CODE>SnmpPeer</CODE> destination.
-     * <BR>The community string used is the one located in the <CODE>SnmpPeer</CODE> parameters (<CODE>SnmpParameters.getRdCommunity() </CODE>).
-     * <BR>The variable list included in the outgoing trap is composed of the following items:
-     * <UL>
-     * <LI><CODE>sysUpTime.0</CODE> with the value specified by <CODE>time</CODE>
-     * <LI><CODE>snmpTrapOid.0</CODE> with the value specified by <CODE>trapOid</CODE>
-     * <LI><CODE>all the (oid,values)</CODE> from the specified <CODE>varBindList</CODE>
-     * </UL>
-     *
-     * @param peer The <CODE>SnmpPeer</CODE> destination of the trap.
-     * @param trapOid The OID identifying the trap.
-     * @param varBindList A list of <CODE>SnmpVarBind</CODE> instances or null.
-     * @param time The time stamp (overwrite the current time).
-     *
-     * @exception IOException An I/O error occurred while sending the trap.
-     * @exception SnmpStatusException If the trap exceeds the limit defined by <CODE>bufferSize</CODE>.
-     *
-     * @since 1.5
-     */
-    public void snmpV2Trap(SnmpPeer peer,
-                           SnmpOid trapOid,
-                           SnmpVarBindList varBindList,
-                           SnmpTimeticks time) throws IOException, SnmpStatusException;
-
-    /**
-     * Sends a trap using SNMP V2 trap format.
-     * <BR>The trap is sent to each destination defined in the ACL file (if available).
-     * If no ACL file or no destinations are available, the trap is sent to the local host.
-     * <BR>The variable list included in the outgoing trap is composed of the following items:
-     * <UL>
-     * <LI><CODE>sysUpTime.0</CODE> with its current value
-     * <LI><CODE>snmpTrapOid.0</CODE> with the value specified by <CODE>trapOid</CODE>
-     * <LI><CODE>all the (oid,values)</CODE> from the specified <CODE>varBindList</CODE>
-     * </UL>
-     *
-     * @param trapOid The OID identifying the trap.
-     * @param varBindList A list of <CODE>SnmpVarBind</CODE> instances or null.
-     *
-     * @exception IOException An I/O error occurred while sending the trap.
-     * @exception SnmpStatusException If the trap exceeds the limit defined by <CODE>bufferSize</CODE>.
-     */
-    public void snmpV2Trap(SnmpOid trapOid, SnmpVarBindList varBindList) throws IOException, SnmpStatusException;
-
-
-    /**
-     * Sends a trap using SNMP V2 trap format.
-     * <BR>The trap is sent to the specified <CODE>InetAddress</CODE> destination
-     * using the specified community string (and the ACL file is not used).
-     * <BR>The variable list included in the outgoing trap is composed of the following items:
-     * <UL>
-     * <LI><CODE>sysUpTime.0</CODE> with its current value
-     * <LI><CODE>snmpTrapOid.0</CODE> with the value specified by <CODE>trapOid</CODE>
-     * <LI><CODE>all the (oid,values)</CODE> from the specified <CODE>varBindList</CODE>
-     * </UL>
-     *
-     * @param address The <CODE>InetAddress</CODE> destination of the trap.
-     * @param cs The community string to be used for the trap.
-     * @param trapOid The OID identifying the trap.
-     * @param varBindList A list of <CODE>SnmpVarBind</CODE> instances or null.
-     *
-     * @exception IOException An I/O error occurred while sending the trap.
-     * @exception SnmpStatusException If the trap exceeds the limit defined by <CODE>bufferSize</CODE>.
-     */
-    public void snmpV2Trap(InetAddress address, String cs, SnmpOid trapOid, SnmpVarBindList varBindList)
-        throws IOException, SnmpStatusException;
-
-    /**
-     * Send the specified trap PDU to the passed <CODE>InetAddress</CODE>.
-     * @param address The destination address.
-     * @param pdu The pdu to send.
-     * @exception IOException An I/O error occurred while sending the trap.
-     * @exception SnmpStatusException If the trap exceeds the limit defined by <CODE>bufferSize</CODE>.
-     *
-     * @since 1.5
-     */
-    public void snmpPduTrap(InetAddress address, SnmpPduPacket pdu)
-        throws IOException, SnmpStatusException;
-    /**
-     * Send the specified trap PDU to the passed <CODE>SnmpPeer</CODE>.
-     * @param peer The destination peer. The Read community string is used of <CODE>SnmpParameters</CODE> is used as the trap community string.
-     * @param pdu The pdu to send.
-     * @exception IOException An I/O error occurred while sending the trap.
-     * @exception SnmpStatusException If the trap exceeds the limit defined by <CODE>bufferSize</CODE>.
-     * @since 1.5
-     */
-    public void snmpPduTrap(SnmpPeer peer,
-                            SnmpPduPacket pdu)
-        throws IOException, SnmpStatusException;
-
-    /**
-     * Sends an inform using SNMP V2 inform request format.
-     * <BR>The inform request is sent to each destination defined in the ACL file (if available).
-     * If no ACL file or no destinations are available, the inform request is sent to the local host.
-     * <BR>The variable list included in the outgoing inform request is composed of the following items:
-     * <UL>
-     * <LI><CODE>sysUpTime.0</CODE> with its current value
-     * <LI><CODE>snmpTrapOid.0</CODE> with the value specified by <CODE>trapOid</CODE>
-     * <LI><CODE>all the (oid,values)</CODE> from the specified <CODE>varBindList</CODE>
-     * </UL>
-     * To send an inform request, the SNMP adaptor server must be active.
-     *
-     * @param cb The callback that is invoked when a request is complete.
-     * @param trapOid The OID identifying the trap.
-     * @param varBindList A list of <CODE>SnmpVarBind</CODE> instances or null.
-     *
-     * @return A vector of {@link com.sun.jmx.snmp.daemon.SnmpInformRequest} objects.
-     * <P>If there is no destination host for this inform request, the returned vector will be empty.
-     *
-     * @exception IllegalStateException  This method has been invoked while the SNMP adaptor server was not active.
-     * @exception IOException An I/O error occurred while sending the inform request.
-     * @exception SnmpStatusException If the inform request exceeds the limit defined by <CODE>bufferSize</CODE>.
-     */
-    public Vector<?> snmpInformRequest(SnmpInformHandler cb, SnmpOid trapOid,
-            SnmpVarBindList varBindList)
-        throws IllegalStateException, IOException, SnmpStatusException;
-
-    /**
-     * Sends an inform using SNMP V2 inform request format.
-     * <BR>The inform is sent to the specified <CODE>InetAddress</CODE> destination
-     * using the specified community string.
-     * <BR>The variable list included in the outgoing inform request is composed of the following items:
-     * <UL>
-     * <LI><CODE>sysUpTime.0</CODE> with its current value
-     * <LI><CODE>snmpTrapOid.0</CODE> with the value specified by <CODE>trapOid</CODE>
-     * <LI><CODE>all the (oid,values)</CODE> from the specified <CODE>varBindList</CODE>
-     * </UL>
-     * To send an inform request, the SNMP adaptor server must be active.
-     *
-     * @param address The <CODE>InetAddress</CODE> destination for this inform request.
-     * @param cs The community string to be used for the inform request.
-     * @param cb The callback that is invoked when a request is complete.
-     * @param trapOid The OID identifying the trap.
-     * @param varBindList A list of <CODE>SnmpVarBind</CODE> instances or null.
-     *
-     * @return The inform request object.
-     *
-     * @exception IllegalStateException  This method has been invoked while the SNMP adaptor server was not active.
-     * @exception IOException An I/O error occurred while sending the inform request.
-     * @exception SnmpStatusException If the inform request exceeds the limit defined by <CODE>bufferSize</CODE>.
-     */
-    public SnmpInformRequest snmpInformRequest(InetAddress address, String cs, SnmpInformHandler cb,
-                                               SnmpOid trapOid, SnmpVarBindList varBindList)
-        throws IllegalStateException, IOException, SnmpStatusException;
-
-
-    /**
-     * Sends an inform using SNMP V2 inform request format.
-     * <BR>The inform is sent to the specified <CODE>SnmpPeer</CODE> destination.
-     * <BR> The community string used is the one located in the <CODE>SnmpPeer</CODE> parameters (<CODE>SnmpParameters.getInformCommunity() </CODE>).
-     * <BR>The variable list included in the outgoing inform is composed of the following items:
-     * <UL>
-     * <LI><CODE>sysUpTime.0</CODE> with its current value
-     * <LI><CODE>snmpTrapOid.0</CODE> with the value specified by <CODE>trapOid</CODE>
-     * <LI><CODE>all the (oid,values)</CODE> from the specified <CODE>varBindList</CODE>
-     * </UL>
-     * To send an inform request, the SNMP adaptor server must be active.
-     *
-     * @param peer The <CODE>SnmpPeer</CODE> destination for this inform request.
-     * @param cb The callback that is invoked when a request is complete.
-     * @param trapOid The OID identifying the trap.
-     * @param varBindList A list of <CODE>SnmpVarBind</CODE> instances or null.
-     *
-     * @return The inform request object.
-     *
-     * @exception IllegalStateException  This method has been invoked while the SNMP adaptor server was not active.
-     * @exception IOException An I/O error occurred while sending the inform request.
-     * @exception SnmpStatusException If the inform request exceeds the limit defined by <CODE>bufferSize</CODE>.
-     *
-     * @since 1.5
-     */
-    public SnmpInformRequest snmpInformRequest(SnmpPeer peer,
-                                               SnmpInformHandler cb,
-                                               SnmpOid trapOid,
-                                               SnmpVarBindList varBindList) throws IllegalStateException, IOException, SnmpStatusException;
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/daemon/SnmpInformHandler.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,80 +0,0 @@
-/*
- * Copyright (c) 2000, 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.jmx.snmp.daemon ;
-
-// JMX imports
-//
-import com.sun.jmx.snmp.SnmpDefinitions;
-import com.sun.jmx.snmp.SnmpVarBindList;
-
-/**
- * Provides the callback methods that are required to be implemented by the application
- * when an inform response is received by the agent.
- * <P>
- * Each inform request can be provided with an object that implements this callback
- * interface. An application then uses the SNMP adaptor to start an SNMP inform request,
- * which marks the request as active. The methods in this callback interface
- * get invoked when any of the following happens:
- * <P>
- * <UL>
- * <LI> The agent receives the SNMP inform response.
- * <LI> The agent does not receive any response within a specified time and the number of tries
- * have exceeded the limit (timeout condition).
- * <LI> An internal error occurs while processing or parsing the inform request.
- * </UL>
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- */
-
-public interface SnmpInformHandler extends SnmpDefinitions {
-
-    /**
-     * This callback is invoked when a manager responds to an SNMP inform request.
-     * The callback should check the error status of the inform request to determine
-     * the kind of response.
-     *
-     * @param request The <CODE>SnmpInformRequest</CODE> associated with this callback.
-     * @param errStatus The status of the request.
-     * @param errIndex The index in the list that caused the error.
-     * @param vblist The <CODE>Response varBind</CODE> list for the successful request.
-     */
-    public abstract void processSnmpPollData(SnmpInformRequest request, int errStatus, int errIndex, SnmpVarBindList vblist);
-
-    /**
-     * This callback is invoked when a manager does not respond within the
-     * specified timeout value to the SNMP inform request. The number of tries have also
-     * been exhausted.
-     * @param request The <CODE>SnmpInformRequest</CODE> associated with this callback.
-     */
-    public abstract void processSnmpPollTimeout(SnmpInformRequest request);
-
-    /**
-     * This callback is invoked when any form of internal error occurs.
-     * @param request The <CODE>SnmpInformRequest</CODE> associated with this callback.
-     * @param errmsg The <CODE>String</CODE> describing the internal error.
-     */
-    public abstract void processSnmpInternalError(SnmpInformRequest request, String errmsg);
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/daemon/SnmpMibTree.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,269 +0,0 @@
-/*
- * Copyright (c) 1998, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-package com.sun.jmx.snmp.daemon;
-
-
-
-// java imports
-//
-import java.util.Vector;
-import java.util.Enumeration;
-
-// jmx imports
-//
-import com.sun.jmx.snmp.SnmpOid;
-
-// SNMP Runtime imports
-//
-import com.sun.jmx.snmp.agent.SnmpMibAgent;
-
-/**
- * The class is used for building a tree representation of the different
- * root oids of the supported MIBs. Each node is associated to a specific MIB.
- */
-final class SnmpMibTree {
-
-    public SnmpMibTree() {
-      defaultAgent= null;
-      root= new TreeNode(-1, null, null);
-    }
-
-    public void setDefaultAgent(SnmpMibAgent def) {
-        defaultAgent= def;
-        root.agent= def;
-    }
-
-    public SnmpMibAgent getDefaultAgent() {
-        return defaultAgent;
-    }
-
-    public void register(SnmpMibAgent agent) {
-        root.registerNode(agent);
-    }
-
-    public void register(SnmpMibAgent agent, long[] oid) {
-      root.registerNode(oid, 0, agent);
-    }
-
-    public SnmpMibAgent getAgentMib(SnmpOid oid) {
-        TreeNode node= root.retrieveMatchingBranch(oid.longValue(), 0);
-        if (node == null)
-            return defaultAgent;
-        else
-            if(node.getAgentMib() == null)
-                return defaultAgent;
-            else
-                return node.getAgentMib();
-    }
-
-    public void unregister(SnmpMibAgent agent, SnmpOid[] oids) {
-        for(int i = 0; i < oids.length; i++) {
-            long[] oid = oids[i].longValue();
-            TreeNode node = root.retrieveMatchingBranch(oid, 0);
-            if (node == null)
-                continue;
-            node.removeAgent(agent);
-        }
-    }
-
-
-    public void unregister(SnmpMibAgent agent) {
-
-        root.removeAgentFully(agent);
-    }
-
-    /*
-    public void unregister(SnmpMibAgent agent) {
-        long[] oid= agent.getRootOid();
-        TreeNode node= root.retrieveMatchingBranch(oid, 0);
-        if (node == null)
-            return;
-        node.removeAgent(agent);
-    }
-    */
-    public void printTree() {
-        root.printTree(">");
-    }
-
-    private SnmpMibAgent defaultAgent;
-    private TreeNode root;
-
-    // A SnmpMibTree object is a tree of TreeNode
-    //
-    final class TreeNode {
-
-        void registerNode(SnmpMibAgent agent) {
-            long[] oid= agent.getRootOid();
-            registerNode(oid, 0, agent);
-        }
-
-        TreeNode retrieveMatchingBranch(long[] oid, int cursor) {
-            TreeNode node= retrieveChild(oid, cursor);
-            if (node == null)
-                return this;
-            if (children.isEmpty()) {
-                // In this case, the node does not have any children. So no point to
-                // continue the search ...
-                return node;
-            }
-            if( cursor + 1 == oid.length) {
-                // In this case, the oid does not have any more element. So the search
-                // is over.
-                return node;
-            }
-
-            TreeNode n = node.retrieveMatchingBranch(oid, cursor + 1);
-            //If the returned node got a null agent, we have to replace it by
-            //the current one (in case it is not null)
-            //
-            return n.agent == null ? this : n;
-        }
-
-        SnmpMibAgent getAgentMib() {
-            return agent;
-        }
-
-        public void printTree(String ident) {
-
-            StringBuilder buff= new StringBuilder();
-            if (agents == null) {
-                return;
-            }
-
-            for(Enumeration<SnmpMibAgent> e= agents.elements(); e.hasMoreElements(); ) {
-                SnmpMibAgent mib= e.nextElement();
-                if (mib == null)
-                    buff.append("empty ");
-                else
-                    buff.append(mib.getMibName()).append(" ");
-            }
-            ident+= " ";
-            if (children == null) {
-                return;
-            }
-            for(Enumeration<TreeNode> e= children.elements(); e.hasMoreElements(); ) {
-                TreeNode node= e.nextElement();
-                node.printTree(ident);
-            }
-        }
-
-        // PRIVATE STUFF
-        //--------------
-
-        /**
-         * Only the treeNode class can create an instance of treeNode.
-         * The creation occurs when registering a new oid.
-         */
-        private TreeNode(long nodeValue, SnmpMibAgent agent, TreeNode sup) {
-            this.nodeValue= nodeValue;
-            this.parent= sup;
-            agents.addElement(agent);
-        }
-
-        private void removeAgentFully(SnmpMibAgent agent) {
-            Vector<TreeNode> v = new Vector<>();
-            for(Enumeration<TreeNode> e= children.elements();
-                e.hasMoreElements(); ) {
-
-                TreeNode node= e.nextElement();
-                node.removeAgentFully(agent);
-                if(node.agents.isEmpty())
-                    v.add(node);
-
-            }
-            for(Enumeration<TreeNode> e= v.elements(); e.hasMoreElements(); ) {
-                children.removeElement(e.nextElement());
-            }
-            removeAgent(agent);
-
-        }
-
-        private void removeAgent(SnmpMibAgent mib) {
-            if (!agents.contains(mib))
-                return;
-            agents.removeElement(mib);
-
-            if (!agents.isEmpty())
-                agent= agents.firstElement();
-
-        }
-
-        private void setAgent(SnmpMibAgent agent) {
-            this.agent = agent;
-        }
-
-        private void registerNode(long[] oid, int cursor, SnmpMibAgent agent) {
-
-            if (cursor >= oid.length)
-                //That's it !
-                //
-                return;
-            TreeNode child = retrieveChild(oid, cursor);
-            if (child == null) {
-                // Create a child and register it !
-                //
-                long theValue= oid[cursor];
-                child= new TreeNode(theValue, agent, this);
-                children.addElement(child);
-            }
-            else
-                if (agents.contains(agent) == false) {
-                    agents.addElement(agent);
-                }
-
-            // We have to set the agent attribute
-            //
-            if(cursor == (oid.length - 1)) {
-              child.setAgent(agent);
-            }
-            else
-              child.registerNode(oid, cursor+1, agent);
-        }
-
-        private TreeNode retrieveChild(long[] oid, int current) {
-            long theValue= oid[current];
-
-            for(Enumeration<TreeNode> e= children.elements(); e.hasMoreElements(); ) {
-                TreeNode node= e.nextElement();
-                if (node.match(theValue))
-                    return node;
-            }
-            return null;
-        }
-
-        private boolean match(long value) {
-            return (nodeValue == value) ? true : false;
-        }
-
-        private Vector<TreeNode> children= new Vector<>();
-        private Vector<SnmpMibAgent> agents= new Vector<>();
-        private long nodeValue;
-        private SnmpMibAgent agent;
-        private TreeNode parent;
-
-    }; // end of class TreeNode
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/daemon/SnmpRequestHandler.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1149 +0,0 @@
-/*
- * Copyright (c) 1998, 2013, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-package com.sun.jmx.snmp.daemon;
-
-
-
-// java import
-//
-import java.util.Vector;
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.logging.Level;
-import java.io.InterruptedIOException;
-import java.net.DatagramSocket;
-import java.net.DatagramPacket;
-import java.net.SocketException;
-
-// jmx imports
-//
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-import com.sun.jmx.snmp.SnmpMessage;
-import com.sun.jmx.snmp.SnmpPduFactory;
-import com.sun.jmx.snmp.SnmpPduBulk;
-import com.sun.jmx.snmp.SnmpPduPacket;
-import com.sun.jmx.snmp.SnmpPduRequest;
-import com.sun.jmx.snmp.SnmpPduTrap;
-import com.sun.jmx.snmp.SnmpValue;
-import com.sun.jmx.snmp.SnmpVarBind;
-import com.sun.jmx.snmp.SnmpVarBindList;
-import com.sun.jmx.snmp.SnmpDefinitions;
-import com.sun.jmx.snmp.SnmpStatusException;
-import com.sun.jmx.snmp.SnmpTooBigException;
-import com.sun.jmx.snmp.SnmpDataTypeEnums;
-
-// RI imports
-//
-import static com.sun.jmx.defaults.JmxProperties.SNMP_ADAPTOR_LOGGER;
-
-// SNMP runtime import
-//
-import com.sun.jmx.snmp.agent.SnmpMibAgent;
-import com.sun.jmx.snmp.agent.SnmpUserDataFactory;
-//import com.sun.jmx.snmp.IPAcl.IPAcl;
-import com.sun.jmx.snmp.InetAddressAcl;
-
-
-class SnmpRequestHandler extends ClientHandler implements SnmpDefinitions {
-
-    private transient DatagramSocket       socket = null ;
-    private transient DatagramPacket       packet = null ;
-    private transient Vector<SnmpMibAgent> mibs = null ;
-
-    /**
-     * Contains the list of sub-requests associated to the current request.
-     */
-    private transient Hashtable<SnmpMibAgent, SnmpSubRequestHandler> subs = null;
-
-    /**
-     * Reference on the MIBS
-     */
-    private transient SnmpMibTree root;
-
-    private transient InetAddressAcl      ipacl = null ;
-    private transient SnmpPduFactory      pduFactory = null ;
-    private transient SnmpUserDataFactory userDataFactory = null ;
-    private transient SnmpAdaptorServer adaptor = null;
-    /**
-     * Full constructor
-     */
-    public SnmpRequestHandler(SnmpAdaptorServer server, int id,
-                              DatagramSocket s, DatagramPacket p,
-                              SnmpMibTree tree, Vector<SnmpMibAgent> m,
-                              InetAddressAcl a,
-                              SnmpPduFactory factory,
-                              SnmpUserDataFactory dataFactory,
-                              MBeanServer f, ObjectName n)
-    {
-        super(server, id, f, n);
-
-        // Need a reference on SnmpAdaptorServer for getNext & getBulk,
-        // in case of oid equality (mib overlapping).
-        //
-        adaptor = server;
-        socket = s;
-        packet = p;
-        root= tree;
-        mibs = new Vector<>(m);
-        subs= new Hashtable<>(mibs.size());
-        ipacl = a;
-        pduFactory = factory ;
-        userDataFactory = dataFactory ;
-        //thread.start();
-    }
-
-    /**
-     * Treat the request available in 'packet' and send the result
-     * back to the client.
-     * Note: we overwrite 'packet' with the response bytes.
-     */
-    @Override
-    public void doRun() {
-
-        // Trace the input packet
-        //
-        if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-            SNMP_ADAPTOR_LOGGER.logp(Level.FINER, dbgTag,
-                    "doRun","Packet received:\n" +
-                    SnmpMessage.dumpHexBuffer(packet.getData(), 0, packet.getLength()));
-        }
-
-        // Let's build the response packet
-        //
-        DatagramPacket respPacket = makeResponsePacket(packet) ;
-
-        // Trace the output packet
-        //
-        if ((SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) && (respPacket != null)) {
-            SNMP_ADAPTOR_LOGGER.logp(Level.FINER, dbgTag,
-                    "doRun","Packet to be sent:\n" +
-                    SnmpMessage.dumpHexBuffer(respPacket.getData(), 0, respPacket.getLength()));
-        }
-
-        // Send the response packet if any
-        //
-        if (respPacket != null) {
-            try {
-                socket.send(respPacket) ;
-            } catch (SocketException e) {
-                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                    if (e.getMessage().equals(InterruptSysCallMsg)) {
-                        SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, dbgTag,
-                            "doRun", "interrupted");
-                    } else {
-                      SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, dbgTag,
-                            "doRun", "I/O exception", e);
-                    }
-                }
-            } catch(InterruptedIOException e) {
-                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, dbgTag,
-                        "doRun", "interrupted");
-                }
-            } catch(Exception e) {
-                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, dbgTag,
-                        "doRun", "failure when sending response", e);
-                }
-            }
-        }
-    }
-
-    /**
-     * Here we make a response packet from a request packet.
-     * We return null if there no response packet to sent.
-     */
-    private DatagramPacket makeResponsePacket(DatagramPacket reqPacket) {
-        DatagramPacket respPacket = null ;
-
-        // Transform the request packet into a request SnmpMessage
-        //
-        SnmpMessage reqMsg = new SnmpMessage() ;
-        try {
-            reqMsg.decodeMessage(reqPacket.getData(), reqPacket.getLength()) ;
-            reqMsg.address = reqPacket.getAddress() ;
-            reqMsg.port = reqPacket.getPort() ;
-        }
-        catch(SnmpStatusException x) {
-            if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, dbgTag,
-                    "makeResponsePacket", "packet decoding failed", x);
-            }
-            reqMsg = null ;
-            ((SnmpAdaptorServer)adaptorServer).incSnmpInASNParseErrs(1) ;
-        }
-
-        // Make the response SnmpMessage if any
-        //
-        SnmpMessage respMsg = null ;
-        if (reqMsg != null) {
-            respMsg = makeResponseMessage(reqMsg) ;
-        }
-
-        // Try to transform the response SnmpMessage into response packet.
-        // NOTE: we overwrite the request packet.
-        //
-        if (respMsg != null) {
-            try {
-                reqPacket.setLength(respMsg.encodeMessage(reqPacket.getData())) ;
-                respPacket = reqPacket ;
-            }
-            catch(SnmpTooBigException x) {
-                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, dbgTag,
-                        "makeResponsePacket", "response message is too big");
-                }
-                try {
-                    respMsg = newTooBigMessage(reqMsg) ;
-                    reqPacket.setLength(respMsg.encodeMessage(reqPacket.getData())) ;
-                    respPacket = reqPacket ;
-                }
-                catch(SnmpTooBigException xx) {
-                    if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                        SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, dbgTag,
-                            "makeResponsePacket", "'too big' is 'too big' !!!");
-                    }
-                    adaptor.incSnmpSilentDrops(1);
-                }
-            }
-        }
-
-        return respPacket ;
-    }
-
-    /**
-     * Here we make a response message from a request message.
-     * We return null if there is no message to reply.
-     */
-    private SnmpMessage makeResponseMessage(SnmpMessage reqMsg) {
-        SnmpMessage respMsg = null ;
-
-        // Transform the request message into a request pdu
-        //
-        SnmpPduPacket reqPdu;
-        Object userData = null;
-        try {
-            reqPdu = (SnmpPduPacket)pduFactory.decodeSnmpPdu(reqMsg) ;
-            if (reqPdu != null && userDataFactory != null)
-                userData = userDataFactory.allocateUserData(reqPdu);
-        }
-        catch(SnmpStatusException x) {
-            reqPdu = null ;
-            SnmpAdaptorServer snmpServer = (SnmpAdaptorServer)adaptorServer ;
-            snmpServer.incSnmpInASNParseErrs(1) ;
-            if (x.getStatus()== SnmpDefinitions.snmpWrongSnmpVersion)
-                snmpServer.incSnmpInBadVersions(1) ;
-            if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, dbgTag,
-                    "makeResponseMessage", "message decoding failed", x);
-            }
-        }
-
-        // Make the response pdu if any
-        //
-        SnmpPduPacket respPdu = null ;
-        if (reqPdu != null) {
-            respPdu = makeResponsePdu(reqPdu,userData) ;
-            try {
-                if (userDataFactory != null)
-                    userDataFactory.releaseUserData(userData,respPdu);
-            } catch (SnmpStatusException x) {
-                respPdu = null;
-            }
-        }
-
-        // Try to transform the response pdu into a response message if any
-        //
-        if (respPdu != null) {
-            try {
-                respMsg = (SnmpMessage)pduFactory.
-                    encodeSnmpPdu(respPdu, packet.getData().length) ;
-            }
-            catch(SnmpStatusException x) {
-                respMsg = null ;
-                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, dbgTag,
-                        "makeResponseMessage", "failure when encoding the response message", x);
-                }
-            }
-            catch(SnmpTooBigException x) {
-                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, dbgTag,
-                        "makeResponseMessage", "response message is too big");
-                }
-
-                try {
-                    // if the PDU is too small, why should we try to do
-                    // recovery ?
-                    //
-                    if (packet.getData().length <=32)
-                        throw x;
-                    int pos= x.getVarBindCount();
-                    if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                        SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, dbgTag,
-                            "makeResponseMessage", "fail on element" + pos);
-                    }
-                    int old;
-                    while (true) {
-                        try {
-                            respPdu = reduceResponsePdu(reqPdu, respPdu, pos) ;
-                            respMsg = (SnmpMessage)pduFactory.
-                                encodeSnmpPdu(respPdu,
-                                              packet.getData().length -32) ;
-                            break;
-                        } catch (SnmpTooBigException xx) {
-                            if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                                SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, dbgTag,
-                                    "makeResponseMessage", "response message is still too big");
-                            }
-                            old= pos;
-                            pos= xx.getVarBindCount();
-                            if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                                SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, dbgTag,
-                                    "makeResponseMessage","fail on element" + pos);
-                            }
-                            if (pos == old) {
-                                // we can not go any further in trying to
-                                // reduce the message !
-                                //
-                                throw xx;
-                            }
-                        }
-                    }// end of loop
-                } catch(SnmpStatusException xx) {
-                    respMsg = null ;
-                    if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                        SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, dbgTag,
-                           "makeResponseMessage", "failure when encoding the response message", xx);
-                    }
-                }
-                catch(SnmpTooBigException xx) {
-                    try {
-                        respPdu = newTooBigPdu(reqPdu) ;
-                        respMsg = (SnmpMessage)pduFactory.
-                            encodeSnmpPdu(respPdu, packet.getData().length) ;
-                    }
-                    catch(SnmpTooBigException xxx) {
-                        respMsg = null ;
-                        if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                            SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, dbgTag,
-                               "makeResponseMessage", "'too big' is 'too big' !!!");
-                        }
-                        adaptor.incSnmpSilentDrops(1);
-                    }
-                    catch(Exception xxx) {
-                        if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                            SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, dbgTag,
-                               "makeResponseMessage", "Got unexpected exception", xxx);
-                        }
-                        respMsg = null ;
-                    }
-                }
-                catch(Exception xx) {
-                    if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                        SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, dbgTag,
-                           "makeResponseMessage", "Got unexpected exception", xx);
-                    }
-                    respMsg = null ;
-                }
-            }
-        }
-        return respMsg ;
-    }
-
-    /**
-     * Here we make a response pdu from a request pdu.
-     * We return null if there is no pdu to reply.
-     */
-    private SnmpPduPacket makeResponsePdu(SnmpPduPacket reqPdu,
-                                          Object userData) {
-
-        SnmpAdaptorServer snmpServer = (SnmpAdaptorServer)adaptorServer ;
-        SnmpPduPacket respPdu = null ;
-
-        snmpServer.updateRequestCounters(reqPdu.type) ;
-        if (reqPdu.varBindList != null)
-            snmpServer.updateVarCounters(reqPdu.type,
-                                         reqPdu.varBindList.length) ;
-
-        if (checkPduType(reqPdu)) {
-            respPdu = checkAcl(reqPdu) ;
-            if (respPdu == null) { // reqPdu is accepted by ACLs
-                if (mibs.size() < 1) {
-                    if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-                        SNMP_ADAPTOR_LOGGER.logp(Level.FINER, dbgTag,
-                           "makeResponsePdu", "Request " + reqPdu.requestId +
-                           " received but no MIB registered.");
-                    }
-                    return makeNoMibErrorPdu((SnmpPduRequest)reqPdu, userData);
-                }
-                switch(reqPdu.type) {
-                case SnmpPduPacket.pduGetRequestPdu:
-                case SnmpPduPacket.pduGetNextRequestPdu:
-                case SnmpPduPacket.pduSetRequestPdu:
-                    respPdu = makeGetSetResponsePdu((SnmpPduRequest)reqPdu,
-                                                    userData) ;
-                    break ;
-
-                case SnmpPduPacket.pduGetBulkRequestPdu:
-                    respPdu = makeGetBulkResponsePdu((SnmpPduBulk)reqPdu,
-                                                     userData) ;
-                    break ;
-                }
-            }
-            else { // reqPdu is rejected by ACLs
-                // respPdu contains the error response to be sent.
-                // We send this response only if authResEnabled is true.
-                if (!snmpServer.getAuthRespEnabled()) { // No response should be sent
-                    respPdu = null ;
-                }
-                if (snmpServer.getAuthTrapEnabled()) { // A trap must be sent
-                    try {
-                        snmpServer.snmpV1Trap(SnmpPduTrap.
-                                              trapAuthenticationFailure, 0,
-                                              new SnmpVarBindList()) ;
-                    }
-                    catch(Exception x) {
-                        if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                            SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, dbgTag,
-                               "makeResponsePdu", "Failure when sending authentication trap", x);
-                        }
-                    }
-                }
-            }
-        }
-        return respPdu ;
-    }
-
-    //
-    // Generates a response packet, filling the values in the
-    // varbindlist with one of endOfMibView, noSuchObject, noSuchInstance
-    // according to the value of <code>status</code>
-    //
-    // @param statusTag should be one of:
-    //        <li>SnmpDataTypeEnums.errEndOfMibViewTag</li>
-    //        <li>SnmpDataTypeEnums.errNoSuchObjectTag</li>
-    //        <li>SnmpDataTypeEnums.errNoSuchInstanceTag</li>
-    //
-    SnmpPduPacket makeErrorVarbindPdu(SnmpPduPacket req, int statusTag) {
-
-        final SnmpVarBind[] vblist = req.varBindList;
-        final int length = vblist.length;
-
-        switch (statusTag) {
-        case SnmpDataTypeEnums.errEndOfMibViewTag:
-            for (int i=0 ; i<length ; i++)
-                vblist[i].value = SnmpVarBind.endOfMibView;
-            break;
-        case SnmpDataTypeEnums.errNoSuchObjectTag:
-            for (int i=0 ; i<length ; i++)
-                vblist[i].value = SnmpVarBind.noSuchObject;
-            break;
-        case SnmpDataTypeEnums.errNoSuchInstanceTag:
-            for (int i=0 ; i<length ; i++)
-                vblist[i].value = SnmpVarBind.noSuchInstance;
-            break;
-        default:
-            return newErrorResponsePdu(req,snmpRspGenErr,1);
-        }
-        return newValidResponsePdu(req,vblist);
-    }
-
-    // Generates an appropriate response when no mib is registered in
-    // the adaptor.
-    //
-    // <li>If the version is V1:</li>
-    // <ul><li>Generates a NoSuchName error V1 response PDU</li></ul>
-    // <li>If the version is V2:</li>
-    // <ul><li>If the request is a GET, fills the varbind list with
-    //         NoSuchObject's</li>
-    //     <li>If the request is a GET-NEXT/GET-BULK, fills the varbind
-    //         list with EndOfMibView's</li>
-    //     <li>If the request is a SET, generates a NoAccess error V2
-    //          response PDU</li>
-    // </ul>
-    //
-    //
-    SnmpPduPacket makeNoMibErrorPdu(SnmpPduRequest req, Object userData) {
-        // There is no agent registered
-        //
-        if (req.version == SnmpDefinitions.snmpVersionOne) {
-            // Version 1: => NoSuchName
-            return
-                newErrorResponsePdu(req,snmpRspNoSuchName,1);
-        } else if (req.version == SnmpDefinitions.snmpVersionTwo) {
-            // Version 2: => depends on PDU type
-            switch (req.type) {
-            case pduSetRequestPdu :
-            case pduWalkRequest :
-                // SET request => NoAccess
-                return
-                    newErrorResponsePdu(req,snmpRspNoAccess,1);
-            case pduGetRequestPdu :
-                // GET request => NoSuchObject
-                return
-                    makeErrorVarbindPdu(req,SnmpDataTypeEnums.
-                                        errNoSuchObjectTag);
-            case pduGetNextRequestPdu :
-            case pduGetBulkRequestPdu :
-                // GET-NEXT or GET-BULK => EndOfMibView
-                return
-                    makeErrorVarbindPdu(req,SnmpDataTypeEnums.
-                                        errEndOfMibViewTag);
-            default:
-            }
-        }
-        // Something wrong here: => snmpRspGenErr
-        return newErrorResponsePdu(req,snmpRspGenErr,1);
-    }
-
-    /**
-     * Here we make the response pdu from a get/set request pdu.
-     * At this level, the result is never null.
-     */
-    private SnmpPduPacket makeGetSetResponsePdu(SnmpPduRequest req,
-                                                Object userData) {
-
-        // Create the trhead group specific for handling sub-requests
-        // associated to the current request. Use the invoke id
-        //
-        // Nice idea to use a thread group on a request basis.
-        // However the impact on performance is terrible !
-        // theGroup= new ThreadGroup(thread.getThreadGroup(),
-        //                "request " + String.valueOf(req.requestId));
-
-        // Let's build the varBindList for the response pdu
-        //
-
-        if (req.varBindList == null) {
-            // Good ! Let's make a full response pdu.
-            //
-            return newValidResponsePdu(req, null) ;
-        }
-
-        // First we need to split the request into subrequests
-        //
-        splitRequest(req);
-        int nbSubRequest= subs.size();
-        if (nbSubRequest == 1)
-            return turboProcessingGetSet(req,userData);
-
-
-        // Execute all the subrequests resulting from the split of the
-        // varbind list.
-        //
-        SnmpPduPacket result= executeSubRequest(req,userData);
-        if (result != null)
-            // It means that an error occurred. The error is already
-            // formatted by the executeSubRequest
-            // method.
-            return result;
-
-        // So far so good. So we need to concatenate all the answers.
-        //
-        if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-            SNMP_ADAPTOR_LOGGER.logp(Level.FINER, dbgTag,
-               "makeGetSetResponsePdu",
-               "Build the unified response for request " + req.requestId);
-        }
-        return mergeResponses(req);
-    }
-
-    /**
-     * The method runs all the sub-requests associated to the current
-     * instance of SnmpRequestHandler.
-     */
-    private SnmpPduPacket executeSubRequest(SnmpPduPacket req,
-                                            Object userData) {
-
-        int errorStatus = SnmpDefinitions.snmpRspNoError ;
-
-        int i;
-        // If it's a set request, we must first check any varBind
-        //
-        if (req.type == pduSetRequestPdu) {
-
-            i=0;
-            for(Enumeration<SnmpSubRequestHandler> e= subs.elements(); e.hasMoreElements() ; i++) {
-                // Indicate to the sub request that a check must be invoked ...
-                // OK we should have defined out own tag for that !
-                //
-                SnmpSubRequestHandler sub= e.nextElement();
-                sub.setUserData(userData);
-                sub.type= pduWalkRequest;
-
-                sub.run();
-
-                sub.type= pduSetRequestPdu;
-
-                if (sub.getErrorStatus() != SnmpDefinitions.snmpRspNoError) {
-                    // No point to go any further.
-                    //
-                    if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                        SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, dbgTag,
-                           "executeSubRequest", "an error occurs");
-                    }
-
-                    return newErrorResponsePdu(req, errorStatus,
-                                               sub.getErrorIndex() + 1) ;
-                }
-            }
-        }// end processing check operation for a set PDU.
-
-        // Let's start the sub-requests.
-        //
-        i=0;
-        for(Enumeration<SnmpSubRequestHandler> e= subs.elements(); e.hasMoreElements() ;i++) {
-            SnmpSubRequestHandler sub= e.nextElement();
-        /* NPCTE fix for bugId 4492741, esc 0, 16-August 2001 */
-            sub.setUserData(userData);
-        /* end of NPCTE fix for bugId 4492741 */
-
-            sub.run();
-
-            if (sub.getErrorStatus() != SnmpDefinitions.snmpRspNoError) {
-                // No point to go any further.
-                //
-                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, dbgTag,
-                       "executeSubRequest", "an error occurs");
-                }
-
-                return newErrorResponsePdu(req, errorStatus,
-                                           sub.getErrorIndex() + 1) ;
-            }
-        }
-
-        // everything is ok
-        //
-        return null;
-    }
-
-    /**
-     * Optimize when there is only one sub request
-     */
-    private SnmpPduPacket turboProcessingGetSet(SnmpPduRequest req,
-                                                Object userData) {
-
-        int errorStatus;
-        SnmpSubRequestHandler sub = subs.elements().nextElement();
-        sub.setUserData(userData);
-
-        // Indicate to the sub request that a check must be invoked ...
-        // OK we should have defined out own tag for that !
-        //
-        if (req.type == SnmpDefinitions.pduSetRequestPdu) {
-            sub.type= pduWalkRequest;
-            sub.run();
-            sub.type= pduSetRequestPdu;
-
-            // Check the error status.
-            //
-            errorStatus= sub.getErrorStatus();
-            if (errorStatus != SnmpDefinitions.snmpRspNoError) {
-                // No point to go any further.
-                //
-                return newErrorResponsePdu(req, errorStatus,
-                                           sub.getErrorIndex() + 1) ;
-            }
-        }
-
-        // process the operation
-        //
-
-        sub.run();
-        errorStatus= sub.getErrorStatus();
-        if (errorStatus != SnmpDefinitions.snmpRspNoError) {
-            // No point to go any further.
-            //
-            if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, dbgTag,
-                   "turboProcessingGetSet", "an error occurs");
-            }
-            int realIndex= sub.getErrorIndex() + 1;
-            return newErrorResponsePdu(req, errorStatus, realIndex) ;
-        }
-
-        // So far so good. So we need to concatenate all the answers.
-        //
-
-        if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-            SNMP_ADAPTOR_LOGGER.logp(Level.FINER, dbgTag,
-               "turboProcessingGetSet",  "build the unified response for request "
-                + req.requestId);
-        }
-        return mergeResponses(req);
-    }
-
-    /**
-     * Here we make the response pdu for a bulk request.
-     * At this level, the result is never null.
-     */
-    private SnmpPduPacket makeGetBulkResponsePdu(SnmpPduBulk req,
-                                                 Object userData) {
-
-        SnmpVarBind[] respVarBindList;
-
-        // RFC 1905, Section 4.2.3, p14
-        int L = req.varBindList.length ;
-        int N = Math.max(Math.min(req.nonRepeaters, L), 0) ;
-        int M = Math.max(req.maxRepetitions, 0) ;
-        int R = L - N ;
-
-        if (req.varBindList == null) {
-            // Good ! Let's make a full response pdu.
-            //
-            return newValidResponsePdu(req, null) ;
-        }
-
-        // Split the request into subrequests.
-        //
-        splitBulkRequest(req, N, M, R);
-        SnmpPduPacket result= executeSubRequest(req,userData);
-        if (result != null)
-            return result;
-
-        respVarBindList= mergeBulkResponses(N + (M * R));
-
-        // Now we remove useless trailing endOfMibView.
-        //
-        int m2 ; // respVarBindList[m2] item and next are going to be removed
-        int t = respVarBindList.length ;
-        while ((t > N) && (respVarBindList[t-1].
-                           value.equals(SnmpVarBind.endOfMibView))) {
-            t-- ;
-        }
-        if (t == N)
-            m2 = N + R ;
-        else
-            m2 = N + ((t -1 -N) / R + 2) * R ; // Trivial, of course...
-        if (m2 < respVarBindList.length) {
-            SnmpVarBind[] truncatedList = new SnmpVarBind[m2] ;
-            for (int i = 0 ; i < m2 ; i++) {
-                truncatedList[i] = respVarBindList[i] ;
-            }
-            respVarBindList = truncatedList ;
-        }
-
-        // Good ! Let's make a full response pdu.
-        //
-        return newValidResponsePdu(req, respVarBindList) ;
-    }
-
-    /**
-     * Check the type of the pdu: only the get/set/bulk request
-     * are accepted.
-     */
-    private boolean checkPduType(SnmpPduPacket pdu) {
-
-        boolean result;
-
-        switch(pdu.type) {
-
-        case SnmpDefinitions.pduGetRequestPdu:
-        case SnmpDefinitions.pduGetNextRequestPdu:
-        case SnmpDefinitions.pduSetRequestPdu:
-        case SnmpDefinitions.pduGetBulkRequestPdu:
-            result = true ;
-            break;
-
-        default:
-            if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, dbgTag,
-                   "checkPduType", "cannot respond to this kind of PDU");
-            }
-            result = false ;
-            break;
-        }
-
-        return result ;
-    }
-
-    /**
-     * Check if the specified pdu is conform to the ACL.
-     * This method returns null if the pdu is ok. If not, it returns
-     * the response pdu to be replied.
-     */
-    private SnmpPduPacket checkAcl(SnmpPduPacket pdu) {
-        SnmpPduPacket response = null ;
-        String community = new String(pdu.community) ;
-
-        // We check the pdu type and create an error response if
-        // the check failed.
-        //
-        if (ipacl != null) {
-            if (pdu.type == SnmpDefinitions.pduSetRequestPdu) {
-                if (!ipacl.checkWritePermission(pdu.address, community)) {
-                    if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-                        SNMP_ADAPTOR_LOGGER.logp(Level.FINER, dbgTag,
-                           "checkAcl", "sender is " + pdu.address +
-                              " with " + community +". Sender has no write permission");
-                    }
-                    int err = SnmpSubRequestHandler.
-                        mapErrorStatus(SnmpDefinitions.
-                                       snmpRspAuthorizationError,
-                                       pdu.version, pdu.type);
-                    response = newErrorResponsePdu(pdu, err, 0) ;
-                }
-                else {
-                    if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-                        SNMP_ADAPTOR_LOGGER.logp(Level.FINER, dbgTag,
-                           "checkAcl", "sender is " + pdu.address +
-                              " with " + community +". Sender has write permission");
-                    }
-                }
-            }
-            else {
-                if (!ipacl.checkReadPermission(pdu.address, community)) {
-                    if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-                        SNMP_ADAPTOR_LOGGER.logp(Level.FINER, dbgTag,
-                           "checkAcl", "sender is " + pdu.address +
-                              " with " + community +". Sender has no read permission");
-                    }
-                    int err = SnmpSubRequestHandler.
-                        mapErrorStatus(SnmpDefinitions.
-                                       snmpRspAuthorizationError,
-                                       pdu.version, pdu.type);
-                    response = newErrorResponsePdu(pdu,
-                                                   err,
-                                                   0);
-                    SnmpAdaptorServer snmpServer =
-                        (SnmpAdaptorServer)adaptorServer;
-                    snmpServer.updateErrorCounters(SnmpDefinitions.
-                                                   snmpRspNoSuchName);
-                }
-                else {
-                    if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-                        SNMP_ADAPTOR_LOGGER.logp(Level.FINER, dbgTag,
-                           "checkAcl", "sender is " + pdu.address +
-                              " with " + community +". Sender has read permission");
-                    }
-                }
-            }
-        }
-
-        // If the response is not null, this means the pdu is rejected.
-        // So let's update the statistics.
-        //
-        if (response != null) {
-            SnmpAdaptorServer snmpServer = (SnmpAdaptorServer)adaptorServer ;
-            snmpServer.incSnmpInBadCommunityUses(1) ;
-            if (ipacl.checkCommunity(community) == false)
-                snmpServer.incSnmpInBadCommunityNames(1) ;
-        }
-
-        return response ;
-    }
-
-    /**
-     * Make a response pdu with the specified error status and index.
-     * NOTE: the response pdu share its varBindList with the request pdu.
-     */
-    private SnmpPduRequest newValidResponsePdu(SnmpPduPacket reqPdu,
-                                               SnmpVarBind[] varBindList) {
-        SnmpPduRequest result = new SnmpPduRequest() ;
-
-        result.address = reqPdu.address ;
-        result.port = reqPdu.port ;
-        result.version = reqPdu.version ;
-        result.community = reqPdu.community ;
-        result.type = SnmpPduRequest.pduGetResponsePdu ;
-        result.requestId = reqPdu.requestId ;
-        result.errorStatus = SnmpDefinitions.snmpRspNoError ;
-        result.errorIndex = 0 ;
-        result.varBindList = varBindList ;
-
-        ((SnmpAdaptorServer)adaptorServer).
-            updateErrorCounters(result.errorStatus) ;
-
-        return result ;
-    }
-
-    /**
-     * Make a response pdu with the specified error status and index.
-     * NOTE: the response pdu share its varBindList with the request pdu.
-     */
-    private SnmpPduRequest newErrorResponsePdu(SnmpPduPacket req,int s,int i) {
-        SnmpPduRequest result = newValidResponsePdu(req, null) ;
-        result.errorStatus = s ;
-        result.errorIndex = i ;
-        result.varBindList = req.varBindList ;
-
-        ((SnmpAdaptorServer)adaptorServer).
-            updateErrorCounters(result.errorStatus) ;
-
-        return result ;
-    }
-
-    private SnmpMessage newTooBigMessage(SnmpMessage reqMsg)
-        throws SnmpTooBigException {
-        SnmpMessage result = null ;
-        SnmpPduPacket reqPdu;
-
-        try {
-            reqPdu = (SnmpPduPacket)pduFactory.decodeSnmpPdu(reqMsg) ;
-            if (reqPdu != null) {
-                SnmpPduPacket respPdu = newTooBigPdu(reqPdu) ;
-                result = (SnmpMessage)pduFactory.
-                    encodeSnmpPdu(respPdu, packet.getData().length) ;
-            }
-        }
-        catch(SnmpStatusException x) {
-            // This should not occur because decodeIncomingRequest has normally
-            // been successfully called before.
-            if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, dbgTag,
-                   "newTooBigMessage", "Internal error", x);
-            }
-            throw new InternalError(x) ;
-        }
-
-        return result ;
-    }
-
-    private SnmpPduPacket newTooBigPdu(SnmpPduPacket req) {
-        SnmpPduRequest result =
-            newErrorResponsePdu(req, SnmpDefinitions.snmpRspTooBig, 0) ;
-        result.varBindList = null ;
-        return result ;
-    }
-
-    private SnmpPduPacket reduceResponsePdu(SnmpPduPacket req,
-                                            SnmpPduPacket resp,
-                                            int acceptedVbCount)
-        throws SnmpTooBigException {
-
-        // Reduction can be attempted only on bulk response
-        //
-        if (req.type != SnmpPduPacket.pduGetBulkRequestPdu) {
-            if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, dbgTag,
-                   "reduceResponsePdu", "cannot remove anything");
-            }
-            throw new SnmpTooBigException(acceptedVbCount) ;
-        }
-
-        // We're going to reduce the varbind list.
-        // First determine which items should be removed.
-        // Next duplicate and replace the existing list by the reduced one.
-        //
-        // acceptedVbCount is the number of varbind which have been
-        // successfully encoded before reaching bufferSize:
-        //   * when it is >= 2, we split the varbindlist at this
-        //     position (-1 to be safe),
-        //   * when it is 1, we only put one (big?) item in the varbindlist
-        //   * when it is 0 (in fact, acceptedVbCount is not available),
-        //     we split the varbindlist by 2.
-        //
-        int vbCount;
-        if (acceptedVbCount >= 3)
-            vbCount = Math.min(acceptedVbCount - 1, resp.varBindList.length) ;
-        else if (acceptedVbCount == 1)
-            vbCount = 1 ;
-        else // acceptedCount == 0 ie it is unknown
-            vbCount = resp.varBindList.length / 2 ;
-
-        if (vbCount < 1) {
-            if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, dbgTag,
-                   "reduceResponsePdu", "cannot remove anything");
-            }
-            throw new SnmpTooBigException(acceptedVbCount) ;
-        }
-        else {
-            SnmpVarBind[] newVbList = new SnmpVarBind[vbCount] ;
-            for (int i = 0 ; i < vbCount ; i++) {
-                newVbList[i] = resp.varBindList[i] ;
-            }
-            if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, dbgTag,
-                   "reduceResponsePdu", (resp.varBindList.length - newVbList.length) +
-                    " items have been removed");
-            }
-            resp.varBindList = newVbList ;
-        }
-
-        return resp ;
-    }
-
-    /**
-     * The method takes the incoming requests and split it into subrequests.
-     */
-    private void splitRequest(SnmpPduRequest req) {
-
-        int nbAgents= mibs.size();
-        SnmpMibAgent agent = mibs.firstElement();
-        if (nbAgents == 1) {
-            // Take all the oids contained in the request and
-            //
-            subs.put(agent, new SnmpSubRequestHandler(agent, req, true));
-            return;
-        }
-
-        // For the get next operation we are going to send the varbind list
-        // to all agents
-        //
-        if (req.type == pduGetNextRequestPdu) {
-            for(Enumeration<SnmpMibAgent> e= mibs.elements(); e.hasMoreElements(); ) {
-                final SnmpMibAgent ag= e.nextElement();
-                subs.put(ag, new SnmpSubNextRequestHandler(adaptor, ag, req));
-            }
-            return;
-        }
-
-        int nbReqs= req.varBindList.length;
-        SnmpVarBind[] vars= req.varBindList;
-        SnmpSubRequestHandler sub;
-        for(int i=0; i < nbReqs; i++) {
-            agent= root.getAgentMib(vars[i].oid);
-            sub= subs.get(agent);
-            if (sub == null) {
-                // We need to create the sub request handler and update
-                // the hashtable
-                //
-                sub= new SnmpSubRequestHandler(agent, req);
-                subs.put(agent, sub);
-            }
-
-            // Update the translation table within the subrequest
-            //
-            sub.updateRequest(vars[i], i);
-        }
-    }
-
-    /**
-     * The method takes the incoming get bulk requests and split it into
-     * subrequests.
-     */
-    private void splitBulkRequest(SnmpPduBulk req,
-                                  int nonRepeaters,
-                                  int maxRepetitions,
-                                  int R) {
-        // Send the getBulk to all agents
-        //
-        for(Enumeration<SnmpMibAgent> e= mibs.elements(); e.hasMoreElements(); ) {
-            final SnmpMibAgent agent = e.nextElement();
-
-            if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-                SNMP_ADAPTOR_LOGGER.logp(Level.FINER, dbgTag,
-                   "splitBulkRequest", "Create a sub with : " + agent + " " + nonRepeaters
-                   + " " + maxRepetitions + " " + R);
-            }
-
-            subs.put(agent,
-                     new SnmpSubBulkRequestHandler(adaptor,
-                                                   agent,
-                                                   req,
-                                                   nonRepeaters,
-                                                   maxRepetitions,
-                                                   R));
-        }
-    }
-
-    private SnmpPduPacket mergeResponses(SnmpPduRequest req) {
-
-        if (req.type == pduGetNextRequestPdu) {
-            return mergeNextResponses(req);
-        }
-
-        SnmpVarBind[] result= req.varBindList;
-
-        // Go through the list of subrequests and concatenate.
-        // Hopefully, by now all the sub-requests should be finished
-        //
-        for(Enumeration<SnmpSubRequestHandler> e= subs.elements(); e.hasMoreElements();) {
-            SnmpSubRequestHandler sub= e.nextElement();
-            sub.updateResult(result);
-        }
-        return newValidResponsePdu(req,result);
-    }
-
-    private SnmpPduPacket mergeNextResponses(SnmpPduRequest req) {
-        int max= req.varBindList.length;
-        SnmpVarBind[] result= new SnmpVarBind[max];
-
-        // Go through the list of subrequests and concatenate.
-        // Hopefully, by now all the sub-requests should be finished
-        //
-        for(Enumeration<SnmpSubRequestHandler> e= subs.elements(); e.hasMoreElements();) {
-            SnmpSubRequestHandler sub= e.nextElement();
-            sub.updateResult(result);
-        }
-
-        if (req.version == snmpVersionTwo) {
-            return newValidResponsePdu(req,result);
-        }
-
-        // In v1 make sure there is no endOfMibView ...
-        //
-        for(int i=0; i < max; i++) {
-            SnmpValue val= result[i].value;
-            if (val == SnmpVarBind.endOfMibView)
-                return newErrorResponsePdu(req,
-                                   SnmpDefinitions.snmpRspNoSuchName, i+1);
-        }
-
-        // So far so good ...
-        //
-        return newValidResponsePdu(req,result);
-    }
-
-    private SnmpVarBind[] mergeBulkResponses(int size) {
-        // Let's allocate the array for storing the result
-        //
-        SnmpVarBind[] result= new SnmpVarBind[size];
-        for(int i= size-1; i >=0; --i) {
-            result[i]= new SnmpVarBind();
-            result[i].value= SnmpVarBind.endOfMibView;
-        }
-
-        // Go through the list of subrequests and concatenate.
-        // Hopefully, by now all the sub-requests should be finished
-        //
-        for(Enumeration<SnmpSubRequestHandler> e= subs.elements(); e.hasMoreElements();) {
-            SnmpSubRequestHandler sub= e.nextElement();
-            sub.updateResult(result);
-        }
-
-        return result;
-    }
-
-    @Override
-    protected String makeDebugTag() {
-        return "SnmpRequestHandler[" + adaptorServer.getProtocol() + ":" +
-            adaptorServer.getPort() + "]";
-    }
-
-    @Override
-    Thread createThread(Runnable r) {
-        return null;
-    }
-
-    static final private String InterruptSysCallMsg =
-        "Interrupted system call";
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/daemon/SnmpSubBulkRequestHandler.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,343 +0,0 @@
-/*
- * Copyright (c) 1998, 2013, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-package com.sun.jmx.snmp.daemon;
-
-
-
-// java import
-//
-import java.util.Enumeration;
-import java.util.logging.Level;
-// jmx imports
-//
-import com.sun.jmx.snmp.SnmpPdu;
-import com.sun.jmx.snmp.SnmpVarBind;
-import com.sun.jmx.snmp.SnmpOid;
-import com.sun.jmx.snmp.SnmpValue;
-import com.sun.jmx.snmp.SnmpDefinitions;
-import com.sun.jmx.snmp.SnmpStatusException;
-import com.sun.jmx.snmp.SnmpEngine;
-// SNMP Runtime import
-//
-import static com.sun.jmx.defaults.JmxProperties.SNMP_ADAPTOR_LOGGER;
-import com.sun.jmx.snmp.agent.SnmpMibAgent;
-import com.sun.jmx.snmp.internal.SnmpIncomingRequest;
-import com.sun.jmx.snmp.ThreadContext;
-
-class SnmpSubBulkRequestHandler extends SnmpSubRequestHandler {
-    private SnmpAdaptorServer server = null;
-
-    /**
-     * The constructor initialize the subrequest with the whole varbind list contained
-     * in the original request.
-     */
-    protected SnmpSubBulkRequestHandler(SnmpEngine engine,
-                                        SnmpAdaptorServer server,
-                                        SnmpIncomingRequest incRequest,
-                                        SnmpMibAgent agent,
-                                        SnmpPdu req,
-                                        int nonRepeat,
-                                        int maxRepeat,
-                                        int R) {
-        super(engine, incRequest, agent, req);
-        init(server, req, nonRepeat, maxRepeat, R);
-    }
-
-    /**
-     * The constructor initialize the subrequest with the whole varbind list contained
-     * in the original request.
-     */
-    protected SnmpSubBulkRequestHandler(SnmpAdaptorServer server,
-                                        SnmpMibAgent agent,
-                                        SnmpPdu req,
-                                        int nonRepeat,
-                                        int maxRepeat,
-                                        int R) {
-        super(agent, req);
-        init(server, req, nonRepeat, maxRepeat, R);
-    }
-
-    @Override
-    public void run() {
-
-        size= varBind.size();
-
-        try {
-            // Invoke a getBulk operation
-            //
-            /* NPCTE fix for bugId 4492741, esc 0, 16-August-2001 */
-            final ThreadContext oldContext =
-                ThreadContext.push("SnmpUserData",data);
-            try {
-                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-                    SNMP_ADAPTOR_LOGGER.logp(Level.FINER, SnmpSubRequestHandler.class.getName(),
-                        "run", "[" + Thread.currentThread() +
-                        "]:getBulk operation on " + agent.getMibName());
-                }
-                agent.getBulk(createMibRequest(varBind,version,data),
-                              nonRepeat, maxRepeat);
-            } finally {
-                ThreadContext.restore(oldContext);
-            }
-            /* end of NPCTE fix for bugId 4492741 */
-
-        } catch(SnmpStatusException x) {
-            errorStatus = x.getStatus() ;
-            errorIndex=  x.getErrorIndex();
-            if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, SnmpSubRequestHandler.class.getName(),
-                    "run", "[" + Thread.currentThread() +
-                    "]:an Snmp error occurred during the operation", x);
-            }
-        }
-        catch(Exception x) {
-            errorStatus = SnmpDefinitions.snmpRspGenErr ;
-            if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, SnmpSubRequestHandler.class.getName(),
-                    "run", "[" + Thread.currentThread() +
-                    "]:a generic error occurred during the operation", x);
-            }
-        }
-        if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-            SNMP_ADAPTOR_LOGGER.logp(Level.FINER, SnmpSubRequestHandler.class.getName(),
-                "run", "[" + Thread.currentThread() +
-                  "]:operation completed");
-        }
-    }
-
-    private void init(SnmpAdaptorServer server,
-                      SnmpPdu req,
-                      int nonRepeat,
-                      int maxRepeat,
-                      int R) {
-        this.server = server;
-        this.nonRepeat= nonRepeat;
-        this.maxRepeat= maxRepeat;
-        this.globalR= R;
-
-        final int max= translation.length;
-        final SnmpVarBind[] list= req.varBindList;
-        final NonSyncVector<SnmpVarBind> nonSyncVarBind =
-                ((NonSyncVector<SnmpVarBind>)varBind);
-        for(int i=0; i < max; i++) {
-            translation[i]= i;
-            // we need to allocate a new SnmpVarBind. Otherwise the first
-            // sub request will modify the list...
-            //
-            final SnmpVarBind newVarBind =
-                new SnmpVarBind(list[i].oid, list[i].value);
-            nonSyncVarBind.addNonSyncElement(newVarBind);
-        }
-    }
-
-    /**
-     * The method updates find out which element to use at update time. Handle oid overlapping as well
-     */
-    private SnmpVarBind findVarBind(SnmpVarBind element,
-                                    SnmpVarBind result) {
-
-        if (element == null) return null;
-
-        if (result.oid == null) {
-             return element;
-        }
-
-        if (element.value == SnmpVarBind.endOfMibView) return result;
-
-        if (result.value == SnmpVarBind.endOfMibView) return element;
-
-        final SnmpValue val = result.value;
-
-        int comp = element.oid.compareTo(result.oid);
-        if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-            SNMP_ADAPTOR_LOGGER.logp(Level.FINER, SnmpSubRequestHandler.class.getName(),
-                "findVarBind","Comparing OID element : " + element.oid +
-                  " with result : " + result.oid);
-            SNMP_ADAPTOR_LOGGER.logp(Level.FINER, SnmpSubRequestHandler.class.getName(),
-                "findVarBind","Values element : " + element.value +
-                  " result : " + result.value);
-        }
-        if (comp < 0) {
-            // Take the smallest (lexicographically)
-            //
-            return element;
-        }
-        else {
-            if(comp == 0) {
-                // Must compare agent used for reply
-                // Take the deeper within the reply
-                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-                    SNMP_ADAPTOR_LOGGER.logp(Level.FINER, SnmpSubRequestHandler.class.getName(),
-                        "findVarBind"," oid overlapping. Oid : " +
-                          element.oid + "value :" + element.value);
-                    SNMP_ADAPTOR_LOGGER.logp(Level.FINER, SnmpSubRequestHandler.class.getName(),
-                         "findVarBind","Already present varBind : " +
-                          result);
-                }
-                SnmpOid oid = result.oid;
-                SnmpMibAgent deeperAgent = server.getAgentMib(oid);
-
-                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-                    SNMP_ADAPTOR_LOGGER.logp(Level.FINER, SnmpSubRequestHandler.class.getName(),
-                        "findVarBind","Deeper agent : " + deeperAgent);
-                }
-                if(deeperAgent == agent) {
-                    if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-                        SNMP_ADAPTOR_LOGGER.logp(Level.FINER, SnmpSubRequestHandler.class.getName(),
-                            "findVarBind","The current agent is the deeper one. Update the value with the current one");
-                    }
-                    return element;
-                } else {
-                    if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-                        SNMP_ADAPTOR_LOGGER.logp(Level.FINER, SnmpSubRequestHandler.class.getName(),
-                            "findVarBind","The current agent is not the deeper one. return the previous one.");
-                    }
-                    return result;
-                }
-
-                /*
-                   Vector v = new Vector();
-                   SnmpMibRequest getReq = createMibRequest(v,
-                   version,
-                   null);
-                   SnmpVarBind realValue = new SnmpVarBind(oid);
-                   getReq.addVarBind(realValue);
-                   try {
-                   deeperAgent.get(getReq);
-                   } catch(SnmpStatusException e) {
-                   e.printStackTrace();
-                   }
-
-                   if(isDebugOn())
-                   trace("findVarBind", "Biggest priority value is : " +
-                   realValue.value);
-
-                   return realValue;
-                */
-
-            }
-            else {
-                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-                    SNMP_ADAPTOR_LOGGER.logp(Level.FINER, SnmpSubRequestHandler.class.getName(),
-                        "findVarBind","The right varBind is the already present one");
-                }
-                return result;
-            }
-        }
-    }
-    /**
-     * The method updates a given var bind list with the result of a
-     * previsouly invoked operation.
-     * Prior to calling the method, one must make sure that the operation was
-     * successful. As such the method getErrorIndex or getErrorStatus should be
-     * called.
-     */
-    @Override
-    protected void updateResult(SnmpVarBind[] result) {
-        // we can assume that the run method is over ...
-        //
-
-        final Enumeration<SnmpVarBind> e= varBind.elements();
-        final int max= result.length;
-
-        // First go through all the values once ...
-        for(int i=0; i < size; i++) {
-            // May be we should control the position ...
-            //
-            if (e.hasMoreElements() == false)
-                return;
-
-            // bugId 4641694: must check position in order to avoid
-            //       ArrayIndexOutOfBoundException
-            final int pos=translation[i];
-            if (pos >= max) {
-                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, SnmpSubRequestHandler.class.getName(),
-                        "updateResult","Position '"+pos+"' is out of bound...");
-                }
-                continue;
-            }
-
-            final SnmpVarBind element= e.nextElement();
-
-            if (element == null) continue;
-            if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-                SNMP_ADAPTOR_LOGGER.logp(Level.FINER, SnmpSubRequestHandler.class.getName(),
-                    "updateResult","Non repeaters Current element : " +
-                      element + " from agent : " + agent);
-            }
-            final SnmpVarBind res = findVarBind(element,result[pos]);
-
-            if(res == null) continue;
-
-            result[pos] = res;
-        }
-
-        // Now update the values which have been repeated
-        // more than once.
-        int localR= size - nonRepeat;
-        for (int i = 2 ; i <= maxRepeat ; i++) {
-            for (int r = 0 ; r < localR ; r++) {
-                final int pos = (i-1)* globalR + translation[nonRepeat + r] ;
-                if (pos >= max)
-                    return;
-                if (e.hasMoreElements() ==false)
-                    return;
-                final SnmpVarBind element= e.nextElement();
-
-                if (element == null) continue;
-                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-                    SNMP_ADAPTOR_LOGGER.logp(Level.FINER, SnmpSubRequestHandler.class.getName(),
-                        "updateResult","Repeaters Current element : " +
-                          element + " from agent : " + agent);
-                }
-                final SnmpVarBind res = findVarBind(element, result[pos]);
-
-                if(res == null) continue;
-
-                result[pos] = res;
-            }
-        }
-    }
-
-    // PROTECTED VARIABLES
-    //------------------
-
-    /**
-     * Specific to the sub request
-     */
-    protected int nonRepeat=0;
-
-    protected int maxRepeat=0;
-
-    /**
-     * R as defined in RCF 1902 for the global request the sub-request is associated to.
-     */
-    protected int globalR=0;
-
-    protected int size=0;
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/daemon/SnmpSubNextRequestHandler.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,272 +0,0 @@
-/*
- * Copyright (c) 1998, 2013, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.jmx.snmp.daemon;
-
-// java imports
-//
-import java.util.logging.Level;
-import java.util.Vector;
-
-// jmx imports
-//
-import com.sun.jmx.snmp.SnmpEngine;
-import com.sun.jmx.snmp.SnmpPdu;
-import com.sun.jmx.snmp.SnmpValue;
-import com.sun.jmx.snmp.SnmpVarBind;
-import com.sun.jmx.snmp.SnmpVarBindList;
-import com.sun.jmx.snmp.SnmpOid;
-import com.sun.jmx.snmp.SnmpDefinitions;
-import com.sun.jmx.snmp.SnmpStatusException;
-// SNMP Runtime import
-//
-import static com.sun.jmx.defaults.JmxProperties.SNMP_ADAPTOR_LOGGER;
-import com.sun.jmx.snmp.agent.SnmpMibAgent;
-import com.sun.jmx.snmp.agent.SnmpMibRequest;
-import com.sun.jmx.snmp.daemon.SnmpAdaptorServer;
-import com.sun.jmx.snmp.internal.SnmpIncomingRequest;
-
-/* NPCTE fix for bugId 4492741, esc 0 */
-import com.sun.jmx.snmp.ThreadContext;
-/* end of NPCTE fix for bugId 4492741 */
-
-class SnmpSubNextRequestHandler extends SnmpSubRequestHandler {
-    private SnmpAdaptorServer server = null;
-    /**
-     * The constructor initialize the subrequest with the whole varbind
-     * list contained in the original request.
-     */
-    protected SnmpSubNextRequestHandler(SnmpAdaptorServer server,
-                                        SnmpMibAgent agent,
-                                        SnmpPdu req) {
-        super(agent,req);
-        init(req, server);
-    }
-
-    protected SnmpSubNextRequestHandler(SnmpEngine engine,
-                                        SnmpAdaptorServer server,
-                                        SnmpIncomingRequest incRequest,
-                                        SnmpMibAgent agent,
-                                        SnmpPdu req) {
-        super(engine, incRequest, agent, req);
-        init(req, server);
-        if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-            SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, SnmpSubNextRequestHandler.class.getName(),
-                "SnmpSubNextRequestHandler", "Constructor : " + this);
-        }
-    }
-
-    private void init(SnmpPdu req, SnmpAdaptorServer server) {
-        this.server = server;
-
-        // The translation table is easy in this case ...
-        //
-        final int max= translation.length;
-        final SnmpVarBind[] list= req.varBindList;
-        final NonSyncVector<SnmpVarBind> nonSyncVarBind =
-                ((NonSyncVector<SnmpVarBind>)varBind);
-        for(int i=0; i < max; i++) {
-            translation[i]= i;
-            // we need to allocate a new SnmpVarBind. Otherwise the first
-            // sub request will modify the list...
-            //
-            final SnmpVarBind newVarBind =
-                new SnmpVarBind(list[i].oid, list[i].value);
-            nonSyncVarBind.addNonSyncElement(newVarBind);
-        }
-    }
-
-    public void run() {
-
-        try {
-            /* NPCTE fix for bugId 4492741, esc 0, 16-August-2001 */
-            final ThreadContext oldContext =
-                ThreadContext.push("SnmpUserData",data);
-            try {
-                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-                    SNMP_ADAPTOR_LOGGER.logp(Level.FINER, SnmpSubRequestHandler.class.getName(),
-                        "run", "[" + Thread.currentThread() +
-                          "]:getNext operation on " + agent.getMibName());
-                }
-
-                // Always call with V2. So the merge of the responses will
-                // be easier.
-                //
-                agent.getNext(createMibRequest(varBind, snmpVersionTwo, data));
-            } finally {
-                ThreadContext.restore(oldContext);
-            }
-            /* end of NPCTE fix for bugId 4492741 */
-
-
-        } catch(SnmpStatusException x) {
-            errorStatus = x.getStatus() ;
-            errorIndex=  x.getErrorIndex();
-            if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, SnmpSubRequestHandler.class.getName(),
-                    "run", "[" + Thread.currentThread() +
-                      "]:an Snmp error occurred during the operation", x);
-            }
-        }
-        catch(Exception x) {
-            errorStatus = SnmpDefinitions.snmpRspGenErr ;
-            if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, SnmpSubRequestHandler.class.getName(),
-                    "run", "[" + Thread.currentThread() +
-                      "]:a generic error occurred during the operation", x);
-            }
-        }
-        if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-            SNMP_ADAPTOR_LOGGER.logp(Level.FINER, SnmpSubRequestHandler.class.getName(),
-                "run", "[" + Thread.currentThread() +  "]:operation completed");
-        }
-    }
-
-    /**
-     * The method updates the varbind list of the subrequest.
-     */
-    protected  void updateRequest(SnmpVarBind var, int pos) {
-        if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-            SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, SnmpSubRequestHandler.class.getName(),
-                "updateRequest", "Copy :" + var);
-        }
-        int size= varBind.size();
-        translation[size]= pos;
-        final SnmpVarBind newVarBind =
-            new SnmpVarBind(var.oid, var.value);
-        if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-            SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, SnmpSubRequestHandler.class.getName(),
-                "updateRequest", "Copied :" + newVarBind);
-        }
-
-        varBind.addElement(newVarBind);
-    }
-    /**
-     * The method updates a given var bind list with the result of a
-     * previsouly invoked operation.
-     * Prior to calling the method, one must make sure that the operation was
-     * successful. As such the method getErrorIndex or getErrorStatus should be
-     * called.
-     */
-    protected void updateResult(SnmpVarBind[] result) {
-
-        final int max=varBind.size();
-        for(int i= 0; i< max ; i++) {
-            // May be we should control the position ...
-            //
-            final int index= translation[i];
-            final SnmpVarBind elmt=
-                (SnmpVarBind)((NonSyncVector)varBind).elementAtNonSync(i);
-
-            final SnmpVarBind vb= result[index];
-            if (vb == null) {
-                result[index]= elmt;
-                /* NPCTE fix for bugid 4381195 esc 0. <J.C.> < 17-Oct-2000> */
-                // if ((elmt != null) &&  (elmt.value == null) &&
-                //    (version == snmpVersionTwo))
-                //    elmt.value = SnmpVarBind.endOfMibView;
-                /* end of NPCTE fix for bugid 4381195 */
-                continue;
-            }
-
-            final SnmpValue val= vb.value;
-            if ((val == null)|| (val == SnmpVarBind.endOfMibView)){
-                /* NPCTE fix for bugid 4381195 esc 0. <J.C.> < 17-Oct-2000> */
-                if ((elmt != null) &&
-                    (elmt.value != SnmpVarBind.endOfMibView))
-                    result[index]= elmt;
-                // else if ((val == null) && (version == snmpVersionTwo))
-                //    vb.value = SnmpVarBind.endOfMibView;
-                continue;
-                /* end of NPCTE fix for bugid 4381195 */
-            }
-
-            /* NPCTE fix for bugid 4381195 esc 0. <J.C.> < 17-Oct-2000> */
-            if (elmt == null) continue;
-            /* end of NPCTE fix for bugid 4381195 */
-
-            if (elmt.value == SnmpVarBind.endOfMibView) continue;
-
-
-            // Now we need to take the smallest oid ...
-            //
-            int comp = elmt.oid.compareTo(vb.oid);
-            if (comp < 0) {
-              // Take the smallest (lexicographically)
-                //
-                result[index]= elmt;
-            }
-            else {
-                if(comp == 0) {
-                    // Must compare agent used for reply
-                    // Take the deeper within the reply
-                    if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-                        SNMP_ADAPTOR_LOGGER.logp(Level.FINER, SnmpSubRequestHandler.class.getName(),
-                            "updateResult"," oid overlapping. Oid : " +
-                              elmt.oid + "value :" + elmt.value);
-                        SNMP_ADAPTOR_LOGGER.logp(Level.FINER, SnmpSubRequestHandler.class.getName(),
-                            "updateResult","Already present varBind : " +
-                              vb);
-                    }
-
-                    SnmpOid oid = vb.oid;
-                    SnmpMibAgent deeperAgent = server.getAgentMib(oid);
-
-                    if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-                        SNMP_ADAPTOR_LOGGER.logp(Level.FINER, SnmpSubRequestHandler.class.getName(),
-                            "updateResult","Deeper agent : " + deeperAgent);
-                    }
-                    if(deeperAgent == agent) {
-                        if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-                            SNMP_ADAPTOR_LOGGER.logp(Level.FINER, SnmpSubRequestHandler.class.getName(),
-                                "updateResult","The current agent is the deeper one. Update the value with the current one");
-                        }
-                        result[index].value = elmt.value;
-                    }
-
-                    /*
-                      Vector v = new Vector();
-                      SnmpMibRequest getReq = createMibRequest(v,
-                      version,
-                      null);
-                      SnmpVarBind realValue = new SnmpVarBind(oid);
-                      getReq.addVarBind(realValue);
-                      try {
-                      deeperAgent.get(getReq);
-                      } catch(SnmpStatusException e) {
-                      e.printStackTrace();
-                      }
-
-                      if(isDebugOn())
-                      trace("updateResult", "Biggest priority value is : " +
-                      realValue.value);
-
-                      result[index].value = realValue.value;
-                    */
-                }
-            }
-        }
-    }
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/daemon/SnmpSubRequestHandler.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,630 +0,0 @@
-/*
- * Copyright (c) 1998, 2013, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-package com.sun.jmx.snmp.daemon;
-
-
-
-// java import
-//
-import java.util.logging.Level;
-import java.util.Vector;
-
-// jmx imports
-//
-import static com.sun.jmx.defaults.JmxProperties.SNMP_ADAPTOR_LOGGER;
-import com.sun.jmx.snmp.SnmpPdu;
-import com.sun.jmx.snmp.SnmpVarBind;
-import com.sun.jmx.snmp.SnmpDefinitions;
-import com.sun.jmx.snmp.SnmpStatusException;
-import com.sun.jmx.snmp.SnmpEngine;
-
-// SNMP Runtime import
-//
-import com.sun.jmx.snmp.agent.SnmpMibAgent;
-import com.sun.jmx.snmp.agent.SnmpMibRequest;
-import com.sun.jmx.snmp.ThreadContext;
-import com.sun.jmx.snmp.internal.SnmpIncomingRequest;
-
-class SnmpSubRequestHandler implements SnmpDefinitions, Runnable {
-
-    protected SnmpIncomingRequest incRequest = null;
-    protected SnmpEngine engine = null;
-    /**
-     * V3 enabled Adaptor. Each Oid is added using updateRequest method.
-     */
-    protected SnmpSubRequestHandler(SnmpEngine engine,
-                                    SnmpIncomingRequest incRequest,
-                                    SnmpMibAgent agent,
-                                    SnmpPdu req) {
-        this(agent, req);
-        init(engine, incRequest);
-    }
-
-    /**
-     * V3 enabled Adaptor.
-     */
-    protected SnmpSubRequestHandler(SnmpEngine engine,
-                                    SnmpIncomingRequest incRequest,
-                                    SnmpMibAgent agent,
-                                    SnmpPdu req,
-                                    boolean nouse) {
-        this(agent, req, nouse);
-        init(engine, incRequest);
-    }
-    /**
-     * SNMP V1/V2 . To be called with updateRequest.
-     */
-    protected SnmpSubRequestHandler(SnmpMibAgent agent, SnmpPdu req) {
-        if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-            SNMP_ADAPTOR_LOGGER.logp(Level.FINER, SnmpSubRequestHandler.class.getName(),
-                "constructor", "creating instance for request " + String.valueOf(req.requestId));
-        }
-
-        version= req.version;
-        type= req.type;
-        this.agent= agent;
-
-        // We get a ref on the pdu in order to pass it to SnmpMibRequest.
-        reqPdu = req;
-
-        //Pre-allocate room for storing varbindlist and translation table.
-        //
-        int length= req.varBindList.length;
-        translation= new int[length];
-        varBind= new NonSyncVector<SnmpVarBind>(length);
-    }
-
-    /**
-     * SNMP V1/V2 The constructor initialize the subrequest with the whole varbind list contained
-     * in the original request.
-     */
-    @SuppressWarnings("unchecked")  // cast to NonSyncVector<SnmpVarBind>
-    protected SnmpSubRequestHandler(SnmpMibAgent agent,
-                                    SnmpPdu req,
-                                    boolean nouse) {
-        this(agent,req);
-
-        // The translation table is easy in this case ...
-        //
-        int max= translation.length;
-        SnmpVarBind[] list= req.varBindList;
-        for(int i=0; i < max; i++) {
-            translation[i]= i;
-            ((NonSyncVector<SnmpVarBind>)varBind).addNonSyncElement(list[i]);
-        }
-    }
-
-    SnmpMibRequest createMibRequest(Vector<SnmpVarBind> vblist,
-                                    int protocolVersion,
-                                    Object userData) {
-
-        // This is an optimization:
-        //    The SnmpMibRequest created in the check() phase is
-        //    reused in the set() phase.
-        //
-        if (type == pduSetRequestPdu && mibRequest != null)
-            return mibRequest;
-
-        //This is a request comming from an SnmpV3AdaptorServer.
-        //Full power.
-        SnmpMibRequest result = null;
-        if(incRequest != null) {
-            result = SnmpMibAgent.newMibRequest(engine,
-                                                reqPdu,
-                                                vblist,
-                                                protocolVersion,
-                                                userData,
-                                                incRequest.getPrincipal(),
-                                                incRequest.getSecurityLevel(),
-                                                incRequest.getSecurityModel(),
-                                                incRequest.getContextName(),
-                                                incRequest.getAccessContext());
-        } else {
-            result = SnmpMibAgent.newMibRequest(reqPdu,
-                                                vblist,
-                                                protocolVersion,
-                                                userData);
-        }
-        // If we're doing the check() phase, we store the SnmpMibRequest
-        // so that we can reuse it in the set() phase.
-        //
-        if (type == pduWalkRequest)
-            mibRequest = result;
-
-        return result;
-    }
-
-    void setUserData(Object userData) {
-        data = userData;
-    }
-
-    public void run() {
-
-        try {
-            final ThreadContext oldContext =
-                ThreadContext.push("SnmpUserData",data);
-            try {
-                switch(type) {
-                case pduGetRequestPdu:
-                    // Invoke a get operation
-                    //
-                    if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-                        SNMP_ADAPTOR_LOGGER.logp(Level.FINER, SnmpSubRequestHandler.class.getName(),
-                            "run", "[" + Thread.currentThread() +
-                              "]:get operation on " + agent.getMibName());
-                    }
-
-                    agent.get(createMibRequest(varBind,version,data));
-                    break;
-
-                case pduGetNextRequestPdu:
-                    if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-                        SNMP_ADAPTOR_LOGGER.logp(Level.FINER, SnmpSubRequestHandler.class.getName(),
-                            "run", "[" + Thread.currentThread() +
-                              "]:getNext operation on " + agent.getMibName());
-                    }
-                    //#ifdef DEBUG
-                    agent.getNext(createMibRequest(varBind,version,data));
-                    break;
-
-                case pduSetRequestPdu:
-                    if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-                        SNMP_ADAPTOR_LOGGER.logp(Level.FINER, SnmpSubRequestHandler.class.getName(),
-                            "run", "[" + Thread.currentThread() +
-                            "]:set operation on " + agent.getMibName());
-                    }
-                    agent.set(createMibRequest(varBind,version,data));
-                    break;
-
-                case pduWalkRequest:
-                    if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-                        SNMP_ADAPTOR_LOGGER.logp(Level.FINER, SnmpSubRequestHandler.class.getName(),
-                            "run", "[" + Thread.currentThread() +
-                            "]:check operation on " + agent.getMibName());
-                    }
-                    agent.check(createMibRequest(varBind,version,data));
-                    break;
-
-                default:
-                    if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                        SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, SnmpSubRequestHandler.class.getName(),
-                            "run", "[" + Thread.currentThread() +
-                              "]:unknown operation (" +  type + ") on " +
-                              agent.getMibName());
-                    }
-                    errorStatus= snmpRspGenErr;
-                    errorIndex= 1;
-                    break;
-
-                }// end of switch
-
-            } finally {
-                ThreadContext.restore(oldContext);
-            }
-        } catch(SnmpStatusException x) {
-            errorStatus = x.getStatus() ;
-            errorIndex=  x.getErrorIndex();
-            if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, SnmpSubRequestHandler.class.getName(),
-                    "run", "[" + Thread.currentThread() +
-                      "]:an Snmp error occurred during the operation", x);
-            }
-        }
-        catch(Exception x) {
-            errorStatus = SnmpDefinitions.snmpRspGenErr ;
-            if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, SnmpSubRequestHandler.class.getName(),
-                    "run", "[" + Thread.currentThread() +
-                      "]:a generic error occurred during the operation", x);
-            }
-        }
-        if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
-            SNMP_ADAPTOR_LOGGER.logp(Level.FINER, SnmpSubRequestHandler.class.getName(),
-                "run", "[" + Thread.currentThread() + "]:operation completed");
-        }
-    }
-
-    // -------------------------------------------------------------
-    //
-    // This function does a best-effort to map global error status
-    // to SNMP v1 valid global error status.
-    //
-    // An SnmpStatusException can contain either:
-    // <li> v2 local error codes (that should be stored in the varbind)</li>
-    // <li> v2 global error codes </li>
-    // <li> v1 global error codes </li>
-    //
-    // v2 local error codes (noSuchInstance, noSuchObject) are
-    // transformed in a global v1 snmpRspNoSuchName error.
-    //
-    // v2 global error codes are transformed in the following way:
-    //
-    //    If the request was a GET/GETNEXT then either
-    //         snmpRspNoSuchName or snmpRspGenErr is returned.
-    //
-    //    Otherwise:
-    //      snmpRspNoAccess, snmpRspInconsistentName
-    //               => snmpRspNoSuchName
-    //      snmpRspAuthorizationError, snmpRspNotWritable, snmpRspNoCreation
-    //               => snmpRspReadOnly  (snmpRspNoSuchName for GET/GETNEXT)
-    //      snmpRspWrong*
-    //               => snmpRspBadValue  (snmpRspNoSuchName for GET/GETNEXT)
-    //      snmpRspResourceUnavailable, snmpRspRspCommitFailed,
-    //      snmpRspUndoFailed
-    //                  => snmpRspGenErr
-    //
-    // -------------------------------------------------------------
-    //
-    static final int mapErrorStatusToV1(int errorStatus, int reqPduType) {
-        // Map v2 codes onto v1 codes
-        //
-        if (errorStatus == SnmpDefinitions.snmpRspNoError)
-            return SnmpDefinitions.snmpRspNoError;
-
-        if (errorStatus == SnmpDefinitions.snmpRspGenErr)
-            return SnmpDefinitions.snmpRspGenErr;
-
-        if (errorStatus == SnmpDefinitions.snmpRspNoSuchName)
-            return SnmpDefinitions.snmpRspNoSuchName;
-
-        if ((errorStatus == SnmpStatusException.noSuchInstance) ||
-            (errorStatus == SnmpStatusException.noSuchObject)   ||
-            (errorStatus == SnmpDefinitions.snmpRspNoAccess)    ||
-            (errorStatus == SnmpDefinitions.snmpRspInconsistentName) ||
-            (errorStatus == SnmpDefinitions.snmpRspAuthorizationError)){
-
-            return SnmpDefinitions.snmpRspNoSuchName;
-
-        } else if ((errorStatus ==
-                    SnmpDefinitions.snmpRspAuthorizationError)         ||
-                   (errorStatus == SnmpDefinitions.snmpRspNotWritable)) {
-
-            if (reqPduType == SnmpDefinitions.pduWalkRequest)
-                return SnmpDefinitions.snmpRspReadOnly;
-            else
-                return SnmpDefinitions.snmpRspNoSuchName;
-
-        } else if ((errorStatus == SnmpDefinitions.snmpRspNoCreation)) {
-
-                return SnmpDefinitions.snmpRspNoSuchName;
-
-        } else if ((errorStatus == SnmpDefinitions.snmpRspWrongType)      ||
-                   (errorStatus == SnmpDefinitions.snmpRspWrongLength)    ||
-                   (errorStatus == SnmpDefinitions.snmpRspWrongEncoding)  ||
-                   (errorStatus == SnmpDefinitions.snmpRspWrongValue)     ||
-                   (errorStatus == SnmpDefinitions.snmpRspWrongLength)    ||
-                   (errorStatus ==
-                    SnmpDefinitions.snmpRspInconsistentValue)) {
-
-            if ((reqPduType == SnmpDefinitions.pduSetRequestPdu) ||
-                (reqPduType == SnmpDefinitions.pduWalkRequest))
-                return SnmpDefinitions.snmpRspBadValue;
-            else
-                return SnmpDefinitions.snmpRspNoSuchName;
-
-        } else if ((errorStatus ==
-                    SnmpDefinitions.snmpRspResourceUnavailable) ||
-                   (errorStatus ==
-                    SnmpDefinitions.snmpRspCommitFailed)        ||
-                   (errorStatus == SnmpDefinitions.snmpRspUndoFailed)) {
-
-            return SnmpDefinitions.snmpRspGenErr;
-
-        }
-
-        // At this point we should have a V1 error code
-        //
-        if (errorStatus == SnmpDefinitions.snmpRspTooBig)
-            return SnmpDefinitions.snmpRspTooBig;
-
-        if( (errorStatus == SnmpDefinitions.snmpRspBadValue) ||
-            (errorStatus == SnmpDefinitions.snmpRspReadOnly)) {
-            if ((reqPduType == SnmpDefinitions.pduSetRequestPdu) ||
-                (reqPduType == SnmpDefinitions.pduWalkRequest))
-                return errorStatus;
-            else
-                return SnmpDefinitions.snmpRspNoSuchName;
-        }
-
-        // We have a snmpRspGenErr, or something which is not defined
-        // in RFC1905 => return a snmpRspGenErr
-        //
-        return SnmpDefinitions.snmpRspGenErr;
-
-    }
-
-    // -------------------------------------------------------------
-    //
-    // This function does a best-effort to map global error status
-    // to SNMP v2 valid global error status.
-    //
-    // An SnmpStatusException can contain either:
-    // <li> v2 local error codes (that should be stored in the varbind)</li>
-    // <li> v2 global error codes </li>
-    // <li> v1 global error codes </li>
-    //
-    // v2 local error codes (noSuchInstance, noSuchObject)
-    // should not raise this level: they should have been stored in the
-    // varbind earlier. If they, do there is nothing much we can do except
-    // to transform them into:
-    // <li> a global snmpRspGenErr (if the request is a GET/GETNEXT) </li>
-    // <li> a global snmpRspNoSuchName otherwise. </li>
-    //
-    // v2 global error codes are transformed in the following way:
-    //
-    //    If the request was a GET/GETNEXT then snmpRspGenErr is returned.
-    //    (snmpRspGenErr is the only global error that is expected to be
-    //     raised by a GET/GETNEXT request).
-    //
-    //    Otherwise the v2 code itself is returned
-    //
-    // v1 global error codes are transformed in the following way:
-    //
-    //      snmpRspNoSuchName
-    //               => snmpRspNoAccess  (snmpRspGenErr for GET/GETNEXT)
-    //      snmpRspReadOnly
-    //               => snmpRspNotWritable (snmpRspGenErr for GET/GETNEXT)
-    //      snmpRspBadValue
-    //               => snmpRspWrongValue  (snmpRspGenErr for GET/GETNEXT)
-    //
-    // -------------------------------------------------------------
-    //
-    static final int mapErrorStatusToV2(int errorStatus, int reqPduType) {
-        // Map v1 codes onto v2 codes
-        //
-        if (errorStatus == SnmpDefinitions.snmpRspNoError)
-            return SnmpDefinitions.snmpRspNoError;
-
-        if (errorStatus == SnmpDefinitions.snmpRspGenErr)
-            return SnmpDefinitions.snmpRspGenErr;
-
-        if (errorStatus == SnmpDefinitions.snmpRspTooBig)
-            return SnmpDefinitions.snmpRspTooBig;
-
-        // For get / getNext / getBulk the only global error
-        // (PDU-level) possible is genErr.
-        //
-        if ((reqPduType != SnmpDefinitions.pduSetRequestPdu) &&
-            (reqPduType != SnmpDefinitions.pduWalkRequest)) {
-            if(errorStatus == SnmpDefinitions.snmpRspAuthorizationError)
-                return errorStatus;
-            else
-                return SnmpDefinitions.snmpRspGenErr;
-        }
-
-        // Map to noSuchName
-        //      if ((errorStatus == SnmpDefinitions.snmpRspNoSuchName) ||
-        //   (errorStatus == SnmpStatusException.noSuchInstance) ||
-        //  (errorStatus == SnmpStatusException.noSuchObject))
-        //  return SnmpDefinitions.snmpRspNoSuchName;
-
-        // SnmpStatusException.noSuchInstance and
-        // SnmpStatusException.noSuchObject can't happen...
-
-        if (errorStatus == SnmpDefinitions.snmpRspNoSuchName)
-            return SnmpDefinitions.snmpRspNoAccess;
-
-        // Map to notWritable
-        if (errorStatus == SnmpDefinitions.snmpRspReadOnly)
-                return SnmpDefinitions.snmpRspNotWritable;
-
-        // Map to wrongValue
-        if (errorStatus == SnmpDefinitions.snmpRspBadValue)
-            return SnmpDefinitions.snmpRspWrongValue;
-
-        // Other valid V2 codes
-        if ((errorStatus == SnmpDefinitions.snmpRspNoAccess) ||
-            (errorStatus == SnmpDefinitions.snmpRspInconsistentName) ||
-            (errorStatus == SnmpDefinitions.snmpRspAuthorizationError) ||
-            (errorStatus == SnmpDefinitions.snmpRspNotWritable) ||
-            (errorStatus == SnmpDefinitions.snmpRspNoCreation) ||
-            (errorStatus == SnmpDefinitions.snmpRspWrongType) ||
-            (errorStatus == SnmpDefinitions.snmpRspWrongLength) ||
-            (errorStatus == SnmpDefinitions.snmpRspWrongEncoding) ||
-            (errorStatus == SnmpDefinitions.snmpRspWrongValue) ||
-            (errorStatus == SnmpDefinitions.snmpRspWrongLength) ||
-            (errorStatus == SnmpDefinitions.snmpRspInconsistentValue) ||
-            (errorStatus == SnmpDefinitions.snmpRspResourceUnavailable) ||
-            (errorStatus == SnmpDefinitions.snmpRspCommitFailed) ||
-            (errorStatus == SnmpDefinitions.snmpRspUndoFailed))
-            return errorStatus;
-
-        // Ivalid V2 code => genErr
-        return SnmpDefinitions.snmpRspGenErr;
-    }
-
-    static final int mapErrorStatus(int errorStatus,
-                                    int protocolVersion,
-                                    int reqPduType) {
-        if (errorStatus == SnmpDefinitions.snmpRspNoError)
-            return SnmpDefinitions.snmpRspNoError;
-
-        // Too bad, an error occurs ... we need to translate it ...
-        //
-        if (protocolVersion == SnmpDefinitions.snmpVersionOne)
-            return mapErrorStatusToV1(errorStatus,reqPduType);
-        if (protocolVersion == SnmpDefinitions.snmpVersionTwo ||
-            protocolVersion == SnmpDefinitions.snmpVersionThree)
-            return mapErrorStatusToV2(errorStatus,reqPduType);
-
-        return SnmpDefinitions.snmpRspGenErr;
-    }
-
-    /**
-     * The method returns the error status of the operation.
-     * The method takes into account the protocol version.
-     */
-    protected int getErrorStatus() {
-        if (errorStatus == snmpRspNoError)
-            return snmpRspNoError;
-
-        return mapErrorStatus(errorStatus,version,type);
-    }
-
-    /**
-     * The method returns the error index as a position in the var bind list.
-     * The value returned by the method corresponds to the index in the original
-     * var bind list as received by the SNMP protocol adaptor.
-     */
-    protected int getErrorIndex() {
-        if  (errorStatus == snmpRspNoError)
-            return -1;
-
-        // An error occurs. We need to be carefull because the index
-        // we are getting is a valid SNMP index (so range starts at 1).
-        // FIX ME: Shall we double-check the range here ?
-        // The response is : YES :
-        if ((errorIndex == 0) || (errorIndex == -1))
-            errorIndex = 1;
-
-        return translation[errorIndex -1];
-    }
-
-    /**
-     * The method updates the varbind list of the subrequest.
-     */
-    protected  void updateRequest(SnmpVarBind var, int pos) {
-        int size= varBind.size();
-        translation[size]= pos;
-        varBind.addElement(var);
-    }
-
-    /**
-     * The method updates a given var bind list with the result of a
-     * previsouly invoked operation.
-     * Prior to calling the method, one must make sure that the operation was
-     * successful. As such the method getErrorIndex or getErrorStatus should be
-     * called.
-     */
-    protected void updateResult(SnmpVarBind[] result) {
-
-        if (result == null) return;
-        final int max=varBind.size();
-        final int len=result.length;
-        for(int i= 0; i< max ; i++) {
-            // bugId 4641694: must check position in order to avoid
-            //       ArrayIndexOutOfBoundException
-            final int pos=translation[i];
-            if (pos < len) {
-                result[pos] =
-                    (SnmpVarBind)((NonSyncVector)varBind).elementAtNonSync(i);
-            } else {
-                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, SnmpSubRequestHandler.class.getName(),
-                        "updateResult","Position `"+pos+"' is out of bound...");
-                }
-            }
-        }
-    }
-
-    private void init(SnmpEngine engine,
-                      SnmpIncomingRequest incRequest) {
-        this.incRequest = incRequest;
-        this.engine = engine;
-    }
-
-    // PRIVATE VARIABLES
-    //------------------
-
-    /**
-     * Store the protocol version to handle
-     */
-    protected int version= snmpVersionOne;
-
-    /**
-     * Store the operation type. Remember if the type is Walk, it means
-     * that we have to invoke the check method ...
-     */
-    protected int type= 0;
-
-    /**
-     * Agent directly handled by the sub-request handler.
-     */
-    protected SnmpMibAgent agent;
-
-    /**
-     * Error status.
-     */
-    protected int errorStatus= snmpRspNoError;
-
-    /**
-     * Index of error.
-     * A value of -1 means no error.
-     */
-    protected int errorIndex= -1;
-
-    /**
-     * The varbind list specific to the current sub request.
-     * The vector must contain object of type SnmpVarBind.
-     */
-    protected Vector<SnmpVarBind> varBind;
-
-    /**
-     * The array giving the index translation between the content of
-     * <VAR>varBind</VAR> and the varbind list as specified in the request.
-     */
-    protected int[] translation;
-
-    /**
-     * Contextual object allocated by the SnmpUserDataFactory.
-     **/
-    protected Object data;
-
-    /**
-     * The SnmpMibRequest that will be passed to the agent.
-     *
-     **/
-    private   SnmpMibRequest mibRequest = null;
-
-    /**
-     * The SnmpPdu that will be passed to the request.
-     *
-     **/
-    private   SnmpPdu reqPdu = null;
-
-    // All the methods of the Vector class are synchronized.
-    // Synchronization is a very expensive operation. In our case it is not always
-    // required...
-    //
-    @SuppressWarnings("serial")  // we never serialize this
-    class NonSyncVector<E> extends Vector<E> {
-
-        public NonSyncVector(int size) {
-            super(size);
-        }
-
-        final void addNonSyncElement(E obj) {
-            ensureCapacity(elementCount + 1);
-            elementData[elementCount++] = obj;
-        }
-
-        @SuppressWarnings("unchecked")  // cast to E
-        final E elementAtNonSync(int index) {
-            return (E) elementData[index];
-        }
-    };
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/daemon/package.html	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-<HTML>
-<HEAD>
-<!--
-
-Copyright (c) 1999, 2003, 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
-particular file as subject to the "Classpath" exception as provided
-by Oracle in the LICENSE file that accompanied this code.
-
-This code is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-version 2 for more details (a copy is included in the LICENSE file that
-accompanied this code).
-
-You should have received a copy of the GNU General Public License version
-2 along with this work; if not, write to the Free Software Foundation,
-Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
-Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-or visit www.oracle.com if you need additional information or have any
-questions.
--->
-</HEAD>
-<BODY>
-Provides the classes implementing the <B>communication</B>.
-<p><b>This API is a Sun Microsystems internal API  and is subject 
-   to change without notice.</b></p>
-</BODY>
-</HTML>
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/defaults/DefaultPaths.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,245 +0,0 @@
-/*
- * Copyright (c) 2002, 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.jmx.snmp.defaults;
-
-
-// java import
-//
-import java.io.File;
-import java.io.BufferedReader;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.util.StringTokenizer;
-
-/**
- * This class represents a set of default directories used by Java DMK.
- *
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- * @since 1.5
- */
-public class DefaultPaths {
-    private static final String INSTALL_PATH_RESOURCE_NAME = "com/sun/jdmk/defaults/install.path";
-    // private constructor defined to "hide" the default public constructor
-    private DefaultPaths() {
-
-    }
-
-    // PUBLIC STATIC METHODS
-    //----------------------
-
-    /**
-     * Returns the installation directory for Java DMK.
-     *
-     * The default value of the installation directory is:
-     * <CODE>&lt;base_dir&gt; + File.separator + SUNWjdmk + File.separator + jdmk5.0 </CODE>
-     *
-     * @return Java DMK installation directory.
-     */
-    public static String getInstallDir() {
-        if (installDir == null)
-            return useRessourceFile();
-        else
-            return installDir;
-    }
-
-    /**
-     * Returns the installation directory for Java DMK concatenated with dirname.
-     *
-     * The default value of the installation directory is:
-     * <CODE>&lt;base_dir&gt; + File.separator + SUNWjdmk + File.separator + jdmk5.0 </CODE>
-     *
-     * @param dirname The directory to be appended.
-     *
-     * @return Java DMK installation directory + <CODE>File.separator</CODE> + <CODE>dirname</CODE>.
-     */
-    public static String getInstallDir(String dirname) {
-        if (installDir == null) {
-            if (dirname == null) {
-                return getInstallDir();
-            } else {
-                return getInstallDir() + File.separator + dirname;
-            }
-        } else {
-            if (dirname == null) {
-                return installDir;
-            } else {
-                return installDir + File.separator + dirname;
-            }
-        }
-    }
-
-    /**
-     * Sets the installation directory for Java DMK.
-     *
-     * @param dirname The directory where Java DMK resides.
-     */
-    public static void setInstallDir(String dirname) {
-        installDir = dirname;
-    }
-
-    /**
-     * Returns the <CODE>etc</CODE> directory for Java DMK.
-     * <P>
-     * The default value of the <CODE>etc</CODE> directory is:
-     * <UL>
-     * <LI><CODE>DefaultPaths.getInstallDir("etc")</CODE>.
-     * </UL>
-     *
-     * @return Java DMK <CODE>etc</CODE> directory.
-     */
-    public static String getEtcDir() {
-        if (etcDir == null)
-            return getInstallDir("etc");
-        else
-            return etcDir;
-    }
-
-    /**
-     * Returns the <CODE>etc</CODE> directory for Java DMK concatenated with dirname.
-     * <P>
-     * The default value of the <CODE>etc</CODE> directory is:
-     * <UL>
-     * <LI><CODE>DefaultPaths.getInstallDir("etc")</CODE>.
-     * </UL>
-     *
-     * @param dirname The directory to be appended.
-     *
-     * @return Java DMK <CODE>etc</CODE> directory + <CODE>File.separator</CODE> + <CODE>dirname</CODE>.
-     */
-    public static String getEtcDir(String dirname) {
-        if (etcDir == null) {
-            if (dirname == null) {
-                return getEtcDir();
-            } else {
-                return getEtcDir() + File.separator + dirname;
-            }
-        } else {
-            if (dirname == null) {
-                return etcDir;
-            } else {
-                return etcDir + File.separator + dirname;
-            }
-        }
-    }
-
-    /**
-     * Sets the <CODE>etc</CODE> directory for Java DMK.
-     *
-     * @param dirname The <CODE>etc</CODE> directory for Java DMK.
-     */
-    public static void setEtcDir(String dirname) {
-        etcDir = dirname;
-    }
-
-    /**
-     * Returns the <CODE>tmp</CODE> directory for the product.
-     * <P>
-     * The default value of the <CODE>tmp</CODE> directory is:
-     * <UL>
-     * <LI><CODE>DefaultPaths.getInstallDir("tmp")</CODE>.
-     * </UL>
-     *
-     * @return Java DMK <CODE>tmp</CODE> directory.
-     */
-    public static String getTmpDir() {
-         if (tmpDir == null)
-            return getInstallDir("tmp");
-        else
-            return tmpDir;
-    }
-
-    /**
-     * Returns the <CODE>tmp</CODE> directory for Java DMK concatenated with dirname.
-     * <P>
-     * The default value of the <CODE>tmp</CODE> directory is:
-     * <UL>
-     * <LI><CODE>DefaultPaths.getInstallDir("tmp")</CODE>.
-     * </UL>
-     *
-     * @param dirname The directory to be appended.
-     *
-     * @return Java DMK <CODE>tmp</CODE> directory + <CODE>File.separator</CODE> + <CODE>dirname</CODE>.
-     */
-    public static String getTmpDir(String dirname) {
-        if (tmpDir == null) {
-            if (dirname == null) {
-                return getTmpDir();
-            } else {
-                return getTmpDir() + File.separator + dirname;
-            }
-        } else {
-            if (dirname == null) {
-                return tmpDir;
-            } else {
-                return tmpDir + File.separator + dirname;
-            }
-        }
-    }
-
-    /**
-     * Sets the <CODE>tmp</CODE> directory for the product
-     *
-     * @param dirname The <CODE>tmp</CODE> directory for Java DMK.
-     */
-    public static void setTmpDir(String dirname) {
-        tmpDir = dirname;
-    }
-
-
-    // PRIVATE STATIC METHODS
-    //-----------------------
-
-    private static String useRessourceFile() {
-        InputStream in = null;
-        BufferedReader r = null;
-        try {
-            in =
-                DefaultPaths.class.getClassLoader().getResourceAsStream(INSTALL_PATH_RESOURCE_NAME);
-            if(in == null) return null;
-            r = new BufferedReader(new InputStreamReader(in));
-            installDir = r.readLine();
-        }catch(Exception e) {
-        }
-        finally {
-            try {
-                if(in != null) in.close();
-                if(r != null) r.close();
-            }catch(Exception e) {}
-        }
-        return installDir;
-    }
-
-    // PRIVATE VARIABLES
-    //------------------
-
-    /**
-     * Directories used by Java DMK.
-     */
-    private static String etcDir;
-    private static String tmpDir;
-    private static String installDir;
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/defaults/SnmpProperties.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,178 +0,0 @@
-/*
- * Copyright (c) 2002, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.jmx.snmp.defaults;
-
-// java import
-//
-import java.io.FileInputStream;
-import java.io.InputStream;
-import java.io.IOException;
-import java.util.Properties;
-import java.util.Enumeration;
-
-/**
- * This class reads a file containing the property list defined for Java DMK
- * and adds all the read properties to the list of system properties.
- *
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- *
- * @since 1.5
- */
-public class SnmpProperties {
-
-    // private constructor defined to "hide" the default public constructor
-    private SnmpProperties() {
-    }
-
-    // PUBLIC STATIC METHODS
-    //----------------------
-
-    /**
-     * Reads the Java DMK property list from a file and
-     * adds the read properties as system properties.
-     */
-    public static void load(String file) throws IOException {
-        Properties props = new Properties();
-        InputStream is = new FileInputStream(file);
-        props.load(is);
-        is.close();
-        for (final Enumeration<?> e = props.keys(); e.hasMoreElements() ; ) {
-            final String key = (String) e.nextElement();
-            System.setProperty(key,props.getProperty(key));
-        }
-    }
-
-    // PUBLIC STATIC VARIABLES
-    //------------------------
-
-    /**
-     * References the property that specifies the directory where
-     * the native libraries will be stored before the MLet Service
-     * loads them into memory.
-     * <p>
-     * Property Name: <B>jmx.mlet.library.dir</B>
-     */
-    public static final String MLET_LIB_DIR = "jmx.mlet.library.dir";
-
-    /**
-     * References the property that specifies the ACL file
-     * used by the SNMP protocol adaptor.
-     * <p>
-     * Property Name: <B>jdmk.acl.file</B>
-     */
-    public static final String ACL_FILE = "jdmk.acl.file";
-
-    /**
-     * References the property that specifies the Security file
-     * used by the SNMP protocol adaptor.
-     * <p>
-     * Property Name: <B>jdmk.security.file</B>
-     */
-    public static final String SECURITY_FILE = "jdmk.security.file";
-
-    /**
-     * References the property that specifies the User ACL file
-     * used by the SNMP protocol adaptor.
-     * <p>
-     * Property Name: <B>jdmk.uacl.file</B>
-     */
-    public static final String UACL_FILE = "jdmk.uacl.file";
-
-    /**
-     * References the property that specifies the default mib_core file
-     * used by the mibgen compiler.
-     * <p>
-     * Property Name: <B>mibcore.file</B>
-     */
-    public static final String MIB_CORE_FILE = "mibcore.file";
-
-    /**
-     * References the property that specifies the full name of the JMX
-     * specification implemented by this product.
-     * <p>
-     * Property Name: <B>jmx.specification.name</B>
-     */
-     public static final String JMX_SPEC_NAME = "jmx.specification.name";
-
-    /**
-     * References the property that specifies the version of the JMX
-     * specification implemented by this product.
-     * <p>
-     * Property Name: <B>jmx.specification.version</B>
-     */
-     public static final String JMX_SPEC_VERSION = "jmx.specification.version";
-
-    /**
-     * References the property that specifies the vendor of the JMX
-     * specification implemented by this product.
-     * <p>
-     * Property Name: <B>jmx.specification.vendor</B>
-     */
-     public static final String JMX_SPEC_VENDOR = "jmx.specification.vendor";
-
-    /**
-     * References the property that specifies the full name of this product
-     * implementing the  JMX specification.
-     * <p>
-     * Property Name: <B>jmx.implementation.name</B>
-     */
-    public static final String JMX_IMPL_NAME = "jmx.implementation.name";
-
-    /**
-     * References the property that specifies the name of the vendor of this product
-     * implementing the  JMX specification.
-     * <p>
-     * Property Name: <B>jmx.implementation.vendor</B>
-     */
-    public static final String JMX_IMPL_VENDOR = "jmx.implementation.vendor";
-
-    /**
-     * References the property that specifies the version of this product
-     * implementing the  JMX specification.
-     * <p>
-     * Property Name: <B>jmx.implementation.version</B>
-     */
-    public static final String JMX_IMPL_VERSION = "jmx.implementation.version";
-
-    /**
-     * References the property that specifies the SSL cipher suites to
-     * be enabled by the HTTP/SSL connector.
-     * <p>
-     * Property Name: <B>jdmk.ssl.cipher.suite.</B>
-     * <p>
-     * The list of SSL cipher suites is specified in the format:
-     * <p>
-     * <DD><B>jdmk.ssl.cipher.suite.</B>&lt;n&gt;<B>=</B>&lt;cipher suite name&gt;</DD>
-     * <p>
-     * For example:
-     * <p>
-     * <DD>jdmk.ssl.cipher.suite.1=SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA</DD>
-     * <DD>jdmk.ssl.cipher.suite.2=SSL_RSA_EXPORT_WITH_RC4_40_MD5</DD>
-     * <DD>. . .</DD>
-     */
-    public static final String SSL_CIPHER_SUITE = "jdmk.ssl.cipher.suite.";
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/defaults/package.html	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-<HTML>
-<HEAD>
-<!--
- 
-Copyright (c) 2002, 2003, 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
-particular file as subject to the "Classpath" exception as provided
-by Oracle in the LICENSE file that accompanied this code.
-
-This code is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-version 2 for more details (a copy is included in the LICENSE file that
-accompanied this code).
-
-You should have received a copy of the GNU General Public License version
-2 along with this work; if not, write to the Free Software Foundation,
-Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
-Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-or visit www.oracle.com if you need additional information or have any
-questions.
--->
-</HEAD>
-<BODY>
-    Provides specific classes to <B>Sun JMX Tools Contribution</B>: Utility classes.
-<p><b>This API is a Sun Microsystems internal API  and is subject 
-   to change without notice.</b></p>
-</BODY>
-</HTML>
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/internal/SnmpAccessControlModel.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,92 +0,0 @@
-/*
- * Copyright (c) 2001, 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.sun.jmx.snmp.internal;
-
-import com.sun.jmx.snmp.SnmpStatusException;
-import com.sun.jmx.snmp.SnmpOid;
-import com.sun.jmx.snmp.SnmpPdu;
-/**
- * Access Control Model interface. Every access control model must implement this interface in order to be integrated in the engine based framework.
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- * @since 1.5
- */
-public interface SnmpAccessControlModel extends SnmpModel {
-    /**
-     * Method called by the dispatcher in order to control the access at an <CODE>SnmpOid</CODE> Level. If access is not allowed, an <CODE>SnmpStatusException</CODE> is thrown.
-     * This method is called after the <CODE>checkPduAccess</CODE> pdu based method.
-     * @param version The SNMP protocol version number.
-     * @param principal The request principal.
-     * @param securityLevel The request security level as defined in <CODE>SnmpEngine</CODE>.
-     * @param pduType The pdu type (get, set, ...).
-     * @param securityModel The security model ID.
-     * @param contextName The access control context name.
-     * @param oid The OID to check.
-     */
-    public void checkAccess(int version,
-                            String principal,
-                            int securityLevel,
-                            int pduType,
-                            int securityModel,
-                            byte[] contextName,
-                            SnmpOid oid)
-        throws SnmpStatusException;
-    /**
-     * Method called by the dispatcher in order to control the access at an SNMP pdu Level. If access is not allowed, an <CODE>SnmpStatusException</CODE> is thrown. In case of exception, the access control is aborted. OIDs are not checked.
-     * This method should be called prior to the <CODE>checkAccess</CODE> OID based method.
-     * @param version The SNMP protocol version number.
-     * @param principal The request principal.
-     * @param securityLevel The request security level as defined in <CODE>SnmpEngine</CODE>.
-     * @param pduType The pdu type (get, set, ...).
-     * @param securityModel The security model ID.
-     * @param contextName The access control context name.
-     * @param pdu The pdu to check.
-     */
-    public void checkPduAccess(int version,
-                               String principal,
-                               int securityLevel,
-                               int pduType,
-                               int securityModel,
-                               byte[] contextName,
-                               SnmpPdu pdu)
-        throws SnmpStatusException;
-
-    /**
-     * Enable SNMP V1 and V2 set requests. Be aware that can lead to a security hole in a context of SNMP V3 management. By default SNMP V1 and V2 set requests are not authorized.
-     * @return boolean True the activation suceeded.
-     */
-    public boolean enableSnmpV1V2SetRequest();
-    /**
-     * Disable SNMP V1 and V2 set requests. By default SNMP V1 and V2 set requests are not authorized.
-     * @return boolean True the deactivation suceeded.
-     */
-    public boolean disableSnmpV1V2SetRequest();
-
-    /**
-     * The SNMP V1 and V2 set requests authorization status. By default SNMP V1 and V2 set requests are not authorized.
-     * @return boolean True SNMP V1 and V2 requests are authorized.
-     */
-    public boolean isSnmpV1V2SetRequestAuthorized();
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/internal/SnmpAccessControlSubSystem.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +0,0 @@
-/*
- * Copyright (c) 2001, 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.sun.jmx.snmp.internal;
-
-import com.sun.jmx.snmp.SnmpStatusException;
-import com.sun.jmx.snmp.SnmpOid;
-import com.sun.jmx.snmp.SnmpPdu;
-import com.sun.jmx.snmp.SnmpUnknownAccContrModelException;
-/**
- * Access Control sub system interface. To allow engine integration, an Access Control sub system must implement this interface.
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- * @since 1.5
- */
-public interface SnmpAccessControlSubSystem extends SnmpSubSystem {
-
-    /**
-     * Method called by the dispatcher in order to control the access at an SNMP pdu Level.
-     * <P> This call is routed by the sub system to the target model according to the SNMP protocol version number.</P>
-     * @param version The SNMP protocol version number.
-     * @param principal The request principal.
-     * @param securityLevel The request security level as defined in <CODE>SnmpEngine</CODE>.
-     * @param pduType The pdu type (get, set, ...).
-     * @param securityModel The security model ID.
-     * @param contextName The access control context name.
-     * @param pdu The pdu to check.
-     */
-    public void checkPduAccess(int version,
-                               String principal,
-                               int securityLevel,
-                               int pduType,
-                               int securityModel,
-                               byte[] contextName,
-                               SnmpPdu pdu) throws SnmpStatusException, SnmpUnknownAccContrModelException;
-    /**
-     * Method called by the dispatcher in order to control the access at an <CODE>SnmpOid</CODE> Level.
-     * This method is called after the <CODE>checkPduAccess</CODE> pdu based method.
-     * <P> This call is routed by the sub system to the target model according to the SNMP protocol version number.</P>
-     * @param version The SNMP protocol version number.
-     * @param principal The request principal.
-     * @param securityLevel The request security level as defined in <CODE>SnmpEngine</CODE>.
-     * @param pduType The pdu type (get, set, ...).
-     * @param securityModel The security model ID.
-     * @param contextName The access control context name.
-     * @param oid The OID to check.
-     */
-    public void checkAccess(int version,
-                            String principal,
-                            int securityLevel,
-                            int pduType,
-                            int securityModel,
-                            byte[] contextName,
-                            SnmpOid oid) throws SnmpStatusException, SnmpUnknownAccContrModelException;
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/internal/SnmpDecryptedPdu.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2001, 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.sun.jmx.snmp.internal;
-/**
- * Class returned by <CODE>SnmpSecuritySubSystem</CODE> and <CODE>SnmpSecurityModel</CODE>. If privacy is applied, the received pdu must be decrypted. This class contains the field of of a decrypted scoped pdu.
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- * @since 1.5
- */
-
-public class SnmpDecryptedPdu {
-    /**
-     * Decrypted pdu data.
-     */
-    public byte[] data = null;
-    /**
-     * Decrypted pdu data length.
-     */
-    public int dataLength = 0;
-    /**
-     * Decrypted context name.
-     */
-    public byte[] contextName = null;
-    /**
-     * Decrypted context engine Id.
-     */
-    public byte[] contextEngineId = null;
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/internal/SnmpEngineImpl.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,424 +0,0 @@
-/*
- * Copyright (c) 2001, 2006, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.sun.jmx.snmp.internal;
-
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.util.Hashtable;
-import java.util.logging.Level;
-import java.io.Serializable;
-
-import com.sun.jmx.snmp.SnmpDefinitions;
-import com.sun.jmx.snmp.SnmpEngineId;
-import com.sun.jmx.snmp.SnmpEngine;
-import com.sun.jmx.snmp.SnmpUsmKeyHandler;
-import com.sun.jmx.snmp.SnmpEngineFactory;
-import com.sun.jmx.snmp.SnmpUnknownModelException;
-
-import com.sun.jmx.snmp.internal.SnmpTools;
-import com.sun.jmx.snmp.SnmpBadSecurityLevelException;
-import static com.sun.jmx.defaults.JmxProperties.SNMP_LOGGER;
-
-/**
- * This engine is conformant with the RFC 2571. It is the main object within
- * an SNMP entity (agent, manager...).
- * To an engine is associated an {@link com.sun.jmx.snmp.SnmpEngineId}.
- * The way the engineId is retrieved is linked to the way the engine is
- * instantiated. See each <CODE>SnmpEngine</CODE> constructor for more details.
- * An engine is composed of a set of sub systems
- * {@link com.sun.jmx.snmp.internal.SnmpSubSystem}. An <CODE>SNMP</CODE>
- * engine can contain a:
- *<ul>
- *<li> Message Processing Sub System :
- * {@link com.sun.jmx.snmp.internal.SnmpMsgProcessingSubSystem}</li>
- *<li> Security Sub System :
- * {@link com.sun.jmx.snmp.internal.SnmpSecuritySubSystem} </li>
- *<li> Access Control Sub System :
- * {@link com.sun.jmx.snmp.internal.SnmpAccessControlSubSystem}</li>
- *</ul>
- *<P> Each sub system contains a set of models. A model is an implementation
- * of a particular treatement (eg: the User based Security Model defined in
- * RFC 2574 is a functional element dealing with authentication and privacy).
- *</P>
- * Engine instantiation is based on a factory. This factory, implementing
- * mandatorily {@link com.sun.jmx.snmp.SnmpEngineFactory  SnmpEngineFactory}
- * is set in the method <CODE>setFactory</CODE>.
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- * @since 1.5
- */
-public class SnmpEngineImpl implements SnmpEngine, Serializable {
-    private static final long serialVersionUID = -2564301391365614725L;
-
-    /**
-     * Security level. No authentication, no privacy. Value is 0,
-     * as defined in RFC 2572
-     */
-    public static final int noAuthNoPriv = 0;
-    /**
-     * Security level. Authentication, no privacy. Value is 1, as
-     * defined in RFC 2572
-     */
-    public static final int authNoPriv = 1;
-    /**
-     * Security level. Authentication, privacy. Value is 3,
-     * as defined in RFC 2572
-     */
-    public static final int authPriv = 3;
-    /**
-     * Flag that indicates that a report is to be sent. Value is 4, as defined in RFC 2572
-     */
-    public static final int reportableFlag = 4;
-
-    /**
-     * Mask used to isolate authentication information within a message flag.
-     */
-    public static final int authMask = 1;
-    /**
-     * Mask used to isolate privacy information within a message flag.
-     */
-    public static final int privMask = 2;
-    /**
-     * Mask used to isolate authentication and privacy information within a message flag.
-     */
-    public static final int authPrivMask = 3;
-
-    private SnmpEngineId engineid = null;
-    private SnmpEngineFactory factory = null;
-    private long startTime = 0;
-
-    private int boot = 0;
-    private boolean checkOid = false;
-
-    transient private SnmpUsmKeyHandler usmKeyHandler = null;
-    transient private SnmpLcd lcd = null;
-
-    transient private SnmpSecuritySubSystem securitySub = null;
-
-    transient private SnmpMsgProcessingSubSystem messageSub = null;
-
-    transient private SnmpAccessControlSubSystem accessSub = null;
-
-    /**
-     * Gets the engine time in seconds. This is the time from the last reboot.
-     * @return The time from the last reboot.
-     */
-    public synchronized int getEngineTime() {
-        //We do the counter wrap in a lazt way. Each time Engine is asked for his time it checks. So if nobody use the Engine, the time can wrap and wrap again without incrementing nb boot. We can imagine that it is irrelevant due to the amount of time needed to wrap.
-        long delta = (System.currentTimeMillis() / 1000) - startTime;
-        if(delta >  0x7FFFFFFF) {
-            //67 years of running. That is a great thing!
-            //Reinitialize startTime.
-            startTime = System.currentTimeMillis() / 1000;
-
-            //Can't do anything with this counter.
-            if(boot != 0x7FFFFFFF)
-                boot += 1;
-            //Store for future use.
-            storeNBBoots(boot);
-        }
-
-        return (int) ((System.currentTimeMillis() / 1000) - startTime);
-    }
-
-    /**
-     * Gets the engine Id. This is unique for each engine.
-     * @return The engine Id object.
-     */
-    public SnmpEngineId getEngineId() {
-        return engineid;
-    }
-
-    /**
-     * Gets the Usm key handler.
-     * @return The key handler.
-     */
-    public SnmpUsmKeyHandler getUsmKeyHandler() {
-        return usmKeyHandler;
-    }
-
-    /**
-     * Gets the engine Lcd.
-     * @return The engine Lcd.
-     */
-    public SnmpLcd getLcd() {
-        return lcd;
-    }
-    /**
-     * Gets the engine boot number. This is the number of time this engine has rebooted. Each time an <CODE>SnmpEngine</CODE> is instantiated, it will read this value in its Lcd, and store back the value incremented by one.
-     * @return The engine's number of reboot.
-     */
-    public int getEngineBoots() {
-        return boot;
-    }
-
-     /**
-     * Constructor. A Local Configuration Datastore is passed to the engine. It will be used to store and retrieve data (engine Id, engine boots).
-     * <P> WARNING : The SnmpEngineId is computed as follow:
-     * <ul>
-     * <li> If an lcd file is provided containing the property "localEngineID", this property value is used.</li>.
-     * <li> If not, if the passed engineID is not null, this engine ID is used.</li>
-     * <li> If not, a time based engineID is computed.</li>
-     * </ul>
-     * This constructor should be called by an <CODE>SnmpEngineFactory</CODE>. Don't call it directly.
-     * @param fact The factory used to instantiate this engine.
-     * @param lcd The local configuration datastore.
-     * @param engineid The engine ID to use. If null is provided, an SnmpEngineId is computed using the current time.
-     * @throws UnknownHostException Exception thrown, if the host name located in the property "localEngineID" is invalid.
-     */
-    public SnmpEngineImpl(SnmpEngineFactory fact,
-                          SnmpLcd lcd,
-                          SnmpEngineId engineid) throws UnknownHostException {
-
-        init(lcd, fact);
-        initEngineID();
-        if(this.engineid == null) {
-            if(engineid != null)
-                this.engineid = engineid;
-            else
-                this.engineid = SnmpEngineId.createEngineId();
-        }
-        lcd.storeEngineId(this.engineid);
-        if (SNMP_LOGGER.isLoggable(Level.FINER)) {
-            SNMP_LOGGER.logp(Level.FINER, SnmpEngineImpl.class.getName(),
-                    "SnmpEngineImpl(SnmpEngineFactory,SnmpLcd,SnmpEngineId)",
-                    "LOCAL ENGINE ID: " + this.engineid);
-        }
-    }
-    /**
-     * Constructor. A Local Configuration Datastore is passed to the engine. It will be used to store and retrieve data (engine ID, engine boots).
-     * <P> WARNING : The SnmpEngineId is computed as follow:
-     * <ul>
-     * <li> If an lcd file is provided containing the property "localEngineID", this property value is used.</li>.
-     * <li> If not, the passed address and port are used to compute one.</li>
-     * </ul>
-     * This constructor should be called by an <CODE>SnmpEngineFactory</CODE>. Don't call it directly.
-     * @param fact The factory used to instantiate this engine.
-     * @param lcd The local configuration datastore.
-     * @param port UDP port to use in order to calculate the engine ID.
-     * @param address An IP address used to calculate the engine ID.
-     * @throws UnknownHostException Exception thrown, if the host name located in the property "localEngineID" is invalid.
-     */
-    public SnmpEngineImpl(SnmpEngineFactory fact,
-                          SnmpLcd lcd,
-                          InetAddress address,
-                          int port) throws UnknownHostException {
-        init(lcd, fact);
-        initEngineID();
-        if(engineid == null)
-            engineid = SnmpEngineId.createEngineId(address, port);
-
-        lcd.storeEngineId(engineid);
-
-        if (SNMP_LOGGER.isLoggable(Level.FINER)) {
-            SNMP_LOGGER.logp(Level.FINER, SnmpEngineImpl.class.getName(),
-                    "SnmpEngineImpl(SnmpEngineFactory,SnmpLcd,InetAddress,int)",
-                    "LOCAL ENGINE ID: " + engineid + " / " +
-                    "LOCAL ENGINE NB BOOTS: " + boot + " / " +
-                    "LOCAL ENGINE START TIME: " + getEngineTime());
-        }
-    }
-
-    /**
-     * Constructor. A Local Configuration Datastore is passed to the engine. It will be used to store and retrieve data (engine ID, engine boots).
-     * <P> WARNING : The SnmpEngineId is computed as follow:
-     * <ul>
-     * <li> If an lcd file is provided containing the property "localEngineID", this property value is used.</li>.
-     * <li> If not, The passed port is used to compute one.</li>
-     * </ul>
-     * This constructor should be called by an <CODE>SnmpEngineFactory</CODE>. Don't call it directly.
-     * @param fact The factory used to instantiate this engine.
-     * @param lcd The local configuration datastore
-     * @param port UDP port to use in order to calculate the engine ID.
-     * @throws UnknownHostException Exception thrown, if the host name located in the property "localEngineID" is invalid.
-     */
-    public SnmpEngineImpl(SnmpEngineFactory fact,
-                          SnmpLcd lcd,
-                          int port) throws UnknownHostException {
-        init(lcd, fact);
-        initEngineID();
-        if(engineid == null)
-           engineid = SnmpEngineId.createEngineId(port);
-
-        lcd.storeEngineId(engineid);
-
-        if (SNMP_LOGGER.isLoggable(Level.FINER)) {
-            SNMP_LOGGER.logp(Level.FINER, SnmpEngineImpl.class.getName(),
-                    "SnmpEngineImpl(SnmpEngineFactory,SnmpLcd,int)",
-                    "LOCAL ENGINE ID: " + engineid + " / " +
-                    "LOCAL ENGINE NB BOOTS: " + boot + " / " +
-                    "LOCAL ENGINE START TIME: " + getEngineTime());
-        }
-    }
-
-    /**
-     * Constructor. A Local Configuration Datastore is passed to the engine. It will be used to store and retrieve data (engine ID, engine boots).
-     * <P> WARNING : The SnmpEngineId is computed as follow:
-     * <ul>
-     * <li> If an lcd file is provided containing the property "localEngineID", this property value is used.</li>.
-     * <li> If not, a time based engineID is computed.</li>
-     * </ul>
-     * When no configuration nor java property is set for the engine ID value, a unique time based engine ID will be generated.
-     * This constructor should be called by an <CODE>SnmpEngineFactory</CODE>. Don't call it directly.
-     * @param fact The factory used to instantiate this engine.
-     * @param lcd The local configuration datastore.
-     */
-    public SnmpEngineImpl(SnmpEngineFactory fact,
-                          SnmpLcd lcd) throws UnknownHostException {
-        init(lcd, fact);
-        initEngineID();
-        if(engineid == null)
-            engineid = SnmpEngineId.createEngineId();
-
-        lcd.storeEngineId(engineid);
-
-        if (SNMP_LOGGER.isLoggable(Level.FINER)) {
-            SNMP_LOGGER.logp(Level.FINER, SnmpEngineImpl.class.getName(),
-                    "SnmpEngineImpl(SnmpEngineFactory,SnmpLcd)",
-                    "LOCAL ENGINE ID: " + engineid + " / " +
-                    "LOCAL ENGINE NB BOOTS: " + boot + " / " +
-                    "LOCAL ENGINE START TIME: " + getEngineTime());
-        }
-    }
-
-    /**
-     * Access Control will check the oids. By default is false.
-     */
-    public synchronized void activateCheckOid() {
-        checkOid = true;
-    }
-
-    /**
-     * Access Control will not check the oids. By default is false.
-     */
-    public synchronized void deactivateCheckOid() {
-        checkOid = false;
-    }
-
-    /**
-     * Access Control check or not the oids. By default is false.
-     */
-    public synchronized boolean isCheckOidActivated() {
-        return checkOid;
-    }
-
-    //Do some check and store the nb boots value.
-    private void storeNBBoots(int boot) {
-        if(boot < 0 || boot == 0x7FFFFFFF) {
-            boot = 0x7FFFFFFF;
-            lcd.storeEngineBoots(boot);
-        }
-        else
-            lcd.storeEngineBoots(boot + 1);
-    }
-
-    // Initialize internal status.
-    private void init(SnmpLcd lcd, SnmpEngineFactory fact) {
-        this.factory = fact;
-        this.lcd = lcd;
-        boot = lcd.getEngineBoots();
-
-        if(boot == -1 || boot == 0)
-            boot = 1;
-
-        storeNBBoots(boot);
-
-        startTime = System.currentTimeMillis() / 1000;
-
-    }
-
-    void setUsmKeyHandler(SnmpUsmKeyHandler usmKeyHandler) {
-        this.usmKeyHandler = usmKeyHandler;
-    }
-
-    //Initialize the engineID.
-    private void initEngineID() throws UnknownHostException {
-        String id = lcd.getEngineId();
-        if(id != null) {
-            engineid = SnmpEngineId.createEngineId(id);
-        }
-    }
-
-
-    /**
-     * Returns the Message Processing Sub System.
-     * @return The Message Processing Sub System.
-     */
-    public SnmpMsgProcessingSubSystem getMsgProcessingSubSystem() {
-        return messageSub;
-    }
-
-    /**
-     * Sets the Message Processing Sub System.
-     * @param sys The Message Processing Sub System.
-     */
-    public void setMsgProcessingSubSystem(SnmpMsgProcessingSubSystem sys) {
-        messageSub = sys;
-    }
-
-     /**
-     * Returns the Security Sub System.
-     * @return The Security Sub System.
-     */
-    public SnmpSecuritySubSystem getSecuritySubSystem() {
-        return securitySub;
-    }
-    /**
-     * Sets the Security Sub System.
-     * @param sys The Security Sub System.
-     */
-    public void setSecuritySubSystem(SnmpSecuritySubSystem sys) {
-        securitySub = sys;
-    }
-     /**
-     * Sets the Access Control Sub System.
-     * @param sys The Access Control Sub System.
-     */
-    public void setAccessControlSubSystem(SnmpAccessControlSubSystem sys) {
-        accessSub = sys;
-    }
-
-    /**
-     * Returns the Access Control Sub System.
-     * @return The Access Control Sub System.
-     */
-    public SnmpAccessControlSubSystem getAccessControlSubSystem() {
-        return accessSub;
-    }
-    /**
-     * Checks the passed msg flags according to the rules specified in RFC 2572.
-     * @param msgFlags The msg flags.
-     */
-    public static void checkSecurityLevel(byte msgFlags)
-        throws SnmpBadSecurityLevelException {
-        int secLevel = msgFlags & SnmpDefinitions.authPriv;
-        if((secLevel & SnmpDefinitions.privMask) != 0)
-            if((secLevel & SnmpDefinitions.authMask) == 0) {
-                throw new SnmpBadSecurityLevelException("Security level:"+
-                                                        " noAuthPriv!!!");
-            }
-    }
-
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/internal/SnmpIncomingRequest.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,164 +0,0 @@
-/*
- * Copyright (c) 2001, 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.sun.jmx.snmp.internal;
-
-import java.net.InetAddress;
-
-import com.sun.jmx.snmp.SnmpSecurityParameters;
-import com.sun.jmx.snmp.SnmpTooBigException;
-import com.sun.jmx.snmp.SnmpStatusException;
-import com.sun.jmx.snmp.SnmpPdu;
-import com.sun.jmx.snmp.SnmpMsg;
-
-import com.sun.jmx.snmp.SnmpUnknownSecModelException;
-import com.sun.jmx.snmp.SnmpBadSecurityLevelException;
-
-/**
-<P> An <CODE>SnmpIncomingRequest</CODE> handles both sides of an incoming SNMP request:
-<ul>
-<li> The request. Unmarshalling of the received message. </li>
-<li> The response. Marshalling of the message to send. </li>
-</ul>
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- * @since 1.5
- */
-public interface SnmpIncomingRequest {
-    /**
-     * Once the incoming request decoded, returns the decoded security parameters.
-     * @return The decoded security parameters.
-     */
-    public SnmpSecurityParameters getSecurityParameters();
-     /**
-     * Tests if a report is expected.
-     * @return boolean indicating if a report is to be sent.
-     */
-    public boolean isReport();
-    /**
-     * Tests if a response is expected.
-     * @return boolean indicating if a response is to be sent.
-     */
-    public boolean isResponse();
-
-    /**
-     * Tells this request that no response will be sent.
-     */
-    public void noResponse();
-    /**
-     * Gets the incoming request principal.
-     * @return The request principal.
-     **/
-    public String getPrincipal();
-    /**
-     * Gets the incoming request security level. This level is defined in {@link com.sun.jmx.snmp.SnmpEngine SnmpEngine}.
-     * @return The security level.
-     */
-    public int getSecurityLevel();
-    /**
-     * Gets the incoming request security model.
-     * @return The security model.
-     */
-    public int getSecurityModel();
-    /**
-     * Gets the incoming request context name.
-     * @return The context name.
-     */
-    public byte[] getContextName();
-    /**
-     * Gets the incoming request context engine Id.
-     * @return The context engine Id.
-     */
-    public byte[] getContextEngineId();
-    /**
-     * Gets the incoming request context name used by Access Control Model in order to allow or deny the access to OIDs.
-     */
-    public byte[] getAccessContext();
-    /**
-     * Encodes the response message to send and puts the result in the specified byte array.
-     *
-     * @param outputBytes An array to receive the resulting encoding.
-     *
-     * @exception ArrayIndexOutOfBoundsException If the result does not fit
-     *                                           into the specified array.
-     */
-    public int encodeMessage(byte[] outputBytes)
-        throws SnmpTooBigException;
-
-    /**
-     * Decodes the specified bytes and initializes the request with the incoming message.
-     *
-     * @param inputBytes The bytes to be decoded.
-     *
-     * @exception SnmpStatusException If the specified bytes are not a valid encoding or if the security applied to this request failed and no report is to be sent (typically trap PDU).
-     */
-    public void decodeMessage(byte[] inputBytes,
-                              int byteCount,
-                              InetAddress address,
-                              int port)
-        throws SnmpStatusException, SnmpUnknownSecModelException,
-               SnmpBadSecurityLevelException;
-
-     /**
-     * Initializes the response to send with the passed Pdu.
-     * <P>
-     * If the encoding length exceeds <CODE>maxDataLength</CODE>,
-     * the method throws an exception.
-     *
-     * @param p The PDU to be encoded.
-     * @param maxDataLength The maximum length permitted for the data field.
-     *
-     * @exception SnmpStatusException If the specified <CODE>pdu</CODE>
-     *     is not valid.
-     * @exception SnmpTooBigException If the resulting encoding does not fit
-     * into <CODE>maxDataLength</CODE> bytes.
-     * @exception ArrayIndexOutOfBoundsException If the encoding exceeds
-     *   <CODE>maxDataLength</CODE>.
-     */
-    public SnmpMsg encodeSnmpPdu(SnmpPdu p,
-                                 int maxDataLength)
-        throws SnmpStatusException, SnmpTooBigException;
-
-    /**
-     * Gets the request PDU encoded in the received message.
-     * <P>
-     * This method decodes the data field and returns the resulting PDU.
-     *
-     * @return The resulting PDU.
-     * @exception SnmpStatusException If the encoding is not valid.
-     */
-    public SnmpPdu decodeSnmpPdu()
-        throws SnmpStatusException;
-
-    /**
-     * Returns a stringified form of the received message.
-     * @return The message state string.
-     */
-    public String printRequestMessage();
-    /**
-     * Returns a stringified form of the message to send.
-     * @return The message state string.
-     */
-    public String printResponseMessage();
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/internal/SnmpIncomingResponse.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,122 +0,0 @@
-/*
- * Copyright (c) 2001, 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.sun.jmx.snmp.internal;
-
-import java.net.InetAddress;
-import com.sun.jmx.snmp.SnmpPduFactory;
-import com.sun.jmx.snmp.SnmpSecurityParameters;
-import com.sun.jmx.snmp.SnmpSecurityException;
-import com.sun.jmx.snmp.SnmpTooBigException;
-import com.sun.jmx.snmp.SnmpStatusException;
-import com.sun.jmx.snmp.SnmpPdu;
-import com.sun.jmx.snmp.SnmpMsg;
-
-import com.sun.jmx.snmp.internal.SnmpSecurityCache;
-import com.sun.jmx.snmp.SnmpBadSecurityLevelException;
-/**
- * <P> An <CODE>SnmpIncomingResponse</CODE> handles the unmarshalling of the received response.</P>
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- * @since 1.5
- */
-
-public interface SnmpIncomingResponse {
-    /**
-     * Returns the source address.
-     * @return The source address.
-     */
-    public InetAddress getAddress();
-
-    /**
-     * Returns the source port.
-     * @return The source port.
-     */
-    public int getPort();
-
-    /**
-     * Gets the incoming response security parameters.
-     * @return The security parameters.
-     **/
-    public SnmpSecurityParameters getSecurityParameters();
-    /**
-     * Call this method in order to reuse <CODE>SnmpOutgoingRequest</CODE> cache.
-     * @param cache The security cache.
-     */
-    public void setSecurityCache(SnmpSecurityCache cache);
-    /**
-     * Gets the incoming response security level. This level is defined in
-     * {@link com.sun.jmx.snmp.SnmpEngine SnmpEngine}.
-     * @return The security level.
-     */
-    public int getSecurityLevel();
-    /**
-     * Gets the incoming response security model.
-     * @return The security model.
-     */
-    public int getSecurityModel();
-    /**
-     * Gets the incoming response context name.
-     * @return The context name.
-     */
-    public byte[] getContextName();
-
-    /**
-     * Decodes the specified bytes and initializes itself with the received
-     * response.
-     *
-     * @param inputBytes The bytes to be decoded.
-     *
-     * @exception SnmpStatusException If the specified bytes are not a valid encoding.
-     */
-    public SnmpMsg decodeMessage(byte[] inputBytes,
-                                 int byteCount,
-                                 InetAddress address,
-                                 int port)
-        throws SnmpStatusException, SnmpSecurityException;
-
-    /**
-     * Gets the request PDU encoded in the received response.
-     * <P>
-     * This method decodes the data field and returns the resulting PDU.
-     *
-     * @return The resulting PDU.
-     * @exception SnmpStatusException If the encoding is not valid.
-     */
-    public SnmpPdu decodeSnmpPdu()
-        throws SnmpStatusException;
-
-    /**
-     * Returns the response request Id.
-     * @param data The flat message.
-     * @return The request Id.
-     */
-    public int getRequestId(byte[] data) throws SnmpStatusException;
-
-    /**
-     * Returns a stringified form of the message to send.
-     * @return The message state string.
-     */
-    public String printMessage();
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/internal/SnmpLcd.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,136 +0,0 @@
-/*
- * Copyright (c) 2001, 2006, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.sun.jmx.snmp.internal;
-
-import java.util.Hashtable;
-import com.sun.jmx.snmp.SnmpEngineId;
-import com.sun.jmx.snmp.SnmpUnknownModelLcdException;
-import com.sun.jmx.snmp.SnmpUnknownSubSystemException;
-/**
- * Class to extend in order to develop a customized Local Configuration Datastore. The Lcd is used by the <CODE>SnmpEngine</CODE> to store and retrieve data.
- *<P> <CODE>SnmpLcd</CODE> manages the Lcds needed by every {@link com.sun.jmx.snmp.internal.SnmpModel SnmpModel}. It is possible to add and remove {@link com.sun.jmx.snmp.internal.SnmpModelLcd SnmpModelLcd}.</P>
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- * @since 1.5
- */
-public abstract class SnmpLcd {
-
-    class SubSysLcdManager {
-        private Hashtable<Integer, SnmpModelLcd> models =
-                new Hashtable<Integer, SnmpModelLcd>();
-
-        public void addModelLcd(int id,
-                                SnmpModelLcd usmlcd) {
-            models.put(id, usmlcd);
-        }
-
-        public SnmpModelLcd getModelLcd(int id) {
-            return models.get(id);
-        }
-
-        public SnmpModelLcd removeModelLcd(int id) {
-            return models.remove(id);
-        }
-    }
-
-
-    private Hashtable<SnmpSubSystem, SubSysLcdManager> subs =
-            new Hashtable<SnmpSubSystem, SubSysLcdManager>();
-
-    /**
-     * Returns the number of time the engine rebooted.
-     * @return The number of reboots or -1 if the information is not present in the Lcd.
-     */
-    public abstract int getEngineBoots();
-    /**
-     * Returns the engine Id located in the Lcd.
-     * @return The engine Id or null if the information is not present in the Lcd.
-     */
-    public abstract String getEngineId();
-
-    /**
-     * Persists the number of reboots.
-     * @param i Reboot number.
-     */
-    public abstract void storeEngineBoots(int i);
-
-    /**
-     * Persists the engine Id.
-     * @param id The engine Id.
-     */
-    public abstract void  storeEngineId(SnmpEngineId id);
-    /**
-     * Adds an Lcd model.
-     * @param sys The subsytem managing the model.
-     * @param id The model Id.
-     * @param lcd The Lcd model.
-     */
-    public void addModelLcd(SnmpSubSystem sys,
-                            int id,
-                            SnmpModelLcd lcd) {
-
-        SubSysLcdManager subsys = subs.get(sys);
-        if( subsys == null ) {
-            subsys = new SubSysLcdManager();
-            subs.put(sys, subsys);
-        }
-
-        subsys.addModelLcd(id, lcd);
-    }
-     /**
-     * Removes an Lcd model.
-     * @param sys The subsytem managing the model.
-     * @param id The model Id.
-     */
-    public void removeModelLcd(SnmpSubSystem sys,
-                                int id)
-        throws SnmpUnknownModelLcdException, SnmpUnknownSubSystemException {
-
-        SubSysLcdManager subsys = subs.get(sys);
-        if( subsys != null ) {
-            SnmpModelLcd lcd = subsys.removeModelLcd(id);
-            if(lcd == null) {
-                throw new SnmpUnknownModelLcdException("Model : " + id);
-            }
-        }
-        else
-            throw new SnmpUnknownSubSystemException(sys.toString());
-    }
-
-    /**
-     * Gets an Lcd model.
-     * @param sys The subsytem managing the model
-     * @param id The model Id.
-     * @return The Lcd model or null if no Lcd model were found.
-     */
-    public SnmpModelLcd getModelLcd(SnmpSubSystem sys,
-                                    int id) {
-        SubSysLcdManager subsys = subs.get(sys);
-
-        if(subsys == null) return null;
-
-        return subsys.getModelLcd(id);
-    }
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/internal/SnmpModel.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2001, 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.sun.jmx.snmp.internal;
-/**
- * Interface that every SNMP model must implement in order to be integrated in the engine framework.
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- * @since 1.5
- */
-public interface SnmpModel {
-
-    /**
-     * Returns the sub system that manages this model.
-     * @return The sub system.
-     */
-    public SnmpSubSystem getSubSystem();
-    /**
-     * A human readable model name.
-     * @return The model name.
-     */
-    public String getName();
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/internal/SnmpModelLcd.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 2001, 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.jmx.snmp.internal;
-
-/**
- * An interface to implement when developping customized model configuration datastore.
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- * @since 1.5
- */
-public interface SnmpModelLcd {
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/internal/SnmpMsgProcessingModel.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,147 +0,0 @@
-/*
- * Copyright (c) 2001, 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.sun.jmx.snmp.internal;
-
-
-import com.sun.jmx.snmp.mpm.SnmpMsgTranslator;
-
-import com.sun.jmx.snmp.SnmpTooBigException;
-import com.sun.jmx.snmp.SnmpStatusException;
-import com.sun.jmx.snmp.SnmpPdu;
-import com.sun.jmx.snmp.SnmpPduFactory;
-import com.sun.jmx.snmp.SnmpSecurityParameters;
-
-import com.sun.jmx.snmp.SnmpParams;
-/**
- * The message processing model interface. Any message processing model must implement this interface in order to be integrated in the engine framework.
- * The model is called by the dispatcher when a call is received or when a call is sent.
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- * @since 1.5
- */
-public interface SnmpMsgProcessingModel extends SnmpModel {
-    /**
-     * This method is called when a call is to be sent to the network.
-     * @param factory The pdu factory to use to encode and decode pdu.
-     * @return The object that will handle every steps of the sending (mainly marshalling and security).
-     */
-    public SnmpOutgoingRequest getOutgoingRequest(SnmpPduFactory factory);
-    /**
-     * This method is called when a call is received from the network.
-     * @param factory The pdu factory to use to encode and decode pdu.
-     * @return The object that will handle every steps of the receiving (mainly unmarshalling and security).
-     */
-    public SnmpIncomingRequest getIncomingRequest(SnmpPduFactory factory);
-
-     /**
-     * This method is called when a response is received from the network.
-     * @param factory The pdu factory to use to encode and decode pdu.
-     * @return The object that will handle every steps of the receiving (mainly unmarshalling and security).
-     */
-    public SnmpIncomingResponse getIncomingResponse(SnmpPduFactory factory);
-    /**
-     * This method is called to instantiate a pdu according to the passed pdu type and parameters.
-     * @param p The request parameters.
-     * @param type The pdu type.
-     * @return The pdu.
-     */
-    public SnmpPdu getRequestPdu(SnmpParams p, int type) throws SnmpStatusException;
-
-    /**
-     * This method is called to encode a full scoped pdu that has not been encrypted. <CODE>contextName</CODE>, <CODE>contextEngineID</CODE> and data are known.
-     * <BR>The specified parameters are defined in RFC 2572 (see also the {@link com.sun.jmx.snmp.SnmpV3Message} class).
-     * @param version The SNMP protocol version.
-     * @param msgID The SNMP message ID.
-     * @param msgMaxSize The max message size.
-     * @param msgFlags The message flags.
-     * @param msgSecurityModel The message security model.
-     * @param params The security parameters.
-     * @param contextEngineID The context engine ID.
-     * @param contextName The context name.
-     * @param data The encoded data.
-     * @param dataLength The encoded data length.
-     * @param outputBytes The buffer containing the encoded message.
-     * @return The encoded bytes number.
-     */
-    public int encode(int version,
-                      int msgID,
-                      int msgMaxSize,
-                      byte msgFlags,
-                      int msgSecurityModel,
-                      SnmpSecurityParameters params,
-                      byte[] contextEngineID,
-                      byte[] contextName,
-                      byte[] data,
-                      int dataLength,
-                      byte[] outputBytes) throws SnmpTooBigException;
-    /**
-     * This method is called to encode a full scoped pdu that as been encrypted. <CODE>contextName</CODE>, <CODE>contextEngineID</CODE> and data are known.
-     * <BR>The specified parameters are defined in RFC 2572 (see also the {@link com.sun.jmx.snmp.SnmpV3Message} class).
-     * @param version The SNMP protocol version.
-     * @param msgID The SNMP message ID.
-     * @param msgMaxSize The max message size.
-     * @param msgFlags The message flags.
-     * @param msgSecurityModel The message security model.
-     * @param params The security parameters.
-     * @param encryptedPdu The encrypted pdu.
-     * @param outputBytes The buffer containing the encoded message.
-     * @return The encoded bytes number.
-     */
-    public int encodePriv(int version,
-                          int msgID,
-                          int msgMaxSize,
-                          byte msgFlags,
-                          int msgSecurityModel,
-                          SnmpSecurityParameters params,
-                          byte[] encryptedPdu,
-                          byte[] outputBytes) throws SnmpTooBigException;
-     /**
-     * This method returns a decoded scoped pdu. This method decodes only the <CODE>contextEngineID</CODE>, <CODE>contextName</CODE> and data. It is needed by the <CODE>SnmpSecurityModel</CODE> after decryption.
-     * @param pdu The encoded pdu.
-     * @return The partialy scoped pdu.
-     */
-    public SnmpDecryptedPdu decode(byte[] pdu) throws SnmpStatusException;
-
-    /**
-     * This method returns an encoded scoped pdu. This method encode only the <CODE>contextEngineID</CODE>, <CODE>contextName</CODE> and data. It is needed by the <CODE>SnmpSecurityModel</CODE> for decryption.
-     * @param pdu The pdu to encode.
-     * @param outputBytes The partialy scoped pdu.
-     * @return The encoded bytes number.
-     */
-    public int encode(SnmpDecryptedPdu pdu,
-                      byte[] outputBytes) throws SnmpTooBigException;
-
-    /**
-     * In order to change the behavior of the translator, set it.
-     * @param translator The translator that will be used.
-     */
-    public void setMsgTranslator(SnmpMsgTranslator translator);
-
-    /**
-     * Returns the current translator.
-     * @return The current translator.
-     */
-    public SnmpMsgTranslator getMsgTranslator();
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/internal/SnmpMsgProcessingSubSystem.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,162 +0,0 @@
-/*
- * Copyright (c) 2001, 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.sun.jmx.snmp.internal;
-
-import java.util.Vector;
-import com.sun.jmx.snmp.SnmpMsg;
-import com.sun.jmx.snmp.SnmpParams;
-import com.sun.jmx.snmp.SnmpPdu;
-import com.sun.jmx.snmp.SnmpVarBind;
-import com.sun.jmx.snmp.SnmpStatusException;
-import com.sun.jmx.snmp.SnmpTooBigException;
-import com.sun.jmx.snmp.SnmpPduFactory;
-import com.sun.jmx.snmp.SnmpSecurityParameters;
-
-import com.sun.jmx.snmp.SnmpUnknownMsgProcModelException;
-
-/**
- * Message processing sub system interface. To allow engine integration, a message processing sub system must implement this interface. This sub system is called by the dispatcher when receiving or sending calls.
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- * @since 1.5
- */
-public interface SnmpMsgProcessingSubSystem extends SnmpSubSystem {
-
-    /**
-     * Attaches the security sub system to this sub system. Message processing model are making usage of various security sub systems. This direct attachement avoid the need of accessing the engine to retrieve the Security sub system.
-     * @param security The security sub system.
-     */
-    public void setSecuritySubSystem(SnmpSecuritySubSystem security);
-    /** Gets the attached security sub system.
-     * @return The security sub system.
-     */
-    public SnmpSecuritySubSystem getSecuritySubSystem();
-
-    /**
-     * This method is called when a call is received from the network.
-     * @param model The model ID.
-     * @param factory The pdu factory to use to encode and decode pdu.
-     * @return The object that will handle every steps of the receiving (mainly unmarshalling and security).
-     */
-    public SnmpIncomingRequest getIncomingRequest(int model,
-                                                  SnmpPduFactory factory)
-        throws SnmpUnknownMsgProcModelException;
-    /**
-     * This method is called when a call is to be sent to the network. The sub system routes the call to the dedicated model according to the model ID.
-     * @param model The model ID.
-     * @param factory The pdu factory to use to encode and decode pdu.
-     * @return The object that will handle every steps of the sending (mainly marshalling and security).
-     */
-    public SnmpOutgoingRequest getOutgoingRequest(int model,
-                                                  SnmpPduFactory factory) throws SnmpUnknownMsgProcModelException ;
-    /**
-     * This method is called to instantiate a pdu according to the passed pdu type and parameters. The sub system routes the call to the dedicated model according to the model ID.
-     * @param model The model ID.
-     * @param p The request parameters.
-     * @param type The pdu type.
-     * @return The pdu.
-     */
-    public SnmpPdu getRequestPdu(int model, SnmpParams p, int type) throws SnmpUnknownMsgProcModelException, SnmpStatusException ;
-     /**
-     * This method is called when a call is received from the network. The sub system routes the call to the dedicated model according to the model ID.
-     * @param model The model ID.
-     * @param factory The pdu factory to use to decode pdu.
-     * @return The object that will handle every steps of the receiving (mainly marshalling and security).
-     */
-    public SnmpIncomingResponse getIncomingResponse(int model,
-                                                    SnmpPduFactory factory) throws SnmpUnknownMsgProcModelException;
-    /**
-     * This method is called to encode a full scoped pdu that as not been encrypted. <CODE>contextName</CODE>, <CODE>contextEngineID</CODE> and data are known. It will be routed to the dedicated model according to the version value.
-     * <BR>The specified parameters are defined in RFC 2572 (see also the {@link com.sun.jmx.snmp.SnmpV3Message} class).
-     * @param version The SNMP protocol version.
-     * @param msgID The SNMP message ID.
-     * @param msgMaxSize The max message size.
-     * @param msgFlags The message flags.
-     * @param msgSecurityModel The message security model.
-     * @param params The security parameters.
-     * @param contextEngineID The context engine ID.
-     * @param contextName The context name.
-     * @param data The encoded data.
-     * @param dataLength The encoded data length.
-     * @param outputBytes The buffer containing the encoded message.
-     * @return The encoded bytes number.
-     */
-    public int encode(int version,
-                      int msgID,
-                      int msgMaxSize,
-                      byte msgFlags,
-                      int msgSecurityModel,
-                      SnmpSecurityParameters params,
-                      byte[] contextEngineID,
-                      byte[] contextName,
-                      byte[] data,
-                      int dataLength,
-                      byte[] outputBytes)
-        throws SnmpTooBigException,
-               SnmpUnknownMsgProcModelException ;
-    /**
-     * This method is called to encode a full scoped pdu that as been encrypted. <CODE>contextName</CODE>, <CODE>contextEngineID</CODE> and data are not known. It will be routed to the dedicated model according to the version value.
-     * <BR>The specified parameters are defined in RFC 2572 (see also the {@link com.sun.jmx.snmp.SnmpV3Message} class).
-     * @param version The SNMP protocol version.
-     * @param msgID The SNMP message ID.
-     * @param msgMaxSize The max message size.
-     * @param msgFlags The message flags.
-     * @param msgSecurityModel The message security model.
-     * @param params The security parameters.
-     * @param encryptedPdu The encrypted pdu.
-     * @param outputBytes The buffer containing the encoded message.
-     * @return The encoded bytes number.
-     */
-    public int encodePriv(int version,
-                          int msgID,
-                          int msgMaxSize,
-                          byte msgFlags,
-                          int msgSecurityModel,
-                          SnmpSecurityParameters params,
-                          byte[] encryptedPdu,
-                          byte[] outputBytes) throws SnmpTooBigException, SnmpUnknownMsgProcModelException;
-
-     /**
-     * This method returns a decoded scoped pdu. This method decodes only the <CODE>contextEngineID</CODE>, <CODE>contextName</CODE> and data. It is needed by the <CODE>SnmpSecurityModel</CODE> after decryption. It will be routed to the dedicated model according to the version value.
-     * @param version The SNMP protocol version.
-     * @param pdu The encoded pdu.
-     * @return the partialy scoped pdu.
-     */
-    public SnmpDecryptedPdu decode(int version,
-                                   byte[] pdu)
-        throws SnmpStatusException, SnmpUnknownMsgProcModelException;
-
-      /**
-     * This method returns an encoded scoped pdu. This method encodes only the <CODE>contextEngineID</CODE>, <CODE>contextName</CODE> and data. It is needed by the <CODE>SnmpSecurityModel</CODE> for decryption. It will be routed to the dedicated model according to the version value.
-     * @param version The SNMP protocol version.
-     * @param pdu The pdu to encode.
-     * @param outputBytes The partialy scoped pdu.
-     * @return The encoded bytes number.
-     */
-    public int encode(int version,
-                      SnmpDecryptedPdu pdu,
-                      byte[] outputBytes)
-        throws SnmpTooBigException, SnmpUnknownMsgProcModelException;
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/internal/SnmpOutgoingRequest.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,88 +0,0 @@
-/*
- * Copyright (c) 2001, 2006, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.jmx.snmp.internal;
-
-import java.net.InetAddress;
-
-import com.sun.jmx.snmp.SnmpSecurityException;
-import com.sun.jmx.snmp.SnmpTooBigException;
-import com.sun.jmx.snmp.SnmpStatusException;
-import com.sun.jmx.snmp.SnmpPdu;
-import com.sun.jmx.snmp.SnmpMsg;
-
-import com.sun.jmx.snmp.internal.SnmpSecurityCache;
-import com.sun.jmx.snmp.SnmpUnknownSecModelException;
-import com.sun.jmx.snmp.SnmpBadSecurityLevelException;
-/**
- * <P> An <CODE>SnmpOutgoingRequest</CODE> handles the marshalling of the message to send.</P>
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- * @since 1.5
- */
-
-public interface SnmpOutgoingRequest {
-    /**
-     * Returns the cached security data used when marshalling the call as a secure one.
-     * @return The cached data.
-     */
-    public SnmpSecurityCache getSecurityCache();
-    /**
-     * Encodes the message to send and puts the result in the specified byte array.
-     *
-     * @param outputBytes An array to receive the resulting encoding.
-     *
-     * @exception ArrayIndexOutOfBoundsException If the result does not fit
-     *                                           into the specified array.
-     */
-    public int encodeMessage(byte[] outputBytes)
-        throws SnmpStatusException,
-               SnmpTooBigException, SnmpSecurityException,
-               SnmpUnknownSecModelException, SnmpBadSecurityLevelException;
-  /**
-     * Initializes the message to send with the passed Pdu.
-     * <P>
-     * If the encoding length exceeds <CODE>maxDataLength</CODE>,
-     * the method throws an exception.</P>
-     *
-     * @param p The PDU to be encoded.
-     * @param maxDataLength The maximum length permitted for the data field.
-     *
-     * @exception SnmpStatusException If the specified PDU <CODE>p</CODE> is
-     *    not valid.
-     * @exception SnmpTooBigException If the resulting encoding does not fit
-     *    into <CODE>maxDataLength</CODE> bytes.
-     * @exception ArrayIndexOutOfBoundsException If the encoding exceeds
-     *    <CODE>maxDataLength</CODE>.
-     */
-    public SnmpMsg encodeSnmpPdu(SnmpPdu p,
-                                 int maxDataLength)
-        throws SnmpStatusException, SnmpTooBigException;
-    /**
-     * Returns a stringified form of the message to send.
-     * @return The message state string.
-     */
-    public String printMessage();
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/internal/SnmpSecurityCache.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2001, 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.sun.jmx.snmp.internal;
-
-/**
- * Cache is returned by <CODE>SnmpSecurityModel</CODE> when handling requests. The cache contants is security dependant. This interface is a marker that every cache classes must implement.
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- * @since 1.5
- */
-public interface SnmpSecurityCache {
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/internal/SnmpSecurityModel.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,176 +0,0 @@
-/*
- * Copyright (c) 2001, 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.sun.jmx.snmp.internal;
-
-import com.sun.jmx.snmp.SnmpSecurityException;
-import com.sun.jmx.snmp.SnmpStatusException;
-import com.sun.jmx.snmp.SnmpTooBigException;
-import com.sun.jmx.snmp.SnmpSecurityParameters;
-
-/**
- * Security model interface. Any security model implementation must implement this interface in order to be integrated in the engine framework. Security models are called when SNMP messages are received or sent. They deal with security (authentication and privacy).
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- * @since 1.5
- */
-public interface SnmpSecurityModel extends SnmpModel {
-    /**
-     * Called when a request is to be sent to the network. It must be securized.
-     * <BR>The specified parameters are defined in RFC 2572 (see also the {@link com.sun.jmx.snmp.SnmpV3Message} class).
-     * @param cache The cache that has been created by calling <CODE>createSecurityCache</CODE> on this model.
-     * @param version The SNMP protocol version.
-     * @param msgID The current request id.
-     * @param msgMaxSize The message max size.
-     * @param msgFlags The message flags (reportable, Auth and Priv).
-     * @param msgSecurityModel This current security model.
-     * @param params The security parameters that contain the model dependant parameters.
-     * @param contextEngineID The context engine ID.
-     * @param contextName The context name.
-     * @param data The marshalled varbind list.
-     * @param dataLength The marshalled varbind list length.
-     * @param outputBytes The buffer to fill with securized request. This is a representation independant marshalled format. This buffer will be sent to the network.
-     * @return The marshalled byte number.
-     */
-    public int generateRequestMsg(SnmpSecurityCache cache,
-                                  int version,
-                                  int msgID,
-                                  int msgMaxSize,
-                                  byte msgFlags,
-                                  int msgSecurityModel,
-                                  SnmpSecurityParameters params,
-                                  byte[] contextEngineID,
-                                  byte[] contextName,
-                                  byte[] data,
-                                  int dataLength,
-                                  byte[] outputBytes)
-        throws SnmpTooBigException, SnmpStatusException,
-               SnmpSecurityException;
-
-    /**
-     * Called when a response is to be sent to the network. It must be securized.
-     * <BR>The specified parameters are defined in RFC 2572 (see also the {@link com.sun.jmx.snmp.SnmpV3Message} class).
-     * @param cache The cache that has been created by calling <CODE>createSecurityCache</CODE> on this model.
-     * @param version The SNMP protocol version.
-     * @param msgID The current request id.
-     * @param msgMaxSize The message max size.
-     * @param msgFlags The message flags (reportable, Auth and Priv)
-     * @param msgSecurityModel This current security model.
-     * @param params The security parameters that contain the model dependant parameters.
-     * @param contextEngineID The context engine ID.
-     * @param contextName The context name.
-     * @param data The marshalled varbind list.
-     * @param dataLength The marshalled varbind list length.
-     * @param outputBytes The buffer to fill with securized request. This is a representation independant marshalled format. This buffer will be sent to the network.
-     * @return The marshalled byte number.
-     */
-    public int generateResponseMsg(SnmpSecurityCache cache,
-                                   int version,
-                                   int msgID,
-                                   int msgMaxSize,
-                                   byte msgFlags,
-                                   int msgSecurityModel,
-                                   SnmpSecurityParameters params,
-                                   byte[] contextEngineID,
-                                   byte[] contextName,
-                                   byte[] data,
-                                   int dataLength,
-                                   byte[] outputBytes)
-        throws SnmpTooBigException, SnmpStatusException,
-               SnmpSecurityException;
-    /**
-     * Called when a request is received from the network. It handles authentication and privacy.
-     * <BR>The specified parameters are defined in RFC 2572 (see also the {@link com.sun.jmx.snmp.SnmpV3Message} class).
-     * @param cache The cache that has been created by calling <CODE>createSecurityCache</CODE> on this model.
-     * @param version The SNMP protocol version.
-     * @param msgID The current request id.
-     * @param msgMaxSize The message max size.
-     * @param msgFlags The message flags (reportable, Auth and Priv)
-     * @param msgSecurityModel This current security model.
-     * @param params The security parameters in a marshalled format. The informations contained in this array are model dependant.
-     * @param contextEngineID The context engine ID or null if encrypted.
-     * @param contextName The context name or null if encrypted.
-     * @param data The marshalled varbind list or null if encrypted
-     * @param encryptedPdu The encrypted pdu or null if not encrypted.
-     * @param decryptedPdu The decrypted pdu. If no decryption is to be done, the passed context engine ID, context name and data could be used to fill this object.
-     * @return The decoded security parameters.
-
-     */
-    public SnmpSecurityParameters
-        processIncomingRequest(SnmpSecurityCache cache,
-                               int version,
-                               int msgID,
-                               int msgMaxSize,
-                               byte msgFlags,
-                               int msgSecurityModel,
-                               byte[] params,
-                               byte[] contextEngineID,
-                               byte[] contextName,
-                               byte[] data,
-                               byte[] encryptedPdu,
-                               SnmpDecryptedPdu decryptedPdu)
-        throws SnmpStatusException, SnmpSecurityException;
- /**
-     * Called when a response is received from the network. It handles authentication and privacy.
-     * <BR>The specified parameters are defined in RFC 2572 (see also the {@link com.sun.jmx.snmp.SnmpV3Message} class).
-     * @param cache The cache that has been created by calling <CODE>createSecurityCache</CODE> on this model.
-     * @param version The SNMP protocol version.
-     * @param msgID The current request id.
-     * @param msgMaxSize The message max size.
-     * @param msgFlags The message flags (reportable, Auth and Priv)
-     * @param msgSecurityModel This current security model.
-     * @param params The security parameters in a marshalled format. The informations cointained in this array are model dependant.
-     * @param contextEngineID The context engine ID or null if encrypted.
-     * @param contextName The context name or null if encrypted.
-     * @param data The marshalled varbind list or null if encrypted
-     * @param encryptedPdu The encrypted pdu or null if not encrypted.
-     * @param decryptedPdu The decrypted pdu. If no decryption is to be done, the passed context engine ID, context name and data could be used to fill this object.
-     * @return The security parameters.
-
-     */
-    public SnmpSecurityParameters processIncomingResponse(SnmpSecurityCache cache,
-                                                          int version,
-                                                          int msgID,
-                                                          int msgMaxSize,
-                                                          byte msgFlags,
-                                                          int msgSecurityModel,
-                                                          byte[] params,
-                                                          byte[] contextEngineID,
-                                                          byte[] contextName,
-                                                          byte[] data,
-                                                          byte[] encryptedPdu,
-                                                          SnmpDecryptedPdu decryptedPdu)
-        throws SnmpStatusException, SnmpSecurityException;
-
-    /**
-     * Instantiate an <CODE>SnmpSecurityCache</CODE> that is dependant to the model implementation.
-     * @return The model dependant security cache.
-     */
-    public SnmpSecurityCache createSecurityCache();
-    /**
-     * Release the previously created cache.
-     * @param cache The security cache to release.
-     */
-    public void releaseSecurityCache(SnmpSecurityCache cache);
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/internal/SnmpSecuritySubSystem.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,178 +0,0 @@
-/*
- * Copyright (c) 2001, 2006, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.sun.jmx.snmp.internal;
-
-import com.sun.jmx.snmp.SnmpTooBigException;
-import com.sun.jmx.snmp.SnmpStatusException;
-import com.sun.jmx.snmp.SnmpUnknownSecModelException;
-import com.sun.jmx.snmp.SnmpSecurityException;
-import com.sun.jmx.snmp.SnmpSecurityParameters;
-
-/**
- * Security sub system interface. To allow engine integration, a security sub system must implement this interface.
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- */
-public interface SnmpSecuritySubSystem extends SnmpSubSystem {
-     /**
-     * Instantiates an <CODE>SnmpSecurityCache</CODE> that is dependant to the model implementation. This call is routed to the dedicated model according to the model ID.
-     * @param id The model ID.
-     * @return The model dependant security cache.
-     */
-    public SnmpSecurityCache createSecurityCache(int id) throws SnmpUnknownSecModelException;
-    /**
-     * To release the previously created cache. This call is routed to the dedicated model according to the model ID.
-     * @param id The model ID.
-     * @param cache The security cache to release.
-     */
-    public void releaseSecurityCache(int id,
-                                     SnmpSecurityCache cache) throws SnmpUnknownSecModelException;
-
-     /**
-     * Called when a request is to be sent to the network. It must be securized. This call is routed to the dedicated model according to the model ID.
-     * <BR>The specified parameters are defined in RFC 2572 (see also the {@link com.sun.jmx.snmp.SnmpV3Message} class).
-     * @param cache The cache that has been created by calling <CODE>createSecurityCache</CODE> on this model.
-     * @param version The SNMP protocol version.
-     * @param msgID The current request id.
-     * @param msgMaxSize The message max size.
-     * @param msgFlags The message flags (reportable, Auth and Priv).
-     * @param msgSecurityModel This current security model.
-     * @param params The security parameters that contain the model dependant parameters.
-     * @param contextEngineID The context engine ID.
-     * @param contextName The context name.
-     * @param data The marshalled varbind list
-     * @param dataLength The marshalled varbind list length.
-     * @param outputBytes The buffer to fill with securized request. This is a representation independant marshalled format. This buffer will be sent to the network.
-     * @return The marshalled byte number.
-     */
-    public int generateRequestMsg(SnmpSecurityCache cache,
-                                  int version,
-                                  int msgID,
-                                  int msgMaxSize,
-                                  byte msgFlags,
-                                  int msgSecurityModel,
-                                  SnmpSecurityParameters params,
-                                  byte[] contextEngineID,
-                                  byte[] contextName,
-                                  byte[] data,
-                                  int dataLength,
-                                  byte[] outputBytes)
-        throws SnmpTooBigException, SnmpStatusException, SnmpSecurityException, SnmpUnknownSecModelException;
-
-    /**
-     * Called when a response is to be sent to the network. It must be securized. This call is routed to the dedicated model according to the model ID.
-     * <BR>The specified parameters are defined in RFC 2572 (see also the {@link com.sun.jmx.snmp.SnmpV3Message} class).
-     * @param cache The cache that has been created by calling <CODE>createSecurityCache</CODE> on this model.
-     * @param version The SNMP protocol version.
-     * @param msgID The current request id.
-     * @param msgMaxSize The message max size.
-     * @param msgFlags The message flags (reportable, Auth and Priv).
-     * @param msgSecurityModel This current security model.
-     * @param params The security parameters that contain the model dependant parameters.
-     * @param contextEngineID The context engine ID.
-     * @param contextName The context name.
-     * @param data The marshalled varbind list
-     * @param dataLength The marshalled varbind list length.
-     * @param outputBytes The buffer to fill with securized request. This is a representation independant marshalled format. This buffer will be sent to the network.
-     * @return The marshalled byte number.
-     */
-    public int generateResponseMsg(SnmpSecurityCache cache,
-                                   int version,
-                                   int msgID,
-                                   int msgMaxSize,
-                                   byte msgFlags,
-                                   int msgSecurityModel,
-                                   SnmpSecurityParameters params,
-                                   byte[] contextEngineID,
-                                   byte[] contextName,
-                                   byte[] data,
-                                   int dataLength,
-                                   byte[] outputBytes)
-        throws SnmpTooBigException, SnmpStatusException,
-               SnmpSecurityException, SnmpUnknownSecModelException;
-      /**
-     * Called when a request is received from the network. It handles authentication and privacy. This call is routed to the dedicated model according to the model ID.
-     * <BR>The specified parameters are defined in RFC 2572 (see also the {@link com.sun.jmx.snmp.SnmpV3Message} class).
-     * @param cache The cache that has been created by calling <CODE>createSecurityCache</CODE> on this model.
-     * @param version The SNMP protocol version.
-     * @param msgID The current request id.
-     * @param msgMaxSize The message max size.
-     * @param msgFlags The message flags (reportable, Auth and Priv)
-     * @param msgSecurityModel This current security model.
-     * @param params The security parameters in a marshalled format. The informations cointained in this array are model dependant.
-     * @param contextEngineID The context engine ID or null if encrypted.
-     * @param contextName The context name or null if encrypted.
-     * @param data The marshalled varbind list or null if encrypted.
-     * @param encryptedPdu The encrypted pdu or null if not encrypted.
-     * @param decryptedPdu The decrypted pdu. If no decryption is to be done, the passed context engine ID, context name and data could be used to fill this object.
-     * @return The decoded security parameters.
-
-     */
-    public SnmpSecurityParameters
-        processIncomingRequest(SnmpSecurityCache cache,
-                               int version,
-                               int msgID,
-                               int msgMaxSize,
-                               byte msgFlags,
-                               int msgSecurityModel,
-                               byte[] params,
-                               byte[] contextEngineID,
-                               byte[] contextName,
-                               byte[] data,
-                               byte[] encryptedPdu,
-                               SnmpDecryptedPdu decryptedPdu)
-        throws SnmpStatusException, SnmpSecurityException, SnmpUnknownSecModelException;
-          /**
-     * Called when a response is received from the network. It handles authentication and privacy. This call is routed to the dedicated model according to the model ID.
-     * <BR>The specified parameters are defined in RFC 2572 (see also the {@link com.sun.jmx.snmp.SnmpV3Message} class).
-     * @param cache The cache that has been created by calling <CODE>createSecurityCache</CODE> on this model.
-     * @param version The SNMP protocol version.
-     * @param msgID The current request id.
-     * @param msgMaxSize The message max size.
-     * @param msgFlags The message flags (reportable, Auth and Priv).
-     * @param msgSecurityModel This current security model.
-     * @param params The security parameters in a marshalled format. The informations cointained in this array are model dependant.
-     * @param contextEngineID The context engine ID or null if encrypted.
-     * @param contextName The context name or null if encrypted.
-     * @param data The marshalled varbind list or null if encrypted.
-     * @param encryptedPdu The encrypted pdu or null if not encrypted.
-     * @param decryptedPdu The decrypted pdu. If no decryption is to be done, the passed context engine ID, context name and data could be used to fill this object.
-     * @return The security parameters.
-
-     */
-    public SnmpSecurityParameters processIncomingResponse(SnmpSecurityCache cache,
-                                                          int version,
-                                                          int msgID,
-                                                          int msgMaxSize,
-                                                          byte msgFlags,
-                                                          int msgSecurityModel,
-                                                          byte[] params,
-                                                          byte[] contextEngineID,
-                                                          byte[] contextName,
-                                                          byte[] data,
-                                                          byte[] encryptedPdu,
-                                                          SnmpDecryptedPdu decryptedPdu)
-        throws SnmpStatusException, SnmpSecurityException, SnmpUnknownSecModelException;
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/internal/SnmpSubSystem.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,73 +0,0 @@
-/*
- * Copyright (c) 2001, 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.sun.jmx.snmp.internal;
-
-import com.sun.jmx.snmp.SnmpEngine;
-import com.sun.jmx.snmp.SnmpUnknownModelException;
-import java.util.Hashtable;
-/**
- * SNMP sub system interface. To allow engine framework integration, a sub system must implement this interface. A sub system is a model manager. Every model is identified by an ID. A sub system can retrieve a previously registered model using this ID.
- * <P> Every sub system is associated to its SNMP engine.
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- */
-public interface SnmpSubSystem {
-    /**
-     * Returns the associated engine.
-     * @return The engine.
-     */
-    public SnmpEngine getEngine();
-
-    /**
-     * Adds a model to this sub system.
-     * @param id The model ID.
-     * @param model The model to add.
-     */
-    public void addModel(int id, SnmpModel model);
-
-    /**
-     * Removes a model from this sub system.
-     * @param id The model ID to remove.
-     * @return The removed model.
-     */
-    public SnmpModel removeModel(int id) throws SnmpUnknownModelException;
-
-    /**
-     * Gets a model from this sub system.
-     * @param id The model ID to get.
-     * @return The model.
-     */
-    public SnmpModel getModel(int id) throws SnmpUnknownModelException;
-
-    /**
-     * Returns the set of model Ids that have been registered within the sub system.
-     */
-    public int[] getModelIds();
-
-    /**
-     * Returns the set of model names that have been registered within the sub system.
-     */
-    public String[] getModelNames();
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/internal/SnmpTools.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,125 +0,0 @@
-/*
- * Copyright (c) 2001, 2006, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.sun.jmx.snmp.internal;
-
-import com.sun.jmx.snmp.SnmpDefinitions;
-/**
- * Utility class used to deal with various data representations.
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- * @since 1.5
- */
-public class SnmpTools implements SnmpDefinitions {
-
-    /**
-     * Translates a binary representation in an ASCII one. The returned string is an hexadecimal string starting with 0x.
-     * @param data Binary to translate.
-     * @return Translated binary.
-     */
-    static public String binary2ascii(byte[] data, int length)
-    {
-        if(data == null) return null;
-        final int size = (length * 2) + 2;
-        byte[] asciiData = new byte[size];
-        asciiData[0] = (byte) '0';
-        asciiData[1] = (byte) 'x';
-        for (int i=0; i < length; i++) {
-            int j = i*2;
-            int v = (data[i] & 0xf0);
-            v = v >> 4;
-            if (v < 10)
-                asciiData[j+2] = (byte) ('0' + v);
-            else
-                asciiData[j+2] = (byte) ('A' + (v - 10));
-            v = ((data[i] & 0xf));
-            if (v < 10)
-                asciiData[j+1+2] = (byte) ('0' + v);
-            else
-                asciiData[j+1+2] = (byte) ('A' + (v - 10));
-        }
-        return new String(asciiData);
-    }
-
-    /**
-     * Translates a binary representation in an ASCII one. The returned string is an hexadecimal string starting with 0x.
-     * @param data Binary to translate.
-     * @return Translated binary.
-     */
-    static public String binary2ascii(byte[] data)
-    {
-        return binary2ascii(data, data.length);
-    }
-    /**
-     * Translates a stringified representation in a binary one. The passed string is an hexadecimal one starting with 0x.
-     * @param str String to translate.
-     * @return Translated string.
-     */
-    static public byte[] ascii2binary(String str) {
-        if(str == null) return null;
-        String val = str.substring(2);
-
-        int size = val.length();
-        byte []buf = new byte[size/2];
-        byte []p = val.getBytes();
-
-        for(int i = 0; i < (size / 2); i++)
-        {
-            int j = i * 2;
-            byte v = 0;
-            if (p[j] >= '0' && p[j] <= '9') {
-                v = (byte) ((p[j] - '0') << 4);
-            }
-            else if (p[j] >= 'a' && p[j] <= 'f') {
-                v = (byte) ((p[j] - 'a' + 10) << 4);
-            }
-            else if (p[j] >= 'A' && p[j] <= 'F') {
-                v = (byte) ((p[j] - 'A' + 10) << 4);
-            }
-            else
-                throw new Error("BAD format :" + str);
-
-            if (p[j+1] >= '0' && p[j+1] <= '9') {
-                //System.out.println("ascii : " + p[j+1]);
-                v += (p[j+1] - '0');
-                //System.out.println("binary : " + v);
-            }
-            else if (p[j+1] >= 'a' && p[j+1] <= 'f') {
-                //System.out.println("ascii : " + p[j+1]);
-                v += (p[j+1] - 'a' + 10);
-                //System.out.println("binary : " + v+1);
-            }
-            else if (p[j+1] >= 'A' && p[j+1] <= 'F') {
-                //System.out.println("ascii : " + p[j+1]);
-                v += (p[j+1] - 'A' + 10);
-                //System.out.println("binary : " + v);
-            }
-            else
-                throw new Error("BAD format :" + str);
-
-            buf[i] = v;
-        }
-        return buf;
-    }
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/internal/package.html	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-<HTML>
-<HEAD>
-<!--
- 
-Copyright (c) 2003, 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
-particular file as subject to the "Classpath" exception as provided
-by Oracle in the LICENSE file that accompanied this code.
-
-This code is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-version 2 for more details (a copy is included in the LICENSE file that
-accompanied this code).
-
-You should have received a copy of the GNU General Public License version
-2 along with this work; if not, write to the Free Software Foundation,
-Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
-Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-or visit www.oracle.com if you need additional information or have any
-questions.
--->
-</HEAD>
-<BODY>
-    Public internal SNMP classes. These classes are not exposed by the API.
-<p><b>This API is a Sun Microsystems internal API  and is subject 
-   to change without notice.</b></p>
-</BODY>
-</HTML>
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/mpm/SnmpMsgTranslator.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,92 +0,0 @@
-/*
- * Copyright (c) 2001, 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.sun.jmx.snmp.mpm;
-
-import com.sun.jmx.snmp.SnmpSecurityParameters;
-import com.sun.jmx.snmp.SnmpMsg;
-/**
- * The translator interface is implemented by classes dealing with a specific SNMP protocol version. SnmpMsgTranslator are used in conjonction with SnmpMsgProcessingModel implementations.
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- * @since 1.5
- */
-public interface SnmpMsgTranslator {
-    /**
-     * Returns the request or message Id contained in the passed message. The message is a generic one that is narrowed in the object implementing this interface.
-     */
-    public int getMsgId(SnmpMsg msg);
-    /**
-     * Returns the response max message size. The message is a generic one that is narrowed in the object implementing this interface.
-     */
-    public int getMsgMaxSize(SnmpMsg msg);
-    /**
-     * Returns the message flags. The message is a generic one that is narrowed in the object implementing this interface.
-     */
-    public byte getMsgFlags(SnmpMsg msg);
-    /**
-     * Returns the message security model. The message is a generic one that is narrowed in the object implementing this interface.
-     */
-    public int getMsgSecurityModel(SnmpMsg msg);
-    /**
-     * Returns the message security level. The message is a generic one that is narrowed in the object implementing this interface.
-     */
-    public int getSecurityLevel(SnmpMsg msg);
-     /**
-     * Returns an encoded representation of security parameters contained in the passed msg. The message is a generic one that is narrowed in the object implementing this interface.
-     */
-    public byte[] getFlatSecurityParameters(SnmpMsg msg);
-    /**
-     * Returns the message security parameters. The message is a generic one that is narrowed in the object implementing this interface.
-     */
-    public SnmpSecurityParameters getSecurityParameters(SnmpMsg msg);
-    /**
-     * Returns the message context Engine Id. The message is a generic one that is narrowed in the object implementing this interface.
-     */
-    public byte[] getContextEngineId(SnmpMsg msg);
-    /**
-     * Returns the message context name. The message is a generic one that is narrowed in the object implementing this interface.
-     */
-    public byte[] getContextName(SnmpMsg msg);
-    /**
-     * Returns the raw message context name. Raw mean as it is received from the network, without translation. It can be useful when some data are piggy backed in the context name.The message is a generic one that is narrowed in the object implementing this interface.
-     */
-    public byte[] getRawContextName(SnmpMsg msg);
-    /**
-     * Returns the message accesscontext name. This access context name is used when dealing with access rights (eg: community for V1/V2 or context name for V3).The message is a generic one that is narrowed in the object implementing this interface.
-     */
-    public byte[] getAccessContext(SnmpMsg msg);
-    /**
-     * Returns the message encrypted pdu or null if no encryption. The message is a generic one that is narrowed in the object implementing this interface.
-     */
-    public byte[] getEncryptedPdu(SnmpMsg msg);
-    /**
-     * Set the context name of the passed message.
-     */
-    public void setContextName(SnmpMsg req, byte[] contextName);
-     /**
-     * Set the context engine Id of the passed message.
-     */
-    public void setContextEngineId(SnmpMsg req, byte[] contextEngineId);
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/mpm/package.html	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-<HTML>
-<HEAD>
-<!--
- 
-Copyright (c) 2001, 2003, 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
-particular file as subject to the "Classpath" exception as provided
-by Oracle in the LICENSE file that accompanied this code.
-
-This code is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-version 2 for more details (a copy is included in the LICENSE file that
-accompanied this code).
-
-You should have received a copy of the GNU General Public License version
-2 along with this work; if not, write to the Free Software Foundation,
-Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
-Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-or visit www.oracle.com if you need additional information or have any
-questions.
--->
-</HEAD>
-<BODY>
-Provides the classes which implement the <B>Message Processing Models</B> for SNMP version 1, version 2c and version 3. 
-<p><b>This API is a Sun Microsystems internal API  and is subject 
-   to change without notice.</b></p>
-</BODY>
-</HTML>
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/package.html	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-<HTML>
-<HEAD>
-<!--
- 
-Copyright (c) 1999, 2003, 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
-particular file as subject to the "Classpath" exception as provided
-by Oracle in the LICENSE file that accompanied this code.
-
-This code is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-version 2 for more details (a copy is included in the LICENSE file that
-accompanied this code).
-
-You should have received a copy of the GNU General Public License version
-2 along with this work; if not, write to the Free Software Foundation,
-Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
-Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-or visit www.oracle.com if you need additional information or have any
-questions.
--->
-</HEAD>
-<BODY>
-    Provides the core classes which implement <B>common SNMP data types and services</B>.
-<p><b>This API is a Sun Microsystems internal API  and is subject 
-   to change without notice.</b></p>
-</BODY>
-</HTML>
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/tasks/Task.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,67 +0,0 @@
-// NPCTE fix for bugId 4510777, esc 532372, MR October 2001
-// file Task.java created for this bug fix
-/*
- * Copyright (c) 2002, 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.sun.jmx.snmp.tasks;
-
-/**
- * This interface is implemented by objects that can be executed
- * by a {@link com.sun.jmx.snmp.tasks.TaskServer}.
- * <p>A <code>Task</code> object implements two methods:
- * <ul><li><code>public void run(): </code> from
- *               {@link java.lang.Runnable}</li>
- * <ul>This method is called by the {@link com.sun.jmx.snmp.tasks.TaskServer}
- *     when the task is executed.</ul>
- * <li><code>public void cancel(): </code></li>
- * <ul>This method is called by the {@link com.sun.jmx.snmp.tasks.TaskServer}
- *     if the <code>TaskServer</code> is stopped before the
- *     <code>Task</code> is executed.</ul>
- * </ul>
- * An implementation of {@link com.sun.jmx.snmp.tasks.TaskServer} shall call
- * either <code>run()</code> or <code>cancel()</code>.
- * Whether the task is executed synchronously in the current
- * thread (when calling <code>TaskServer.submitTask()</code> or in a new
- * thread dedicated to the task, or in a daemon thread, depends on the
- * implementation of the <code>TaskServer</code> through which the task
- * is executed.
- * <p>The implementation of <code>Task</code> must not make any
- * assumption on the implementation of the <code>TaskServer</code> through
- * which it will be executed.
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- * @see com.sun.jmx.snmp.tasks.TaskServer
- *
- * @since 1.5
- **/
-public interface Task extends Runnable {
-    /**
-     * Cancel the submitted task.
-     * The implementation of this method is Task-implementation dependent.
-     * It could involve some message logging, or even call the run() method.
-     * Note that only one of run() or cancel() will be called - and exactly
-     * one.
-     **/
-    public void cancel();
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/tasks/TaskServer.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-// NPCTE fix for bugId 4510777, esc 532372, MR October 2001
-// file TaskServer.java created for this bug fix
-
-/*
- * Copyright (c) 2002, 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-package com.sun.jmx.snmp.tasks;
-
-/**
- * This interface is implemented by objects that are able to execute
- * tasks. Whether the task is executed in the client thread or in another
- * thread depends on the TaskServer implementation.
- *
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- * @see com.sun.jmx.snmp.tasks.Task
- *
- * @since 1.5
- **/
-public interface TaskServer {
-    /**
-     * Submit a task to be executed.
-     * Once a task is submitted, it is guaranteed that either
-     * {@link com.sun.jmx.snmp.tasks.Task#run() task.run()} or
-     * {@link com.sun.jmx.snmp.tasks.Task#cancel() task.cancel()} will be called.
-     * <p>Whether the task is executed in the client thread (e.g.
-     * <code>public void submitTask(Task task) { task.run(); }</code>) or in
-     * another thread (e.g. <code>
-     * public void submitTask(Task task) { new Thrad(task).start(); }</code>)
-     * depends on the TaskServer implementation.
-     * @param task The task to be executed.
-     **/
-    public void submitTask(Task task);
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/tasks/ThreadService.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,246 +0,0 @@
-/*
- * Copyright (c) 2002, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.jmx.snmp.tasks;
-
-import java.util.ArrayList;
-import com.sun.jmx.snmp.tasks.Task;
-import com.sun.jmx.snmp.tasks.TaskServer;
-
-/**
- * This class implements a {@link com.sun.jmx.snmp.tasks.TaskServer} over
- * a thread pool.
- * <p><b>This API is a Sun Microsystems internal API  and is subject
- * to change without notice.</b></p>
- **/
-public class ThreadService implements TaskServer {
-
-    public ThreadService(int threadNumber) {
-        if (threadNumber <= 0) {
-            throw new IllegalArgumentException("The thread number should bigger than zero.");
-        }
-
-        minThreads = threadNumber;
-        threadList = new ExecutorThread[threadNumber];
-
-        priority = Thread.currentThread().getPriority();
-        cloader = Thread.currentThread().getContextClassLoader();
-
-    }
-
-// public methods
-// --------------
-
-    /**
-     * Submit a task to be executed.
-     * Once a task is submitted, it is guaranteed that either
-     * {@link com.sun.jmx.snmp.tasks.Task#run() task.run()} or
-     * {@link com.sun.jmx.snmp.tasks.Task#cancel() task.cancel()} will be called.
-     * This implementation of TaskServer uses a thread pool to execute
-     * the submitted tasks.
-     * @param task The task to be executed.
-     * @exception IllegalArgumentException if the submitted task is null.
-     **/
-    public void submitTask(Task task) throws IllegalArgumentException {
-        submitTask((Runnable)task);
-    }
-
-    /**
-     * Submit a task to be executed.
-     * This implementation of TaskServer uses a thread pool to execute
-     * the submitted tasks.
-     * @param task The task to be executed.
-     * @exception IllegalArgumentException if the submitted task is null.
-     **/
-    public void submitTask(Runnable task) throws IllegalArgumentException {
-        stateCheck();
-
-        if (task == null) {
-            throw new IllegalArgumentException("No task specified.");
-        }
-
-        synchronized(jobList) {
-            jobList.add(jobList.size(), task);
-
-            jobList.notify();
-        }
-
-        createThread();
-    }
-
-    public Runnable removeTask(Runnable task) {
-        stateCheck();
-
-        Runnable removed = null;
-        synchronized(jobList) {
-            int lg = jobList.indexOf(task);
-            if (lg >= 0) {
-                removed = jobList.remove(lg);
-            }
-        }
-        if (removed != null && removed instanceof Task)
-            ((Task) removed).cancel();
-        return removed;
-    }
-
-    public void removeAll() {
-        stateCheck();
-
-        final Object[] jobs;
-        synchronized(jobList) {
-            jobs = jobList.toArray();
-            jobList.clear();
-        }
-        final int len = jobs.length;
-        for (int i=0; i<len ; i++) {
-            final Object o = jobs[i];
-            if (o!= null && o instanceof Task) ((Task)o).cancel();
-        }
-    }
-
-    // to terminate
-    public void terminate() {
-
-        if (terminated == true) {
-            return;
-        }
-
-        terminated = true;
-
-        synchronized(jobList) {
-            jobList.notifyAll();
-        }
-
-        removeAll();
-
-        for (int i=0; i<currThreds; i++) {
-            try {
-                threadList[i].interrupt();
-            } catch (Exception e) {
-                // TODO
-            }
-        }
-
-        threadList = null;
-    }
-
-// private classes
-// ---------------
-
-    // A thread used to execute jobs
-    //
-    private class ExecutorThread extends Thread {
-        public ExecutorThread() {
-            super(threadGroup, "ThreadService-"+counter++);
-            setDaemon(true);
-
-            // init
-            this.setPriority(priority);
-            this.setContextClassLoader(cloader);
-
-            idle++;
-        }
-
-        public void run() {
-
-            while(!terminated) {
-                Runnable job = null;
-
-                synchronized(jobList) {
-                    if (jobList.size() > 0) {
-                        job = jobList.remove(0);
-                        if (jobList.size() > 0) {
-                            jobList.notify();
-                        }
-
-                    } else {
-                        try {
-                            jobList.wait();
-                        } catch (InterruptedException ie) {
-                            // terminated ?
-                        } finally {
-                        }
-                        continue;
-                    }
-                }
-                if (job != null) {
-                    try {
-                        idle--;
-                        job.run();
-                    } catch (Exception e) {
-                        // TODO
-                        e.printStackTrace();
-                    } finally {
-                        idle++;
-                    }
-                }
-
-                // re-init
-                this.setPriority(priority);
-                Thread.interrupted();
-                this.setContextClassLoader(cloader);
-            }
-        }
-    }
-
-// private methods
-    private void stateCheck() throws IllegalStateException {
-        if (terminated) {
-            throw new IllegalStateException("The thread service has been terminated.");
-        }
-    }
-
-    private void createThread() {
-        if (idle < 1) {
-            synchronized(threadList) {
-                if (jobList.size() > 0 && currThreds < minThreads) {
-                    ExecutorThread et = new ExecutorThread();
-                    et.start();
-                    threadList[currThreds++] = et;
-                }
-            }
-        }
-    }
-
-
-// protected or private variables
-// ------------------------------
-    private ArrayList<Runnable> jobList = new ArrayList<Runnable>(0);
-
-    private ExecutorThread[] threadList;
-    private int minThreads = 1;
-    private int currThreds = 0;
-    private int idle = 0;
-
-    private boolean terminated = false;
-    private int priority;
-    private ThreadGroup threadGroup = new ThreadGroup("ThreadService");
-    private ClassLoader cloader;
-
-    private static long counter = 0;
-
-    private int addedJobs = 1;
-    private int doneJobs = 1;
-}
--- a/jdk/src/jdk.snmp/share/classes/com/sun/jmx/snmp/tasks/package.html	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-<HTML>
-<HEAD>
-<!--
- 
-Copyright (c) 2002, 2003, 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
-particular file as subject to the "Classpath" exception as provided
-by Oracle in the LICENSE file that accompanied this code.
-
-This code is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-version 2 for more details (a copy is included in the LICENSE file that
-accompanied this code).
-
-You should have received a copy of the GNU General Public License version
-2 along with this work; if not, write to the Free Software Foundation,
-Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
-Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-or visit www.oracle.com if you need additional information or have any
-questions.
--->
-</HEAD>
-<BODY>
-Provides some <B>common</B> classes to control JDMK threading.
-<p><b>This API is a Sun Microsystems internal API  and is subject 
-   to change without notice.</b></p>
-</BODY>
-</HTML>
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/AdaptorBootstrap.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,396 +0,0 @@
-/*
- * Copyright (c) 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.management.snmp;
-
-import com.sun.jmx.snmp.daemon.SnmpAdaptorServer;
-import com.sun.jmx.snmp.InetAddressAcl;
-import com.sun.jmx.snmp.IPAcl.SnmpAcl;
-import sun.management.snmp.jvmmib.JVM_MANAGEMENT_MIB;
-import sun.management.snmp.jvminstr.JVM_MANAGEMENT_MIB_IMPL;
-import sun.management.snmp.jvminstr.NotificationTarget;
-import sun.management.snmp.jvminstr.NotificationTargetImpl;
-import sun.management.snmp.util.MibLogger;
-import sun.management.snmp.util.JvmContextFactory;
-
-import sun.management.Agent;
-import sun.management.AgentConfigurationError;
-import static sun.management.AgentConfigurationError.*;
-import sun.management.FileSystem;
-
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Enumeration;
-import java.util.Properties;
-
-import java.io.IOException;
-import java.io.File;
-import java.io.FileInputStream;
-
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-
-/**
- * This class initializes and starts the SNMP Adaptor for JSR 163 SNMP
- * Monitoring.
- **/
-public final class AdaptorBootstrap {
-
-    private static final MibLogger log = new MibLogger(AdaptorBootstrap.class);
-
-    /**
-     * Default values for SNMP configuration properties.
-     **/
-    public static interface DefaultValues {
-        public static final String PORT="161";
-        public static final String CONFIG_FILE_NAME="management.properties";
-        public static final String TRAP_PORT="162";
-        public static final String USE_ACL="true";
-        public static final String ACL_FILE_NAME="snmp.acl";
-        public static final String BIND_ADDRESS="localhost";
-    }
-
-    /**
-     * Names of SNMP configuration properties.
-     **/
-    public static interface PropertyNames {
-        public static final String PORT="com.sun.management.snmp.port";
-        public static final String CONFIG_FILE_NAME=
-            "com.sun.management.config.file";
-        public static final String TRAP_PORT=
-            "com.sun.management.snmp.trap";
-        public static final String USE_ACL=
-            "com.sun.management.snmp.acl";
-        public static final String ACL_FILE_NAME=
-            "com.sun.management.snmp.acl.file";
-        public static final String BIND_ADDRESS=
-            "com.sun.management.snmp.interface";
-    }
-
-    /**
-     * We keep a reference - so that we can possibly call
-     * terminate(). As of now, terminate() is only called by unit tests
-     * (makes it possible to run several testcases sequentially in the
-     * same JVM).
-     **/
-    private SnmpAdaptorServer       adaptor;
-    private JVM_MANAGEMENT_MIB_IMPL jvmmib;
-
-    private AdaptorBootstrap(SnmpAdaptorServer snmpas,
-                             JVM_MANAGEMENT_MIB_IMPL mib) {
-        jvmmib  = mib;
-        adaptor = snmpas;
-    }
-
-    /**
-     * Compute the full path name for a default file.
-     * @param basename basename (with extension) of the default file.
-     * @return ${JRE}/lib/management/${basename}
-     **/
-    private static String getDefaultFileName(String basename) {
-        final String fileSeparator = File.separator;
-        return System.getProperty("java.home") + fileSeparator + "lib" +
-            fileSeparator + "management" + fileSeparator + basename;
-    }
-
-    /**
-     * Retrieve the Trap Target List from the ACL file.
-     **/
-    @SuppressWarnings("unchecked")
-    private static List<NotificationTarget> getTargetList(InetAddressAcl acl,
-                                                          int defaultTrapPort) {
-        final ArrayList<NotificationTarget> result =
-                new ArrayList<>();
-        if (acl != null) {
-            if (log.isDebugOn())
-                log.debug("getTargetList",Agent.getText("jmxremote.AdaptorBootstrap.getTargetList.processing"));
-
-            final Enumeration<InetAddress> td = acl.getTrapDestinations();
-            for (; td.hasMoreElements() ;) {
-                final InetAddress targetAddr = td.nextElement();
-                final Enumeration<String> tc =
-                    acl.getTrapCommunities(targetAddr);
-                for (;tc.hasMoreElements() ;) {
-                    final String community = tc.nextElement();
-                    final NotificationTarget target =
-                        new NotificationTargetImpl(targetAddr,
-                                                   defaultTrapPort,
-                                                   community);
-                    if (log.isDebugOn())
-                        log.debug("getTargetList",
-                                  Agent.getText("jmxremote.AdaptorBootstrap.getTargetList.adding",
-                                                target.toString()));
-                    result.add(target);
-                }
-            }
-        }
-        return result;
-    }
-
-    /**
-     * Initializes and starts the SNMP Adaptor Server.
-     * If the com.sun.management.snmp.port property is not defined,
-     * simply return. Otherwise, attempts to load the config file, and
-     * then calls {@link #initialize(java.lang.String, java.util.Properties)}.
-     *
-     **/
-    public static synchronized AdaptorBootstrap initialize() {
-
-        // Load a new properties
-        final Properties props = Agent.loadManagementProperties();
-        if (props == null) return null;
-
-        final String portStr = props.getProperty(PropertyNames.PORT);
-
-        return initialize(portStr,props);
-    }
-
-    /**
-     * Initializes and starts the SNMP Adaptor Server.
-     **/
-    public static synchronized
-        AdaptorBootstrap initialize(String portStr, Properties props) {
-
-        // Get port number
-        if (portStr.length()==0) portStr=DefaultValues.PORT;
-        final int port;
-        try {
-            port = Integer.parseInt(portStr);
-        } catch (NumberFormatException x) {
-            throw new AgentConfigurationError(INVALID_SNMP_PORT, x, portStr);
-        }
-
-        if (port < 0) {
-            throw new AgentConfigurationError(INVALID_SNMP_PORT, portStr);
-        }
-
-        // Get trap port number
-        final String trapPortStr =
-            props.getProperty(PropertyNames.TRAP_PORT,
-                              DefaultValues.TRAP_PORT);
-
-        final int trapPort;
-        try {
-            trapPort = Integer.parseInt(trapPortStr);
-        } catch (NumberFormatException x) {
-            throw new AgentConfigurationError(INVALID_SNMP_TRAP_PORT, x, trapPortStr);
-        }
-
-        if (trapPort < 0) {
-            throw new AgentConfigurationError(INVALID_SNMP_TRAP_PORT, trapPortStr);
-        }
-
-        // Get bind address
-        final String addrStr =
-            props.getProperty(PropertyNames.BIND_ADDRESS,
-                              DefaultValues.BIND_ADDRESS);
-
-        // Get ACL File
-        final String defaultAclFileName   =
-            getDefaultFileName(DefaultValues.ACL_FILE_NAME);
-        final String aclFileName =
-            props.getProperty(PropertyNames.ACL_FILE_NAME,
-                               defaultAclFileName);
-        final String  useAclStr =
-            props.getProperty(PropertyNames.USE_ACL,DefaultValues.USE_ACL);
-        final boolean useAcl =
-            Boolean.valueOf(useAclStr).booleanValue();
-
-        if (useAcl) checkAclFile(aclFileName);
-
-        AdaptorBootstrap adaptor = null;
-        try {
-            adaptor = getAdaptorBootstrap(port, trapPort, addrStr,
-                                          useAcl, aclFileName);
-        } catch (Exception e) {
-            throw new AgentConfigurationError(AGENT_EXCEPTION, e, e.getMessage());
-        }
-        return adaptor;
-    }
-
-    private static AdaptorBootstrap getAdaptorBootstrap
-        (int port, int trapPort, String bindAddress, boolean useAcl,
-         String aclFileName) {
-
-        final InetAddress address;
-        try {
-            address = InetAddress.getByName(bindAddress);
-        } catch (UnknownHostException e) {
-            throw new AgentConfigurationError(UNKNOWN_SNMP_INTERFACE, e, bindAddress);
-        }
-        if (log.isDebugOn()) {
-            log.debug("initialize",
-                      Agent.getText("jmxremote.AdaptorBootstrap.getTargetList.starting" +
-                      "\n\t" + PropertyNames.PORT + "=" + port +
-                      "\n\t" + PropertyNames.TRAP_PORT + "=" + trapPort +
-                      "\n\t" + PropertyNames.BIND_ADDRESS + "=" + address +
-                      (useAcl?("\n\t" + PropertyNames.ACL_FILE_NAME + "="
-                               + aclFileName):"\n\tNo ACL")+
-                      ""));
-        }
-
-        final InetAddressAcl acl;
-        try {
-            acl = useAcl ? new SnmpAcl(System.getProperty("user.name"),aclFileName)
-                         : null;
-        } catch (UnknownHostException e) {
-            throw new AgentConfigurationError(UNKNOWN_SNMP_INTERFACE, e, e.getMessage());
-        }
-
-        // Create adaptor
-        final SnmpAdaptorServer adaptor =
-            new SnmpAdaptorServer(acl, port, address);
-        adaptor.setUserDataFactory(new JvmContextFactory());
-        adaptor.setTrapPort(trapPort);
-
-        // Create MIB
-        //
-        final JVM_MANAGEMENT_MIB_IMPL mib = new JVM_MANAGEMENT_MIB_IMPL();
-        try {
-            mib.init();
-        } catch (IllegalAccessException x) {
-            throw new AgentConfigurationError(SNMP_MIB_INIT_FAILED, x, x.getMessage());
-        }
-
-        // Configure the trap destinations.
-        //
-        mib.addTargets(getTargetList(acl,trapPort));
-
-
-        // Start Adaptor
-        //
-        try {
-            // Will wait until the adaptor starts or fails to start.
-            // If the adaptor fails to start, a CommunicationException or
-            // an InterruptedException is thrown.
-            //
-            adaptor.start(Long.MAX_VALUE);
-        } catch (Exception x) {
-            Throwable t=x;
-            if (x instanceof com.sun.jmx.snmp.daemon.CommunicationException) {
-                final Throwable next = t.getCause();
-                if (next != null) t = next;
-            }
-            throw new AgentConfigurationError(SNMP_ADAPTOR_START_FAILED, t,
-                                              address + ":" + port,
-                                              "(" + t.getMessage() + ")");
-        }
-
-        // double check that adaptor is actually started (should always
-        // be active, so that exception should never be thrown from here)
-        //
-        if (!adaptor.isActive()) {
-            throw new AgentConfigurationError(SNMP_ADAPTOR_START_FAILED,
-                                              address + ":" + port);
-        }
-
-        try {
-            // Add MIB to adaptor
-            //
-            adaptor.addMib(mib);
-
-            // Add Adaptor to the MIB
-            //
-            mib.setSnmpAdaptor(adaptor);
-        } catch (RuntimeException x) {
-            new AdaptorBootstrap(adaptor,mib).terminate();
-            throw x;
-        }
-
-        log.debug("initialize",
-                  Agent.getText("jmxremote.AdaptorBootstrap.getTargetList.initialize1"));
-        log.config("initialize",
-                   Agent.getText("jmxremote.AdaptorBootstrap.getTargetList.initialize2",
-                                 address.toString(), java.lang.Integer.toString(adaptor.getPort())));
-        return new AdaptorBootstrap(adaptor,mib);
-    }
-
-    private static void checkAclFile(String aclFileName) {
-        if (aclFileName == null || aclFileName.length()==0) {
-            throw new AgentConfigurationError(SNMP_ACL_FILE_NOT_SET);
-        }
-        final File file = new File(aclFileName);
-        if (!file.exists()) {
-            throw new AgentConfigurationError(SNMP_ACL_FILE_NOT_FOUND, aclFileName);
-        }
-        if (!file.canRead()) {
-            throw new AgentConfigurationError(SNMP_ACL_FILE_NOT_READABLE, aclFileName);
-        }
-
-        FileSystem fs = FileSystem.open();
-        try {
-            if (fs.supportsFileSecurity(file)) {
-                if (!fs.isAccessUserOnly(file)) {
-                    throw new AgentConfigurationError(SNMP_ACL_FILE_ACCESS_NOT_RESTRICTED,
-                        aclFileName);
-                }
-            }
-        } catch (IOException e) {
-            throw new AgentConfigurationError(SNMP_ACL_FILE_READ_FAILED, aclFileName);
-
-        }
-    }
-
-
-    /**
-     * Get the port on which the adaptor is bound.
-     * Returns 0 if the adaptor is already terminated.
-     *
-     **/
-    public synchronized int getPort() {
-        if (adaptor != null) return adaptor.getPort();
-        return 0;
-    }
-
-    /**
-     * Stops the adaptor server.
-     **/
-    public synchronized void terminate() {
-        if (adaptor == null) return;
-
-        // Terminate the MIB (deregister NotificationListener from
-        // MemoryMBean)
-        //
-        try {
-            jvmmib.terminate();
-        } catch (Exception x) {
-            // Must not prevent to stop...
-            //
-            log.debug("jmxremote.AdaptorBootstrap.getTargetList.terminate",
-                      x.toString());
-        } finally {
-            jvmmib=null;
-        }
-
-        // Stop the adaptor
-        //
-        try {
-            adaptor.stop();
-        } finally {
-            adaptor = null;
-        }
-    }
-
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvminstr/JVM_MANAGEMENT_MIB_IMPL.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,694 +0,0 @@
-/*
- * Copyright (c) 2003, 2013, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package sun.management.snmp.jvminstr;
-
-// java imports
-//
-import java.util.Hashtable;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.lang.ref.WeakReference;
-
-// jmx imports
-//
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-import javax.management.InstanceAlreadyExistsException;
-import javax.management.NotificationEmitter;
-import javax.management.NotificationListener;
-import javax.management.Notification;
-import javax.management.ListenerNotFoundException;
-import javax.management.openmbean.CompositeData;
-
-// jdmk imports
-//
-import com.sun.jmx.snmp.agent.SnmpMib;
-import com.sun.jmx.snmp.daemon.SnmpAdaptorServer;
-import com.sun.jmx.snmp.SnmpPeer;
-import com.sun.jmx.snmp.SnmpParameters;
-
-import com.sun.jmx.snmp.SnmpOidTable;
-import com.sun.jmx.snmp.SnmpOid;
-import com.sun.jmx.snmp.SnmpVarBindList;
-import com.sun.jmx.snmp.SnmpVarBind;
-import com.sun.jmx.snmp.SnmpCounter;
-import com.sun.jmx.snmp.SnmpCounter64;
-import com.sun.jmx.snmp.SnmpString;
-import com.sun.jmx.snmp.SnmpInt;
-import com.sun.jmx.snmp.Enumerated;
-import com.sun.jmx.snmp.agent.SnmpMibTable;
-
-import sun.management.snmp.jvmmib.JVM_MANAGEMENT_MIBOidTable;
-import sun.management.snmp.jvmmib.JVM_MANAGEMENT_MIB;
-import sun.management.snmp.jvmmib.JvmMemoryMeta;
-import sun.management.snmp.jvmmib.JvmThreadingMeta;
-import sun.management.snmp.jvmmib.JvmRuntimeMeta;
-import sun.management.snmp.jvmmib.JvmClassLoadingMeta;
-import sun.management.snmp.jvmmib.JvmCompilationMeta;
-import sun.management.snmp.util.MibLogger;
-import sun.management.snmp.util.SnmpCachedData;
-import sun.management.snmp.util.SnmpTableHandler;
-
-//java management imports
-import java.lang.management.ManagementFactory;
-import java.lang.management.MemoryPoolMXBean;
-import java.lang.management.MemoryNotificationInfo;
-import java.lang.management.MemoryType;
-
-public class JVM_MANAGEMENT_MIB_IMPL extends JVM_MANAGEMENT_MIB {
-    private static final long serialVersionUID = -8104825586888859831L;
-
-    private static final MibLogger log =
-        new MibLogger(JVM_MANAGEMENT_MIB_IMPL.class);
-
-    private static WeakReference<SnmpOidTable> tableRef;
-
-    public static SnmpOidTable getOidTable() {
-        SnmpOidTable table = null;
-        if(tableRef == null) {
-            table =  new JVM_MANAGEMENT_MIBOidTable();
-            tableRef = new WeakReference<>(table);
-            return table;
-        }
-
-        table = tableRef.get();
-        if(table == null) {
-            table = new JVM_MANAGEMENT_MIBOidTable();
-            tableRef = new WeakReference<>(table);
-        }
-
-        return table;
-    }
-
-    /**
-     * Handler waiting for memory <CODE>Notification</CODE>.
-     * Translate each JMX notification in SNMP trap.
-     */
-    private class NotificationHandler implements NotificationListener {
-        public void handleNotification(Notification notification,
-                                       Object handback) {
-            log.debug("handleNotification", "Received notification [ " +
-                      notification.getType() + "]");
-
-            String type = notification.getType();
-            if (type.equals(MemoryNotificationInfo.MEMORY_THRESHOLD_EXCEEDED) ||
-                type.equals(MemoryNotificationInfo.
-                    MEMORY_COLLECTION_THRESHOLD_EXCEEDED)) {
-                MemoryNotificationInfo minfo = MemoryNotificationInfo.
-                    from((CompositeData) notification.getUserData());
-                SnmpCounter64 count = new SnmpCounter64(minfo.getCount());
-                SnmpCounter64 used =
-                    new SnmpCounter64(minfo.getUsage().getUsed());
-                SnmpString poolName = new SnmpString(minfo.getPoolName());
-                SnmpOid entryIndex =
-                    getJvmMemPoolEntryIndex(minfo.getPoolName());
-
-                if (entryIndex == null) {
-                    log.error("handleNotification",
-                              "Error: Can't find entry index for Memory Pool: "
-                              + minfo.getPoolName() +": " +
-                              "No trap emitted for " + type);
-                    return;
-                }
-
-                SnmpOid trap = null;
-
-                final SnmpOidTable mibTable = getOidTable();
-                try {
-                    SnmpOid usedOid  = null;
-                    SnmpOid countOid = null;
-
-                    if (type.equals(MemoryNotificationInfo.
-                                   MEMORY_THRESHOLD_EXCEEDED)) {
-                        trap = new SnmpOid(mibTable.
-                        resolveVarName("jvmLowMemoryPoolUsageNotif").getOid());
-                        usedOid =
-                            new SnmpOid(mibTable.
-                            resolveVarName("jvmMemPoolUsed").getOid() +
-                                    "." + entryIndex);
-                        countOid =
-                            new SnmpOid(mibTable.
-                            resolveVarName("jvmMemPoolThreshdCount").getOid()
-                                    + "." + entryIndex);
-                    } else if  (type.equals(MemoryNotificationInfo.
-                                   MEMORY_COLLECTION_THRESHOLD_EXCEEDED)) {
-                        trap = new SnmpOid(mibTable.
-                        resolveVarName("jvmLowMemoryPoolCollectNotif").
-                                           getOid());
-                        usedOid =
-                            new SnmpOid(mibTable.
-                            resolveVarName("jvmMemPoolCollectUsed").getOid() +
-                                        "." + entryIndex);
-                        countOid =
-                            new SnmpOid(mibTable.
-                            resolveVarName("jvmMemPoolCollectThreshdCount").
-                                        getOid() +
-                                        "." + entryIndex);
-                    }
-
-                    //Datas
-                    SnmpVarBindList list = new SnmpVarBindList();
-                    SnmpOid poolNameOid =
-                        new SnmpOid(mibTable.
-                                    resolveVarName("jvmMemPoolName").getOid() +
-                                    "." + entryIndex);
-
-                    SnmpVarBind varCount = new SnmpVarBind(countOid, count);
-                    SnmpVarBind varUsed = new SnmpVarBind(usedOid, used);
-                    SnmpVarBind varPoolName = new SnmpVarBind(poolNameOid,
-                                              poolName);
-
-                    list.add(varPoolName);
-                    list.add(varCount);
-                    list.add(varUsed);
-
-                    sendTrap(trap, list);
-                }catch(Exception e) {
-                    log.error("handleNotification",
-                              "Exception occurred : " + e);
-                }
-            }
-        }
-    }
-
-    /**
-     * List of notification targets.
-     */
-    private ArrayList<NotificationTarget> notificationTargets =
-            new ArrayList<>();
-    private final NotificationEmitter emitter;
-    private final NotificationHandler handler;
-
-
-    /**
-     * Instantiate a JVM MIB intrusmentation.
-     * A <CODE>NotificationListener</CODE> is added to the <CODE>MemoryMXBean</CODE>
-     * <CODE>NotificationEmitter</CODE>
-     */
-    public JVM_MANAGEMENT_MIB_IMPL() {
-        handler = new NotificationHandler();
-        emitter = (NotificationEmitter) ManagementFactory.getMemoryMXBean();
-        emitter.addNotificationListener(handler, null, null);
-    }
-
-    private synchronized void sendTrap(SnmpOid trap, SnmpVarBindList list) {
-        final Iterator<NotificationTarget> iterator = notificationTargets.iterator();
-        final SnmpAdaptorServer adaptor =
-            (SnmpAdaptorServer) getSnmpAdaptor();
-
-        if (adaptor == null) {
-            log.error("sendTrap", "Cannot send trap: adaptor is null.");
-            return;
-        }
-
-        if (!adaptor.isActive()) {
-            log.config("sendTrap", "Adaptor is not active: trap not sent.");
-            return;
-        }
-
-        while(iterator.hasNext()) {
-            NotificationTarget target = null;
-            try {
-                target = iterator.next();
-                SnmpPeer peer =
-                    new SnmpPeer(target.getAddress(), target.getPort());
-                SnmpParameters p = new SnmpParameters();
-                p.setRdCommunity(target.getCommunity());
-                peer.setParams(p);
-                log.debug("handleNotification", "Sending trap to " +
-                          target.getAddress() + ":" + target.getPort());
-                adaptor.snmpV2Trap(peer, trap, list, null);
-            }catch(Exception e) {
-                log.error("sendTrap",
-                          "Exception occurred while sending trap to [" +
-                          target + "]. Exception : " + e);
-                log.debug("sendTrap",e);
-            }
-        }
-    }
-
-    /**
-     * Add a notification target.
-     * @param target The target to add
-     * @throws IllegalArgumentException If target parameter is null.
-     */
-    public synchronized void addTarget(NotificationTarget target)
-        throws IllegalArgumentException {
-        if(target == null)
-            throw new IllegalArgumentException("Target is null");
-
-        notificationTargets.add(target);
-    }
-
-    /**
-     * Remove notification listener.
-     */
-    public void terminate() {
-        try {
-            emitter.removeNotificationListener(handler);
-        }catch(ListenerNotFoundException e) {
-            log.error("terminate", "Listener Not found : " + e);
-        }
-    }
-
-    /**
-     * Add notification targets.
-     * @param targets A list of
-     * <CODE>sun.management.snmp.jvminstr.NotificationTarget</CODE>
-     * @throws IllegalArgumentException If targets parameter is null.
-     */
-    public synchronized void addTargets(List<NotificationTarget> targets)
-        throws IllegalArgumentException {
-        if(targets == null)
-            throw new IllegalArgumentException("Target list is null");
-
-        notificationTargets.addAll(targets);
-    }
-
-    /**
-     * Factory method for "JvmMemory" group MBean.
-     *
-     * You can redefine this method if you need to replace the default
-     * generated MBean class with your own customized class.
-     *
-     * @param groupName Name of the group ("JvmMemory")
-     * @param groupOid  OID of this group
-     * @param groupObjname ObjectName for this group (may be null)
-     * @param server    MBeanServer for this group (may be null)
-     *
-     * @return An instance of the MBean class generated for the
-     *         "JvmMemory" group (JvmMemory)
-     *
-     * Note that when using standard metadata,
-     * the returned object must implement the "JvmMemoryMBean"
-     * interface.
-     **/
-    protected Object createJvmMemoryMBean(String groupName,
-                String groupOid,  ObjectName groupObjname,
-                                          MBeanServer server)  {
-
-        // Note that when using standard metadata,
-        // the returned object must implement the "JvmMemoryMBean"
-        // interface.
-        //
-        if (server != null)
-            return new JvmMemoryImpl(this,server);
-        else
-            return new JvmMemoryImpl(this);
-    }
-
-    /**
-     * Factory method for "JvmMemory" group metadata class.
-     *
-     * You can redefine this method if you need to replace the default
-     * generated metadata class with your own customized class.
-     *
-     * @param groupName Name of the group ("JvmMemory")
-     * @param groupOid  OID of this group
-     * @param groupObjname ObjectName for this group (may be null)
-     * @param server    MBeanServer for this group (may be null)
-     *
-     * @return An instance of the metadata class generated for the
-     *         "JvmMemory" group (JvmMemoryMeta)
-     *
-     **/
-    protected JvmMemoryMeta createJvmMemoryMetaNode(String groupName,
-                                                    String groupOid,
-                                                    ObjectName groupObjname,
-                                                    MBeanServer server) {
-        return new JvmMemoryMetaImpl(this, objectserver);
-    }
-
-    /**
-     * Factory method for "JvmThreading" group metadata class.
-     *
-     * You can redefine this method if you need to replace the default
-     * generated metadata class with your own customized class.
-     *
-     * @param groupName Name of the group ("JvmThreading")
-     * @param groupOid  OID of this group
-     * @param groupObjname ObjectName for this group (may be null)
-     * @param server    MBeanServer for this group (may be null)
-     *
-     * @return An instance of the metadata class generated for the
-     *         "JvmThreading" group (JvmThreadingMeta)
-     *
-     **/
-    protected JvmThreadingMeta createJvmThreadingMetaNode(String groupName,
-                                                          String groupOid,
-                                                          ObjectName groupObjname,
-                                                          MBeanServer server)  {
-        return new JvmThreadingMetaImpl(this, objectserver);
-    }
-
-    /**
-     * Factory method for "JvmThreading" group MBean.
-     *
-     * You can redefine this method if you need to replace the default
-     * generated MBean class with your own customized class.
-     *
-     * @param groupName Name of the group ("JvmThreading")
-     * @param groupOid  OID of this group
-     * @param groupObjname ObjectName for this group (may be null)
-     * @param server    MBeanServer for this group (may be null)
-     *
-     * @return An instance of the MBean class generated for the
-     *         "JvmThreading" group (JvmThreading)
-     *
-     * Note that when using standard metadata,
-     * the returned object must implement the "JvmThreadingMBean"
-     * interface.
-     **/
-    protected Object createJvmThreadingMBean(String groupName,
-                                             String groupOid,
-                                             ObjectName groupObjname,
-                                             MBeanServer server)  {
-
-        // Note that when using standard metadata,
-        // the returned object must implement the "JvmThreadingMBean"
-        // interface.
-        //
-        if (server != null)
-            return new JvmThreadingImpl(this,server);
-        else
-            return new JvmThreadingImpl(this);
-    }
-
-    /**
-     * Factory method for "JvmRuntime" group metadata class.
-     *
-     * You can redefine this method if you need to replace the default
-     * generated metadata class with your own customized class.
-     *
-     * @param groupName Name of the group ("JvmRuntime")
-     * @param groupOid  OID of this group
-     * @param groupObjname ObjectName for this group (may be null)
-     * @param server    MBeanServer for this group (may be null)
-     *
-     * @return An instance of the metadata class generated for the
-     *         "JvmRuntime" group (JvmRuntimeMeta)
-     *
-     **/
-    protected JvmRuntimeMeta createJvmRuntimeMetaNode(String groupName,
-                                                      String groupOid,
-                                                      ObjectName groupObjname,
-                                                      MBeanServer server)  {
-        return new JvmRuntimeMetaImpl(this, objectserver);
-    }
-
-    /**
-     * Factory method for "JvmRuntime" group MBean.
-     *
-     * You can redefine this method if you need to replace the default
-     * generated MBean class with your own customized class.
-     *
-     * @param groupName Name of the group ("JvmRuntime")
-     * @param groupOid  OID of this group
-     * @param groupObjname ObjectName for this group (may be null)
-     * @param server    MBeanServer for this group (may be null)
-     *
-     * @return An instance of the MBean class generated for the
-     *         "JvmRuntime" group (JvmRuntime)
-     *
-     * Note that when using standard metadata,
-     * the returned object must implement the "JvmRuntimeMBean"
-     * interface.
-     **/
-    protected Object createJvmRuntimeMBean(String groupName,
-                                           String groupOid,
-                                           ObjectName groupObjname,
-                                           MBeanServer server)  {
-
-        // Note that when using standard metadata,
-        // the returned object must implement the "JvmRuntimeMBean"
-        // interface.
-        //
-        if (server != null)
-            return new JvmRuntimeImpl(this,server);
-        else
-            return new JvmRuntimeImpl(this);
-    }
-
-    /**
-     * Factory method for "JvmCompilation" group metadata class.
-     *
-     * You can redefine this method if you need to replace the default
-     * generated metadata class with your own customized class.
-     *
-     * @param groupName Name of the group ("JvmCompilation")
-     * @param groupOid  OID of this group
-     * @param groupObjname ObjectName for this group (may be null)
-     * @param server    MBeanServer for this group (may be null)
-     *
-     * @return An instance of the metadata class generated for the
-     *         "JvmCompilation" group (JvmCompilationMeta)
-     *
-     **/
-    protected JvmCompilationMeta
-        createJvmCompilationMetaNode(String groupName,
-                                     String groupOid,
-                                     ObjectName groupObjname,
-                                     MBeanServer server)  {
-        // If there is no compilation system, the jvmCompilation  will not
-        // be instantiated.
-        //
-        if (ManagementFactory.getCompilationMXBean() == null) return null;
-        return super.createJvmCompilationMetaNode(groupName,groupOid,
-                                                  groupObjname,server);
-    }
-
-    /**
-     * Factory method for "JvmCompilation" group MBean.
-     *
-     * You can redefine this method if you need to replace the default
-     * generated MBean class with your own customized class.
-     *
-     * @param groupName Name of the group ("JvmCompilation")
-     * @param groupOid  OID of this group
-     * @param groupObjname ObjectName for this group (may be null)
-     * @param server    MBeanServer for this group (may be null)
-     *
-     * @return An instance of the MBean class generated for the
-     *         "JvmCompilation" group (JvmCompilation)
-     *
-     * Note that when using standard metadata,
-     * the returned object must implement the "JvmCompilationMBean"
-     * interface.
-     **/
-    protected Object createJvmCompilationMBean(String groupName,
-                String groupOid,  ObjectName groupObjname, MBeanServer server)  {
-
-        // Note that when using standard metadata,
-        // the returned object must implement the "JvmCompilationMBean"
-        // interface.
-        //
-        if (server != null)
-            return new JvmCompilationImpl(this,server);
-        else
-            return new JvmCompilationImpl(this);
-    }
-
-    /**
-     * Factory method for "JvmOS" group MBean.
-     *
-     * You can redefine this method if you need to replace the default
-     * generated MBean class with your own customized class.
-     *
-     * @param groupName Name of the group ("JvmOS")
-     * @param groupOid  OID of this group
-     * @param groupObjname ObjectName for this group (may be null)
-     * @param server    MBeanServer for this group (may be null)
-     *
-     * @return An instance of the MBean class generated for the
-     *         "JvmOS" group (JvmOS)
-     *
-     * Note that when using standard metadata,
-     * the returned object must implement the "JvmOSMBean"
-     * interface.
-     **/
-    protected Object createJvmOSMBean(String groupName,
-                String groupOid,  ObjectName groupObjname, MBeanServer server)  {
-
-        // Note that when using standard metadata,
-        // the returned object must implement the "JvmOSMBean"
-        // interface.
-        //
-        if (server != null)
-            return new JvmOSImpl(this,server);
-        else
-            return new JvmOSImpl(this);
-    }
-
-
-    /**
-     * Factory method for "JvmClassLoading" group MBean.
-     *
-     * You can redefine this method if you need to replace the default
-     * generated MBean class with your own customized class.
-     *
-     * @param groupName Name of the group ("JvmClassLoading")
-     * @param groupOid  OID of this group
-     * @param groupObjname ObjectName for this group (may be null)
-     * @param server    MBeanServer for this group (may be null)
-     *
-     * @return An instance of the MBean class generated for the
-     *         "JvmClassLoading" group (JvmClassLoading)
-     *
-     * Note that when using standard metadata,
-     * the returned object must implement the "JvmClassLoadingMBean"
-     * interface.
-     **/
-    protected Object createJvmClassLoadingMBean(String groupName,
-                                                String groupOid,
-                                                ObjectName groupObjname,
-                                                MBeanServer server)  {
-
-        // Note that when using standard metadata,
-        // the returned object must implement the "JvmClassLoadingMBean"
-        // interface.
-        //
-        if (server != null)
-            return new JvmClassLoadingImpl(this,server);
-        else
-            return new JvmClassLoadingImpl(this);
-    }
-
-    static String validDisplayStringTC(String str) {
-
-        if(str == null) return "";
-
-        if(str.length() > DISPLAY_STRING_MAX_LENGTH) {
-            return str.substring(0, DISPLAY_STRING_MAX_LENGTH);
-        }
-        else
-            return str;
-    }
-
-    static String validJavaObjectNameTC(String str) {
-
-        if(str == null) return "";
-
-        if(str.length() > JAVA_OBJECT_NAME_MAX_LENGTH) {
-            return str.substring(0, JAVA_OBJECT_NAME_MAX_LENGTH);
-        }
-        else
-            return str;
-    }
-
-    static String validPathElementTC(String str) {
-
-        if(str == null) return "";
-
-        if(str.length() > PATH_ELEMENT_MAX_LENGTH) {
-            return str.substring(0, PATH_ELEMENT_MAX_LENGTH);
-        }
-        else
-            return str;
-    }
-    static String validArgValueTC(String str) {
-
-        if(str == null) return "";
-
-        if(str.length() > ARG_VALUE_MAX_LENGTH) {
-            return str.substring(0, ARG_VALUE_MAX_LENGTH);
-        }
-        else
-            return str;
-    }
-
-    /**
-     * WARNING: This should probably be moved to JvmMemPoolTableMetaImpl
-     **/
-    private SnmpTableHandler getJvmMemPoolTableHandler(Object userData) {
-        final SnmpMibTable meta =
-            getRegisteredTableMeta("JvmMemPoolTable");
-        if (! (meta instanceof JvmMemPoolTableMetaImpl)) {
-            final String err = ((meta==null)?"No metadata for JvmMemPoolTable":
-                                "Bad metadata class for JvmMemPoolTable: " +
-                                meta.getClass().getName());
-            log.error("getJvmMemPoolTableHandler", err);
-            return null;
-        }
-        final JvmMemPoolTableMetaImpl memPoolTable =
-            (JvmMemPoolTableMetaImpl) meta;
-        return memPoolTable.getHandler(userData);
-    }
-
-    /**
-     * WARNING: This should probably be moved to JvmMemPoolTableMetaImpl
-     **/
-    private int findInCache(SnmpTableHandler handler,
-                            String poolName) {
-
-        if (!(handler instanceof SnmpCachedData)) {
-            if (handler != null) {
-                final String err = "Bad class for JvmMemPoolTable datas: " +
-                    handler.getClass().getName();
-                log.error("getJvmMemPoolEntry", err);
-            }
-            return -1;
-        }
-
-        final SnmpCachedData data = (SnmpCachedData)handler;
-        final int len = data.datas.length;
-        for (int i=0; i < data.datas.length ; i++) {
-            final MemoryPoolMXBean pool = (MemoryPoolMXBean) data.datas[i];
-            if (poolName.equals(pool.getName())) return i;
-        }
-        return -1;
-    }
-
-    /**
-     * WARNING: This should probably be moved to JvmMemPoolTableMetaImpl
-     **/
-    private SnmpOid getJvmMemPoolEntryIndex(SnmpTableHandler handler,
-                                            String poolName) {
-        final int index = findInCache(handler,poolName);
-        if (index < 0) return null;
-        return ((SnmpCachedData)handler).indexes[index];
-    }
-
-    private SnmpOid getJvmMemPoolEntryIndex(String poolName) {
-        return getJvmMemPoolEntryIndex(getJvmMemPoolTableHandler(null),
-                                       poolName);
-    }
-
-    // cache validity
-    //
-    // Should we define a property for this? Should we have different
-    // cache validity periods depending on which table we cache?
-    //
-    public long validity() {
-        return DEFAULT_CACHE_VALIDITY_PERIOD;
-    }
-
-    // Defined in RFC 2579
-    private final static int DISPLAY_STRING_MAX_LENGTH=255;
-    private final static int JAVA_OBJECT_NAME_MAX_LENGTH=1023;
-    private final static int PATH_ELEMENT_MAX_LENGTH=1023;
-    private final static int ARG_VALUE_MAX_LENGTH=1023;
-    private final static int DEFAULT_CACHE_VALIDITY_PERIOD=1000;
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvminstr/JvmClassLoadingImpl.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,149 +0,0 @@
-/*
- * Copyright (c) 2003, 2004, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package sun.management.snmp.jvminstr;
-
-// java imports
-//
-import java.io.Serializable;
-
-import java.lang.management.ClassLoadingMXBean;
-import java.lang.management.ManagementFactory;
-// jmx imports
-//
-import javax.management.MBeanServer;
-import com.sun.jmx.snmp.SnmpString;
-import com.sun.jmx.snmp.SnmpStatusException;
-
-// jdmk imports
-//
-import com.sun.jmx.snmp.agent.SnmpMib;
-
-import sun.management.snmp.jvmmib.JvmClassLoadingMBean;
-import sun.management.snmp.jvmmib.EnumJvmClassesVerboseLevel;
-import sun.management.snmp.util.MibLogger;
-
-/**
- * The class is used for implementing the "JvmClassLoading" group.
- */
-public class JvmClassLoadingImpl implements JvmClassLoadingMBean {
-
-    /**
-     * Variable for storing the value of "JvmClassesVerboseLevel".
-     *
-     * "verbose: if the -verbose:class flag is set.
-     * silent:  otherwise.
-     *
-     * See java.management.ClassLoadingMXBean.isVerbose(),
-     * java.management.ClassLoadingMXBean.setVerbose()
-     * "
-     *
-     */
-    static final EnumJvmClassesVerboseLevel JvmClassesVerboseLevelVerbose =
-        new EnumJvmClassesVerboseLevel("verbose");
-    static final EnumJvmClassesVerboseLevel JvmClassesVerboseLevelSilent =
-        new EnumJvmClassesVerboseLevel("silent");
-
-    /**
-     * Constructor for the "JvmClassLoading" group.
-     * If the group contains a table, the entries created through an
-     * SNMP SET will not be registered in Java DMK.
-     */
-    public JvmClassLoadingImpl(SnmpMib myMib) {
-    }
-
-    /**
-     * Constructor for the "JvmClassLoading" group.
-     * If the group contains a table, the entries created through an SNMP SET
-     * will be AUTOMATICALLY REGISTERED in Java DMK.
-     */
-    public JvmClassLoadingImpl(SnmpMib myMib, MBeanServer server) {
-    }
-
-    static ClassLoadingMXBean getClassLoadingMXBean() {
-        return ManagementFactory.getClassLoadingMXBean();
-    }
-
-    /**
-     * Getter for the "JvmClassesVerboseLevel" variable.
-     */
-    public EnumJvmClassesVerboseLevel getJvmClassesVerboseLevel()
-        throws SnmpStatusException {
-        if(getClassLoadingMXBean().isVerbose())
-            return JvmClassesVerboseLevelVerbose;
-        else
-            return JvmClassesVerboseLevelSilent;
-    }
-
-    /**
-     * Setter for the "JvmClassesVerboseLevel" variable.
-     */
-    public void setJvmClassesVerboseLevel(EnumJvmClassesVerboseLevel x)
-        throws SnmpStatusException {
-        final boolean verbose;
-        if (JvmClassesVerboseLevelVerbose.equals(x)) verbose=true;
-        else if (JvmClassesVerboseLevelSilent.equals(x)) verbose=false;
-        // Should never happen, this case is handled by
-        // checkJvmClassesVerboseLevel();
-        else throw new
-            SnmpStatusException(SnmpStatusException.snmpRspWrongValue);
-        getClassLoadingMXBean().setVerbose(verbose);
-    }
-
-    /**
-     * Checker for the "JvmClassesVerboseLevel" variable.
-     */
-    public void checkJvmClassesVerboseLevel(EnumJvmClassesVerboseLevel x)
-        throws SnmpStatusException {
-        //
-        // Add your own checking policy.
-        //
-        if (JvmClassesVerboseLevelVerbose.equals(x)) return;
-        if (JvmClassesVerboseLevelSilent.equals(x))  return;
-        throw new SnmpStatusException(SnmpStatusException.snmpRspWrongValue);
-
-    }
-
-    /**
-     * Getter for the "JvmClassesUnloadedCount" variable.
-     */
-    public Long getJvmClassesUnloadedCount() throws SnmpStatusException {
-        return getClassLoadingMXBean().getUnloadedClassCount();
-    }
-
-    /**
-     * Getter for the "JvmClassesTotalLoadedCount" variable.
-     */
-    public Long getJvmClassesTotalLoadedCount() throws SnmpStatusException {
-        return getClassLoadingMXBean().getTotalLoadedClassCount();
-    }
-
-    /**
-     * Getter for the "JvmClassesLoadedCount" variable.
-     */
-    public Long getJvmClassesLoadedCount() throws SnmpStatusException {
-        return (long)getClassLoadingMXBean().getLoadedClassCount();
-    }
-
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvminstr/JvmCompilationImpl.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,129 +0,0 @@
-/*
- * Copyright (c) 2003, 2004, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package sun.management.snmp.jvminstr;
-
-// java imports
-//
-import java.io.Serializable;
-import java.lang.management.ManagementFactory;
-import java.lang.management.CompilationMXBean;
-
-// jmx imports
-//
-import javax.management.MBeanServer;
-import com.sun.jmx.snmp.SnmpString;
-import com.sun.jmx.snmp.SnmpStatusException;
-
-// jdmk imports
-//
-import com.sun.jmx.snmp.agent.SnmpMib;
-
-import sun.management.snmp.jvmmib.JvmCompilationMBean;
-import sun.management.snmp.jvmmib.EnumJvmJITCompilerTimeMonitoring;
-import sun.management.snmp.util.MibLogger;
-
-/**
- * The class is used for implementing the "JvmCompilation" group.
- */
-public class JvmCompilationImpl implements JvmCompilationMBean {
-
-    /**
-     * Variable for storing the value of "JvmJITCompilerTimeMonitoring".
-     *
-     * "Indicates whether the Java virtual machine supports
-     * compilation time monitoring.
-     *
-     * See java.management.CompilationMXBean.
-     * isCompilationTimeMonitoringSupported()
-     * "
-     *
-     */
-    static final EnumJvmJITCompilerTimeMonitoring
-        JvmJITCompilerTimeMonitoringSupported =
-        new EnumJvmJITCompilerTimeMonitoring("supported");
-    static final EnumJvmJITCompilerTimeMonitoring
-        JvmJITCompilerTimeMonitoringUnsupported =
-        new EnumJvmJITCompilerTimeMonitoring("unsupported");
-
-
-    /**
-     * Constructor for the "JvmCompilation" group.
-     * If the group contains a table, the entries created through an SNMP SET
-     * will not be registered in Java DMK.
-     */
-    public JvmCompilationImpl(SnmpMib myMib) {
-    }
-
-
-    /**
-     * Constructor for the "JvmCompilation" group.
-     * If the group contains a table, the entries created through an SNMP
-     * SET will be AUTOMATICALLY REGISTERED in Java DMK.
-     */
-    public JvmCompilationImpl(SnmpMib myMib, MBeanServer server) {
-    }
-
-    private static CompilationMXBean getCompilationMXBean() {
-        return ManagementFactory.getCompilationMXBean();
-    }
-
-    /**
-     * Getter for the "JvmJITCompilerTimeMonitoring" variable.
-     */
-    public EnumJvmJITCompilerTimeMonitoring getJvmJITCompilerTimeMonitoring()
-        throws SnmpStatusException {
-
-        // If we reach this point, then we can safely assume that
-        // getCompilationMXBean() will not return null, because this
-        // object will not be instantiated when there is no compilation
-        // system (see JVM_MANAGEMENT_MIB_IMPL).
-        //
-        if(getCompilationMXBean().isCompilationTimeMonitoringSupported())
-            return JvmJITCompilerTimeMonitoringSupported;
-        else
-            return JvmJITCompilerTimeMonitoringUnsupported;
-    }
-
-    /**
-     * Getter for the "JvmJITCompilerTimeMs" variable.
-     */
-    public Long getJvmJITCompilerTimeMs() throws SnmpStatusException {
-        final long t;
-        if(getCompilationMXBean().isCompilationTimeMonitoringSupported())
-            t = getCompilationMXBean().getTotalCompilationTime();
-        else
-            t = 0;
-        return t;
-    }
-
-    /**
-     * Getter for the "JvmJITCompilerName" variable.
-     */
-    public String getJvmJITCompilerName() throws SnmpStatusException {
-        return JVM_MANAGEMENT_MIB_IMPL.
-            validJavaObjectNameTC(getCompilationMXBean().getName());
-    }
-
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvminstr/JvmMemGCEntryImpl.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,91 +0,0 @@
-/*
- * Copyright (c) 2003, 2004, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package sun.management.snmp.jvminstr;
-
-// java imports
-//
-import java.io.Serializable;
-
-// jmx imports
-//
-import com.sun.jmx.snmp.SnmpStatusException;
-
-// jdmk imports
-//
-import com.sun.jmx.snmp.agent.SnmpMib;
-
-import java.lang.management.GarbageCollectorMXBean;
-
-import sun.management.snmp.jvmmib.JvmMemGCEntryMBean;
-import sun.management.snmp.util.MibLogger;
-
-/**
- * The class is used for implementing the "JvmMemGCEntry" group.
- */
-public class JvmMemGCEntryImpl implements JvmMemGCEntryMBean {
-
-    /**
-     * Variable for storing the value of "JvmMemManagerIndex".
-     *
-     * "An index opaquely computed by the agent and which uniquely
-     * identifies a Memory Manager."
-     *
-     */
-    protected final int JvmMemManagerIndex;
-
-    protected final GarbageCollectorMXBean gcm;
-
-    /**
-     * Constructor for the "JvmMemGCEntry" group.
-     */
-    public JvmMemGCEntryImpl(GarbageCollectorMXBean gcm, int index) {
-        this.gcm=gcm;
-        this.JvmMemManagerIndex = index;
-    }
-
-    /**
-     * Getter for the "JvmMemGCTimeMs" variable.
-     */
-    // Don't bother to uses the request contextual cache for this.
-    public Long getJvmMemGCTimeMs() throws SnmpStatusException {
-        return gcm.getCollectionTime();
-    }
-
-    /**
-     * Getter for the "JvmMemGCCount" variable.
-     */
-    // Don't bother to uses the request contextual cache for this.
-    public Long getJvmMemGCCount() throws SnmpStatusException {
-        return gcm.getCollectionCount();
-    }
-
-    /**
-     * Getter for the "JvmMemManagerIndex" variable.
-     */
-    public Integer getJvmMemManagerIndex() throws SnmpStatusException {
-        return JvmMemManagerIndex;
-    }
-
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvminstr/JvmMemGCTableMetaImpl.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,362 +0,0 @@
-/*
- * Copyright (c) 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package sun.management.snmp.jvminstr;
-
-
-// java imports
-//
-import java.io.Serializable;
-import java.util.List;
-import java.util.Map;
-import java.util.TreeMap;
-
-// jmx imports
-//
-import com.sun.jmx.snmp.SnmpOid;
-import com.sun.jmx.snmp.SnmpStatusException;
-
-// jdmk imports
-//
-import com.sun.jmx.snmp.agent.SnmpMib;
-import com.sun.jmx.snmp.agent.SnmpStandardObjectServer;
-
-import java.lang.management.MemoryManagerMXBean;
-import java.lang.management.GarbageCollectorMXBean;
-import java.lang.management.ManagementFactory;
-
-import sun.management.snmp.jvmmib.JvmMemGCTableMeta;
-import sun.management.snmp.util.SnmpCachedData;
-import sun.management.snmp.util.SnmpTableCache;
-import sun.management.snmp.util.SnmpTableHandler;
-import sun.management.snmp.util.MibLogger;
-import sun.management.snmp.util.JvmContextFactory;
-
-/**
- * The class is used for implementing the "JvmMemGCTable" table.
- */
-public class JvmMemGCTableMetaImpl extends  JvmMemGCTableMeta {
-
-    static final long serialVersionUID = 8250461197108867607L;
-
-    /**
-     * This class acts as a filter over the SnmpTableHandler
-     * used for the JvmMemoryManagerTable. It filters out
-     * (skip) all MemoryManagerMXBean that are not instances of
-     * GarbageCollectorMXBean so that only Garbage Collectors are
-     * seen. This is a better solution than relying on
-     * ManagementFactory.getGarbageCollectorMXBeans() because it makes it
-     * possible to guarantee the consistency betwen the MemoryManager table
-     * and the GCTable since both will be sharing the same cache.
-     **/
-    protected static class GCTableFilter {
-
-        /**
-         * Returns the index that immediately follows the given
-         * <var>index</var>. The returned index is strictly greater
-         * than the given <var>index</var>, and is contained in the table.
-         * <br>If the given <var>index</var> is null, returns the first
-         * index in the table.
-         * <br>If there are no index after the given <var>index</var>,
-         * returns null.
-         * This method is an optimization for the case where the
-         * SnmpTableHandler is in fact an instance of SnmpCachedData.
-         **/
-        public SnmpOid getNext(SnmpCachedData datas, SnmpOid index) {
-
-            final boolean dbg = log.isDebugOn();
-
-            // We're going to loop until we find an instance of
-            // GarbageCollectorMXBean. First we attempt to find
-            // the next element whose OID follows the given index.
-            // If `index' is null, the insertion point is -1
-            // (the next is 0 = -insertion - 1)
-            //
-            final int insertion = (index==null)?-1:datas.find(index);
-            if (dbg) log.debug("GCTableFilter","oid="+index+
-                               " at insertion="+insertion);
-
-            int next;
-            if (insertion > -1) next = insertion+1;
-            else next = -insertion -1;
-
-            // Now `next' points to the element that imediately
-            // follows the given `index'. We're going to loop
-            // through the table, starting at `next' (included),
-            // and return the first element which is an instance
-            // of GarbageCollectorMXBean.
-            //
-            for (;next<datas.indexes.length;next++) {
-                if (dbg) log.debug("GCTableFilter","next="+next);
-                final Object value = datas.datas[next];
-                if (dbg) log.debug("GCTableFilter","value["+next+"]=" +
-                      ((MemoryManagerMXBean)value).getName());
-                if (value instanceof GarbageCollectorMXBean) {
-                    // That's the next: return it.
-                    if (dbg) log.debug("GCTableFilter",
-                          ((MemoryManagerMXBean)value).getName() +
-                          " is a  GarbageCollectorMXBean.");
-                    return datas.indexes[next];
-                }
-                if (dbg) log.debug("GCTableFilter",
-                      ((MemoryManagerMXBean)value).getName() +
-                      " is not a  GarbageCollectorMXBean: " +
-                      value.getClass().getName());
-                // skip to next index...
-            }
-            return null;
-        }
-
-        /**
-         * Returns the index that immediately follows the given
-         * <var>index</var>. The returned index is strictly greater
-         * than the given <var>index</var>, and is contained in the table.
-         * <br>If the given <var>index</var> is null, returns the first
-         * index in the table.
-         * <br>If there are no index after the given <var>index</var>,
-         * returns null.
-         **/
-        public SnmpOid getNext(SnmpTableHandler handler, SnmpOid index) {
-
-            // try to call the optimized method
-            if (handler instanceof SnmpCachedData)
-                return getNext((SnmpCachedData)handler, index);
-
-            // too bad - revert to non-optimized generic algorithm
-            SnmpOid next = index;
-            do {
-                next = handler.getNext(next);
-                final Object value = handler.getData(next);
-                if (value instanceof GarbageCollectorMXBean)
-                    // That's the next! return it
-                    return next;
-                // skip to next index...
-            } while (next != null);
-            return null;
-        }
-
-        /**
-         * Returns the data associated with the given index.
-         * If the given index is not found, null is returned.
-         * Note that returning null does not necessarily means that
-         * the index was not found.
-         **/
-        public Object  getData(SnmpTableHandler handler, SnmpOid index) {
-            final Object value = handler.getData(index);
-            if (value instanceof GarbageCollectorMXBean) return value;
-            // Behaves as if there was nothing at this index...
-            //
-            return null;
-        }
-
-        /**
-         * Returns true if the given <var>index</var> is present.
-         **/
-        public boolean contains(SnmpTableHandler handler, SnmpOid index) {
-            if (handler.getData(index) instanceof GarbageCollectorMXBean)
-                return true;
-            // Behaves as if there was nothing at this index...
-            //
-            return false;
-        }
-    }
-
-
-    private transient JvmMemManagerTableMetaImpl managers = null;
-    private static GCTableFilter filter = new GCTableFilter();
-
-
-    /**
-     * Constructor for the table. Initialize metadata for "JvmMemGCTableMeta".
-     */
-    public JvmMemGCTableMetaImpl(SnmpMib myMib,
-                                 SnmpStandardObjectServer objserv) {
-        super(myMib,objserv);
-    }
-
-    // Returns a pointer to the JvmMemManager meta node - we're going
-    // to reuse its SnmpTableHandler by filtering out all that is
-    // not a GarbageCollectorMXBean.
-    private final JvmMemManagerTableMetaImpl getManagers(SnmpMib mib) {
-        if (managers == null) {
-            managers = (JvmMemManagerTableMetaImpl)
-                mib.getRegisteredTableMeta("JvmMemManagerTable");
-        }
-        return managers;
-    }
-
-    /**
-     * Returns the JvmMemManagerTable SnmpTableHandler
-     **/
-    protected SnmpTableHandler getHandler(Object userData) {
-        JvmMemManagerTableMetaImpl managerTable= getManagers(theMib);
-        return managerTable.getHandler(userData);
-    }
-
-    // See com.sun.jmx.snmp.agent.SnmpMibTable
-    protected SnmpOid getNextOid(Object userData)
-        throws SnmpStatusException {
-        // null means get the first OID.
-        return getNextOid(null,userData);
-    }
-
-    // See com.sun.jmx.snmp.agent.SnmpMibTable
-    protected SnmpOid getNextOid(SnmpOid oid, Object userData)
-        throws SnmpStatusException {
-        final boolean dbg = log.isDebugOn();
-        try {
-            if (dbg) log.debug("getNextOid", "previous=" + oid);
-
-            // Get the data handler.
-            //
-            SnmpTableHandler handler = getHandler(userData);
-            if (handler == null) {
-                // This should never happen.
-                // If we get here it's a bug.
-                //
-                if (dbg) log.debug("getNextOid", "handler is null!");
-                throw new
-                    SnmpStatusException(SnmpStatusException.noSuchInstance);
-            }
-
-
-            // Get the next oid, using the GC filter.
-            //
-            final SnmpOid next = filter.getNext(handler,oid);
-            if (dbg) log.debug("getNextOid", "next=" + next);
-
-            // if next is null: we reached the end of the table.
-            //
-            if (next == null)
-                throw new
-                    SnmpStatusException(SnmpStatusException.noSuchInstance);
-
-            return next;
-        } catch (RuntimeException x) {
-            // debug. This should never happen.
-            //
-            if (dbg) log.debug("getNextOid",x);
-            throw x;
-        }
-    }
-
-
-    // See com.sun.jmx.snmp.agent.SnmpMibTable
-    protected boolean contains(SnmpOid oid, Object userData) {
-        // Get the handler.
-        //
-        SnmpTableHandler handler = getHandler(userData);
-
-        // handler should never be null.
-        //
-        if (handler == null)
-            return false;
-        return filter.contains(handler,oid);
-    }
-
-    // See com.sun.jmx.snmp.agent.SnmpMibTable
-    public Object getEntry(SnmpOid oid)
-        throws SnmpStatusException {
-
-        if (oid == null)
-            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-
-        // Get the request contextual cache (userData).
-        //
-        final Map<Object, Object> m = JvmContextFactory.getUserData();
-
-        // First look in the request contextual cache: maybe we've already
-        // created this entry...
-        //
-
-        // We know in the case of this table that the index is an integer,
-        // it is thus the first OID arc of the index OID.
-        //
-        final long   index    = oid.getOidArc(0);
-
-        // We're going to use this name to store/retrieve the entry in
-        // the request contextual cache.
-        //
-        // Revisit: Probably better programming to put all these strings
-        //          in some interface.
-        //
-        final String entryTag = ((m==null)?null:("JvmMemGCTable.entry." +
-                                                 index));
-
-        // If the entry is in the cache, simply return it.
-        //
-        if (m != null) {
-            final Object entry = m.get(entryTag);
-            if (entry != null) return entry;
-        }
-
-        // Entry was not in request cache. Make a new one.
-        //
-        // Get the data hanler.
-        //
-        SnmpTableHandler handler = getHandler(m);
-
-        // handler should never be null.
-        //
-        if (handler == null)
-            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-
-        // Use the filter to retrieve only GarabageCollectorMBean data.
-        //
-        final Object data = filter.getData(handler,oid);
-
-        // data may be null if the OID we were given is not valid.
-        // (e.g. it identifies a MemoryManager which is not a
-        // GarbageCollector)
-        //
-        if (data == null)
-            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-
-        // Make a new entryy (transient object that will be kept only
-        // for the duration of the request.
-        //
-        final Object entry =
-            new JvmMemGCEntryImpl((GarbageCollectorMXBean)data,(int)index);
-
-        // Put the entry in the request cache in case we need it later
-        // in the processing of the request. Note that we could have
-        // optimized this by making JvmMemGCEntryImpl extend
-        // JvmMemManagerEntryImpl, and then make sure that
-        // JvmMemManagerTableMetaImpl creates an instance of JvmMemGCEntryImpl
-        // instead of JvmMemManagerEntryImpl when the associated data is
-        // an instance of GarbageCollectorMXBean. This would have made it
-        // possible to share the transient entry object.
-        // As it is, we may have two transient objects that points to
-        // the same underlying MemoryManagerMXBean (which is definitely
-        // not a problem - but is only a small dysatisfaction)
-        //
-        if (m != null && entry != null) {
-            m.put(entryTag,entry);
-        }
-
-        return entry;
-    }
-
-    static final MibLogger log = new MibLogger(JvmMemGCTableMetaImpl.class);
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvminstr/JvmMemManagerEntryImpl.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,101 +0,0 @@
-/*
- * Copyright (c) 2003, 2004, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package sun.management.snmp.jvminstr;
-
-// java imports
-//
-import java.io.Serializable;
-
-// jmx imports
-//
-import com.sun.jmx.snmp.SnmpStatusException;
-
-// jdmk imports
-//
-import com.sun.jmx.snmp.agent.SnmpMib;
-
-import java.lang.management.MemoryManagerMXBean;
-
-import sun.management.snmp.jvmmib.JvmMemManagerEntryMBean;
-import sun.management.snmp.jvmmib.EnumJvmMemManagerState;
-
-
-/**
- * The class is used for implementing the "JvmMemManagerEntry" group.
- * The group is defined with the following
- */
-public class JvmMemManagerEntryImpl implements JvmMemManagerEntryMBean {
-
-    /**
-     * Variable for storing the value of "JvmMemManagerIndex".
-     *
-     * "An index opaquely computed by the agent and which uniquely
-     * identifies a Memory Manager."
-     *
-     */
-    protected final int JvmMemManagerIndex;
-
-    protected MemoryManagerMXBean manager;
-
-    /**
-     * Constructor for the "JvmMemManagerEntry" group.
-     */
-    public JvmMemManagerEntryImpl(MemoryManagerMXBean m, int myindex) {
-        manager = m;
-        JvmMemManagerIndex = myindex;
-    }
-
-    /**
-     * Getter for the "JvmMemManagerName" variable.
-     */
-    public String getJvmMemManagerName() throws SnmpStatusException {
-        return JVM_MANAGEMENT_MIB_IMPL.
-            validJavaObjectNameTC(manager.getName());
-    }
-
-    /**
-     * Getter for the "JvmMemManagerIndex" variable.
-     */
-    public Integer getJvmMemManagerIndex() throws SnmpStatusException {
-        return JvmMemManagerIndex;
-    }
-
-    /**
-     * Getter for the "JvmMemManagerState" variable.
-     */
-    public EnumJvmMemManagerState getJvmMemManagerState()
-        throws SnmpStatusException {
-        if (manager.isValid())
-            return JvmMemManagerStateValid;
-        else
-            return JvmMemManagerStateInvalid;
-    }
-
-    private final static EnumJvmMemManagerState JvmMemManagerStateValid =
-        new EnumJvmMemManagerState("valid");
-    private final static EnumJvmMemManagerState JvmMemManagerStateInvalid =
-        new EnumJvmMemManagerState("invalid");
-
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvminstr/JvmMemManagerTableMetaImpl.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,303 +0,0 @@
-/*
- * Copyright (c) 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package sun.management.snmp.jvminstr;
-
-
-// java imports
-//
-import com.sun.jmx.mbeanserver.Util;
-import java.io.Serializable;
-import java.util.List;
-import java.util.Map;
-import java.util.TreeMap;
-
-// jmx imports
-//
-import com.sun.jmx.snmp.SnmpOid;
-import com.sun.jmx.snmp.SnmpStatusException;
-
-// jdmk imports
-//
-import com.sun.jmx.snmp.agent.SnmpMib;
-import com.sun.jmx.snmp.agent.SnmpStandardObjectServer;
-
-import java.lang.management.MemoryManagerMXBean;
-import java.lang.management.ManagementFactory;
-
-import sun.management.snmp.jvmmib.JvmMemManagerTableMeta;
-import sun.management.snmp.util.SnmpTableCache;
-import sun.management.snmp.util.SnmpNamedListTableCache;
-import sun.management.snmp.util.SnmpTableHandler;
-import sun.management.snmp.util.MibLogger;
-import sun.management.snmp.util.JvmContextFactory;
-
-/**
- * The class is used for implementing the "JvmMemManagerTable" table.
- *
- * This custom implementation show how to implement an SNMP table
- * over a weak cache, recomputing the cahed data when needed.
- */
-public class JvmMemManagerTableMetaImpl extends JvmMemManagerTableMeta {
-
-    static final long serialVersionUID = 36176771566817592L;
-
-    /**
-     * A concrete implementation of {@link SnmpNamedListTableCache}, for the
-     * jvmMemManagerTable.
-     **/
-    private static class JvmMemManagerTableCache
-        extends SnmpNamedListTableCache {
-
-        static final long serialVersionUID = 6564294074653009240L;
-
-        /**
-         * Create a weak cache for the jvmMemManagerTable.
-         * @param validity validity of the cached data, in ms.
-         **/
-        JvmMemManagerTableCache(long validity) {
-            this.validity = validity;
-        }
-
-        /**
-         * Use the MemoryManagerMXBean name as key.
-         * @param context A {@link TreeMap} as allocated by the parent
-         *        {@link SnmpNamedListTableCache} class.
-         * @param rawDatas List of {@link MemoryManagerMXBean}, as
-         *        returned by
-         * <code>ManagementFactory.getMemoryMBean().getMemoryManagers()</code>
-         * @param rank The <var>rank</var> of <var>item</var> in the list.
-         * @param item The <var>rank</var><super>th</super>
-         *        <code>MemoryManagerMXBean</code> in the list.
-         * @return  <code>((MemoryManagerMXBean)item).getName()</code>
-         **/
-        protected String getKey(Object context, List<?> rawDatas,
-                                int rank, Object item) {
-            if (item == null) return null;
-            final String name = ((MemoryManagerMXBean)item).getName();
-            log.debug("getKey", "key=" + name);
-            return name;
-        }
-
-        /**
-         * Call <code>getTableHandler(JvmContextFactory.getUserData())</code>.
-         **/
-        public SnmpTableHandler getTableHandler() {
-            final Map<Object, Object> userData = JvmContextFactory.getUserData();
-            return getTableDatas(userData);
-        }
-
-        /**
-         * Return the key used to cache the raw data of this table.
-         **/
-        protected String getRawDatasKey() {
-            return "JvmMemManagerTable.getMemoryManagers";
-        }
-
-        /**
-         * Call ManagementFactory.getMemoryManagerMXBeans() to
-         * load the raw data of this table.
-         **/
-        protected List<MemoryManagerMXBean> loadRawDatas(Map<Object, Object> userData) {
-            return ManagementFactory.getMemoryManagerMXBeans();
-        }
-
-    }
-
-    // The weak cache for this table.
-    protected SnmpTableCache cache;
-
-    /**
-     * Constructor for the table. Initialize metadata for
-     * "JvmMemManagerTableMeta".
-     * The reference on the MBean server is updated so the entries
-     * created through an SNMP SET will be AUTOMATICALLY REGISTERED
-     * in Java DMK.
-     */
-    public JvmMemManagerTableMetaImpl(SnmpMib myMib,
-                                      SnmpStandardObjectServer objserv) {
-        super(myMib,objserv);
-        this.cache = new
-            JvmMemManagerTableCache(((JVM_MANAGEMENT_MIB_IMPL)myMib).
-                                    validity());
-    }
-
-    // See com.sun.jmx.snmp.agent.SnmpMibTable
-    protected SnmpOid getNextOid(Object userData)
-        throws SnmpStatusException {
-        // null means get the first OID.
-        return getNextOid(null,userData);
-    }
-
-    // See com.sun.jmx.snmp.agent.SnmpMibTable
-    protected SnmpOid getNextOid(SnmpOid oid, Object userData)
-        throws SnmpStatusException {
-        final boolean dbg = log.isDebugOn();
-        if (dbg) log.debug("getNextOid", "previous=" + oid);
-
-
-        // Get the data handler.
-        //
-        SnmpTableHandler handler = getHandler(userData);
-        if (handler == null) {
-            // This should never happen.
-            // If we get here it's a bug.
-            //
-            if (dbg) log.debug("getNextOid", "handler is null!");
-            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-        }
-
-        // Get the next oid
-        //
-        final SnmpOid next = handler.getNext(oid);
-        if (dbg) log.debug("getNextOid", "next=" + next);
-
-        // if next is null: we reached the end of the table.
-        //
-        if (next == null)
-            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-
-        return next;
-    }
-
-
-    // See com.sun.jmx.snmp.agent.SnmpMibTable
-    protected boolean contains(SnmpOid oid, Object userData) {
-
-        // Get the handler.
-        //
-        SnmpTableHandler handler = getHandler(userData);
-
-        // handler should never be null.
-        //
-        if (handler == null)
-            return false;
-
-        return handler.contains(oid);
-    }
-
-    // See com.sun.jmx.snmp.agent.SnmpMibTable
-    public Object getEntry(SnmpOid oid)
-        throws SnmpStatusException {
-
-        if (oid == null)
-            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-
-        // Get the request contextual cache (userData).
-        //
-        final Map<Object, Object> m = JvmContextFactory.getUserData();
-
-        // We know in the case of this table that the index is an integer,
-        // it is thus the first OID arc of the index OID.
-        //
-        final long   index    = oid.getOidArc(0);
-
-        // We're going to use this name to store/retrieve the entry in
-        // the request contextual cache.
-        //
-        // Revisit: Probably better programming to put all these strings
-        //          in some interface.
-        //
-        final String entryTag = ((m==null)?null:("JvmMemManagerTable.entry." +
-                                                 index));
-
-        // If the entry is in the cache, simply return it.
-        //
-        if (m != null) {
-            final Object entry = m.get(entryTag);
-            if (entry != null) return entry;
-        }
-
-        // The entry was not in the cache, make a new one.
-        //
-        // Get the data hanler.
-        //
-        SnmpTableHandler handler = getHandler(m);
-
-        // handler should never be null.
-        //
-        if (handler == null)
-            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-
-        // Get the data associated with our entry.
-        //
-        final Object data = handler.getData(oid);
-
-        // data may be null if the OID we were given is not valid.
-        //
-        if (data == null)
-            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-
-        // make the new entry (transient object that will be kept only
-        // for the duration of the request.
-        //
-        final Object entry =
-            new JvmMemManagerEntryImpl((MemoryManagerMXBean)data,(int)index);
-
-        // Put the entry in the cache in case we need it later while processing
-        // the request.
-        //
-        if (m != null && entry != null) {
-            m.put(entryTag,entry);
-        }
-
-        return entry;
-    }
-
-    /**
-     * Get the SnmpTableHandler that holds the jvmMemManagerTable data.
-     * First look it up in the request contextual cache, and if it is
-     * not found, obtain it from the weak cache.
-     * <br>The request contextual cache will be released at the end of the
-     * current requests, and is used only to process this request.
-     * <br>The weak cache is shared by all requests, and is only
-     * recomputed when it is found to be obsolete.
-     * <br>Note that the data put in the request contextual cache is
-     *     never considered to be obsolete, in order to preserve data
-     *     coherency.
-     **/
-    protected SnmpTableHandler getHandler(Object userData) {
-        final Map<Object, Object> m;
-        if (userData instanceof Map) m=Util.cast(userData);
-        else m=null;
-
-        // Look in the contextual cache.
-        if (m != null) {
-            final SnmpTableHandler handler =
-                (SnmpTableHandler)m.get("JvmMemManagerTable.handler");
-            if (handler != null) return handler;
-        }
-
-        // No handler in contextual cache, make a new one.
-        final SnmpTableHandler handler = cache.getTableHandler();
-
-        if (m != null && handler != null )
-            m.put("JvmMemManagerTable.handler",handler);
-
-        return handler;
-    }
-
-    static final MibLogger log =
-        new MibLogger(JvmMemManagerTableMetaImpl.class);
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvminstr/JvmMemMgrPoolRelEntryImpl.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,105 +0,0 @@
-/*
- * Copyright (c) 2003, 2004, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package sun.management.snmp.jvminstr;
-
-// jmx imports
-//
-import com.sun.jmx.snmp.SnmpStatusException;
-
-// jdmk imports
-//
-
-
-import sun.management.snmp.jvmmib.JvmMemMgrPoolRelEntryMBean;
-
-/**
- * The class is used for implementing the "JvmMemMgrPoolRelEntry" group.
- */
-public class JvmMemMgrPoolRelEntryImpl
-    implements JvmMemMgrPoolRelEntryMBean {
-
-    /**
-     * Variable for storing the value of "JvmMemManagerIndex".
-     *
-     * "An index opaquely computed by the agent and which uniquely
-     * identifies a Memory Manager."
-     *
-     */
-    final protected int JvmMemManagerIndex;
-
-    /**
-     * Variable for storing the value of "JvmMemPoolIndex".
-     *
-     * "An index value opaquely computed by the agent which uniquely
-     * identifies a row in the jvmMemPoolTable.
-     * "
-     *
-     */
-    final protected int JvmMemPoolIndex;
-    final protected String mmmName;
-    final protected String mpmName;
-
-    /**
-     * Constructor for the "JvmMemMgrPoolRelEntry" group.
-     */
-    public JvmMemMgrPoolRelEntryImpl(String mmmName,
-                                     String mpmName,
-                                     int mmarc, int mparc) {
-        JvmMemManagerIndex = mmarc;
-        JvmMemPoolIndex    = mparc;
-
-        this.mmmName = mmmName;
-        this.mpmName = mpmName;
-    }
-
-    /**
-     * Getter for the "JvmMemMgrRelPoolName" variable.
-     */
-    public String getJvmMemMgrRelPoolName() throws SnmpStatusException {
-        return JVM_MANAGEMENT_MIB_IMPL.validJavaObjectNameTC(mpmName);
-    }
-
-    /**
-     * Getter for the "JvmMemMgrRelManagerName" variable.
-     */
-    public String getJvmMemMgrRelManagerName() throws SnmpStatusException {
-        return JVM_MANAGEMENT_MIB_IMPL.validJavaObjectNameTC(mmmName);
-    }
-
-    /**
-     * Getter for the "JvmMemManagerIndex" variable.
-     */
-    public Integer getJvmMemManagerIndex() throws SnmpStatusException {
-        return JvmMemManagerIndex;
-    }
-
-    /**
-     * Getter for the "JvmMemPoolIndex" variable.
-     */
-    public Integer getJvmMemPoolIndex() throws SnmpStatusException {
-        return JvmMemPoolIndex;
-    }
-
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvminstr/JvmMemMgrPoolRelTableMetaImpl.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,523 +0,0 @@
-/*
- * Copyright (c) 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package sun.management.snmp.jvminstr;
-
-// java imports
-//
-import com.sun.jmx.mbeanserver.Util;
-import java.io.Serializable;
-import java.util.List;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.TreeMap;
-import java.util.Collections;
-
-// jmx imports
-//
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-import com.sun.jmx.snmp.SnmpOid;
-import com.sun.jmx.snmp.SnmpStatusException;
-
-// jdmk imports
-//
-import com.sun.jmx.snmp.agent.SnmpMib;
-import com.sun.jmx.snmp.agent.SnmpStandardObjectServer;
-import com.sun.jmx.snmp.agent.SnmpMibTable;
-
-import java.lang.management.MemoryManagerMXBean;
-import java.lang.management.MemoryPoolMXBean;
-
-import sun.management.snmp.jvmmib.JvmMemMgrPoolRelTableMeta;
-import sun.management.snmp.util.SnmpTableCache;
-import sun.management.snmp.util.SnmpCachedData;
-import sun.management.snmp.util.SnmpTableHandler;
-import sun.management.snmp.util.MibLogger;
-import sun.management.snmp.util.JvmContextFactory;
-
-/**
- * The class is used for implementing the "JvmMemMgrPoolRelTable" group.
- */
-public class JvmMemMgrPoolRelTableMetaImpl extends JvmMemMgrPoolRelTableMeta
-    implements Serializable {
-
-    static final long serialVersionUID = 1896509775012355443L;
-
-    /**
-     * A concrete implementation of {@link SnmpTableCache}, for the
-     * jvmMemMgrPoolRelTable.
-     **/
-
-    private static class JvmMemMgrPoolRelTableCache
-        extends SnmpTableCache {
-
-        static final long serialVersionUID = 6059937161990659184L;
-        final private JvmMemMgrPoolRelTableMetaImpl meta;
-
-        /**
-         * Create a weak cache for the jvmMemMgrPoolRelTable.
-         * @param validity validity of the cached data, in ms.
-         **/
-        JvmMemMgrPoolRelTableCache(JvmMemMgrPoolRelTableMetaImpl meta,
-                                   long validity) {
-            this.validity = validity;
-            this.meta     = meta;
-        }
-
-        /**
-         * Call <code>getTableDatas(JvmContextFactory.getUserData())</code>.
-         **/
-        public SnmpTableHandler getTableHandler() {
-            final Map<Object,Object> userData = JvmContextFactory.getUserData();
-            return getTableDatas(userData);
-        }
-
-        /**
-         * Builds a map pool-name => pool-index from the SnmpTableHandler
-         * of the JvmMemPoolTable.
-         **/
-        private static Map<String, SnmpOid> buildPoolIndexMap(SnmpTableHandler handler) {
-            // optimization...
-            if (handler instanceof SnmpCachedData)
-                return buildPoolIndexMap((SnmpCachedData)handler);
-
-            // not optimizable... too bad.
-            final Map<String, SnmpOid> m = new HashMap<>();
-            SnmpOid index=null;
-            while ((index = handler.getNext(index))!=null) {
-                final MemoryPoolMXBean mpm =
-                    (MemoryPoolMXBean)handler.getData(index);
-                if (mpm == null) continue;
-                final String name = mpm.getName();
-                if (name == null) continue;
-                m.put(name,index);
-            }
-            return m;
-        }
-
-        /**
-         * Builds a map pool-name => pool-index from the SnmpTableHandler
-         * of the JvmMemPoolTable.
-         * Optimized algorithm.
-         **/
-        private static Map<String, SnmpOid> buildPoolIndexMap(SnmpCachedData cached) {
-            if (cached == null) return Collections.emptyMap();
-            final SnmpOid[] indexes = cached.indexes;
-            final Object[]  datas   = cached.datas;
-            final int len = indexes.length;
-            final Map<String, SnmpOid> m = new HashMap<>(len);
-            for (int i=0; i<len; i++) {
-                final SnmpOid index = indexes[i];
-                if (index == null) continue;
-                final MemoryPoolMXBean mpm =
-                    (MemoryPoolMXBean)datas[i];
-                if (mpm == null) continue;
-                final String name = mpm.getName();
-                if (name == null) continue;
-                m.put(name,index);
-            }
-            return m;
-        }
-
-        /**
-         * Return a table handler that holds the jvmMemManagerTable table data.
-         * This method return the cached table data if it is still
-         * valid, recompute it and cache the new value if it's not.
-         * If it needs to recompute the cached data, it first
-         * try to obtain the list of memory managers from the request
-         * contextual cache, and if it is not found, it calls
-         * <code>ManagementFactory.getMemoryMBean().getMemoryManagers()</code>
-         * and caches the value.
-         * This ensures that
-         * <code>ManagementFactory.getMemoryMBean().getMemoryManagers()</code>
-         * is not called more than once per request, thus ensuring a
-         * consistent view of the table.
-         **/
-        protected SnmpCachedData updateCachedDatas(Object userData) {
-            // Get the MemoryManager     table
-            final SnmpTableHandler mmHandler =
-                meta.getManagerHandler(userData);
-
-            // Get the MemoryPool        table
-            final SnmpTableHandler mpHandler =
-                meta.getPoolHandler(userData);
-
-            // Time stamp for the cache
-            final long time = System.currentTimeMillis();
-
-            //     Build a Map poolname -> index
-            final Map<String,SnmpOid> poolIndexMap = buildPoolIndexMap(mpHandler);
-
-            // For each memory manager, get the list of memory pools
-            // For each memory pool, find its index in the memory pool table
-            // Create a row in the relation table.
-            final TreeMap<SnmpOid, Object> table =
-                    new TreeMap<>(SnmpCachedData.oidComparator);
-            updateTreeMap(table,userData,mmHandler,mpHandler,poolIndexMap);
-
-            return new SnmpCachedData(time,table);
-        }
-
-
-        /**
-         * Get the list of memory pool associated with the
-         * given MemoryManagerMXBean.
-         **/
-        protected String[] getMemoryPools(Object userData,
-                                      MemoryManagerMXBean mmm, long mmarc) {
-            final String listTag =
-                "JvmMemManager." + mmarc + ".getMemoryPools";
-
-            String[] result=null;
-            if (userData instanceof Map) {
-                result = (String[])((Map)userData).get(listTag);
-                if (result != null) return result;
-            }
-
-            if (mmm!=null) {
-                result = mmm.getMemoryPoolNames();
-            }
-            if ((result!=null)&&(userData instanceof Map)) {
-                Map<Object, Object> map = Util.cast(userData);
-                map.put(listTag,result);
-            }
-
-            return result;
-        }
-
-        protected void updateTreeMap(TreeMap<SnmpOid, Object> table, Object userData,
-                                     MemoryManagerMXBean mmm,
-                                     SnmpOid mmIndex,
-                                     Map<String, SnmpOid> poolIndexMap) {
-
-            // The MemoryManager index is an int, so it's the first
-            // and only subidentifier.
-            final long mmarc;
-            try {
-                mmarc = mmIndex.getOidArc(0);
-            } catch (SnmpStatusException x) {
-                log.debug("updateTreeMap",
-                          "Bad MemoryManager OID index: "+mmIndex);
-                log.debug("updateTreeMap",x);
-                return;
-            }
-
-
-            // Cache this in userData + get it from cache?
-            final String[] mpList = getMemoryPools(userData,mmm,mmarc);
-            if (mpList == null || mpList.length < 1) return;
-
-            final String mmmName = mmm.getName();
-            for (int i = 0; i < mpList.length; i++) {
-                final String mpmName = mpList[i];
-                if (mpmName == null) continue;
-                final SnmpOid mpIndex = poolIndexMap.get(mpmName);
-                if (mpIndex == null) continue;
-
-                // The MemoryPool index is an int, so it's the first
-                // and only subidentifier.
-                final long mparc;
-                try {
-                    mparc  = mpIndex.getOidArc(0);
-                } catch (SnmpStatusException x) {
-                    log.debug("updateTreeMap","Bad MemoryPool OID index: " +
-                          mpIndex);
-                    log.debug("updateTreeMap",x);
-                    continue;
-                }
-                // The MemoryMgrPoolRel table indexed is composed
-                // of the MemoryManager index, to which the MemoryPool
-                // index is appended.
-                final long[] arcs = { mmarc, mparc };
-
-                final SnmpOid index = new SnmpOid(arcs);
-
-                table.put(index, new JvmMemMgrPoolRelEntryImpl(mmmName,
-                                                               mpmName,
-                                                               (int)mmarc,
-                                                               (int)mparc));
-            }
-        }
-
-        protected void updateTreeMap(TreeMap<SnmpOid, Object> table, Object userData,
-                                     SnmpTableHandler mmHandler,
-                                     SnmpTableHandler mpHandler,
-                                     Map<String, SnmpOid> poolIndexMap) {
-            if (mmHandler instanceof SnmpCachedData) {
-                updateTreeMap(table,userData,(SnmpCachedData)mmHandler,
-                              mpHandler,poolIndexMap);
-                return;
-            }
-
-            SnmpOid mmIndex=null;
-            while ((mmIndex = mmHandler.getNext(mmIndex))!=null) {
-                final MemoryManagerMXBean mmm =
-                    (MemoryManagerMXBean)mmHandler.getData(mmIndex);
-                if (mmm == null) continue;
-                updateTreeMap(table,userData,mmm,mmIndex,poolIndexMap);
-            }
-        }
-
-        protected void updateTreeMap(TreeMap<SnmpOid, Object> table, Object userData,
-                                     SnmpCachedData mmHandler,
-                                     SnmpTableHandler mpHandler,
-                                     Map<String, SnmpOid> poolIndexMap) {
-
-            final SnmpOid[] indexes = mmHandler.indexes;
-            final Object[]  datas   = mmHandler.datas;
-            final int size = indexes.length;
-            for (int i=size-1; i>-1; i--) {
-                final MemoryManagerMXBean mmm =
-                    (MemoryManagerMXBean)datas[i];
-                if (mmm == null) continue;
-                updateTreeMap(table,userData,mmm,indexes[i],poolIndexMap);
-            }
-        }
-    }
-
-    // The weak cache for this table.
-    protected SnmpTableCache cache;
-
-    private transient JvmMemManagerTableMetaImpl managers = null;
-    private transient JvmMemPoolTableMetaImpl    pools    = null;
-
-    /**
-     * Constructor for the table. Initialize metadata for
-     * "JvmMemMgrPoolRelTableMeta".
-     * The reference on the MBean server is updated so the entries
-     * created through an SNMP SET will be AUTOMATICALLY REGISTERED
-     * in Java DMK.
-     */
-    public JvmMemMgrPoolRelTableMetaImpl(SnmpMib myMib,
-                                      SnmpStandardObjectServer objserv) {
-        super(myMib,objserv);
-        this.cache = new
-            JvmMemMgrPoolRelTableCache(this,((JVM_MANAGEMENT_MIB_IMPL)myMib).
-                                       validity());
-    }
-
-    // Returns a pointer to the JvmMemManager meta node - we're going
-    // to reuse its SnmpTableHandler in order to implement the
-    // relation table.
-    private final JvmMemManagerTableMetaImpl getManagers(SnmpMib mib) {
-        if (managers == null) {
-            managers = (JvmMemManagerTableMetaImpl)
-                mib.getRegisteredTableMeta("JvmMemManagerTable");
-        }
-        return managers;
-    }
-
-    // Returns a pointer to the JvmMemPool meta node - we're going
-    // to reuse its SnmpTableHandler in order to implement the
-    // relation table.
-    private final JvmMemPoolTableMetaImpl getPools(SnmpMib mib) {
-        if (pools == null) {
-            pools = (JvmMemPoolTableMetaImpl)
-                mib.getRegisteredTableMeta("JvmMemPoolTable");
-        }
-        return pools;
-    }
-
-    /**
-     * Returns the JvmMemManagerTable SnmpTableHandler
-     **/
-    protected SnmpTableHandler getManagerHandler(Object userData) {
-        final JvmMemManagerTableMetaImpl managerTable = getManagers(theMib);
-        return managerTable.getHandler(userData);
-    }
-
-    /**
-     * Returns the JvmMemPoolTable SnmpTableHandler
-     **/
-    protected SnmpTableHandler getPoolHandler(Object userData) {
-        final JvmMemPoolTableMetaImpl poolTable = getPools(theMib);
-        return poolTable.getHandler(userData);
-    }
-
-    // See com.sun.jmx.snmp.agent.SnmpMibTable
-    protected SnmpOid getNextOid(Object userData)
-        throws SnmpStatusException {
-        // null means get the first OID.
-        return getNextOid(null,userData);
-    }
-
-    // See com.sun.jmx.snmp.agent.SnmpMibTable
-    protected SnmpOid getNextOid(SnmpOid oid, Object userData)
-        throws SnmpStatusException {
-        final boolean dbg = log.isDebugOn();
-        if (dbg) log.debug("getNextOid", "previous=" + oid);
-
-
-        // Get the data handler.
-        //
-        SnmpTableHandler handler = getHandler(userData);
-        if (handler == null) {
-            // This should never happen.
-            // If we get here it's a bug.
-            //
-            if (dbg) log.debug("getNextOid", "handler is null!");
-            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-        }
-
-        // Get the next oid
-        //
-        final SnmpOid next = handler.getNext(oid);
-        if (dbg) log.debug("getNextOid", "next=" + next);
-
-        // if next is null: we reached the end of the table.
-        //
-        if (next == null)
-            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-
-        return next;
-    }
-
-
-    // See com.sun.jmx.snmp.agent.SnmpMibTable
-    protected boolean contains(SnmpOid oid, Object userData) {
-
-        // Get the handler.
-        //
-        SnmpTableHandler handler = getHandler(userData);
-
-        // handler should never be null.
-        //
-        if (handler == null)
-            return false;
-
-        return handler.contains(oid);
-    }
-
-    // See com.sun.jmx.snmp.agent.SnmpMibTable
-    public Object getEntry(SnmpOid oid)
-        throws SnmpStatusException {
-
-        if (oid == null || oid.getLength() < 2)
-            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-
-        // Get the request contextual cache (userData).
-        //
-        final Map<Object, Object> m = JvmContextFactory.getUserData();
-
-        // We know in the case of this table that the index is composed
-        // of two integers,
-        //  o The MemoryManager is the first  OID arc of the index OID.
-        //  o The MemoryPool    is the second OID arc of the index OID.
-        //
-        final long   mgrIndex     = oid.getOidArc(0);
-        final long   poolIndex    = oid.getOidArc(1);
-
-        // We're going to use this name to store/retrieve the entry in
-        // the request contextual cache.
-        //
-        // Revisit: Probably better programming to put all these strings
-        //          in some interface.
-        //
-        final String entryTag = ((m==null)?null:
-                                 ("JvmMemMgrPoolRelTable.entry." +
-                                  mgrIndex + "." + poolIndex));
-
-        // If the entry is in the cache, simply return it.
-        //
-        if (m != null) {
-            final Object entry = m.get(entryTag);
-            if (entry != null) return entry;
-        }
-
-        // The entry was not in the cache, make a new one.
-        //
-        // Get the data hanler.
-        //
-        SnmpTableHandler handler = getHandler(m);
-
-        // handler should never be null.
-        //
-        if (handler == null)
-            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-
-        // Get the data associated with our entry.
-        //
-        final Object data = handler.getData(oid);
-
-        // data may be null if the OID we were given is not valid.
-        //
-        if (!(data instanceof JvmMemMgrPoolRelEntryImpl))
-            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-
-        // make the new entry (transient object that will be kept only
-        // for the duration of the request.
-        //
-        final Object entry = (JvmMemMgrPoolRelEntryImpl)data;
-        // XXXXX Revisit
-        // new JvmMemMgrPoolRelEntryImpl((MemoryManagerMXBean)data,
-        //                                (int)mgrIndex,(int)poolIndex);
-
-        // Put the entry in the cache in case we need it later while processing
-        // the request.
-        //
-        if (m != null && entry != null) {
-            m.put(entryTag,entry);
-        }
-
-        return entry;
-    }
-
-    /**
-     * Get the SnmpTableHandler that holds the jvmMemManagerTable data.
-     * First look it up in the request contextual cache, and if it is
-     * not found, obtain it from the weak cache.
-     * <br>The request contextual cache will be released at the end of the
-     * current requests, and is used only to process this request.
-     * <br>The weak cache is shared by all requests, and is only
-     * recomputed when it is found to be obsolete.
-     * <br>Note that the data put in the request contextual cache is
-     *     never considered to be obsolete, in order to preserve data
-     *     coherency.
-     **/
-    protected SnmpTableHandler getHandler(Object userData) {
-        final Map<Object, Object> m;
-        if (userData instanceof Map) m=Util.cast(userData);
-        else m=null;
-
-        // Look in the contextual cache.
-        if (m != null) {
-            final SnmpTableHandler handler =
-                (SnmpTableHandler)m.get("JvmMemMgrPoolRelTable.handler");
-            if (handler != null) return handler;
-        }
-
-        // No handler in contextual cache, make a new one.
-        final SnmpTableHandler handler = cache.getTableHandler();
-
-        if (m != null && handler != null )
-            m.put("JvmMemMgrPoolRelTable.handler",handler);
-
-        return handler;
-    }
-
-    static final MibLogger log =
-        new MibLogger(JvmMemMgrPoolRelTableMetaImpl.class);
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvminstr/JvmMemPoolEntryImpl.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,506 +0,0 @@
-/*
- * Copyright (c) 2003, 2008, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package sun.management.snmp.jvminstr;
-
-// java imports
-//
-import java.util.Map;
-
-// jmx imports
-//
-import com.sun.jmx.snmp.SnmpStatusException;
-import com.sun.jmx.snmp.SnmpDefinitions;
-
-// jdmk imports
-//
-
-import java.lang.management.MemoryUsage;
-import java.lang.management.MemoryType;
-import java.lang.management.MemoryPoolMXBean;
-
-import sun.management.snmp.jvmmib.JvmMemPoolEntryMBean;
-import sun.management.snmp.jvmmib.EnumJvmMemPoolState;
-import sun.management.snmp.jvmmib.EnumJvmMemPoolType;
-import sun.management.snmp.jvmmib.EnumJvmMemPoolThreshdSupport;
-import sun.management.snmp.jvmmib.EnumJvmMemPoolCollectThreshdSupport;
-import sun.management.snmp.util.MibLogger;
-import sun.management.snmp.util.JvmContextFactory;
-
-/**
- * The class is used for implementing the "JvmMemPoolEntry" group.
- */
-public class JvmMemPoolEntryImpl implements JvmMemPoolEntryMBean {
-
-    /**
-     * Variable for storing the value of "JvmMemPoolIndex".
-     *
-     * "An index value opaquely computed by the agent which uniquely
-     * identifies a row in the jvmMemPoolTable.
-     * "
-     *
-     */
-    final protected int jvmMemPoolIndex;
-
-
-    final static String memoryTag = "jvmMemPoolEntry.getUsage";
-    final static String peakMemoryTag = "jvmMemPoolEntry.getPeakUsage";
-    final static String collectMemoryTag =
-        "jvmMemPoolEntry.getCollectionUsage";
-    final static MemoryUsage ZEROS = new MemoryUsage(0,0,0,0);
-
-    final String entryMemoryTag;
-    final String entryPeakMemoryTag;
-    final String entryCollectMemoryTag;
-
-    MemoryUsage getMemoryUsage() {
-        try {
-            final Map<Object, Object> m = JvmContextFactory.getUserData();
-
-            if (m != null) {
-                final MemoryUsage cached = (MemoryUsage)
-                    m.get(entryMemoryTag);
-                if (cached != null) {
-                    log.debug("getMemoryUsage",entryMemoryTag+
-                          " found in cache.");
-                    return cached;
-                }
-
-                MemoryUsage u = pool.getUsage();
-                if (u == null) u = ZEROS;
-
-                m.put(entryMemoryTag,u);
-                return u;
-            }
-            // Should never come here.
-            // Log error!
-            log.trace("getMemoryUsage", "ERROR: should never come here!");
-            return pool.getUsage();
-        } catch (RuntimeException x) {
-            log.trace("getMemoryUsage",
-                  "Failed to get MemoryUsage: " + x);
-            log.debug("getMemoryUsage",x);
-            throw x;
-        }
-
-    }
-
-    MemoryUsage getPeakMemoryUsage() {
-        try {
-            final Map<Object, Object> m = JvmContextFactory.getUserData();
-
-            if (m != null) {
-                final MemoryUsage cached = (MemoryUsage)
-                    m.get(entryPeakMemoryTag);
-                if (cached != null) {
-                    if (log.isDebugOn())
-                        log.debug("getPeakMemoryUsage",
-                              entryPeakMemoryTag + " found in cache.");
-                    return cached;
-                }
-
-                MemoryUsage u = pool.getPeakUsage();
-                if (u == null) u = ZEROS;
-
-                m.put(entryPeakMemoryTag,u);
-                return u;
-            }
-            // Should never come here.
-            // Log error!
-            log.trace("getPeakMemoryUsage", "ERROR: should never come here!");
-            return ZEROS;
-        } catch (RuntimeException x) {
-            log.trace("getPeakMemoryUsage",
-                  "Failed to get MemoryUsage: " + x);
-            log.debug("getPeakMemoryUsage",x);
-            throw x;
-        }
-
-    }
-
-    MemoryUsage getCollectMemoryUsage() {
-        try {
-            final Map<Object, Object> m = JvmContextFactory.getUserData();
-
-            if (m != null) {
-                final MemoryUsage cached = (MemoryUsage)
-                    m.get(entryCollectMemoryTag);
-                if (cached != null) {
-                    if (log.isDebugOn())
-                        log.debug("getCollectMemoryUsage",
-                                  entryCollectMemoryTag + " found in cache.");
-                    return cached;
-                }
-
-                MemoryUsage u = pool.getCollectionUsage();
-                if (u == null) u = ZEROS;
-
-                m.put(entryCollectMemoryTag,u);
-                return u;
-            }
-            // Should never come here.
-            // Log error!
-            log.trace("getCollectMemoryUsage",
-                      "ERROR: should never come here!");
-            return ZEROS;
-        } catch (RuntimeException x) {
-            log.trace("getPeakMemoryUsage",
-                  "Failed to get MemoryUsage: " + x);
-            log.debug("getPeakMemoryUsage",x);
-            throw x;
-        }
-
-    }
-
-    final MemoryPoolMXBean pool;
-
-    /**
-     * Constructor for the "JvmMemPoolEntry" group.
-     */
-    public JvmMemPoolEntryImpl(MemoryPoolMXBean mp, final int index) {
-        this.pool=mp;
-        this.jvmMemPoolIndex = index;
-        this.entryMemoryTag = memoryTag + "." + index;
-        this.entryPeakMemoryTag = peakMemoryTag + "." + index;
-        this.entryCollectMemoryTag = collectMemoryTag + "." + index;
-    }
-
-    /**
-     * Getter for the "JvmMemPoolMaxSize" variable.
-     */
-    public Long getJvmMemPoolMaxSize() throws SnmpStatusException {
-        final long val = getMemoryUsage().getMax();
-        if (val > -1) return  val;
-        else return JvmMemoryImpl.Long0;
-    }
-
-    /**
-     * Getter for the "JvmMemPoolUsed" variable.
-     */
-    public Long getJvmMemPoolUsed() throws SnmpStatusException {
-        final long val = getMemoryUsage().getUsed();
-        if (val > -1) return  val;
-        else return JvmMemoryImpl.Long0;
-    }
-
-    /**
-     * Getter for the "JvmMemPoolInitSize" variable.
-     */
-    public Long getJvmMemPoolInitSize() throws SnmpStatusException {
-        final long val = getMemoryUsage().getInit();
-        if (val > -1) return  val;
-        else return JvmMemoryImpl.Long0;
-    }
-
-    /**
-     * Getter for the "JvmMemPoolCommitted" variable.
-     */
-    public Long getJvmMemPoolCommitted() throws SnmpStatusException {
-        final long val = getMemoryUsage().getCommitted();
-        if (val > -1) return  val;
-        else return JvmMemoryImpl.Long0;
-    }
-
-    /**
-     * Getter for the "JvmMemPoolPeakMaxSize" variable.
-     */
-    public Long getJvmMemPoolPeakMaxSize() throws SnmpStatusException {
-        final long val = getPeakMemoryUsage().getMax();
-        if (val > -1) return  val;
-        else return JvmMemoryImpl.Long0;
-    }
-
-    /**
-     * Getter for the "JvmMemPoolPeakUsed" variable.
-     */
-    public Long getJvmMemPoolPeakUsed() throws SnmpStatusException {
-        final long val = getPeakMemoryUsage().getUsed();
-        if (val > -1) return  val;
-        else return JvmMemoryImpl.Long0;
-    }
-
-    /**
-     * Getter for the "JvmMemPoolPeakCommitted" variable.
-     */
-    public Long getJvmMemPoolPeakCommitted() throws SnmpStatusException {
-        final long val = getPeakMemoryUsage().getCommitted();
-        if (val > -1) return  val;
-        else return JvmMemoryImpl.Long0;
-    }
-
-    /**
-     * Getter for the "JvmMemPoolCollectMaxSize" variable.
-     */
-    public Long getJvmMemPoolCollectMaxSize() throws SnmpStatusException {
-        final long val = getCollectMemoryUsage().getMax();
-        if (val > -1) return  val;
-        else return JvmMemoryImpl.Long0;
-    }
-
-    /**
-     * Getter for the "JvmMemPoolCollectUsed" variable.
-     */
-    public Long getJvmMemPoolCollectUsed() throws SnmpStatusException {
-        final long val = getCollectMemoryUsage().getUsed();
-        if (val > -1) return  val;
-        else return JvmMemoryImpl.Long0;
-    }
-
-    /**
-     * Getter for the "JvmMemPoolCollectCommitted" variable.
-     */
-    public Long getJvmMemPoolCollectCommitted() throws SnmpStatusException {
-        final long val = getCollectMemoryUsage().getCommitted();
-        if (val > -1) return  val;
-        else return JvmMemoryImpl.Long0;
-    }
-
-    /**
-     * Getter for the "JvmMemPoolThreshold" variable.
-     */
-    public Long getJvmMemPoolThreshold() throws SnmpStatusException {
-        if (!pool.isUsageThresholdSupported())
-            return JvmMemoryImpl.Long0;
-        final long val = pool.getUsageThreshold();
-        if (val > -1) return  val;
-        else return JvmMemoryImpl.Long0;
-    }
-
-    /**
-     * Setter for the "JvmMemPoolThreshold" variable.
-     */
-    public void setJvmMemPoolThreshold(Long x) throws SnmpStatusException {
-        final long val = x.longValue();
-        if (val < 0 )
-            throw new SnmpStatusException(SnmpDefinitions.snmpRspWrongValue);
-        // This should never throw an exception has the checks have
-        // already been performed in checkJvmMemPoolThreshold().
-        //
-        pool.setUsageThreshold(val);
-    }
-
-    /**
-     * Checker for the "JvmMemPoolThreshold" variable.
-     */
-    public void checkJvmMemPoolThreshold(Long x) throws SnmpStatusException {
-        // if threshold is -1, it means that low memory detection is not
-        // supported.
-
-        if (!pool.isUsageThresholdSupported())
-            throw new
-                SnmpStatusException(SnmpDefinitions.snmpRspInconsistentValue);
-        final long val = x.longValue();
-        if (val < 0 )
-            throw new SnmpStatusException(SnmpDefinitions.snmpRspWrongValue);
-    }
-
-    /**
-     * Getter for the "JvmMemPoolThreshdSupport" variable.
-     */
-    public EnumJvmMemPoolThreshdSupport getJvmMemPoolThreshdSupport()
-        throws SnmpStatusException {
-        if (pool.isUsageThresholdSupported())
-            return EnumJvmMemPoolThreshdSupported;
-        else
-            return EnumJvmMemPoolThreshdUnsupported;
-    }
-
-    /**
-     * Getter for the "JvmMemPoolThreshdCount" variable.
-     */
-    public Long getJvmMemPoolThreshdCount()
-        throws SnmpStatusException {
-        if (!pool.isUsageThresholdSupported())
-            return JvmMemoryImpl.Long0;
-        final long val = pool.getUsageThresholdCount();
-        if (val > -1) return  val;
-        else return JvmMemoryImpl.Long0;
-    }
-
-    /**
-     * Getter for the "JvmMemPoolCollectThreshold" variable.
-     */
-    public Long getJvmMemPoolCollectThreshold() throws SnmpStatusException {
-        if (!pool.isCollectionUsageThresholdSupported())
-            return JvmMemoryImpl.Long0;
-        final long val = pool.getCollectionUsageThreshold();
-        if (val > -1) return  val;
-        else return JvmMemoryImpl.Long0;
-    }
-
-    /**
-     * Setter for the "JvmMemPoolCollectThreshold" variable.
-     */
-    public void setJvmMemPoolCollectThreshold(Long x)
-        throws SnmpStatusException {
-        final long val = x.longValue();
-        if (val < 0 )
-            throw new SnmpStatusException(SnmpDefinitions.snmpRspWrongValue);
-        // This should never throw an exception has the checks have
-        // already been performed in checkJvmMemPoolCollectThreshold().
-        //
-        pool.setCollectionUsageThreshold(val);
-    }
-
-    /**
-     * Checker for the "JvmMemPoolCollectThreshold" variable.
-     */
-    public void checkJvmMemPoolCollectThreshold(Long x)
-        throws SnmpStatusException {
-        // if threshold is -1, it means that low memory detection is not
-        // supported.
-
-        if (!pool.isCollectionUsageThresholdSupported())
-            throw new
-                SnmpStatusException(SnmpDefinitions.snmpRspInconsistentValue);
-        final long val = x.longValue();
-        if (val < 0 )
-            throw new SnmpStatusException(SnmpDefinitions.snmpRspWrongValue);
-    }
-
-    /**
-     * Getter for the "JvmMemPoolThreshdSupport" variable.
-     */
-    public EnumJvmMemPoolCollectThreshdSupport
-        getJvmMemPoolCollectThreshdSupport()
-        throws SnmpStatusException {
-        if (pool.isCollectionUsageThresholdSupported())
-            return EnumJvmMemPoolCollectThreshdSupported;
-        else
-            return EnumJvmMemPoolCollectThreshdUnsupported;
-    }
-
-    /**
-     * Getter for the "JvmMemPoolCollectThreshdCount" variable.
-     */
-    public Long getJvmMemPoolCollectThreshdCount()
-        throws SnmpStatusException {
-        if (!pool.isCollectionUsageThresholdSupported())
-            return JvmMemoryImpl.Long0;
-        final long val = pool.getCollectionUsageThresholdCount();
-        if (val > -1) return  val;
-        else return JvmMemoryImpl.Long0;
-    }
-
-    public static EnumJvmMemPoolType jvmMemPoolType(MemoryType type)
-        throws SnmpStatusException {
-        if (type.equals(MemoryType.HEAP))
-            return  EnumJvmMemPoolTypeHeap;
-        else if (type.equals(MemoryType.NON_HEAP))
-            return EnumJvmMemPoolTypeNonHeap;
-        throw new SnmpStatusException(SnmpStatusException.snmpRspWrongValue);
-    }
-
-    /**
-     * Getter for the "JvmMemPoolType" variable.
-     */
-    public EnumJvmMemPoolType getJvmMemPoolType() throws SnmpStatusException {
-        return jvmMemPoolType(pool.getType());
-    }
-
-    /**
-     * Getter for the "JvmMemPoolName" variable.
-     */
-    public String getJvmMemPoolName() throws SnmpStatusException {
-        return JVM_MANAGEMENT_MIB_IMPL.validJavaObjectNameTC(pool.getName());
-    }
-
-    /**
-     * Getter for the "JvmMemPoolIndex" variable.
-     */
-    public Integer getJvmMemPoolIndex() throws SnmpStatusException {
-        return jvmMemPoolIndex;
-    }
-
-
-    /**
-     * Getter for the "JvmMemPoolState" variable.
-     */
-    public EnumJvmMemPoolState getJvmMemPoolState()
-        throws SnmpStatusException {
-        if (pool.isValid())
-            return JvmMemPoolStateValid;
-        else
-            return JvmMemPoolStateInvalid;
-    }
-
-    /**
-     * Getter for the "JvmMemPoolPeakReset" variable.
-     */
-    public synchronized Long getJvmMemPoolPeakReset()
-        throws SnmpStatusException {
-        return jvmMemPoolPeakReset;
-    }
-
-    /**
-     * Setter for the "JvmMemPoolPeakReset" variable.
-     */
-    public synchronized void setJvmMemPoolPeakReset(Long x)
-        throws SnmpStatusException {
-        final long l = x.longValue();
-        if (l > jvmMemPoolPeakReset) {
-            final long stamp = System.currentTimeMillis();
-            pool.resetPeakUsage();
-            jvmMemPoolPeakReset = stamp;
-            log.debug("setJvmMemPoolPeakReset",
-                      "jvmMemPoolPeakReset="+stamp);
-        }
-    }
-
-    /**
-     * Checker for the "JvmMemPoolPeakReset" variable.
-     */
-    public void checkJvmMemPoolPeakReset(Long x) throws SnmpStatusException {
-    }
-
-    /* Last time peak usage was reset */
-    private long jvmMemPoolPeakReset = 0;
-
-    private final static EnumJvmMemPoolState JvmMemPoolStateValid =
-        new EnumJvmMemPoolState("valid");
-    private final static EnumJvmMemPoolState JvmMemPoolStateInvalid =
-        new EnumJvmMemPoolState("invalid");
-
-    private static final EnumJvmMemPoolType EnumJvmMemPoolTypeHeap =
-        new EnumJvmMemPoolType("heap");
-    private static final EnumJvmMemPoolType EnumJvmMemPoolTypeNonHeap =
-        new EnumJvmMemPoolType("nonheap");
-
-    private static final EnumJvmMemPoolThreshdSupport
-        EnumJvmMemPoolThreshdSupported =
-        new EnumJvmMemPoolThreshdSupport("supported");
-    private static final EnumJvmMemPoolThreshdSupport
-        EnumJvmMemPoolThreshdUnsupported =
-        new EnumJvmMemPoolThreshdSupport("unsupported");
-
-    private static final EnumJvmMemPoolCollectThreshdSupport
-        EnumJvmMemPoolCollectThreshdSupported =
-        new EnumJvmMemPoolCollectThreshdSupport("supported");
-    private static final EnumJvmMemPoolCollectThreshdSupport
-        EnumJvmMemPoolCollectThreshdUnsupported=
-        new EnumJvmMemPoolCollectThreshdSupport("unsupported");
-
-
-    static final MibLogger log = new MibLogger(JvmMemPoolEntryImpl.class);
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvminstr/JvmMemPoolTableMetaImpl.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,311 +0,0 @@
-/*
- * Copyright (c) 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package sun.management.snmp.jvminstr;
-
-// java imports
-//
-import com.sun.jmx.mbeanserver.Util;
-import java.io.Serializable;
-import java.util.List;
-import java.util.Map;
-import java.util.TreeMap;
-
-
-// jmx imports
-//
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-import com.sun.jmx.snmp.SnmpOid;
-import com.sun.jmx.snmp.SnmpStatusException;
-
-// jdmk imports
-//
-import com.sun.jmx.snmp.agent.SnmpMib;
-import com.sun.jmx.snmp.agent.SnmpMibSubRequest;
-import com.sun.jmx.snmp.agent.SnmpStandardObjectServer;
-
-import java.lang.management.MemoryPoolMXBean;
-import java.lang.management.ManagementFactory;
-
-import sun.management.snmp.jvmmib.JvmMemPoolTableMeta;
-import sun.management.snmp.util.SnmpTableCache;
-import sun.management.snmp.util.SnmpNamedListTableCache;
-import sun.management.snmp.util.SnmpTableHandler;
-import sun.management.snmp.util.MibLogger;
-import sun.management.snmp.util.JvmContextFactory;
-
-/**
- * The class is used for implementing the "JvmMemPoolTable" group.
- */
-public class JvmMemPoolTableMetaImpl extends JvmMemPoolTableMeta {
-
-    static final long serialVersionUID = -2525820976094284957L;
-
-    /**
-     * A concrete implementation of {@link SnmpNamedListTableCache}, for the
-     * jvmMemPoolTable.
-     **/
-    private static class JvmMemPoolTableCache extends SnmpNamedListTableCache {
-
-        static final long serialVersionUID = -1755520683086760574L;
-
-        /**
-         * Create a weak cache for the jvmMemPoolTable.
-         * @param validity validity of the cached data, in ms.
-         **/
-        JvmMemPoolTableCache(long validity) {
-            this.validity = validity;
-        }
-
-        /**
-         * Use the MemoryPoolMXBean name as key.
-         * @param context A {@link TreeMap} as allocated by the parent
-         *        {@link SnmpNamedListTableCache} class.
-         * @param rawDatas List of {@link MemoryPoolMXBean}, as
-         *        returned by
-         * <code>ManagementFactory.getMemoryPoolMXBeans()</code>
-         * @param rank The <var>rank</var> of <var>item</var> in the list.
-         * @param item The <var>rank</var><super>th</super>
-         *        <code>MemoryPoolMXBean</code> in the list.
-         * @return  <code>((MemoryPoolMXBean)item).getName()</code>
-         **/
-        protected String getKey(Object context, List<?> rawDatas,
-                                int rank, Object item) {
-            if (item == null) return null;
-            final String name = ((MemoryPoolMXBean)item).getName();
-            log.debug("getKey", "key=" + name);
-            return name;
-        }
-
-        /**
-         * Call <code>getTableDatas(JvmContextFactory.getUserData())</code>.
-         **/
-        public SnmpTableHandler getTableHandler() {
-            final Map<Object, Object> userData = JvmContextFactory.getUserData();
-            return getTableDatas(userData);
-        }
-
-        /**
-         * Return the key used to cache the raw data of this table.
-         **/
-        protected String getRawDatasKey() {
-            return "JvmMemManagerTable.getMemoryPools";
-        }
-
-        /**
-         * Call ManagementFactory.getMemoryPoolMXBeans() to
-         * load the raw data of this table.
-         **/
-        protected List<MemoryPoolMXBean> loadRawDatas(Map<Object, Object> userData) {
-            return ManagementFactory.getMemoryPoolMXBeans();
-        }
-    }
-
-    // The weak cache for this table.
-    protected SnmpTableCache cache;
-
-    /**
-     * Constructor for the table.
-     * Initialize metadata for "JvmMemPoolTableMeta".
-     */
-    public JvmMemPoolTableMetaImpl(SnmpMib myMib,
-                                   SnmpStandardObjectServer objserv) {
-        super(myMib,objserv);
-        this.cache = new
-            JvmMemPoolTableCache(((JVM_MANAGEMENT_MIB_IMPL)myMib).
-                                    validity()*30);
-    }
-
-
-    // See com.sun.jmx.snmp.agent.SnmpMibTable
-    protected SnmpOid getNextOid(Object userData)
-        throws SnmpStatusException {
-        // null means get the first OID.
-        return getNextOid(null,userData);
-    }
-
-    // See com.sun.jmx.snmp.agent.SnmpMibTable
-    protected SnmpOid getNextOid(SnmpOid oid, Object userData)
-        throws SnmpStatusException {
-        final boolean dbg = log.isDebugOn();
-        try {
-            if (dbg) log.debug("getNextOid", "previous=" + oid);
-
-
-            // Get the data handler.
-            //
-            SnmpTableHandler handler = getHandler(userData);
-            if (handler == null) {
-                // This should never happen.
-                // If we get here it's a bug.
-                //
-                if (dbg) log.debug("getNextOid", "handler is null!");
-                throw new
-                    SnmpStatusException(SnmpStatusException.noSuchInstance);
-            }
-
-            // Get the next oid
-            //
-            final SnmpOid next = handler.getNext(oid);
-            if (dbg) log.debug("getNextOid", "next=" + next);
-
-            // if next is null: we reached the end of the table.
-            //
-            if (next == null)
-                throw new
-                    SnmpStatusException(SnmpStatusException.noSuchInstance);
-
-            return next;
-        } catch (SnmpStatusException x) {
-            if (dbg) log.debug("getNextOid", "End of MIB View: " + x);
-            throw x;
-        } catch (RuntimeException r) {
-            if (dbg) log.debug("getNextOid", "Unexpected exception: " + r);
-            if (dbg) log.debug("getNextOid",r);
-            throw r;
-        }
-    }
-
-
-    // See com.sun.jmx.snmp.agent.SnmpMibTable
-    protected boolean contains(SnmpOid oid, Object userData) {
-
-        // Get the handler.
-        //
-        SnmpTableHandler handler = getHandler(userData);
-
-        // handler should never be null.
-        //
-        if (handler == null)
-            return false;
-
-        return handler.contains(oid);
-    }
-
-    // See com.sun.jmx.snmp.agent.SnmpMibTable
-    public Object getEntry(SnmpOid oid)
-        throws SnmpStatusException {
-
-        if (oid == null)
-            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-
-        // Get the request contextual cache (userData).
-        //
-        final Map<Object, Object> m = Util.cast(JvmContextFactory.getUserData());
-
-        // We know in the case of this table that the index is an integer,
-        // it is thus the first OID arc of the index OID.
-        //
-        final long   index    = oid.getOidArc(0);
-
-        // We're going to use this name to store/retrieve the entry in
-        // the request contextual cache.
-        //
-        // Revisit: Probably better programming to put all these strings
-        //          in some interface.
-        //
-        final String entryTag = ((m==null)?null:("JvmMemPoolTable.entry." +
-                                                 index));
-
-        // If the entry is in the cache, simply return it.
-        //
-        if (m != null) {
-            final Object entry = m.get(entryTag);
-            if (entry != null) return entry;
-        }
-
-        // The entry was not in the cache, make a new one.
-        //
-        // Get the data hanler.
-        //
-        SnmpTableHandler handler = getHandler(m);
-
-        // handler should never be null.
-        //
-        if (handler == null)
-            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-
-        // Get the data associated with our entry.
-        //
-        final Object data = handler.getData(oid);
-
-        // data may be null if the OID we were given is not valid.
-        //
-        if (data == null)
-            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-
-        // make the new entry (transient object that will be kept only
-        // for the duration of the request.
-        //
-        if (log.isDebugOn())
-            log.debug("getEntry","data is a: " + data.getClass().getName());
-        final Object entry =
-            new JvmMemPoolEntryImpl((MemoryPoolMXBean)data,(int)index);
-
-        // Put the entry in the cache in case we need it later while processing
-        // the request.
-        //
-        if (m != null && entry != null) {
-            m.put(entryTag,entry);
-        }
-
-        return entry;
-    }
-
-    /**
-     * Get the SnmpTableHandler that holds the jvmMemPoolTable data.
-     * First look it up in the request contextual cache, and if it is
-     * not found, obtain it from the weak cache.
-     * <br>The request contextual cache will be released at the end of the
-     * current requests, and is used only to process this request.
-     * <br>The weak cache is shared by all requests, and is only
-     * recomputed when it is found to be obsolete.
-     * <br>Note that the data put in the request contextual cache is
-     *     never considered to be obsolete, in order to preserve data
-     *     coherency.
-     **/
-    protected SnmpTableHandler getHandler(Object userData) {
-        final Map<Object, Object> m;
-        if (userData instanceof Map) m = Util.cast(userData);
-        else m = null;
-
-        // Look in the contextual cache.
-        if (m != null) {
-            final SnmpTableHandler handler =
-                (SnmpTableHandler)m.get("JvmMemPoolTable.handler");
-            if (handler != null) return handler;
-        }
-
-        // No handler in contextual cache, make a new one.
-        final SnmpTableHandler handler = cache.getTableHandler();
-
-        if (m != null && handler != null )
-            m.put("JvmMemPoolTable.handler",handler);
-
-        return handler;
-    }
-
-    static final MibLogger log = new MibLogger(JvmMemPoolTableMetaImpl.class);
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvminstr/JvmMemoryImpl.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,391 +0,0 @@
-/*
- * Copyright (c) 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package sun.management.snmp.jvminstr;
-
-// jmx imports
-//
-import javax.management.MBeanServer;
-import com.sun.jmx.snmp.SnmpStatusException;
-import com.sun.jmx.snmp.SnmpDefinitions;
-
-// jdmk imports
-//
-import com.sun.jmx.snmp.agent.SnmpMib;
-
-import java.util.Map;
-import java.lang.management.ManagementFactory;
-import java.lang.management.MemoryUsage;
-import java.lang.management.MemoryType;
-import java.lang.management.MemoryMXBean;
-import javax.management.openmbean.CompositeData;
-
-import sun.management.snmp.jvmmib.JvmMemoryMBean;
-import sun.management.snmp.jvmmib.EnumJvmMemoryGCCall;
-import sun.management.snmp.jvmmib.EnumJvmMemoryGCVerboseLevel;
-import sun.management.snmp.util.MibLogger;
-import sun.management.snmp.util.JvmContextFactory;
-
-/**
- * The class is used for implementing the "JvmMemory" group.
- */
-public class JvmMemoryImpl implements JvmMemoryMBean {
-
-    /**
-     * Variable for storing the value of "JvmMemoryGCCall".
-     *
-     * "This object makes it possible to remotelly trigger the
-     * Garbage Collector in the JVM.
-     *
-     * This object's syntax is an enumeration which defines:
-     *
-     * * Two state values, that can be returned from a GET request:
-     *
-     * unsupported(1): means that remote invocation of gc() is not
-     * supported by the SNMP agent.
-     * supported(2)  : means that remote invocation of gc() is supported
-     * by the SNMP agent.
-     *
-     * * One action value, that can be provided in a SET request to
-     * trigger the garbage collector:
-     *
-     * start(3)      : means that a manager wishes to trigger
-     * garbage collection.
-     *
-     * * Two result value, that will be returned as a result of a
-     * SET request when remote invocation of gc is supported
-     * by the SNMP agent:
-     *
-     * started(4)       : means that garbage collection was
-     * successfully triggered. It does not mean
-     * however that the action was successfullly
-     * completed: gc might still be running when
-     * this value is returned.
-     * failed(5)     : means that garbage collection couldn't be
-     * triggered.
-     *
-     * * If remote invocation is not supported by the SNMP agent, then
-     * unsupported(1) will always be returned as a result of either
-     * a GET request, or a SET request with start(3) as input value.
-     *
-     * * If a SET request with anything but start(3) is received, then
-     * the agent will return a wrongValue error.
-     *
-     * See java.management.MemoryMXBean.gc()
-     * "
-     *
-     */
-    final static EnumJvmMemoryGCCall JvmMemoryGCCallSupported
-        = new EnumJvmMemoryGCCall("supported");
-    final static EnumJvmMemoryGCCall JvmMemoryGCCallStart
-        = new EnumJvmMemoryGCCall("start");
-    final static EnumJvmMemoryGCCall JvmMemoryGCCallFailed
-        = new EnumJvmMemoryGCCall("failed");
-    final static EnumJvmMemoryGCCall JvmMemoryGCCallStarted
-        = new EnumJvmMemoryGCCall("started");
-
-    /**
-     * Variable for storing the value of "JvmMemoryGCVerboseLevel".
-     *
-     * "State of the -verbose:gc state.
-     *
-     * verbose: if the -verbose:gc flag is on,
-     * silent:  otherwise.
-     *
-     * See java.management.MemoryMXBean.isVerbose(),
-     * java.management.MemoryMXBean.setVerbose()
-     * "
-     *
-     */
-    final static EnumJvmMemoryGCVerboseLevel JvmMemoryGCVerboseLevelVerbose =
-        new EnumJvmMemoryGCVerboseLevel("verbose");
-    final static EnumJvmMemoryGCVerboseLevel JvmMemoryGCVerboseLevelSilent =
-        new EnumJvmMemoryGCVerboseLevel("silent");
-
-    /**
-     * Constructor for the "JvmMemory" group.
-     * If the group contains a table, the entries created through an
-     * SNMP SET will not be registered in Java DMK.
-     */
-    public JvmMemoryImpl(SnmpMib myMib) {
-    }
-
-
-    /**
-     * Constructor for the "JvmMemory" group.
-     * If the group contains a table, the entries created through an
-     * SNMP SET will be AUTOMATICALLY REGISTERED in Java DMK.
-     */
-    public JvmMemoryImpl(SnmpMib myMib, MBeanServer server) {
-        // no entry will be registered since the table is virtual.
-    }
-
-    final static String heapMemoryTag = "jvmMemory.getHeapMemoryUsage";
-    final static String nonHeapMemoryTag = "jvmMemory.getNonHeapMemoryUsage";
-
-    private MemoryUsage getMemoryUsage(MemoryType type) {
-        if (type == MemoryType.HEAP) {
-            return ManagementFactory.getMemoryMXBean().getHeapMemoryUsage();
-        } else {
-            return ManagementFactory.getMemoryMXBean().getNonHeapMemoryUsage();
-        }
-    }
-
-    MemoryUsage getNonHeapMemoryUsage() {
-        try {
-            final Map<Object, Object> m = JvmContextFactory.getUserData();
-
-            if (m != null) {
-                final MemoryUsage cached = (MemoryUsage)
-                    m.get(nonHeapMemoryTag);
-                if (cached != null) {
-                    log.debug("getNonHeapMemoryUsage",
-                          "jvmMemory.getNonHeapMemoryUsage found in cache.");
-                    return cached;
-                }
-
-                final MemoryUsage u = getMemoryUsage(MemoryType.NON_HEAP);
-
-                //  getNonHeapMemoryUsage() never returns null.
-                //
-                // if (u == null) u=MemoryUsage.INVALID;
-
-                m.put(nonHeapMemoryTag,u);
-                return u;
-            }
-            // Should never come here.
-            // Log error!
-            log.trace("getNonHeapMemoryUsage",
-                      "ERROR: should never come here!");
-            return getMemoryUsage(MemoryType.NON_HEAP);
-        } catch (RuntimeException x) {
-            log.trace("getNonHeapMemoryUsage",
-                  "Failed to get NonHeapMemoryUsage: " + x);
-            log.debug("getNonHeapMemoryUsage",x);
-            throw x;
-        }
-
-    }
-
-    MemoryUsage getHeapMemoryUsage() {
-        try {
-            final Map<Object, Object> m = JvmContextFactory.getUserData();
-
-            if (m != null) {
-                final MemoryUsage cached = (MemoryUsage)m.get(heapMemoryTag);
-                if (cached != null) {
-                    log.debug("getHeapMemoryUsage",
-                          "jvmMemory.getHeapMemoryUsage found in cache.");
-                    return cached;
-                }
-
-                final MemoryUsage u = getMemoryUsage(MemoryType.HEAP);
-
-                // getHeapMemoryUsage() never returns null.
-                //
-                // if (u == null) u=MemoryUsage.INVALID;
-
-                m.put(heapMemoryTag,u);
-                return u;
-            }
-
-            // Should never come here.
-            // Log error!
-            log.trace("getHeapMemoryUsage", "ERROR: should never come here!");
-            return getMemoryUsage(MemoryType.HEAP);
-        } catch (RuntimeException x) {
-            log.trace("getHeapMemoryUsage",
-                  "Failed to get HeapMemoryUsage: " + x);
-            log.debug("getHeapMemoryUsage",x);
-            throw x;
-        }
-    }
-
-    static final Long Long0 = 0L;
-
-    /**
-     * Getter for the "JvmMemoryNonHeapMaxSize" variable.
-     */
-    public Long getJvmMemoryNonHeapMaxSize()
-        throws SnmpStatusException {
-        final long val = getNonHeapMemoryUsage().getMax();
-        if (val > -1) return  val;
-        else return Long0;
-    }
-
-    /**
-     * Getter for the "JvmMemoryNonHeapCommitted" variable.
-     */
-    public Long getJvmMemoryNonHeapCommitted() throws SnmpStatusException {
-        final long val = getNonHeapMemoryUsage().getCommitted();
-        if (val > -1) return val;
-        else return Long0;
-    }
-
-    /**
-     * Getter for the "JvmMemoryNonHeapUsed" variable.
-     */
-    public Long getJvmMemoryNonHeapUsed() throws SnmpStatusException {
-        final long val = getNonHeapMemoryUsage().getUsed();
-        if (val > -1) return val;
-        else return Long0;
-    }
-
-    /**
-     * Getter for the "JvmMemoryNonHeapInitSize" variable.
-     */
-    public Long getJvmMemoryNonHeapInitSize() throws SnmpStatusException {
-        final long val = getNonHeapMemoryUsage().getInit();
-        if (val > -1) return val;
-        else return Long0;
-    }
-
-    /**
-     * Getter for the "JvmMemoryHeapMaxSize" variable.
-     */
-    public Long getJvmMemoryHeapMaxSize() throws SnmpStatusException {
-        final long val = getHeapMemoryUsage().getMax();
-        if (val > -1) return val;
-        else return Long0;
-    }
-
-    /**
-     * Getter for the "JvmMemoryGCCall" variable.
-     */
-    public EnumJvmMemoryGCCall getJvmMemoryGCCall()
-        throws SnmpStatusException {
-        final Map<Object,Object> m = JvmContextFactory.getUserData();
-
-        if (m != null) {
-            final EnumJvmMemoryGCCall cached
-                = (EnumJvmMemoryGCCall) m.get("jvmMemory.getJvmMemoryGCCall");
-            if (cached != null) return cached;
-        }
-        return JvmMemoryGCCallSupported;
-    }
-
-    /**
-     * Setter for the "JvmMemoryGCCall" variable.
-     */
-    public void setJvmMemoryGCCall(EnumJvmMemoryGCCall x)
-        throws SnmpStatusException {
-        if (x.intValue() == JvmMemoryGCCallStart.intValue()) {
-            final Map<Object, Object> m = JvmContextFactory.getUserData();
-
-            try {
-                ManagementFactory.getMemoryMXBean().gc();
-                if (m != null) m.put("jvmMemory.getJvmMemoryGCCall",
-                                     JvmMemoryGCCallStarted);
-            } catch (Exception ex) {
-                if (m != null) m.put("jvmMemory.getJvmMemoryGCCall",
-                                     JvmMemoryGCCallFailed);
-            }
-            return;
-        }
-        throw new SnmpStatusException(SnmpDefinitions.snmpRspWrongValue);
-    }
-
-    /**
-     * Checker for the "JvmMemoryGCCall" variable.
-     */
-    public void checkJvmMemoryGCCall(EnumJvmMemoryGCCall x)
-        throws SnmpStatusException {
-        if (x.intValue() != JvmMemoryGCCallStart.intValue())
-        throw new SnmpStatusException(SnmpDefinitions.snmpRspWrongValue);
-    }
-
-    /**
-     * Getter for the "JvmMemoryHeapCommitted" variable.
-     */
-    public Long getJvmMemoryHeapCommitted() throws SnmpStatusException {
-        final long val = getHeapMemoryUsage().getCommitted();
-        if (val > -1) return val;
-        else return Long0;
-    }
-
-    /**
-     * Getter for the "JvmMemoryGCVerboseLevel" variable.
-     */
-    public EnumJvmMemoryGCVerboseLevel getJvmMemoryGCVerboseLevel()
-        throws SnmpStatusException {
-        if (ManagementFactory.getMemoryMXBean().isVerbose())
-            return JvmMemoryGCVerboseLevelVerbose;
-        else
-            return JvmMemoryGCVerboseLevelSilent;
-    }
-
-    /**
-     * Setter for the "JvmMemoryGCVerboseLevel" variable.
-     */
-    public void setJvmMemoryGCVerboseLevel(EnumJvmMemoryGCVerboseLevel x)
-        throws SnmpStatusException {
-        if (JvmMemoryGCVerboseLevelVerbose.intValue() == x.intValue())
-            ManagementFactory.getMemoryMXBean().setVerbose(true);
-        else
-            ManagementFactory.getMemoryMXBean().setVerbose(false);
-    }
-
-    /**
-     * Checker for the "JvmMemoryGCVerboseLevel" variable.
-     */
-    public void checkJvmMemoryGCVerboseLevel(EnumJvmMemoryGCVerboseLevel x)
-        throws SnmpStatusException {
-        // Nothing to check...
-    }
-
-    /**
-     * Getter for the "JvmMemoryHeapUsed" variable.
-     */
-    public Long getJvmMemoryHeapUsed() throws SnmpStatusException {
-        final long val = getHeapMemoryUsage().getUsed();
-        if (val > -1) return val;
-        else return Long0;
-    }
-
-    /**
-     * Getter for the "JvmMemoryHeapInitSize" variable.
-     */
-    public Long getJvmMemoryHeapInitSize() throws SnmpStatusException {
-        final long val = getHeapMemoryUsage().getInit();
-        if (val > -1) return val;
-        else return Long0;
-    }
-
-    /**
-     * Getter for the "JvmMemoryPendingFinalCount" variable.
-     */
-    public Long getJvmMemoryPendingFinalCount()
-        throws SnmpStatusException {
-        final long val = ManagementFactory.getMemoryMXBean().
-            getObjectPendingFinalizationCount();
-
-        if (val > -1) return Long.valueOf((int) val);
-
-        // Should never happen... but stay safe all the same.
-        //
-        else return 0L;
-    }
-
-    static final MibLogger log = new MibLogger(JvmMemoryImpl.class);
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvminstr/JvmMemoryMetaImpl.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,151 +0,0 @@
-/*
- * Copyright (c) 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package sun.management.snmp.jvminstr;
-
-// java imports
-//
-import java.io.Serializable;
-
-// jmx imports
-//
-import javax.management.MBeanServer;
-import com.sun.jmx.snmp.SnmpOid;
-import com.sun.jmx.snmp.SnmpStatusException;
-
-// jdmk imports
-//
-import com.sun.jmx.snmp.agent.SnmpMib;
-import com.sun.jmx.snmp.agent.SnmpStandardObjectServer;
-
-import sun.management.snmp.jvmmib.JvmMemoryMeta;
-import sun.management.snmp.jvmmib.JvmMemManagerTableMeta;
-import sun.management.snmp.jvmmib.JvmMemGCTableMeta;
-import sun.management.snmp.jvmmib.JvmMemPoolTableMeta;
-import sun.management.snmp.jvmmib.JvmMemMgrPoolRelTableMeta;
-import sun.management.snmp.util.MibLogger;
-
-/**
- * The class is used for representing SNMP metadata for the "JvmMemory" group.
- */
-public class JvmMemoryMetaImpl extends JvmMemoryMeta {
-
-    static final long serialVersionUID = -6500448253825893071L;
-    /**
-     * Constructor for the metadata associated to "JvmMemory".
-     */
-    public JvmMemoryMetaImpl(SnmpMib myMib, SnmpStandardObjectServer objserv) {
-        super(myMib,objserv);
-    }
-
-    /**
-     * Factory method for "JvmMemManagerTable" table metadata class.
-     *
-     * You can redefine this method if you need to replace the default
-     * generated metadata class with your own customized class.
-     *
-     * @param tableName Name of the table object ("JvmMemManagerTable")
-     * @param groupName Name of the group to which this table belong
-     *        ("JvmMemory")
-     * @param mib The SnmpMib object in which this table is registered
-     * @param server MBeanServer for this table entries (may be null)
-     *
-     * @return An instance of the metadata class generated for the
-     *         "JvmMemManagerTable" table (JvmMemManagerTableMeta)
-     *
-     **/
-    protected JvmMemManagerTableMeta createJvmMemManagerTableMetaNode(
-        String tableName, String groupName, SnmpMib mib, MBeanServer server)  {
-        return new JvmMemManagerTableMetaImpl(mib, objectserver);
-    }
-
-
-    /**
-     * Factory method for "JvmMemGCTable" table metadata class.
-     *
-     * You can redefine this method if you need to replace the default
-     * generated metadata class with your own customized class.
-     *
-     * @param tableName Name of the table object ("JvmMemGCTable")
-     * @param groupName Name of the group to which this table belong
-     *        ("JvmMemory")
-     * @param mib The SnmpMib object in which this table is registered
-     * @param server MBeanServer for this table entries (may be null)
-     *
-     * @return An instance of the metadata class generated for the
-     *         "JvmMemGCTable" table (JvmMemGCTableMeta)
-     *
-     **/
-    protected JvmMemGCTableMeta createJvmMemGCTableMetaNode(String tableName,
-                      String groupName, SnmpMib mib, MBeanServer server)  {
-        return new JvmMemGCTableMetaImpl(mib, objectserver);
-    }
-
-
-    /**
-     * Factory method for "JvmMemPoolTable" table metadata class.
-     *
-     * You can redefine this method if you need to replace the default
-     * generated metadata class with your own customized class.
-     *
-     * @param tableName Name of the table object ("JvmMemPoolTable")
-     * @param groupName Name of the group to which this table belong
-     *        ("JvmMemory")
-     * @param mib The SnmpMib object in which this table is registered
-     * @param server MBeanServer for this table entries (may be null)
-     *
-     * @return An instance of the metadata class generated for the
-     *         "JvmMemPoolTable" table (JvmMemPoolTableMeta)
-     *
-     **/
-    protected JvmMemPoolTableMeta
-        createJvmMemPoolTableMetaNode(String tableName, String groupName,
-                                      SnmpMib mib, MBeanServer server)  {
-        return new JvmMemPoolTableMetaImpl(mib, objectserver);
-    }
-
-    /**
-     * Factory method for "JvmMemMgrPoolRelTable" table metadata class.
-     *
-     * You can redefine this method if you need to replace the default
-     * generated metadata class with your own customized class.
-     *
-     * @param tableName Name of the table object ("JvmMemMgrPoolRelTable")
-     * @param groupName Name of the group to which this table belong
-     *        ("JvmMemory")
-     * @param mib The SnmpMib object in which this table is registered
-     * @param server MBeanServer for this table entries (may be null)
-     *
-     * @return An instance of the metadata class generated for the
-     *         "JvmMemMgrPoolRelTable" table (JvmMemMgrPoolRelTableMeta)
-     *
-     **/
-    protected JvmMemMgrPoolRelTableMeta
-        createJvmMemMgrPoolRelTableMetaNode(String tableName,
-                                            String groupName,
-                                            SnmpMib mib, MBeanServer server) {
-        return new JvmMemMgrPoolRelTableMetaImpl(mib, objectserver);
-    }
-
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvminstr/JvmOSImpl.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,110 +0,0 @@
-/*
- * Copyright (c) 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package sun.management.snmp.jvminstr;
-
-// java imports
-//
-import java.io.Serializable;
-import java.lang.management.ManagementFactory;
-import java.lang.management.OperatingSystemMXBean;
-
-// jmx imports
-//
-import javax.management.MBeanServer;
-import com.sun.jmx.snmp.SnmpString;
-import com.sun.jmx.snmp.SnmpStatusException;
-
-// jdmk imports
-//
-import com.sun.jmx.snmp.agent.SnmpMib;
-
-import sun.management.snmp.jvmmib.JvmOSMBean;
-
-/**
- * The class is used for implementing the "JvmOS" group.
- */
-public class JvmOSImpl implements JvmOSMBean, Serializable {
-
-     static final long serialVersionUID = 1839834731763310809L;
-
-    /**
-     * Constructor for the "JvmOS" group.
-     * If the group contains a table, the entries created through an
-     * SNMP SET will not be registered in Java DMK.
-     */
-    public JvmOSImpl(SnmpMib myMib) {
-    }
-
-
-    /**
-     * Constructor for the "JvmOS" group.
-     * If the group contains a table, the entries created through an
-     * SNMP SET will be AUTOMATICALLY REGISTERED in Java DMK.
-     */
-    public JvmOSImpl(SnmpMib myMib, MBeanServer server) {
-    }
-
-    static OperatingSystemMXBean getOSMBean() {
-        return ManagementFactory.getOperatingSystemMXBean();
-    }
-
-    private static String validDisplayStringTC(String str) {
-        return JVM_MANAGEMENT_MIB_IMPL.validDisplayStringTC(str);
-    }
-
-    private static String validJavaObjectNameTC(String str) {
-        return JVM_MANAGEMENT_MIB_IMPL.validJavaObjectNameTC(str);
-    }
-
-    /**
-     * Getter for the "JvmRTProcessorCount" variable.
-     */
-    public Integer getJvmOSProcessorCount() throws SnmpStatusException {
-        return getOSMBean().getAvailableProcessors();
-
-    }
-
-    /**
-     * Getter for the "JvmOSVersion" variable.
-     */
-    public String getJvmOSVersion() throws SnmpStatusException {
-        return validDisplayStringTC(getOSMBean().getVersion());
-    }
-
-    /**
-     * Getter for the "JvmOSArch" variable.
-     */
-    public String getJvmOSArch() throws SnmpStatusException {
-        return validDisplayStringTC(getOSMBean().getArch());
-    }
-
-    /**
-     * Getter for the "JvmOSName" variable.
-     */
-    public String getJvmOSName() throws SnmpStatusException {
-        return validJavaObjectNameTC(getOSMBean().getName());
-    }
-
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvminstr/JvmRTBootClassPathEntryImpl.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,78 +0,0 @@
-/*
- * Copyright (c) 2004, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package sun.management.snmp.jvminstr;
-
-// java imports
-//
-import java.io.Serializable;
-
-// jmx imports
-//
-import com.sun.jmx.snmp.SnmpStatusException;
-
-// jdmk imports
-//
-import com.sun.jmx.snmp.agent.SnmpMib;
-
-import sun.management.snmp.jvmmib.JvmRTBootClassPathEntryMBean;
-
-/**
- * The class is used for implementing the "JvmRTBootClassPathEntry" group.
- */
-public class JvmRTBootClassPathEntryImpl
-    implements JvmRTBootClassPathEntryMBean, Serializable {
-
-    static final long serialVersionUID = -2282652055235913013L;
-
-    private final String item;
-    private final int index;
-
-    /**
-     * Constructor for the "JvmRTBootClassPathEntry" group.
-     */
-    public JvmRTBootClassPathEntryImpl(String item, int index) {
-        this.item = validPathElementTC(item);
-        this.index = index;
-    }
-
-    private String validPathElementTC(String str) {
-        return JVM_MANAGEMENT_MIB_IMPL.validPathElementTC(str);
-    }
-
-    /**
-     * Getter for the "JvmRTBootClassPathItem" variable.
-     */
-    public String getJvmRTBootClassPathItem() throws SnmpStatusException {
-        return item;
-    }
-
-    /**
-     * Getter for the "JvmRTBootClassPathIndex" variable.
-     */
-    public Integer getJvmRTBootClassPathIndex() throws SnmpStatusException {
-        return index;
-    }
-
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvminstr/JvmRTBootClassPathTableMetaImpl.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,303 +0,0 @@
-/*
- * Copyright (c) 2004, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package sun.management.snmp.jvminstr;
-
-// java imports
-//
-import com.sun.jmx.mbeanserver.Util;
-import java.util.List;
-import java.util.Map;
-
-// jmx imports
-//
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-import com.sun.jmx.snmp.SnmpCounter;
-import com.sun.jmx.snmp.SnmpCounter64;
-import com.sun.jmx.snmp.SnmpGauge;
-import com.sun.jmx.snmp.SnmpInt;
-import com.sun.jmx.snmp.SnmpUnsignedInt;
-import com.sun.jmx.snmp.SnmpIpAddress;
-import com.sun.jmx.snmp.SnmpTimeticks;
-import com.sun.jmx.snmp.SnmpOpaque;
-import com.sun.jmx.snmp.SnmpString;
-import com.sun.jmx.snmp.SnmpStringFixed;
-import com.sun.jmx.snmp.SnmpOid;
-import com.sun.jmx.snmp.SnmpNull;
-import com.sun.jmx.snmp.SnmpValue;
-import com.sun.jmx.snmp.SnmpVarBind;
-import com.sun.jmx.snmp.SnmpStatusException;
-
-// jdmk imports
-//
-import com.sun.jmx.snmp.agent.SnmpIndex;
-import com.sun.jmx.snmp.agent.SnmpMib;
-import com.sun.jmx.snmp.agent.SnmpMibTable;
-import com.sun.jmx.snmp.agent.SnmpMibSubRequest;
-import com.sun.jmx.snmp.agent.SnmpStandardObjectServer;
-
-import sun.management.snmp.jvmmib.JvmRTBootClassPathTableMeta;
-import sun.management.snmp.util.SnmpCachedData;
-import sun.management.snmp.util.SnmpTableCache;
-import sun.management.snmp.util.SnmpTableHandler;
-import sun.management.snmp.util.MibLogger;
-import sun.management.snmp.util.JvmContextFactory;
-
-/**
- * The class is used for implementing the "JvmRTBootClassPathTable".
-  */
-public class JvmRTBootClassPathTableMetaImpl
-    extends JvmRTBootClassPathTableMeta {
-
-    static final long serialVersionUID = -8659886610487538299L;
-
-    private SnmpTableCache cache;
-
-     /**
-     * A concrete implementation of {@link SnmpTableCache}, for the
-     * JvmRTBootClassPathTable.
-     **/
-    private static class JvmRTBootClassPathTableCache extends SnmpTableCache {
-        static final long serialVersionUID = -2637458695413646098L;
-        private JvmRTBootClassPathTableMetaImpl meta;
-
-        JvmRTBootClassPathTableCache(JvmRTBootClassPathTableMetaImpl meta,
-                                 long validity) {
-            this.meta = meta;
-            this.validity = validity;
-        }
-
-        /**
-         * Call <code>getTableDatas(JvmContextFactory.getUserData())</code>.
-         **/
-        public SnmpTableHandler getTableHandler() {
-            final Map<Object,Object> userData = JvmContextFactory.getUserData();
-            return getTableDatas(userData);
-        }
-
-
-        /**
-         * Return a table handler containing the Thread indexes.
-         * Indexes are computed from the ThreadId.
-         **/
-        protected SnmpCachedData updateCachedDatas(Object userData) {
-
-
-            // We are getting all the input args
-            final String[] path =
-                JvmRuntimeImpl.getBootClassPath(userData);
-
-            // Time stamp for the cache
-            final long time = System.currentTimeMillis();
-            final int len = path.length;
-
-            SnmpOid indexes[] = new SnmpOid[len];
-
-            for(int i = 0; i < len; i++) {
-                indexes[i] = new SnmpOid(i + 1);
-            }
-
-            return new SnmpCachedData(time, indexes, path);
-        }
-    }
-
-    /**
-     * Constructor for the table. Initialize metadata for
-     * "JvmRTBootClassPathTableMeta".
-     * The reference on the MBean server is updated so the entries
-     * created through an SNMP SET will be AUTOMATICALLY REGISTERED
-     * in Java DMK.
-     */
-    public JvmRTBootClassPathTableMetaImpl(SnmpMib myMib,
-                                       SnmpStandardObjectServer objserv) {
-        super(myMib, objserv);
-        cache = new JvmRTBootClassPathTableCache(this, -1);
-    }
-
-    // See com.sun.jmx.snmp.agent.SnmpMibTable
-    protected SnmpOid getNextOid(Object userData)
-        throws SnmpStatusException {
-        // null means get the first OID.
-        return getNextOid(null,userData);
-    }
-
-    // See com.sun.jmx.snmp.agent.SnmpMibTable
-    protected SnmpOid getNextOid(SnmpOid oid, Object userData)
-        throws SnmpStatusException {
-        final boolean dbg = log.isDebugOn();
-        if (dbg) log.debug("getNextOid", "previous=" + oid);
-
-
-        // Get the data handler.
-        //
-        SnmpTableHandler handler = getHandler(userData);
-        if (handler == null) {
-            // This should never happen.
-            // If we get here it's a bug.
-            //
-            if (dbg) log.debug("getNextOid", "handler is null!");
-            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-        }
-
-        // Get the next oid
-        //
-        final SnmpOid next = handler.getNext(oid);
-        if (dbg) log.debug("*** **** **** **** getNextOid", "next=" + next);
-
-        // if next is null: we reached the end of the table.
-        //
-        if (next == null)
-            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-
-        return next;
-    }
-
-
-    // See com.sun.jmx.snmp.agent.SnmpMibTable
-    protected boolean contains(SnmpOid oid, Object userData) {
-
-        // Get the handler.
-        //
-        SnmpTableHandler handler = getHandler(userData);
-
-        // handler should never be null.
-        //
-        if (handler == null)
-            return false;
-
-        return handler.contains(oid);
-    }
-
-    // See com.sun.jmx.snmp.agent.SnmpMibTable
-    public Object getEntry(SnmpOid oid)
-        throws SnmpStatusException {
-        final boolean dbg = log.isDebugOn();
-        if (dbg) log.debug("getEntry", "oid [" + oid + "]");
-        if (oid == null || oid.getLength() != 1) {
-            if (dbg) log.debug("getEntry", "Invalid oid [" + oid + "]");
-            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-        }
-
-        // Get the request contextual cache (userData).
-        //
-        final Map<Object, Object> m = JvmContextFactory.getUserData();
-
-        // We're going to use this name to store/retrieve the entry in
-        // the request contextual cache.
-        //
-        // Revisit: Probably better programming to put all these strings
-        //          in some interface.
-        //
-        final String entryTag = ((m==null)?null:
-                                 ("JvmRTBootClassPathTable.entry." +
-                                  oid.toString()));
-
-        // If the entry is in the cache, simply return it.
-        //
-        if (m != null) {
-            final Object entry = m.get(entryTag);
-            if (entry != null) {
-                if (dbg)
-                    log.debug("getEntry", "Entry is already in the cache");
-                return entry;
-            } else
-                if (dbg) log.debug("getEntry", "Entry is not in the cache");
-        }
-
-        // The entry was not in the cache, make a new one.
-        //
-        // Get the data hanler.
-        //
-        SnmpTableHandler handler = getHandler(m);
-
-        // handler should never be null.
-        //
-        if (handler == null)
-            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-
-        // Get the data associated with our entry.
-        //
-        final Object data = handler.getData(oid);
-
-        // data may be null if the OID we were given is not valid.
-        //
-        if (data == null)
-            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-
-        // make the new entry (transient object that will be kept only
-        // for the duration of the request.
-        //
-        if (dbg)
-            log.debug("getEntry","data is a: " + data.getClass().getName());
-        final Object entry =
-            new JvmRTBootClassPathEntryImpl((String) data,
-                                            (int) oid.getOidArc(0));
-
-        // Put the entry in the cache in case we need it later while processing
-        // the request.
-        //
-        if (m != null && entry != null) {
-            m.put(entryTag,entry);
-        }
-
-        return entry;
-    }
-
-    /**
-     * Get the SnmpTableHandler that holds the jvmThreadInstanceTable data.
-     * First look it up in the request contextual cache, and if it is
-     * not found, obtain it from the weak cache.
-     * <br>The request contextual cache will be released at the end of the
-     * current requests, and is used only to process this request.
-     * <br>The weak cache is shared by all requests, and is only
-     * recomputed when it is found to be obsolete.
-     * <br>Note that the data put in the request contextual cache is
-     *     never considered to be obsolete, in order to preserve data
-     *     coherency.
-     **/
-    protected SnmpTableHandler getHandler(Object userData) {
-        final Map<Object, Object> m;
-        if (userData instanceof Map) m=Util.cast(userData);
-        else m=null;
-
-        // Look in the contextual cache.
-        if (m != null) {
-            final SnmpTableHandler handler =
-                (SnmpTableHandler)m.get("JvmRTBootClassPathTable.handler");
-            if (handler != null) return handler;
-        }
-
-        // No handler in contextual cache, make a new one.
-        final SnmpTableHandler handler = cache.getTableHandler();
-
-        if (m != null && handler != null )
-            m.put("JvmRTBootClassPathTable.handler",handler);
-
-        return handler;
-    }
-
-    static final MibLogger log =
-        new MibLogger(JvmRTBootClassPathTableMetaImpl.class);
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvminstr/JvmRTClassPathEntryImpl.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,77 +0,0 @@
-/*
- * Copyright (c) 2004, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package sun.management.snmp.jvminstr;
-
-// java imports
-//
-import java.io.Serializable;
-
-// jmx imports
-//
-import com.sun.jmx.snmp.SnmpStatusException;
-
-// jdmk imports
-//
-import com.sun.jmx.snmp.agent.SnmpMib;
-
-import sun.management.snmp.jvmmib.JvmRTClassPathEntryMBean;
-
-/**
- * The class is used for implementing the "JvmRTClassPathEntry" group.
- */
-public class JvmRTClassPathEntryImpl implements JvmRTClassPathEntryMBean,
-                                                Serializable {
-
-    static final long serialVersionUID = 8524792845083365742L;
-    private final String item;
-    private final int index;
-
-    /**
-     * Constructor for the "JvmRTClassPathEntry" group.
-     */
-    public JvmRTClassPathEntryImpl(String item, int index) {
-        this.item = validPathElementTC(item);
-        this.index = index;
-    }
-
-    private String validPathElementTC(String str) {
-        return JVM_MANAGEMENT_MIB_IMPL.validPathElementTC(str);
-    }
-
-    /**
-     * Getter for the "JvmRTClassPathItem" variable.
-     */
-    public String getJvmRTClassPathItem() throws SnmpStatusException {
-        return item;
-    }
-
-    /**
-     * Getter for the "JvmRTClassPathIndex" variable.
-     */
-    public Integer getJvmRTClassPathIndex() throws SnmpStatusException {
-        return index;
-    }
-
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvminstr/JvmRTClassPathTableMetaImpl.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,301 +0,0 @@
-/*
- * Copyright (c) 2004, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package sun.management.snmp.jvminstr;
-
-// java imports
-//
-import com.sun.jmx.mbeanserver.Util;
-import java.util.List;
-import java.util.Map;
-
-// jmx imports
-//
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-import com.sun.jmx.snmp.SnmpCounter;
-import com.sun.jmx.snmp.SnmpCounter64;
-import com.sun.jmx.snmp.SnmpGauge;
-import com.sun.jmx.snmp.SnmpInt;
-import com.sun.jmx.snmp.SnmpUnsignedInt;
-import com.sun.jmx.snmp.SnmpIpAddress;
-import com.sun.jmx.snmp.SnmpTimeticks;
-import com.sun.jmx.snmp.SnmpOpaque;
-import com.sun.jmx.snmp.SnmpString;
-import com.sun.jmx.snmp.SnmpStringFixed;
-import com.sun.jmx.snmp.SnmpOid;
-import com.sun.jmx.snmp.SnmpNull;
-import com.sun.jmx.snmp.SnmpValue;
-import com.sun.jmx.snmp.SnmpVarBind;
-import com.sun.jmx.snmp.SnmpStatusException;
-
-// jdmk imports
-//
-import com.sun.jmx.snmp.agent.SnmpIndex;
-import com.sun.jmx.snmp.agent.SnmpMib;
-import com.sun.jmx.snmp.agent.SnmpMibTable;
-import com.sun.jmx.snmp.agent.SnmpMibSubRequest;
-import com.sun.jmx.snmp.agent.SnmpStandardObjectServer;
-
-import sun.management.snmp.jvmmib.JvmRTClassPathTableMeta;
-import sun.management.snmp.util.SnmpCachedData;
-import sun.management.snmp.util.SnmpTableCache;
-import sun.management.snmp.util.SnmpTableHandler;
-import sun.management.snmp.util.MibLogger;
-import sun.management.snmp.util.JvmContextFactory;
-
-/**
- * The class is used for implementing the "JvmRTClassPathTable".
-  */
-public class JvmRTClassPathTableMetaImpl extends JvmRTClassPathTableMeta {
-
-    static final long serialVersionUID = -6914494148818455166L;
-
-    private SnmpTableCache cache;
-
-     /**
-     * A concrete implementation of {@link SnmpTableCache}, for the
-     * JvmRTClassPathTable.
-     **/
-    private static class JvmRTClassPathTableCache extends SnmpTableCache {
-        static final long serialVersionUID = 3805032372592117315L;
-        private JvmRTClassPathTableMetaImpl meta;
-
-        JvmRTClassPathTableCache(JvmRTClassPathTableMetaImpl meta,
-                                 long validity) {
-            this.meta = meta;
-            this.validity = validity;
-        }
-
-        /**
-         * Call <code>getTableDatas(JvmContextFactory.getUserData())</code>.
-         **/
-        public SnmpTableHandler getTableHandler() {
-            final Map<Object, Object> userData = JvmContextFactory.getUserData();
-            return getTableDatas(userData);
-        }
-
-
-        /**
-         * Return a table handler containing the Thread indexes.
-         * Indexes are computed from the ThreadId.
-         **/
-        protected SnmpCachedData updateCachedDatas(Object userData) {
-
-
-            // We are getting all the input args
-            final String[] path =
-                JvmRuntimeImpl.getClassPath(userData);
-
-            // Time stamp for the cache
-            final long time = System.currentTimeMillis();
-            final int len = path.length;
-
-            SnmpOid indexes[] = new SnmpOid[len];
-
-            for(int i = 0; i < len; i++) {
-                indexes[i] = new SnmpOid(i + 1);
-            }
-
-            return new SnmpCachedData(time, indexes, path);
-        }
-    }
-
-    /**
-     * Constructor for the table. Initialize metadata for
-     * "JvmRTClassPathTableMeta".
-     * The reference on the MBean server is updated so the entries
-     * created through an SNMP SET will be AUTOMATICALLY REGISTERED
-     * in Java DMK.
-     */
-    public JvmRTClassPathTableMetaImpl(SnmpMib myMib,
-                                       SnmpStandardObjectServer objserv) {
-        super(myMib, objserv);
-        cache = new JvmRTClassPathTableCache(this, -1);
-    }
-
-    // See com.sun.jmx.snmp.agent.SnmpMibTable
-    protected SnmpOid getNextOid(Object userData)
-        throws SnmpStatusException {
-        // null means get the first OID.
-        return getNextOid(null,userData);
-    }
-
-    // See com.sun.jmx.snmp.agent.SnmpMibTable
-    protected SnmpOid getNextOid(SnmpOid oid, Object userData)
-        throws SnmpStatusException {
-        final boolean dbg = log.isDebugOn();
-        if (dbg) log.debug("getNextOid", "previous=" + oid);
-
-
-        // Get the data handler.
-        //
-        SnmpTableHandler handler = getHandler(userData);
-        if (handler == null) {
-            // This should never happen.
-            // If we get here it's a bug.
-            //
-            if (dbg) log.debug("getNextOid", "handler is null!");
-            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-        }
-
-        // Get the next oid
-        //
-        final SnmpOid next = handler.getNext(oid);
-        if (dbg) log.debug("*** **** **** **** getNextOid", "next=" + next);
-
-        // if next is null: we reached the end of the table.
-        //
-        if (next == null)
-            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-
-        return next;
-    }
-
-
-    // See com.sun.jmx.snmp.agent.SnmpMibTable
-    protected boolean contains(SnmpOid oid, Object userData) {
-
-        // Get the handler.
-        //
-        SnmpTableHandler handler = getHandler(userData);
-
-        // handler should never be null.
-        //
-        if (handler == null)
-            return false;
-
-        return handler.contains(oid);
-    }
-
-    // See com.sun.jmx.snmp.agent.SnmpMibTable
-    public Object getEntry(SnmpOid oid)
-        throws SnmpStatusException {
-        final boolean dbg = log.isDebugOn();
-        if (dbg) log.debug("getEntry", "oid [" + oid + "]");
-        if (oid == null || oid.getLength() != 1) {
-            if (dbg) log.debug("getEntry", "Invalid oid [" + oid + "]");
-            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-        }
-
-        // Get the request contextual cache (userData).
-        //
-        final Map<Object, Object> m = JvmContextFactory.getUserData();
-
-        // We're going to use this name to store/retrieve the entry in
-        // the request contextual cache.
-        //
-        // Revisit: Probably better programming to put all these strings
-        //          in some interface.
-        //
-        final String entryTag = ((m==null)?null:
-                                 ("JvmRTClassPathTable.entry." +
-                                  oid.toString()));
-
-        // If the entry is in the cache, simply return it.
-        //
-        if (m != null) {
-            final Object entry = m.get(entryTag);
-            if (entry != null) {
-                if (dbg)
-                    log.debug("getEntry", "Entry is already in the cache");
-                return entry;
-            } else
-                if (dbg) log.debug("getEntry", "Entry is not in the cache");
-        }
-
-        // The entry was not in the cache, make a new one.
-        //
-        // Get the data hanler.
-        //
-        SnmpTableHandler handler = getHandler(m);
-
-        // handler should never be null.
-        //
-        if (handler == null)
-            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-
-        // Get the data associated with our entry.
-        //
-        final Object data = handler.getData(oid);
-
-        // data may be null if the OID we were given is not valid.
-        //
-        if (data == null)
-            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-
-        // make the new entry (transient object that will be kept only
-        // for the duration of the request.
-        //
-        if (dbg)
-            log.debug("getEntry","data is a: " + data.getClass().getName());
-        final Object entry =
-            new JvmRTClassPathEntryImpl((String) data, (int) oid.getOidArc(0));
-
-        // Put the entry in the cache in case we need it later while processing
-        // the request.
-        //
-        if (m != null && entry != null) {
-            m.put(entryTag,entry);
-        }
-
-        return entry;
-    }
-
-    /**
-     * Get the SnmpTableHandler that holds the jvmThreadInstanceTable data.
-     * First look it up in the request contextual cache, and if it is
-     * not found, obtain it from the weak cache.
-     * <br>The request contextual cache will be released at the end of the
-     * current requests, and is used only to process this request.
-     * <br>The weak cache is shared by all requests, and is only
-     * recomputed when it is found to be obsolete.
-     * <br>Note that the data put in the request contextual cache is
-     *     never considered to be obsolete, in order to preserve data
-     *     coherency.
-     **/
-    protected SnmpTableHandler getHandler(Object userData) {
-        final Map<Object, Object> m;
-        if (userData instanceof Map) m=Util.cast(userData);
-        else m=null;
-
-        // Look in the contextual cache.
-        if (m != null) {
-            final SnmpTableHandler handler =
-                (SnmpTableHandler)m.get("JvmRTClassPathTable.handler");
-            if (handler != null) return handler;
-        }
-
-        // No handler in contextual cache, make a new one.
-        final SnmpTableHandler handler = cache.getTableHandler();
-
-        if (m != null && handler != null )
-            m.put("JvmRTClassPathTable.handler",handler);
-
-        return handler;
-    }
-
-    static final MibLogger log =
-        new MibLogger(JvmRTClassPathTableMetaImpl.class);
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvminstr/JvmRTInputArgsEntryImpl.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,77 +0,0 @@
-/*
- * Copyright (c) 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package sun.management.snmp.jvminstr;
-
-// java imports
-//
-import java.io.Serializable;
-
-// jmx imports
-//
-import com.sun.jmx.snmp.SnmpStatusException;
-
-// jdmk imports
-//
-import com.sun.jmx.snmp.agent.SnmpMib;
-
-import sun.management.snmp.jvmmib.JvmRTInputArgsEntryMBean;
-
-/**
- * The class is used for implementing the "JvmRTInputArgsEntry" group.
- */
-public class JvmRTInputArgsEntryImpl implements JvmRTInputArgsEntryMBean,
-                                                Serializable {
-
-    static final long serialVersionUID = 1000306518436503395L;
-    private final String item;
-    private final int index;
-
-    /**
-     * Constructor for the "JvmRTInputArgsEntry" group.
-     */
-    public JvmRTInputArgsEntryImpl(String item, int index) {
-        this.item = validArgValueTC(item);
-        this.index = index;
-    }
-
-    private String validArgValueTC(String str) {
-        return JVM_MANAGEMENT_MIB_IMPL.validArgValueTC(str);
-    }
-
-    /**
-     * Getter for the "JvmRTInputArgsItem" variable.
-     */
-    public String getJvmRTInputArgsItem() throws SnmpStatusException {
-        return item;
-    }
-
-    /**
-     * Getter for the "JvmRTInputArgsIndex" variable.
-     */
-    public Integer getJvmRTInputArgsIndex() throws SnmpStatusException {
-        return index;
-    }
-
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvminstr/JvmRTInputArgsTableMetaImpl.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,297 +0,0 @@
-/*
- * Copyright (c) 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package sun.management.snmp.jvminstr;
-
-// java imports
-//
-import com.sun.jmx.mbeanserver.Util;
-import java.util.List;
-import java.util.Map;
-
-// jmx imports
-//
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-import com.sun.jmx.snmp.SnmpCounter;
-import com.sun.jmx.snmp.SnmpCounter64;
-import com.sun.jmx.snmp.SnmpGauge;
-import com.sun.jmx.snmp.SnmpInt;
-import com.sun.jmx.snmp.SnmpUnsignedInt;
-import com.sun.jmx.snmp.SnmpIpAddress;
-import com.sun.jmx.snmp.SnmpTimeticks;
-import com.sun.jmx.snmp.SnmpOpaque;
-import com.sun.jmx.snmp.SnmpString;
-import com.sun.jmx.snmp.SnmpStringFixed;
-import com.sun.jmx.snmp.SnmpOid;
-import com.sun.jmx.snmp.SnmpNull;
-import com.sun.jmx.snmp.SnmpValue;
-import com.sun.jmx.snmp.SnmpVarBind;
-import com.sun.jmx.snmp.SnmpStatusException;
-
-// jdmk imports
-//
-import com.sun.jmx.snmp.agent.SnmpIndex;
-import com.sun.jmx.snmp.agent.SnmpMib;
-import com.sun.jmx.snmp.agent.SnmpMibTable;
-import com.sun.jmx.snmp.agent.SnmpMibSubRequest;
-import com.sun.jmx.snmp.agent.SnmpStandardObjectServer;
-
-import sun.management.snmp.jvmmib.JvmRTInputArgsTableMeta;
-import sun.management.snmp.util.SnmpCachedData;
-import sun.management.snmp.util.SnmpTableCache;
-import sun.management.snmp.util.SnmpTableHandler;
-import sun.management.snmp.util.MibLogger;
-import sun.management.snmp.util.JvmContextFactory;
-
-/**
- * The class is used for implementing the "JvmRTInputArgsTable" group.
- */
-public class JvmRTInputArgsTableMetaImpl extends JvmRTInputArgsTableMeta {
-
-    static final long serialVersionUID = -2083438094888099238L;
-    private SnmpTableCache cache;
-
-     /**
-     * A concrete implementation of {@link SnmpTableCache}, for the
-     * JvmRTInputArgsTable.
-     **/
-    private static class JvmRTInputArgsTableCache extends SnmpTableCache {
-
-        static final long serialVersionUID = 1693751105464785192L;
-        private JvmRTInputArgsTableMetaImpl meta;
-
-        JvmRTInputArgsTableCache(JvmRTInputArgsTableMetaImpl meta,
-                                 long validity) {
-            this.meta = meta;
-            this.validity = validity;
-        }
-
-        /**
-         * Call <code>getTableDatas(JvmContextFactory.getUserData())</code>.
-         **/
-        public SnmpTableHandler getTableHandler() {
-            final Map<Object,Object> userData = JvmContextFactory.getUserData();
-            return getTableDatas(userData);
-        }
-
-
-        /**
-         * Return a table handler containing the Thread indexes.
-         * Indexes are computed from the ThreadId.
-         **/
-        protected SnmpCachedData updateCachedDatas(Object userData) {
-
-
-            // We are getting all the input args
-            final String[] args = JvmRuntimeImpl.getInputArguments(userData);
-
-            // Time stamp for the cache
-            final long time = System.currentTimeMillis();
-            SnmpOid indexes[] = new SnmpOid[args.length];
-
-            for(int i = 0; i < args.length; i++) {
-                indexes[i] = new SnmpOid(i + 1);
-            }
-
-            return new SnmpCachedData(time, indexes, args);
-        }
-    }
-
-    /**
-     * Constructor for the table. Initialize metadata for
-     * "JvmRTInputArgsTableMeta".
-     * The reference on the MBean server is updated so the entries
-     * created through an SNMP SET will be AUTOMATICALLY REGISTERED
-     * in Java DMK.
-     */
-    public JvmRTInputArgsTableMetaImpl(SnmpMib myMib,
-                                       SnmpStandardObjectServer objserv) {
-        super(myMib, objserv);
-        cache = new JvmRTInputArgsTableCache(this, -1);
-    }
-
-    // See com.sun.jmx.snmp.agent.SnmpMibTable
-    protected SnmpOid getNextOid(Object userData)
-        throws SnmpStatusException {
-        // null means get the first OID.
-        return getNextOid(null,userData);
-    }
-
-    // See com.sun.jmx.snmp.agent.SnmpMibTable
-    protected SnmpOid getNextOid(SnmpOid oid, Object userData)
-        throws SnmpStatusException {
-        final boolean dbg = log.isDebugOn();
-        if (dbg) log.debug("getNextOid", "previous=" + oid);
-
-
-        // Get the data handler.
-        //
-        SnmpTableHandler handler = getHandler(userData);
-        if (handler == null) {
-            // This should never happen.
-            // If we get here it's a bug.
-            //
-            if (dbg) log.debug("getNextOid", "handler is null!");
-            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-        }
-
-        // Get the next oid
-        //
-        final SnmpOid next = handler.getNext(oid);
-        if (dbg) log.debug("*** **** **** **** getNextOid", "next=" + next);
-
-        // if next is null: we reached the end of the table.
-        //
-        if (next == null)
-            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-
-        return next;
-    }
-
-
-    // See com.sun.jmx.snmp.agent.SnmpMibTable
-    protected boolean contains(SnmpOid oid, Object userData) {
-
-        // Get the handler.
-        //
-        SnmpTableHandler handler = getHandler(userData);
-
-        // handler should never be null.
-        //
-        if (handler == null)
-            return false;
-
-        return handler.contains(oid);
-    }
-
-    // See com.sun.jmx.snmp.agent.SnmpMibTable
-    public Object getEntry(SnmpOid oid)
-        throws SnmpStatusException {
-        final boolean dbg = log.isDebugOn();
-        if (dbg) log.debug("getEntry", "oid [" + oid + "]");
-        if (oid == null || oid.getLength() != 1) {
-            if (dbg) log.debug("getEntry", "Invalid oid [" + oid + "]");
-            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-        }
-
-        // Get the request contextual cache (userData).
-        //
-        final Map<Object, Object> m = JvmContextFactory.getUserData();
-
-        // We're going to use this name to store/retrieve the entry in
-        // the request contextual cache.
-        //
-        // Revisit: Probably better programming to put all these strings
-        //          in some interface.
-        //
-        final String entryTag = ((m==null)?null:
-                                 ("JvmRTInputArgsTable.entry." +
-                                  oid.toString()));
-
-        // If the entry is in the cache, simply return it.
-        //
-        if (m != null) {
-            final Object entry = m.get(entryTag);
-            if (entry != null) {
-                if (dbg)
-                    log.debug("getEntry", "Entry is already in the cache");
-                return entry;
-            } else if (dbg) log.debug("getEntry", "Entry is not in the cache");
-        }
-
-        // The entry was not in the cache, make a new one.
-        //
-        // Get the data hanler.
-        //
-        SnmpTableHandler handler = getHandler(m);
-
-        // handler should never be null.
-        //
-        if (handler == null)
-            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-
-        // Get the data associated with our entry.
-        //
-        final Object data = handler.getData(oid);
-
-        // data may be null if the OID we were given is not valid.
-        //
-        if (data == null)
-            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-
-        // make the new entry (transient object that will be kept only
-        // for the duration of the request.
-        //
-        if (dbg) log.debug("getEntry","data is a: " +
-                           data.getClass().getName());
-        final Object entry =
-            new JvmRTInputArgsEntryImpl((String) data, (int) oid.getOidArc(0));
-
-        // Put the entry in the cache in case we need it later while processing
-        // the request.
-        //
-        if (m != null && entry != null) {
-            m.put(entryTag,entry);
-        }
-
-        return entry;
-    }
-
-    /**
-     * Get the SnmpTableHandler that holds the jvmThreadInstanceTable data.
-     * First look it up in the request contextual cache, and if it is
-     * not found, obtain it from the weak cache.
-     * <br>The request contextual cache will be released at the end of the
-     * current requests, and is used only to process this request.
-     * <br>The weak cache is shared by all requests, and is only
-     * recomputed when it is found to be obsolete.
-     * <br>Note that the data put in the request contextual cache is
-     *     never considered to be obsolete, in order to preserve data
-     *     coherency.
-     **/
-    protected SnmpTableHandler getHandler(Object userData) {
-        final Map<Object, Object> m;
-        if (userData instanceof Map) m=Util.cast(userData);
-        else m=null;
-
-        // Look in the contextual cache.
-        if (m != null) {
-            final SnmpTableHandler handler =
-                (SnmpTableHandler)m.get("JvmRTInputArgsTable.handler");
-            if (handler != null) return handler;
-        }
-
-        // No handler in contextual cache, make a new one.
-        final SnmpTableHandler handler = cache.getTableHandler();
-
-        if (m != null && handler != null )
-            m.put("JvmRTInputArgsTable.handler",handler);
-
-        return handler;
-    }
-
-    static final MibLogger log =
-        new MibLogger(JvmRTInputArgsTableMetaImpl.class);
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvminstr/JvmRTLibraryPathEntryImpl.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,77 +0,0 @@
-/*
- * Copyright (c) 2004, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package sun.management.snmp.jvminstr;
-
-// java imports
-//
-import java.io.Serializable;
-
-// jmx imports
-//
-import com.sun.jmx.snmp.SnmpStatusException;
-
-// jdmk imports
-//
-import com.sun.jmx.snmp.agent.SnmpMib;
-
-import sun.management.snmp.jvmmib.JvmRTLibraryPathEntryMBean;
-
-/**
- * The class is used for implementing the "JvmRTLibraryPathEntry" group.
- */
-public class JvmRTLibraryPathEntryImpl implements JvmRTLibraryPathEntryMBean,
-                                                Serializable {
-
-    static final long serialVersionUID = -3322438153507369765L;
-    private final String item;
-    private final int index;
-
-    /**
-     * Constructor for the "JvmRTLibraryPathEntry" group.
-     */
-    public JvmRTLibraryPathEntryImpl(String item, int index) {
-        this.item  = validPathElementTC(item);
-        this.index = index;
-    }
-
-    private String validPathElementTC(String str) {
-        return JVM_MANAGEMENT_MIB_IMPL.validPathElementTC(str);
-    }
-
-    /**
-     * Getter for the "JvmRTLibraryPathItem" variable.
-     */
-    public String getJvmRTLibraryPathItem() throws SnmpStatusException {
-        return item;
-    }
-
-    /**
-     * Getter for the "JvmRTLibraryPathIndex" variable.
-     */
-    public Integer getJvmRTLibraryPathIndex() throws SnmpStatusException {
-        return index;
-    }
-
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvminstr/JvmRTLibraryPathTableMetaImpl.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,300 +0,0 @@
-/*
- * Copyright (c) 2004, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package sun.management.snmp.jvminstr;
-
-// java imports
-//
-import com.sun.jmx.mbeanserver.Util;
-import java.util.List;
-import java.util.Map;
-
-// jmx imports
-//
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-import com.sun.jmx.snmp.SnmpCounter;
-import com.sun.jmx.snmp.SnmpCounter64;
-import com.sun.jmx.snmp.SnmpGauge;
-import com.sun.jmx.snmp.SnmpInt;
-import com.sun.jmx.snmp.SnmpUnsignedInt;
-import com.sun.jmx.snmp.SnmpIpAddress;
-import com.sun.jmx.snmp.SnmpTimeticks;
-import com.sun.jmx.snmp.SnmpOpaque;
-import com.sun.jmx.snmp.SnmpString;
-import com.sun.jmx.snmp.SnmpStringFixed;
-import com.sun.jmx.snmp.SnmpOid;
-import com.sun.jmx.snmp.SnmpNull;
-import com.sun.jmx.snmp.SnmpValue;
-import com.sun.jmx.snmp.SnmpVarBind;
-import com.sun.jmx.snmp.SnmpStatusException;
-
-// jdmk imports
-//
-import com.sun.jmx.snmp.agent.SnmpIndex;
-import com.sun.jmx.snmp.agent.SnmpMib;
-import com.sun.jmx.snmp.agent.SnmpMibTable;
-import com.sun.jmx.snmp.agent.SnmpMibSubRequest;
-import com.sun.jmx.snmp.agent.SnmpStandardObjectServer;
-
-import sun.management.snmp.jvmmib.JvmRTLibraryPathTableMeta;
-import sun.management.snmp.util.SnmpCachedData;
-import sun.management.snmp.util.SnmpTableCache;
-import sun.management.snmp.util.SnmpTableHandler;
-import sun.management.snmp.util.MibLogger;
-import sun.management.snmp.util.JvmContextFactory;
-
-/**
- * The class is used for implementing the "JvmRTLibraryPathTable".
-  */
-public class JvmRTLibraryPathTableMetaImpl extends JvmRTLibraryPathTableMeta {
-
-    static final long serialVersionUID = 6713252710712502068L;
-    private SnmpTableCache cache;
-
-     /**
-     * A concrete implementation of {@link SnmpTableCache}, for the
-     * JvmRTLibraryPathTable.
-     **/
-    private static class JvmRTLibraryPathTableCache extends SnmpTableCache {
-        static final long serialVersionUID = 2035304445719393195L;
-        private JvmRTLibraryPathTableMetaImpl meta;
-
-        JvmRTLibraryPathTableCache(JvmRTLibraryPathTableMetaImpl meta,
-                                 long validity) {
-            this.meta = meta;
-            this.validity = validity;
-        }
-
-        /**
-         * Call <code>getTableDatas(JvmContextFactory.getUserData())</code>.
-         **/
-        public SnmpTableHandler getTableHandler() {
-            final Map<Object,Object> userData = JvmContextFactory.getUserData();
-            return getTableDatas(userData);
-        }
-
-
-        /**
-         * Return a table handler containing the Thread indexes.
-         * Indexes are computed from the ThreadId.
-         **/
-        protected SnmpCachedData updateCachedDatas(Object userData) {
-
-
-            // We are getting all the input args
-            final String[] path =
-                JvmRuntimeImpl.getLibraryPath(userData);
-
-            // Time stamp for the cache
-            final long time = System.currentTimeMillis();
-            final int len = path.length;
-
-            SnmpOid indexes[] = new SnmpOid[len];
-
-            for(int i = 0; i < len; i++) {
-                indexes[i] = new SnmpOid(i + 1);
-            }
-
-            return new SnmpCachedData(time, indexes, path);
-        }
-    }
-
-    /**
-     * Constructor for the table. Initialize metadata for
-     * "JvmRTLibraryPathTableMeta".
-     * The reference on the MBean server is updated so the entries
-     * created through an SNMP SET will be AUTOMATICALLY REGISTERED
-     * in Java DMK.
-     */
-    public JvmRTLibraryPathTableMetaImpl(SnmpMib myMib,
-                                       SnmpStandardObjectServer objserv) {
-        super(myMib, objserv);
-        cache = new JvmRTLibraryPathTableCache(this, -1);
-    }
-
-    // See com.sun.jmx.snmp.agent.SnmpMibTable
-    protected SnmpOid getNextOid(Object userData)
-        throws SnmpStatusException {
-        // null means get the first OID.
-        return getNextOid(null,userData);
-    }
-
-    // See com.sun.jmx.snmp.agent.SnmpMibTable
-    protected SnmpOid getNextOid(SnmpOid oid, Object userData)
-        throws SnmpStatusException {
-        final boolean dbg = log.isDebugOn();
-        if (dbg) log.debug("getNextOid", "previous=" + oid);
-
-
-        // Get the data handler.
-        //
-        SnmpTableHandler handler = getHandler(userData);
-        if (handler == null) {
-            // This should never happen.
-            // If we get here it's a bug.
-            //
-            if (dbg) log.debug("getNextOid", "handler is null!");
-            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-        }
-
-        // Get the next oid
-        //
-        final SnmpOid next = handler.getNext(oid);
-        if (dbg) log.debug("*** **** **** **** getNextOid", "next=" + next);
-
-        // if next is null: we reached the end of the table.
-        //
-        if (next == null)
-            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-
-        return next;
-    }
-
-
-    // See com.sun.jmx.snmp.agent.SnmpMibTable
-    protected boolean contains(SnmpOid oid, Object userData) {
-
-        // Get the handler.
-        //
-        SnmpTableHandler handler = getHandler(userData);
-
-        // handler should never be null.
-        //
-        if (handler == null)
-            return false;
-
-        return handler.contains(oid);
-    }
-
-    // See com.sun.jmx.snmp.agent.SnmpMibTable
-    public Object getEntry(SnmpOid oid)
-        throws SnmpStatusException {
-        final boolean dbg = log.isDebugOn();
-        if (dbg) log.debug("getEntry", "oid [" + oid + "]");
-        if (oid == null || oid.getLength() != 1) {
-            if (dbg) log.debug("getEntry", "Invalid oid [" + oid + "]");
-            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-        }
-
-        // Get the request contextual cache (userData).
-        //
-        final Map<Object, Object> m = JvmContextFactory.getUserData();
-
-        // We're going to use this name to store/retrieve the entry in
-        // the request contextual cache.
-        //
-        // Revisit: Probably better programming to put all these strings
-        //          in some interface.
-        //
-        final String entryTag = ((m==null)?null:
-                                 ("JvmRTLibraryPathTable.entry." +
-                                  oid.toString()));
-
-        // If the entry is in the cache, simply return it.
-        //
-        if (m != null) {
-            final Object entry = m.get(entryTag);
-            if (entry != null) {
-                if (dbg)
-                    log.debug("getEntry", "Entry is already in the cache");
-                return entry;
-            } else if (dbg) log.debug("getEntry", "Entry is not in the cache");
-
-        }
-
-        // The entry was not in the cache, make a new one.
-        //
-        // Get the data hanler.
-        //
-        SnmpTableHandler handler = getHandler(m);
-
-        // handler should never be null.
-        //
-        if (handler == null)
-            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-
-        // Get the data associated with our entry.
-        //
-        final Object data = handler.getData(oid);
-
-        // data may be null if the OID we were given is not valid.
-        //
-        if (data == null)
-            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-
-        // make the new entry (transient object that will be kept only
-        // for the duration of the request.
-        //
-        if (dbg) log.debug("getEntry","data is a: "+
-                           data.getClass().getName());
-        final Object entry =
-            new JvmRTLibraryPathEntryImpl((String) data,(int)oid.getOidArc(0));
-
-        // Put the entry in the cache in case we need it later while processing
-        // the request.
-        //
-        if (m != null && entry != null) {
-            m.put(entryTag,entry);
-        }
-
-        return entry;
-    }
-
-    /**
-     * Get the SnmpTableHandler that holds the jvmThreadInstanceTable data.
-     * First look it up in the request contextual cache, and if it is
-     * not found, obtain it from the weak cache.
-     * <br>The request contextual cache will be released at the end of the
-     * current requests, and is used only to process this request.
-     * <br>The weak cache is shared by all requests, and is only
-     * recomputed when it is found to be obsolete.
-     * <br>Note that the data put in the request contextual cache is
-     *     never considered to be obsolete, in order to preserve data
-     *     coherency.
-     **/
-    protected SnmpTableHandler getHandler(Object userData) {
-        final Map<Object, Object> m;
-        if (userData instanceof Map) m=Util.cast(userData);
-        else m=null;
-
-        // Look in the contextual cache.
-        if (m != null) {
-            final SnmpTableHandler handler =
-                (SnmpTableHandler)m.get("JvmRTLibraryPathTable.handler");
-            if (handler != null) return handler;
-        }
-
-        // No handler in contextual cache, make a new one.
-        final SnmpTableHandler handler = cache.getTableHandler();
-
-        if (m != null && handler != null )
-            m.put("JvmRTLibraryPathTable.handler",handler);
-
-        return handler;
-    }
-
-    static final MibLogger log =
-        new MibLogger(JvmRTLibraryPathTableMetaImpl.class);
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvminstr/JvmRuntimeImpl.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,286 +0,0 @@
-/*
- * Copyright (c) 2003, 2006, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package sun.management.snmp.jvminstr;
-
-// java imports
-//
-import com.sun.jmx.mbeanserver.Util;
-import java.io.Serializable;
-import java.lang.management.RuntimeMXBean;
-import java.lang.management.ManagementFactory;
-import java.util.List;
-import java.util.Map;
-
-// jmx imports
-//
-import javax.management.MBeanServer;
-import com.sun.jmx.snmp.SnmpString;
-import com.sun.jmx.snmp.SnmpStatusException;
-
-// jdmk imports
-//
-import com.sun.jmx.snmp.agent.SnmpMib;
-
-import sun.management.snmp.jvmmib.JvmRuntimeMBean;
-import sun.management.snmp.jvmmib.EnumJvmRTBootClassPathSupport;
-import sun.management.snmp.util.JvmContextFactory;
-
-/**
- * The class is used for implementing the "JvmRuntime" group.
- */
-public class JvmRuntimeImpl implements JvmRuntimeMBean {
-
-    /**
-     * Variable for storing the value of "JvmRTBootClassPathSupport".
-     *
-     * "Indicates whether the Java virtual machine supports the
-     * boot class path mechanism used by the system class loader
-     * to search for class files.
-     *
-     * See java.management.RuntimeMXBean.isBootClassPathSupported()
-     * "
-     *
-     */
-    static final EnumJvmRTBootClassPathSupport
-        JvmRTBootClassPathSupportSupported =
-        new EnumJvmRTBootClassPathSupport("supported");
-    static final EnumJvmRTBootClassPathSupport
-        JvmRTBootClassPathSupportUnSupported =
-        new EnumJvmRTBootClassPathSupport("unsupported");
-
-    /**
-     * Constructor for the "JvmRuntime" group.
-     * If the group contains a table, the entries created through an SNMP SET
-     * will not be registered in Java DMK.
-     */
-    public JvmRuntimeImpl(SnmpMib myMib) {
-
-    }
-
-
-    /**
-     * Constructor for the "JvmRuntime" group.
-     * If the group contains a table, the entries created through an SNMP SET
-     * will be AUTOMATICALLY REGISTERED in Java DMK.
-     */
-    public JvmRuntimeImpl(SnmpMib myMib, MBeanServer server) {
-
-    }
-
-    static RuntimeMXBean getRuntimeMXBean() {
-        return ManagementFactory.getRuntimeMXBean();
-    }
-
-    private static String validDisplayStringTC(String str) {
-        return JVM_MANAGEMENT_MIB_IMPL.validDisplayStringTC(str);
-    }
-
-    private static String validPathElementTC(String str) {
-        return JVM_MANAGEMENT_MIB_IMPL.validPathElementTC(str);
-    }
-
-    private static String validJavaObjectNameTC(String str) {
-        return JVM_MANAGEMENT_MIB_IMPL.validJavaObjectNameTC(str);
-    }
-
-
-    static String[] splitPath(String path) {
-        final String[] items = path.split(java.io.File.pathSeparator);
-        // for (int i=0;i<items.length;i++) {
-        //    items[i]=validPathElementTC(items[i]);
-        // }
-        return items;
-    }
-
-    static String[] getClassPath(Object userData) {
-        final Map<Object, Object> m =
-                Util.cast((userData instanceof Map)?userData:null);
-        final String tag = "JvmRuntime.getClassPath";
-
-        // If the list is in the cache, simply return it.
-        //
-        if (m != null) {
-            final String[] cached = (String[])m.get(tag);
-            if (cached != null) return cached;
-        }
-
-        final String[] args = splitPath(getRuntimeMXBean().getClassPath());
-
-        if (m != null) m.put(tag,args);
-        return args;
-    }
-
-    static String[] getBootClassPath(Object userData) {
-        if (!getRuntimeMXBean().isBootClassPathSupported())
-        return new String[0];
-
-        final Map<Object, Object> m =
-                Util.cast((userData instanceof Map)?userData:null);
-        final String tag = "JvmRuntime.getBootClassPath";
-
-        // If the list is in the cache, simply return it.
-        //
-        if (m != null) {
-            final String[] cached = (String[])m.get(tag);
-            if (cached != null) return cached;
-        }
-
-        final String[] args = splitPath(getRuntimeMXBean().getBootClassPath());
-
-        if (m != null) m.put(tag,args);
-        return args;
-    }
-
-    static String[] getLibraryPath(Object userData) {
-        final Map<Object, Object> m =
-                Util.cast((userData instanceof Map)?userData:null);
-        final String tag = "JvmRuntime.getLibraryPath";
-
-        // If the list is in the cache, simply return it.
-        //
-        if (m != null) {
-            final String[] cached = (String[])m.get(tag);
-            if (cached != null) return cached;
-        }
-
-        final String[] args = splitPath(getRuntimeMXBean().getLibraryPath());
-
-        if (m != null) m.put(tag,args);
-        return args;
-    }
-
-    static String[] getInputArguments(Object userData) {
-        final Map<Object, Object> m =
-                Util.cast((userData instanceof Map)?userData:null);
-        final String tag = "JvmRuntime.getInputArguments";
-
-        // If the list is in the cache, simply return it.
-        //
-        if (m != null) {
-            final String[] cached = (String[])m.get(tag);
-            if (cached != null) return cached;
-        }
-
-        final List<String> l = getRuntimeMXBean().getInputArguments();
-        final String[] args = l.toArray(new String[0]);
-
-        if (m != null) m.put(tag,args);
-        return args;
-    }
-
-    /**
-     * Getter for the "JvmRTSpecVendor" variable.
-     */
-    public String getJvmRTSpecVendor() throws SnmpStatusException {
-        return validDisplayStringTC(getRuntimeMXBean().getSpecVendor());
-    }
-
-    /**
-     * Getter for the "JvmRTSpecName" variable.
-     */
-    public String getJvmRTSpecName() throws SnmpStatusException {
-        return validDisplayStringTC(getRuntimeMXBean().getSpecName());
-    }
-
-    /**
-     * Getter for the "JvmRTVersion" variable.
-     */
-    public String getJvmRTVMVersion() throws SnmpStatusException {
-        return validDisplayStringTC(getRuntimeMXBean().getVmVersion());
-    }
-
-    /**
-     * Getter for the "JvmRTVendor" variable.
-     */
-    public String getJvmRTVMVendor() throws SnmpStatusException {
-        return validDisplayStringTC(getRuntimeMXBean().getVmVendor());
-    }
-
-    /**
-     * Getter for the "JvmRTManagementSpecVersion" variable.
-     */
-    public String getJvmRTManagementSpecVersion() throws SnmpStatusException {
-        return validDisplayStringTC(getRuntimeMXBean().
-                                    getManagementSpecVersion());
-    }
-
-    /**
-     * Getter for the "JvmRTVMName" variable.
-     */
-    public String getJvmRTVMName() throws SnmpStatusException {
-        return validJavaObjectNameTC(getRuntimeMXBean().getVmName());
-    }
-
-
-    /**
-     * Getter for the "JvmRTInputArgsCount" variable.
-     */
-    public Integer getJvmRTInputArgsCount() throws SnmpStatusException {
-
-        final String[] args = getInputArguments(JvmContextFactory.
-                                                getUserData());
-        return args.length;
-    }
-
-    /**
-     * Getter for the "JvmRTBootClassPathSupport" variable.
-     */
-    public EnumJvmRTBootClassPathSupport getJvmRTBootClassPathSupport()
-        throws SnmpStatusException {
-        if(getRuntimeMXBean().isBootClassPathSupported())
-            return JvmRTBootClassPathSupportSupported;
-        else
-            return JvmRTBootClassPathSupportUnSupported;
-    }
-
-    /**
-     * Getter for the "JvmRTUptimeMs" variable.
-     */
-    public Long getJvmRTUptimeMs() throws SnmpStatusException {
-        return getRuntimeMXBean().getUptime();
-    }
-
-    /**
-     * Getter for the "JvmRTStartTimeMs" variable.
-     */
-    public Long getJvmRTStartTimeMs() throws SnmpStatusException {
-        return getRuntimeMXBean().getStartTime();
-    }
-
-    /**
-     * Getter for the "JvmRTSpecVersion" variable.
-     */
-    public String getJvmRTSpecVersion() throws SnmpStatusException {
-        return validDisplayStringTC(getRuntimeMXBean().getSpecVersion());
-    }
-
-    /**
-     * Getter for the "JvmRTName" variable.
-     */
-    public String getJvmRTName() throws SnmpStatusException {
-        return validDisplayStringTC(getRuntimeMXBean().getName());
-    }
-
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvminstr/JvmRuntimeMetaImpl.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,175 +0,0 @@
-/*
- * Copyright (c) 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package sun.management.snmp.jvminstr;
-
-// java imports
-//
-import java.io.Serializable;
-
-// jmx imports
-//
-import javax.management.MBeanServer;
-import com.sun.jmx.snmp.SnmpCounter;
-import com.sun.jmx.snmp.SnmpCounter64;
-import com.sun.jmx.snmp.SnmpGauge;
-import com.sun.jmx.snmp.SnmpInt;
-import com.sun.jmx.snmp.SnmpUnsignedInt;
-import com.sun.jmx.snmp.SnmpIpAddress;
-import com.sun.jmx.snmp.SnmpTimeticks;
-import com.sun.jmx.snmp.SnmpOpaque;
-import com.sun.jmx.snmp.SnmpString;
-import com.sun.jmx.snmp.SnmpStringFixed;
-import com.sun.jmx.snmp.SnmpOid;
-import com.sun.jmx.snmp.SnmpNull;
-import com.sun.jmx.snmp.SnmpValue;
-import com.sun.jmx.snmp.SnmpVarBind;
-import com.sun.jmx.snmp.SnmpStatusException;
-
-// jdmk imports
-//
-import com.sun.jmx.snmp.agent.SnmpMib;
-import com.sun.jmx.snmp.agent.SnmpMibGroup;
-import com.sun.jmx.snmp.agent.SnmpStandardObjectServer;
-import com.sun.jmx.snmp.agent.SnmpStandardMetaServer;
-import com.sun.jmx.snmp.agent.SnmpMibSubRequest;
-import com.sun.jmx.snmp.agent.SnmpMibTable;
-import com.sun.jmx.snmp.EnumRowStatus;
-
-import sun.management.snmp.jvmmib.JvmRuntimeMeta;
-import sun.management.snmp.jvmmib.JvmRTInputArgsTableMeta;
-import sun.management.snmp.jvmmib.JvmRTClassPathTableMeta;
-import sun.management.snmp.jvmmib.JvmRTBootClassPathTableMeta;
-import sun.management.snmp.jvmmib.JvmRTLibraryPathTableMeta;
-
-/**
- * The class is used for representing SNMP metadata for the "JvmRuntime" group.
- */
-public class JvmRuntimeMetaImpl extends JvmRuntimeMeta {
-
-     static final long serialVersionUID = -6570428414857608618L;
-    /**
-     * Constructor for the metadata associated to "JvmRuntime".
-     */
-    public JvmRuntimeMetaImpl(SnmpMib myMib,
-                              SnmpStandardObjectServer objserv) {
-        super(myMib, objserv);
-    }
-
-    /**
-     * Factory method for "JvmRTInputArgsTable" table metadata class.
-     *
-     * You can redefine this method if you need to replace the default
-     * generated metadata class with your own customized class.
-     *
-     * @param tableName Name of the table object ("JvmRTInputArgsTable")
-     * @param groupName Name of the group to which this table belong
-     *        ("JvmRuntime")
-     * @param mib The SnmpMib object in which this table is registered
-     * @param server MBeanServer for this table entries (may be null)
-     *
-     * @return An instance of the metadata class generated for the
-     *         "JvmRTInputArgsTable" table (JvmRTInputArgsTableMeta)
-     *
-     **/
-    protected JvmRTInputArgsTableMeta
-        createJvmRTInputArgsTableMetaNode(String tableName, String groupName,
-                                          SnmpMib mib, MBeanServer server)  {
-        return new JvmRTInputArgsTableMetaImpl(mib, objectserver);
-    }
-
-    /**
-     * Factory method for "JvmRTLibraryPathTable" table metadata class.
-     *
-     * You can redefine this method if you need to replace the default
-     * generated metadata class with your own customized class.
-     *
-     * @param tableName Name of the table object ("JvmRTLibraryPathTable")
-     * @param groupName Name of the group to which this table belong
-     *        ("JvmRuntime")
-     * @param mib The SnmpMib object in which this table is registered
-     * @param server MBeanServer for this table entries (may be null)
-     *
-     * @return An instance of the metadata class generated for the
-     *         "JvmRTLibraryPathTable" table (JvmRTLibraryPathTableMeta)
-     *
-     **/
-    protected JvmRTLibraryPathTableMeta
-        createJvmRTLibraryPathTableMetaNode(String tableName,
-                                            String groupName,
-                                            SnmpMib mib,
-                                            MBeanServer server)  {
-        return new JvmRTLibraryPathTableMetaImpl(mib, objectserver);
-    }
-
-
-    /**
-     * Factory method for "JvmRTClassPathTable" table metadata class.
-     *
-     * You can redefine this method if you need to replace the default
-     * generated metadata class with your own customized class.
-     *
-     * @param tableName Name of the table object ("JvmRTClassPathTable")
-     * @param groupName Name of the group to which this table belong
-     *        ("JvmRuntime")
-     * @param mib The SnmpMib object in which this table is registered
-     * @param server MBeanServer for this table entries (may be null)
-     *
-     * @return An instance of the metadata class generated for the
-     *         "JvmRTClassPathTable" table (JvmRTClassPathTableMeta)
-     *
-     **/
-    protected JvmRTClassPathTableMeta
-        createJvmRTClassPathTableMetaNode(String tableName, String groupName,
-                                          SnmpMib mib, MBeanServer server)  {
-        return new JvmRTClassPathTableMetaImpl(mib, objectserver);
-    }
-
-
-    /**
-     * Factory method for "JvmRTBootClassPathTable" table metadata class.
-     *
-     * You can redefine this method if you need to replace the default
-     * generated metadata class with your own customized class.
-     *
-     * @param tableName Name of the table object ("JvmRTBootClassPathTable")
-     * @param groupName Name of the group to which this table belong
-     *        ("JvmRuntime")
-     * @param mib The SnmpMib object in which this table is registered
-     * @param server MBeanServer for this table entries (may be null)
-     *
-     * @return An instance of the metadata class generated for the
-     *         "JvmRTBootClassPathTable" table (JvmRTBootClassPathTableMeta)
-     *
-     **/
-    protected JvmRTBootClassPathTableMeta
-        createJvmRTBootClassPathTableMetaNode(String tableName,
-                                              String groupName,
-                                              SnmpMib mib,
-                                              MBeanServer server)  {
-        return new JvmRTBootClassPathTableMetaImpl(mib, objectserver);
-    }
-
-
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvminstr/JvmThreadInstanceEntryImpl.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,330 +0,0 @@
-/*
- * Copyright (c) 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package sun.management.snmp.jvminstr;
-
-// java imports
-//
-import java.io.Serializable;
-import java.lang.management.ThreadInfo;
-import java.lang.management.ManagementFactory;
-import java.lang.management.ThreadMXBean;
-
-// jmx imports
-//
-import com.sun.jmx.snmp.SnmpStatusException;
-
-// jdmk imports
-//
-import com.sun.jmx.snmp.agent.SnmpMib;
-import com.sun.jmx.snmp.SnmpOid;
-import com.sun.jmx.snmp.SnmpDefinitions;
-import com.sun.jmx.snmp.SnmpOidTable;
-import com.sun.jmx.snmp.SnmpOidRecord;
-
-import sun.management.snmp.jvmmib.JvmThreadInstanceEntryMBean;
-import sun.management.snmp.jvmmib.JVM_MANAGEMENT_MIBOidTable;
-import sun.management.snmp.util.MibLogger;
-
-/**
- * The class is used for implementing the "JvmThreadInstanceEntry" group.
- */
-public class JvmThreadInstanceEntryImpl
-    implements JvmThreadInstanceEntryMBean, Serializable {
-
-    static final long serialVersionUID = 910173589985461347L;
-
-    public final static class ThreadStateMap {
-        public final static class Byte0 {
-            public final static byte inNative     = (byte)0x80; // bit 1
-            public final static byte suspended    = (byte)0x40; // bit 2
-            public final static byte newThread    = (byte)0x20; // bit 3
-            public final static byte runnable     = (byte)0x10; // bit 4
-            public final static byte blocked      = (byte)0x08; // bit 5
-            public final static byte terminated   = (byte)0x04; // bit 6
-            public final static byte waiting      = (byte)0x02; // bit 7
-            public final static byte timedWaiting = (byte)0x01; // bit 8
-        }
-        public final static class Byte1 {
-            public final static byte other        = (byte)0x80; // bit 9
-            public final static byte reserved10   = (byte)0x40; // bit 10
-            public final static byte reserved11   = (byte)0x20; // bit 11
-            public final static byte reserved12   = (byte)0x10; // bit 12
-            public final static byte reserved13   = (byte)0x08; // bit 13
-            public final static byte reserved14   = (byte)0x04; // bit 14
-            public final static byte reserved15   = (byte)0x02; // bit 15
-            public final static byte reserved16   = (byte)0x01; // bit 16
-        }
-
-        public final static byte mask0 = (byte)0x3F;
-        public final static byte mask1 = (byte)0x80;
-
-        private static void setBit(byte[] bitmap, int index, byte state) {
-            bitmap[index] = (byte) (bitmap[index] | state);
-        }
-        public static void setNative(byte[] bitmap) {
-            setBit(bitmap,0,Byte0.inNative);
-        }
-        public static void setSuspended(byte[] bitmap) {
-            setBit(bitmap,0,Byte0.suspended);
-        }
-        public static void setState(byte[] bitmap, Thread.State state) {
-            switch(state) {
-            case BLOCKED:
-                setBit(bitmap,0,Byte0.blocked);
-                return;
-            case NEW:
-                setBit(bitmap,0,Byte0.newThread);
-                return;
-            case RUNNABLE:
-                setBit(bitmap,0,Byte0.runnable);
-                return;
-            case TERMINATED:
-                setBit(bitmap,0,Byte0.terminated);
-                return;
-            case TIMED_WAITING:
-                setBit(bitmap,0,Byte0.timedWaiting);
-                return;
-            case WAITING:
-                setBit(bitmap,0,Byte0.waiting);
-                return;
-            }
-        }
-
-        public static void checkOther(byte[] bitmap) {
-            if (((bitmap[0]&mask0)==(byte)0x00) &&
-                ((bitmap[1]&mask1)==(byte)0x00))
-                setBit(bitmap,1,Byte1.other);
-        }
-
-        public static Byte[] getState(ThreadInfo info) {
-            byte[] bitmap = new byte[] {(byte)0x00, (byte)0x00};
-            try {
-                final Thread.State state = info.getThreadState();
-                final boolean inNative  = info.isInNative();
-                final boolean suspended = info.isSuspended();
-                log.debug("getJvmThreadInstState",
-                          "[State=" + state +
-                          ",isInNative=" + inNative +
-                          ",isSuspended=" + suspended + "]");
-                setState(bitmap,state);
-                if (inNative)  setNative(bitmap);
-                if (suspended) setSuspended(bitmap);
-                checkOther(bitmap);
-            } catch (RuntimeException r) {
-                bitmap[0]=(byte)0x00;
-                bitmap[1]=Byte1.other;
-                log.trace("getJvmThreadInstState",
-                          "Unexpected exception: " + r);
-                log.debug("getJvmThreadInstState",r);
-            }
-            Byte[] result = {bitmap[0], bitmap[1]};
-            return result;
-        }
-    }
-
-    private final ThreadInfo info;
-    private final Byte[] index;
-
-    /**
-     * Constructor for the "JvmThreadInstanceEntry" group.
-     */
-    public JvmThreadInstanceEntryImpl(ThreadInfo info,
-                                      Byte[] index) {
-        this.info = info;
-        this.index = index;
-    }
-
-
-    private static String  jvmThreadInstIndexOid = null;
-    public static String getJvmThreadInstIndexOid()
-        throws SnmpStatusException {
-        if (jvmThreadInstIndexOid == null) {
-            final SnmpOidTable  table = new JVM_MANAGEMENT_MIBOidTable();
-            final SnmpOidRecord record =
-                table.resolveVarName("jvmThreadInstIndex");
-            jvmThreadInstIndexOid = record.getOid();
-        }
-        return jvmThreadInstIndexOid;
-    }
-
-
-
-    /**
-     * Getter for the "JvmThreadInstLockedOwnerId" variable.
-     */
-    public String getJvmThreadInstLockOwnerPtr() throws SnmpStatusException {
-       long id = info.getLockOwnerId();
-
-       if(id == -1)
-           return new String("0.0");
-
-       SnmpOid oid = JvmThreadInstanceTableMetaImpl.makeOid(id);
-
-       return getJvmThreadInstIndexOid() + "." + oid.toString();
-    }
-
-    private String validDisplayStringTC(String str) {
-        return JVM_MANAGEMENT_MIB_IMPL.validDisplayStringTC(str);
-    }
-
-    private String validJavaObjectNameTC(String str) {
-        return JVM_MANAGEMENT_MIB_IMPL.validJavaObjectNameTC(str);
-    }
-
-    private String validPathElementTC(String str) {
-        return JVM_MANAGEMENT_MIB_IMPL.validPathElementTC(str);
-    }
-
-    /**
-     * Getter for the "JvmThreadInstLockName" variable.
-     */
-    public String getJvmThreadInstLockName() throws SnmpStatusException {
-        return validJavaObjectNameTC(info.getLockName());
-    }
-
-    /**
-     * Getter for the "JvmThreadInstName" variable.
-     */
-    public String getJvmThreadInstName() throws SnmpStatusException {
-        return validJavaObjectNameTC(info.getThreadName());
-    }
-
-    /**
-     * Getter for the "JvmThreadInstCpuTimeNs" variable.
-     */
-    public Long getJvmThreadInstCpuTimeNs() throws SnmpStatusException {
-        long l = 0;
-        final ThreadMXBean tmb = JvmThreadingImpl.getThreadMXBean();
-
-        try {
-            if (tmb.isThreadCpuTimeSupported()) {
-                l = tmb.getThreadCpuTime(info.getThreadId());
-                log.debug("getJvmThreadInstCpuTimeNs", "Cpu time ns : " + l);
-
-                //Cpu time measurement is disabled or the id is not valid.
-                if(l == -1) l = 0;
-            }
-        } catch (UnsatisfiedLinkError e) {
-            // XXX Revisit: catch TO BE EVENTUALLY REMOVED
-            log.debug("getJvmThreadInstCpuTimeNs",
-                      "Operation not supported: " + e);
-        }
-        return l;
-    }
-
-    /**
-     * Getter for the "JvmThreadInstBlockTimeMs" variable.
-     */
-    public Long getJvmThreadInstBlockTimeMs() throws SnmpStatusException {
-        long l = 0;
-
-        final ThreadMXBean tmb = JvmThreadingImpl.getThreadMXBean();
-
-        if (tmb.isThreadContentionMonitoringSupported()) {
-            l = info.getBlockedTime();
-
-            //Monitoring is disabled
-            if(l == -1) l = 0;
-        }
-        return l;
-    }
-
-    /**
-     * Getter for the "JvmThreadInstBlockCount" variable.
-     */
-    public Long getJvmThreadInstBlockCount() throws SnmpStatusException {
-        return info.getBlockedCount();
-    }
-
-    /**
-     * Getter for the "JvmThreadInstWaitTimeMs" variable.
-     */
-    public Long getJvmThreadInstWaitTimeMs() throws SnmpStatusException {
-        long l = 0;
-
-        final ThreadMXBean tmb = JvmThreadingImpl.getThreadMXBean();
-
-        if (tmb.isThreadContentionMonitoringSupported()) {
-            l = info.getWaitedTime();
-
-            //Monitoring is disabled
-            if(l == -1) l = 0;
-        }
-        return l;
-    }
-
-    /**
-     * Getter for the "JvmThreadInstWaitCount" variable.
-     */
-    public Long getJvmThreadInstWaitCount() throws SnmpStatusException {
-        return info.getWaitedCount();
-    }
-
-    /**
-     * Getter for the "JvmThreadInstState" variable.
-     */
-    public Byte[] getJvmThreadInstState()
-        throws SnmpStatusException {
-        return ThreadStateMap.getState(info);
-    }
-
-    /**
-     * Getter for the "JvmThreadInstId" variable.
-     */
-    public Long getJvmThreadInstId() throws SnmpStatusException {
-        return info.getThreadId();
-    }
-
-    /**
-     * Getter for the "JvmThreadInstIndex" variable.
-     */
-    public Byte[] getJvmThreadInstIndex() throws SnmpStatusException {
-        return index;
-    }
-
-    /**
-     * Getter for the "JvmThreadInstStackTrace" variable.
-     */
-    private String getJvmThreadInstStackTrace() throws SnmpStatusException {
-        StackTraceElement[] stackTrace = info.getStackTrace();
-        //We append the stack trace in a buffer
-        // XXX Revisit: should check isDebugOn()
-        StringBuilder sb = new StringBuilder();
-        final int stackSize = stackTrace.length;
-        log.debug("getJvmThreadInstStackTrace", "Stack size : " + stackSize);
-        for(int i = 0; i < stackSize; i++) {
-            log.debug("getJvmThreadInstStackTrace", "Append " +
-                      stackTrace[i].toString());
-            sb.append(stackTrace[i].toString());
-            //Append \n at the end of each line except the last one
-            if(i < stackSize)
-                sb.append("\n");
-        }
-        //The stack trace is truncated if its size exceeds 255.
-        return validPathElementTC(sb.toString());
-    }
-    static final MibLogger log =
-        new MibLogger(JvmThreadInstanceEntryImpl.class);
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvminstr/JvmThreadInstanceTableMetaImpl.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,404 +0,0 @@
-/*
- * Copyright (c) 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package sun.management.snmp.jvminstr;
-
-// java imports
-//
-import com.sun.jmx.mbeanserver.Util;
-import java.io.Serializable;
-import java.util.Vector;
-import java.util.Map;
-import java.util.TreeMap;
-import java.util.Enumeration;
-
-import java.lang.management.ThreadInfo;
-import java.lang.management.ManagementFactory;
-
-// jmx imports
-//
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-import com.sun.jmx.snmp.SnmpCounter;
-import com.sun.jmx.snmp.SnmpCounter64;
-import com.sun.jmx.snmp.SnmpGauge;
-import com.sun.jmx.snmp.SnmpInt;
-import com.sun.jmx.snmp.SnmpUnsignedInt;
-import com.sun.jmx.snmp.SnmpIpAddress;
-import com.sun.jmx.snmp.SnmpTimeticks;
-import com.sun.jmx.snmp.SnmpOpaque;
-import com.sun.jmx.snmp.SnmpString;
-import com.sun.jmx.snmp.SnmpStringFixed;
-import com.sun.jmx.snmp.SnmpOid;
-import com.sun.jmx.snmp.SnmpNull;
-import com.sun.jmx.snmp.SnmpValue;
-import com.sun.jmx.snmp.SnmpVarBind;
-import com.sun.jmx.snmp.SnmpStatusException;
-
-// jdmk imports
-//
-import com.sun.jmx.snmp.agent.SnmpIndex;
-import com.sun.jmx.snmp.agent.SnmpMib;
-import com.sun.jmx.snmp.agent.SnmpMibTable;
-import com.sun.jmx.snmp.agent.SnmpMibSubRequest;
-import com.sun.jmx.snmp.agent.SnmpStandardObjectServer;
-
-import sun.management.snmp.jvmmib.JvmThreadInstanceEntryMBean;
-import sun.management.snmp.jvmmib.JvmThreadInstanceTableMeta;
-import sun.management.snmp.util.SnmpTableCache;
-import sun.management.snmp.util.SnmpCachedData;
-import sun.management.snmp.util.SnmpTableHandler;
-import sun.management.snmp.util.MibLogger;
-import sun.management.snmp.util.JvmContextFactory;
-
-/**
- * The class is used for implementing the "JvmThreadInstanceTable" group.
- */
-public class JvmThreadInstanceTableMetaImpl
-    extends JvmThreadInstanceTableMeta {
-
-    static final long serialVersionUID = -8432271929226397492L;
-
-    /**
-     * Maximum depth of the stacktrace that might be returned through
-     * SNMP.
-     *
-     * Since we do not export the stack trace through SNMP, we set
-     * MAX_STACK_TRACE_DEPTH=0 so that ThreadMXBean.getThreadInfo(long) does
-     * not compute the stack trace.
-     *
-     **/
-    public static final int MAX_STACK_TRACE_DEPTH=0;
-
-    /**
-     * Translate from a long to a Oid. Arc follow the long big-endian order.
-     * @param l The long to make the index from
-     * @return The arc array.
-     */
-    static SnmpOid makeOid(long l) {
-        long[] x =  new long [8];
-        x[0] = (l >> 56) & 0xFF;
-        x[1] =  (l >> 48) & 0x00FF;
-        x[2] =  (l >> 40) & 0x0000FF;
-        x[3] =  (l >> 32) & 0x000000FF;
-        x[4] =  (l >> 24) & 0x00000000FF;
-        x[5] =  (l >> 16) & 0x0000000000FF;
-        x[6] =  (l >> 8)  & 0x000000000000FF;
-        x[7] =  l         & 0x00000000000000FF;
-        return new SnmpOid(x);
-    }
-
-    /**
-     * Translate an Oid to a thread id. Arc follow the long big-endian order.
-     * @param oid The oid to make the id from
-     * @return The thread id.
-     */
-    static long makeId(SnmpOid oid) {
-        long id = 0;
-        long[] arcs = oid.longValue(false);
-
-        id |= arcs[0] << 56;
-        id |= arcs[1] << 48;
-        id |= arcs[2] << 40;
-        id |= arcs[3] << 32;
-        id |= arcs[4] << 24;
-        id |= arcs[5] << 16;
-        id |= arcs[6] << 8;
-        id |= arcs[7];
-
-        return id;
-    }
-
-    /**
-     * A concrete implementation of {@link SnmpTableCache}, for the
-     * JvmThreadInstanceTable.
-     **/
-    private static class JvmThreadInstanceTableCache
-        extends SnmpTableCache {
-
-        static final long serialVersionUID = 4947330124563406878L;
-        final private JvmThreadInstanceTableMetaImpl meta;
-
-        /**
-         * Create a weak cache for the JvmThreadInstanceTable.
-         * @param validity validity of the cached data, in ms.
-         **/
-        JvmThreadInstanceTableCache(JvmThreadInstanceTableMetaImpl meta,
-                                   long validity) {
-            this.validity = validity;
-            this.meta     = meta;
-        }
-
-        /**
-         * Call <code>getTableDatas(JvmContextFactory.getUserData())</code>.
-         **/
-        public SnmpTableHandler getTableHandler() {
-            final Map<Object, Object> userData = JvmContextFactory.getUserData();
-            return getTableDatas(userData);
-        }
-
-        /**
-         * Return a table handler containing the Thread indexes.
-         * Indexes are computed from the ThreadId.
-         **/
-        protected SnmpCachedData updateCachedDatas(Object userData) {
-
-            // We are getting all the thread ids. WARNING.
-            // Some of them will be not valid when accessed for data...
-            // See getEntry
-            long[] id = JvmThreadingImpl.getThreadMXBean().getAllThreadIds();
-
-
-            // Time stamp for the cache
-            final long time = System.currentTimeMillis();
-
-            SnmpOid indexes[] = new SnmpOid[id.length];
-            final TreeMap<SnmpOid, Object> table =
-                    new TreeMap<>(SnmpCachedData.oidComparator);
-            for(int i = 0; i < id.length; i++) {
-                log.debug("", "Making index for thread id [" + id[i] +"]");
-                //indexes[i] = makeOid(id[i]);
-                SnmpOid oid = makeOid(id[i]);
-                table.put(oid, oid);
-            }
-
-            return new SnmpCachedData(time, table);
-        }
-
-    }
-
-
-    // The weak cache for this table.
-    protected SnmpTableCache cache;
-
-    /**
-     * Constructor for the table. Initialize metadata for
-     * "JvmThreadInstanceTableMeta".
-     * The reference on the MBean server is updated so the entries created
-     * through an SNMP SET will be AUTOMATICALLY REGISTERED in Java DMK.
-     */
-    public JvmThreadInstanceTableMetaImpl(SnmpMib myMib,
-                                          SnmpStandardObjectServer objserv) {
-        super(myMib, objserv);
-        cache = new JvmThreadInstanceTableCache(this,
-                            ((JVM_MANAGEMENT_MIB_IMPL)myMib).validity());
-        log.debug("JvmThreadInstanceTableMetaImpl", "Create Thread meta");
-    }
-
-    // See com.sun.jmx.snmp.agent.SnmpMibTable
-    protected SnmpOid getNextOid(Object userData)
-        throws SnmpStatusException {
-        log.debug("JvmThreadInstanceTableMetaImpl", "getNextOid");
-        // null means get the first OID.
-        return getNextOid(null,userData);
-    }
-
-    // See com.sun.jmx.snmp.agent.SnmpMibTable
-    protected SnmpOid getNextOid(SnmpOid oid, Object userData)
-        throws SnmpStatusException {
-        log.debug("getNextOid", "previous=" + oid);
-
-
-        // Get the data handler.
-        //
-        SnmpTableHandler handler = getHandler(userData);
-        if (handler == null) {
-            // This should never happen.
-            // If we get here it's a bug.
-            //
-            log.debug("getNextOid", "handler is null!");
-            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-        }
-
-        // Get the next oid
-        //
-        SnmpOid next = oid;
-        while(true) {
-            next = handler.getNext(next);
-            if (next == null) break;
-            if (getJvmThreadInstance(userData,next) != null) break;
-        }
-
-        log.debug("*** **** **** **** getNextOid", "next=" + next);
-
-        // if next is null: we reached the end of the table.
-        //
-        if (next == null)
-            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-
-        return next;
-    }
-
-    // See com.sun.jmx.snmp.agent.SnmpMibTable
-    protected boolean contains(SnmpOid oid, Object userData) {
-
-        // Get the handler.
-        //
-        SnmpTableHandler handler = getHandler(userData);
-
-        // handler should never be null.
-        //
-        if (handler == null)
-            return false;
-        if(!handler.contains(oid))
-            return false;
-
-        JvmThreadInstanceEntryImpl inst = getJvmThreadInstance(userData, oid);
-        return (inst != null);
-    }
-
-
-    // See com.sun.jmx.snmp.agent.SnmpMibTable
-    public Object getEntry(SnmpOid oid)
-        throws SnmpStatusException {
-        log.debug("*** **** **** **** getEntry", "oid [" + oid + "]");
-        if (oid == null || oid.getLength() != 8) {
-            log.debug("getEntry", "Invalid oid [" + oid + "]");
-            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-        }
-
-        // Get the request contextual cache (userData).
-        //
-        final Map<Object,Object> m = JvmContextFactory.getUserData();
-
-        // Get the handler.
-        //
-        SnmpTableHandler handler = getHandler(m);
-
-        // handler should never be null.
-        //
-        if (handler == null || !handler.contains(oid))
-            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-
-        final JvmThreadInstanceEntryImpl entry = getJvmThreadInstance(m,oid);
-
-        if (entry == null)
-            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-
-        return entry;
-    }
-
-    /**
-     * Get the SnmpTableHandler that holds the jvmThreadInstanceTable data.
-     * First look it up in the request contextual cache, and if it is
-     * not found, obtain it from the weak cache.
-     * <br>The request contextual cache will be released at the end of the
-     * current requests, and is used only to process this request.
-     * <br>The weak cache is shared by all requests, and is only
-     * recomputed when it is found to be obsolete.
-     * <br>Note that the data put in the request contextual cache is
-     *     never considered to be obsolete, in order to preserve data
-     *     coherency.
-     **/
-    protected SnmpTableHandler getHandler(Object userData) {
-        final Map<Object, Object> m;
-        if (userData instanceof Map) m=Util.cast(userData);
-        else m=null;
-
-        // Look in the contextual cache.
-        if (m != null) {
-            final SnmpTableHandler handler =
-                (SnmpTableHandler)m.get("JvmThreadInstanceTable.handler");
-            if (handler != null) return handler;
-        }
-
-        // No handler in contextual cache, make a new one.
-        final SnmpTableHandler handler = cache.getTableHandler();
-
-        if (m != null && handler != null )
-            m.put("JvmThreadInstanceTable.handler",handler);
-
-        return handler;
-    }
-
-    private ThreadInfo getThreadInfo(long id) {
-        return JvmThreadingImpl.getThreadMXBean().
-                  getThreadInfo(id,MAX_STACK_TRACE_DEPTH);
-    }
-
-    private ThreadInfo getThreadInfo(SnmpOid oid) {
-        return getThreadInfo(makeId(oid));
-    }
-
-    private JvmThreadInstanceEntryImpl getJvmThreadInstance(Object userData,
-                                                            SnmpOid oid) {
-        JvmThreadInstanceEntryImpl cached = null;
-        String entryTag = null;
-        Map<Object, Object> map = null;
-        final boolean dbg = log.isDebugOn();
-
-        if (userData instanceof Map) {
-            map = Util.cast(userData);
-
-            // We're going to use this name to store/retrieve the entry in
-            // the request contextual cache.
-            //
-            // Revisit: Probably better programming to put all these strings
-            //          in some interface.
-            //
-            entryTag = "JvmThreadInstanceTable.entry." + oid.toString();
-
-            cached = (JvmThreadInstanceEntryImpl) map.get(entryTag);
-        }
-
-        // If the entry is in the cache, simply return it.
-        //
-        if (cached != null) {
-            if (dbg) log.debug("*** getJvmThreadInstance",
-                               "Entry found in cache: " + entryTag);
-            return cached;
-        }
-
-        if (dbg) log.debug("*** getJvmThreadInstance", "Entry [" +
-                           oid + "] is not in cache");
-
-        // Entry not in cache. We will create one if needed.
-        //
-        ThreadInfo info = null;
-        try {
-            info = getThreadInfo(oid);
-        } catch (RuntimeException r) {
-            log.trace("*** getJvmThreadInstance",
-                      "Failed to get thread info for rowOid: " + oid);
-            log.debug("*** getJvmThreadInstance",r);
-        }
-
-        // No thread by that id => no entry.
-        //
-        if(info == null) {
-            if (dbg) log.debug("*** getJvmThreadInstance",
-                               "No entry by that oid [" + oid + "]");
-            return null;
-        }
-
-        cached = new JvmThreadInstanceEntryImpl(info, oid.toByte());
-        if (map != null) map.put(entryTag, cached);
-        if (dbg) log.debug("*** getJvmThreadInstance",
-                           "Entry created for Thread OID [" + oid + "]");
-        return cached;
-    }
-
-     static final MibLogger log =
-        new MibLogger(JvmThreadInstanceTableMetaImpl.class);
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvminstr/JvmThreadingImpl.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,364 +0,0 @@
-/*
- * Copyright (c) 2003, 2004, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package sun.management.snmp.jvminstr;
-
-// java imports
-//
-import java.io.Serializable;
-
-import java.lang.management.ThreadMXBean;
-import java.lang.management.ManagementFactory;
-
-// jmx imports
-//
-import javax.management.MBeanServer;
-import com.sun.jmx.snmp.SnmpString;
-import com.sun.jmx.snmp.SnmpStatusException;
-
-// jdmk imports
-//
-import com.sun.jmx.snmp.agent.SnmpMib;
-import com.sun.jmx.snmp.SnmpDefinitions;
-
-import sun.management.snmp.jvmmib.JvmThreadingMBean;
-import sun.management.snmp.jvmmib.EnumJvmThreadCpuTimeMonitoring;
-import sun.management.snmp.jvmmib.EnumJvmThreadContentionMonitoring;
-import sun.management.snmp.util.MibLogger;
-
-/**
- * The class is used for implementing the "JvmThreading" group.
- */
-public class JvmThreadingImpl implements JvmThreadingMBean {
-
-    /**
-     * Variable for storing the value of "JvmThreadCpuTimeMonitoring".
-     *
-     * "The state of the Thread CPU Time Monitoring feature.
-     * This feature can be:
-     *
-     * unsupported: The JVM does not support Thread CPU Time Monitoring.
-     * enabled    : The JVM supports Thread CPU Time Monitoring, and it
-     * is enabled.
-     * disabled   : The JVM supports Thread CPU Time Monitoring, and it
-     * is disabled.
-     *
-     * Only enabled(3) and disabled(4) may be supplied as values to a
-     * SET request. unsupported(1) can only be set internally by the
-     * agent.
-     *
-     * See java.lang.management.ThreadMXBean.isThreadCpuTimeSupported(),
-     * java.lang.management.ThreadMXBean.isThreadCpuTimeEnabled(),
-     * java.lang.management.ThreadMXBean.setThreadCpuTimeEnabled()
-     * "
-     *
-     */
-    final static EnumJvmThreadCpuTimeMonitoring
-        JvmThreadCpuTimeMonitoringUnsupported =
-        new EnumJvmThreadCpuTimeMonitoring("unsupported");
-    final static EnumJvmThreadCpuTimeMonitoring
-        JvmThreadCpuTimeMonitoringEnabled =
-        new EnumJvmThreadCpuTimeMonitoring("enabled");
-    final static EnumJvmThreadCpuTimeMonitoring
-        JvmThreadCpuTimeMonitoringDisabled =
-        new EnumJvmThreadCpuTimeMonitoring("disabled");
-
-
-    /**
-     * Variable for storing the value of "JvmThreadContentionMonitoring".
-     *
-     * "The state of the Thread Contention Monitoring feature.
-     * This feature can be:
-     *
-     * unsupported: The JVM does not support Thread Contention Monitoring.
-     * enabled    : The JVM supports Thread Contention Monitoring, and it
-     * is enabled.
-     * disabled   : The JVM supports Thread Contention Monitoring, and it
-     * is disabled.
-     *
-     * Only enabled(3) and disabled(4) may be supplied as values to a
-     * SET request. unsupported(1) can only be set internally by the
-     * agent.
-     *
-     * See java.lang.management.ThreadMXBean.isThreadContentionMonitoringSupported(),
-     * java.lang.management.ThreadMXBean.isThreadContentionMonitoringEnabled(),
-     * java.lang.management.ThreadMXBean.setThreadContentionMonitoringEnabled()
-     * "
-     *
-     */
-    static final EnumJvmThreadContentionMonitoring
-        JvmThreadContentionMonitoringUnsupported =
-        new EnumJvmThreadContentionMonitoring("unsupported");
-    static final EnumJvmThreadContentionMonitoring
-        JvmThreadContentionMonitoringEnabled =
-        new EnumJvmThreadContentionMonitoring("enabled");
-    static final EnumJvmThreadContentionMonitoring
-        JvmThreadContentionMonitoringDisabled =
-        new EnumJvmThreadContentionMonitoring("disabled");
-
-    /**
-     * Constructor for the "JvmThreading" group.
-     * If the group contains a table, the entries created through an SNMP SET
-     * will not be registered in Java DMK.
-     */
-    public JvmThreadingImpl(SnmpMib myMib) {
-        log.debug("JvmThreadingImpl","Constructor");
-    }
-
-
-    /**
-     * Constructor for the "JvmThreading" group.
-     * If the group contains a table, the entries created through an SNMP SET
-     * will be AUTOMATICALLY REGISTERED in Java DMK.
-     */
-    public JvmThreadingImpl(SnmpMib myMib, MBeanServer server) {
-        log.debug("JvmThreadingImpl","Constructor with server");
-    }
-
-    /**
-     * ThreadMXBean accessor. It is acquired from the
-     * java.lang.management.ManagementFactory
-     * @return The local ThreadMXBean.
-     */
-    static ThreadMXBean getThreadMXBean() {
-        return ManagementFactory.getThreadMXBean();
-    }
-
-    /**
-     * Getter for the "JvmThreadCpuTimeMonitoring" variable.
-     */
-    public EnumJvmThreadCpuTimeMonitoring getJvmThreadCpuTimeMonitoring()
-        throws SnmpStatusException {
-
-        ThreadMXBean mbean = getThreadMXBean();
-
-        if(!mbean.isThreadCpuTimeSupported()) {
-            log.debug("getJvmThreadCpuTimeMonitoring",
-                      "Unsupported ThreadCpuTimeMonitoring");
-            return JvmThreadCpuTimeMonitoringUnsupported;
-        }
-
-        try {
-            if(mbean.isThreadCpuTimeEnabled()) {
-                log.debug("getJvmThreadCpuTimeMonitoring",
-                      "Enabled ThreadCpuTimeMonitoring");
-                return JvmThreadCpuTimeMonitoringEnabled;
-            } else {
-                log.debug("getJvmThreadCpuTimeMonitoring",
-                          "Disabled ThreadCpuTimeMonitoring");
-                return JvmThreadCpuTimeMonitoringDisabled;
-            }
-        }catch(UnsupportedOperationException e) {
-            log.debug("getJvmThreadCpuTimeMonitoring",
-                      "Newly unsupported ThreadCpuTimeMonitoring");
-
-            return JvmThreadCpuTimeMonitoringUnsupported;
-        }
-    }
-
-    /**
-     * Setter for the "JvmThreadCpuTimeMonitoring" variable.
-     */
-    public void setJvmThreadCpuTimeMonitoring(EnumJvmThreadCpuTimeMonitoring x)
-        throws SnmpStatusException {
-
-        ThreadMXBean mbean = getThreadMXBean();
-
-        // We can trust the received value, it has been checked in
-        // checkJvmThreadCpuTimeMonitoring
-        if(JvmThreadCpuTimeMonitoringEnabled.intValue() == x.intValue())
-            mbean.setThreadCpuTimeEnabled(true);
-        else
-            mbean.setThreadCpuTimeEnabled(false);
-    }
-
-    /**
-     * Checker for the "JvmThreadCpuTimeMonitoring" variable.
-     */
-    public void checkJvmThreadCpuTimeMonitoring(EnumJvmThreadCpuTimeMonitoring
-                                                x)
-        throws SnmpStatusException {
-
-        //Can't be set externaly to unsupported state.
-        if(JvmThreadCpuTimeMonitoringUnsupported.intValue() == x.intValue()) {
-             log.debug("checkJvmThreadCpuTimeMonitoring",
-                      "Try to set to illegal unsupported value");
-            throw new SnmpStatusException(SnmpDefinitions.snmpRspWrongValue);
-        }
-
-        if ((JvmThreadCpuTimeMonitoringEnabled.intValue() == x.intValue()) ||
-            (JvmThreadCpuTimeMonitoringDisabled.intValue() == x.intValue())) {
-
-            // The value is a valid value. But is the feature supported?
-            ThreadMXBean mbean = getThreadMXBean();
-            if(mbean.isThreadCpuTimeSupported()) return;
-
-            // Not supported.
-            log.debug("checkJvmThreadCpuTimeMonitoring",
-                      "Unsupported operation, can't set state");
-            throw new
-                SnmpStatusException(SnmpDefinitions.snmpRspInconsistentValue);
-        }
-
-        // Unknown value.
-        log.debug("checkJvmThreadCpuTimeMonitoring",
-                  "unknown enum value ");
-        throw new SnmpStatusException(SnmpDefinitions.snmpRspWrongValue);
-    }
-
-    /**
-     * Getter for the "JvmThreadContentionMonitoring" variable.
-     */
-    public EnumJvmThreadContentionMonitoring getJvmThreadContentionMonitoring()
-        throws SnmpStatusException {
-
-        ThreadMXBean mbean = getThreadMXBean();
-
-        if(!mbean.isThreadContentionMonitoringSupported()) {
-            log.debug("getJvmThreadContentionMonitoring",
-                      "Unsupported ThreadContentionMonitoring");
-            return JvmThreadContentionMonitoringUnsupported;
-        }
-
-        if(mbean.isThreadContentionMonitoringEnabled()) {
-            log.debug("getJvmThreadContentionMonitoring",
-                      "Enabled ThreadContentionMonitoring");
-            return JvmThreadContentionMonitoringEnabled;
-        } else {
-            log.debug("getJvmThreadContentionMonitoring",
-                      "Disabled ThreadContentionMonitoring");
-            return JvmThreadContentionMonitoringDisabled;
-        }
-    }
-
-    /**
-     * Setter for the "JvmThreadContentionMonitoring" variable.
-     */
-    public void setJvmThreadContentionMonitoring(
-                            EnumJvmThreadContentionMonitoring x)
-        throws SnmpStatusException {
-        ThreadMXBean mbean = getThreadMXBean();
-
-        // We can trust the received value, it has been checked in
-        // checkJvmThreadContentionMonitoring
-        if(JvmThreadContentionMonitoringEnabled.intValue() == x.intValue())
-            mbean.setThreadContentionMonitoringEnabled(true);
-        else
-            mbean.setThreadContentionMonitoringEnabled(false);
-    }
-
-    /**
-     * Checker for the "JvmThreadContentionMonitoring" variable.
-     */
-    public void checkJvmThreadContentionMonitoring(
-                              EnumJvmThreadContentionMonitoring x)
-        throws SnmpStatusException {
-        //Can't be set externaly to unsupported state.
-        if(JvmThreadContentionMonitoringUnsupported.intValue()==x.intValue()) {
-            log.debug("checkJvmThreadContentionMonitoring",
-                      "Try to set to illegal unsupported value");
-            throw new SnmpStatusException(SnmpDefinitions.snmpRspWrongValue);
-        }
-
-        if ((JvmThreadContentionMonitoringEnabled.intValue()==x.intValue()) ||
-            (JvmThreadContentionMonitoringDisabled.intValue()==x.intValue())) {
-
-            // The value is valid, but is the feature supported ?
-            ThreadMXBean mbean = getThreadMXBean();
-            if(mbean.isThreadContentionMonitoringSupported()) return;
-
-            log.debug("checkJvmThreadContentionMonitoring",
-                      "Unsupported operation, can't set state");
-            throw new
-                SnmpStatusException(SnmpDefinitions.snmpRspInconsistentValue);
-        }
-
-        log.debug("checkJvmThreadContentionMonitoring",
-                  "Try to set to unknown value");
-        throw new SnmpStatusException(SnmpDefinitions.snmpRspWrongValue);
-    }
-
-    /**
-     * Getter for the "JvmThreadTotalStartedCount" variable.
-     */
-    public Long getJvmThreadTotalStartedCount() throws SnmpStatusException {
-        return getThreadMXBean().getTotalStartedThreadCount();
-    }
-
-    /**
-     * Getter for the "JvmThreadPeakCount" variable.
-     */
-    public Long getJvmThreadPeakCount() throws SnmpStatusException {
-        return (long)getThreadMXBean().getPeakThreadCount();
-    }
-
-    /**
-     * Getter for the "JvmThreadDaemonCount" variable.
-     */
-    public Long getJvmThreadDaemonCount() throws SnmpStatusException {
-        return (long)getThreadMXBean().getDaemonThreadCount();
-    }
-
-    /**
-     * Getter for the "JvmThreadCount" variable.
-     */
-    public Long getJvmThreadCount() throws SnmpStatusException {
-        return (long)getThreadMXBean().getThreadCount();
-    }
-
-   /**
-     * Getter for the "JvmThreadPeakCountReset" variable.
-     */
-    public synchronized Long getJvmThreadPeakCountReset()
-        throws SnmpStatusException {
-        return jvmThreadPeakCountReset;
-    }
-
-    /**
-     * Setter for the "JvmThreadPeakCountReset" variable.
-     */
-    public synchronized void setJvmThreadPeakCountReset(Long x)
-        throws SnmpStatusException {
-        final long l = x.longValue();
-        if (l > jvmThreadPeakCountReset) {
-            final long stamp = System.currentTimeMillis();
-            getThreadMXBean().resetPeakThreadCount();
-            jvmThreadPeakCountReset = stamp;
-            log.debug("setJvmThreadPeakCountReset",
-                      "jvmThreadPeakCountReset="+stamp);
-        }
-    }
-
-    /**
-     * Checker for the "JvmThreadPeakCountReset" variable.
-     */
-    public void checkJvmThreadPeakCountReset(Long x)
-        throws SnmpStatusException {
-    }
-
-    /* Last time thread peak count was reset */
-    private long jvmThreadPeakCountReset=0;
-
-    static final MibLogger log = new MibLogger(JvmThreadingImpl.class);
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvminstr/JvmThreadingMetaImpl.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,102 +0,0 @@
-/*
- * Copyright (c) 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package sun.management.snmp.jvminstr;
-
-// java imports
-//
-import java.io.Serializable;
-
-// jmx imports
-//
-import javax.management.MBeanServer;
-import com.sun.jmx.snmp.SnmpCounter;
-import com.sun.jmx.snmp.SnmpCounter64;
-import com.sun.jmx.snmp.SnmpGauge;
-import com.sun.jmx.snmp.SnmpInt;
-import com.sun.jmx.snmp.SnmpUnsignedInt;
-import com.sun.jmx.snmp.SnmpIpAddress;
-import com.sun.jmx.snmp.SnmpTimeticks;
-import com.sun.jmx.snmp.SnmpOpaque;
-import com.sun.jmx.snmp.SnmpString;
-import com.sun.jmx.snmp.SnmpStringFixed;
-import com.sun.jmx.snmp.SnmpOid;
-import com.sun.jmx.snmp.SnmpNull;
-import com.sun.jmx.snmp.SnmpValue;
-import com.sun.jmx.snmp.SnmpVarBind;
-import com.sun.jmx.snmp.SnmpStatusException;
-
-// jdmk imports
-//
-import com.sun.jmx.snmp.agent.SnmpMib;
-import com.sun.jmx.snmp.agent.SnmpMibGroup;
-import com.sun.jmx.snmp.agent.SnmpStandardObjectServer;
-import com.sun.jmx.snmp.agent.SnmpStandardMetaServer;
-import com.sun.jmx.snmp.agent.SnmpMibSubRequest;
-import com.sun.jmx.snmp.agent.SnmpMibTable;
-import com.sun.jmx.snmp.EnumRowStatus;
-
-import sun.management.snmp.jvmmib.JvmThreadingMeta;
-import sun.management.snmp.jvmmib.JvmThreadInstanceTableMeta;
-
-/**
- * The class is used for representing SNMP metadata for the "JvmThreading"
- * group.
- */
-public class JvmThreadingMetaImpl extends JvmThreadingMeta {
-
-    static final long serialVersionUID = -2104788458393251457L;
-
-    /**
-     * Constructor for the metadata associated to "JvmThreading".
-     */
-    public JvmThreadingMetaImpl(SnmpMib myMib,
-                                SnmpStandardObjectServer objserv) {
-        super(myMib, objserv);
-    }
-
-    /**
-     * Factory method for "JvmThreadInstanceTable" table metadata class.
-     *
-     * You can redefine this method if you need to replace the default
-     * generated metadata class with your own customized class.
-     *
-     * @param tableName Name of the table object ("JvmThreadInstanceTable")
-     * @param groupName Name of the group to which this table belong
-     *        ("JvmThreading")
-     * @param mib The SnmpMib object in which this table is registered
-     * @param server MBeanServer for this table entries (may be null)
-     *
-     * @return An instance of the metadata class generated for the
-     *         "JvmThreadInstanceTable" table (JvmThreadInstanceTableMeta)
-     *
-     **/
-    protected JvmThreadInstanceTableMeta
-        createJvmThreadInstanceTableMetaNode(String tableName,
-                                             String groupName,
-                                             SnmpMib mib,
-                                             MBeanServer server)  {
-        return new JvmThreadInstanceTableMetaImpl(mib, objectserver);
-    }
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvminstr/NotificationTarget.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-/*
- * Copyright (c) 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package sun.management.snmp.jvminstr;
-
-import java.net.InetAddress;
-
-/**
- * Target notification.
- */
-public interface NotificationTarget {
-    public InetAddress getAddress();
-    public int getPort();
-    public String getCommunity();
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvminstr/NotificationTargetImpl.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,131 +0,0 @@
-/*
- * Copyright (c) 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package sun.management.snmp.jvminstr;
-
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-
-/**
- * Notification Target data.
- */
-public class NotificationTargetImpl implements NotificationTarget {
-    private InetAddress address;
-    private int port;
-    private String community;
-
-    /**
-     * Target parameter is a <CODE>java.lang.String</CODE>
-     * target synctax is <host>:<port>:community. Eg: "localhost:163:private".
-     * <p>The <code><em>host</em></code> is a host name, an IPv4 numeric
-     * host address, or an IPv6 numeric address enclosed in square
-     * brackets.</p>
-     * @throws IllegalArgumentException In case the target is malformed
-     */
-    public NotificationTargetImpl(String target)
-        throws IllegalArgumentException, UnknownHostException  {
-        parseTarget(target);
-    }
-
-    public NotificationTargetImpl(String address, int port,
-                                  String community)
-        throws UnknownHostException {
-        this(InetAddress.getByName(address),port,community);
-    }
-
-    public NotificationTargetImpl(InetAddress address, int port,
-                                  String community) {
-        this.address = address;
-        this.port = port;
-        this.community = community;
-    }
-
-    private void parseTarget(String target)
-        throws IllegalArgumentException, UnknownHostException {
-
-        if(target == null ||
-           target.length() == 0) throw new
-               IllegalArgumentException("Invalid target [" + target + "]");
-
-        String addrStr;
-        if (target.startsWith("[")) {
-            final int index = target.indexOf(']');
-            final int index2 = target.lastIndexOf(':');
-            if(index == -1)
-                throw new IllegalArgumentException("Host starts with [ but " +
-                                                   "does not end with ]");
-            addrStr = target.substring(1, index);
-            port = Integer.parseInt(target.substring(index + 2,
-                                                     index2));
-            if (!isNumericIPv6Address(addrStr)) {
-            throw new IllegalArgumentException("Address inside [...] must " +
-                                               "be numeric IPv6 address");
-            }
-            if (addrStr.startsWith("["))
-                throw new IllegalArgumentException("More than one [[...]]");
-        } else {
-            final int index = target.indexOf(':');
-            final int index2 = target.lastIndexOf(':');
-            if(index == -1) throw new
-                IllegalArgumentException("Missing port separator \":\"");
-            addrStr = target.substring(0, index);
-
-            port = Integer.parseInt(target.substring(index + 1,
-                                                     index2));
-        }
-
-        address = InetAddress.getByName(addrStr);
-
-        //THE CHECK SHOULD BE STRONGER!!!
-        final int index = target.lastIndexOf(':');
-
-        community = target.substring(index + 1, target.length());
-
-    }
-
-    /* True if this string, assumed to be a valid argument to
-     * InetAddress.getByName, is a numeric IPv6 address.
-     */
-    private static boolean isNumericIPv6Address(String s) {
-        // address contains colon iff it's a numeric IPv6 address
-        return (s.indexOf(':') >= 0);
-    }
-
-    public String getCommunity() {
-        return community;
-    }
-
-    public InetAddress getAddress() {
-        return address;
-    }
-
-    public int getPort() {
-        return port;
-    }
-
-    public String toString() {
-        return "address : " + address + " port : " + port +
-            " community : " + community;
-    }
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvminstr/README	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,244 +0,0 @@
-#==============================================================================
-#          JVM Management MIB - Instrumentation Classes
-#==============================================================================
-
-In this directory:
-------------------
-
-README:              this file
-commands.env:        a file containing some ksh variables & functions
-                     that I have used to generate & compile all the 
-                     stuff. Probably only valid in my own environment.
-logging.properties:  logging.properties file that can be used to obtain
-                     trace information.
-*.java:              utility and custom classes for the JVM Management MIB.
-                     These classes show how to provide instrumentation for
-                     a mibgen generated MIB, how to simulate virtual tables,
-		     and how to make use of the SnmpUserDataFactory.
-		     Only the jvmMemory group and its tables are instrumented.
-
-Dependency
-----------
-
-    jvmManagementMib.txt : the JVM Management MIB module in compilable form.
-    Tiger SNMP Runtime   : SNMP Runtime classes for Tiger. We assume these
-                           classes could be part of the JMX delivery
-                           (classes in com.sun.jmx.snmp.*)
-    JDMK 5.1 : The jdmktk.jar contains the com.sun.jdmk.tools.MibGen class
-               used to compile the MIB. JDMK also has a mibgen.sh script
-               to start mibgen. By default mibgen generates code that can
-               integrate with JDMK SNMP runtime. In order to generate
-               code that integrate with Tiger SNMP runtime, you need to
-	       start mibgen with a non-default resource file. 
-               JDMK 5.1 workspace contains a mibgen resource file
-               specific for tiger: mibgen.property.tiger 
-    Custom Instrumentation Code: the files in this directory.
-
-How to proceed:
----------------
-
-Get mibgen from JDMK 5.1. Start mibgen with mibgen resource file for
-tiger (add -Dcom.sun.jdmk.tools.mibgen.config.file=<mibgen.properties.tiger>)
-on the Java command line.
-
-Use mibgen to generate code for the jvmManagementMib.txt file. Note that
-the custom classes provided in this directory are all in the 
-sun.management.snmp.jvminstr package, and expect the generated classes to
-be in another sun.management.snmp.jvmmib package (use mibgen option 
--tp sun.management.snmp.jvmmib)
-
-If this package name does not suit you, simply change it to something else,
-both in the custom classes below (you might use 'sed' or do it manually) 
-and in the -tp option that you will pass to mibgen.
-
-It is recommended to generate all classes in a different directory (if
-you read command.env you will see that I have put the custom classes
-in a "custom" directory, and the generated classes in a "parsed" 
-directory. This makes it easier to cleanup the mib. You can safely
-do a rm -rf <parsed> and call mibgen again.
-
-Then compile the generated classes - you will need JMX and Tiger SNMP
-runtime classes in your classpath - if you compile with a tiger build that
-already have them then you don't need to specify anything special.
-
-Then make your classpath point to the compiled generated classes, and
-compile the custom code in this directory.
-
-Then you can use the SnmpDaemonTest class to start a JVM with the
-intsrumented MIB, and you can use e.g. the easymanager contrib of
-JDMK to view the MIB through SNMP. 
-
-#==============================================================================
-#  Classes Details
-#==============================================================================
-
-Utility Classes developped for the JVM Management MIB:
-------------------------------------------------------
-JvmContextFactory.java        : The context factory allocates a Map that
-                                serves as request contextual cache.
-                                Values obtained from JSR 163 API can be
-                                cached in this object.
-                                A request contextual cache is allocated
-                                each time a request is being processed,
-                                and is released at the end of processing.
-				Object: 1) preserve atomicity
-                                        2) minimize API calls
-					3) ensure consistency of the
-					   various pieces of data returned.
-
-MibLogger.java                : Send traces to java.util.logging
-
-SnmpTableHandler.java         : an interface used to access table data.
-
-SnmpCachedData.java           : This object can be use to cache a snapshot
-                                of the data contained in a table. 
-
-SnmpTableCache.java           : A weak cache for table data. The data is
-                                computed on demand and cached in a 
-                                weakreference. Makes it possible to specify
-                                a validity period for the cache data.
-
-SnmpListTableCache.java       : Extends SnmpTableCache - for tables whose
-                                data is returned in a List object.
-
-SnmpNamedListTableCache.java  : Extends SnmpListTableCache - for tables whose
-                                elements can be named by a unique string.
-
-SnmpDaemonTest.java           : A dummy standalone SNMP agent that registers
-                                the JVM Managemnt MIB in Tiger's SNMP
-                                adaptor.  This is the "main". Note that
-                                this not the class that will be used to
-			        start the adaptor in the final Tiger - it is
-                                just a dummy test main.
-
-JVM Management MIB
-------------------
-
-JVM_MANAGEMENT_MIB_IMPL.java  : subclasses the generated JVM_MANAGEMENT_MIB
-                                class. 
-				Object: overriding factory method in order
-                                        to instantiate custom code instead
-				        of generated code.
-
-
-JVM Memory Group
-----------------
-
-JvmMemoryImpl.java            : Provides instrumentation for the jvmMemory
-                                group. Replaces the generated JvmMemory class,
-                                which is not used and can be thrown away.
-                                Implements the generated JvmMemoryMBean 
-                                interface (which was also implemented by
-                                the generated JvmMemory skeleton class)
-                                Use  the request contextual cache
-				in order to ensure consistency when
-				returning MemoryUsage datas. Note that all
-                                tables in this group have been implemented
-                                as virtual tables. As a consequence, the
-                                generated TableJvmMemXXXXXTable.java classes
-                                are not needed.
-
-JvmMemoryMetaImpl.java        : Custom MetaData class for the jvmMemory group.
-			        Subclasses the generated JvmMemoryMeta class.
-                                Object: overrides the factory methods in order
-                                        to instantiate custom meta data classes
-                                        for the jvmMemManagerTable,
-						jvmMemGCTable,
-						jvmMemPoolTable,
-						jvmMemMgrPoolRelTable.
-
-JVM Memory Manager Table
-------------------------
-
-JvmMemManagerTableMetaImpl.java : Custom MetaData class for the 
-                                  jvmMemManagerTable. This MetaData traps
-				  all the SNMP Runtime calls made to the 
-                                  table - in order to make the Memory Manager
-				  table virtual: i.e. the table does not have
-				  to be maintained permanently in memory.
-				  Instead, the table is computed "on demand",
-                                  and the data is cached in a weak cache
-                                  (see SnmpNamedListTableCache) which remains
-				  valid for a few ms. If the data is found
-				  to be obsolete, or was garbage collected,
-				  the table is recomputed.
-
-JvmMemManagerEntryImpl.java     : Custom Entry class for jvmMemManagerTable.
-				  Entries are created on the fly when it
-				  becomes necessary to get data from a 
-				  Memory Managers. They are temporary objects
-				  that wrap the MemoryManager just for the
-			          call duration - and are released just after. 
-
-JVM Memory GC Table
--------------------
-
-JvmMemGCTableMetaImpl.java     : Custom MetaData class for the 
-                                 jvmMemGCTable. This MetaData traps
-				 all the SNMP Runtime calls made to the 
-                                 table - in order to make the GC
-				 table virtual: the GC table reuses the
-			         cached data computed for the 
-                                 jvmMemManagerTable - simply acting as a 
-                                 filter that only shows those elements that
-                                 are instance of GarbageCollectorMetrics. 
-                                 In other words it implements a fitered view
-                                 of the jvmMemManagerTable.
-
-JvmMemGCEntryImpl.java         : Provide access to the data specific to
-				 GarbageCollectorMetrics objects. Objects
-				 of this classes are created on the fly,
-				 when data needs to be returned from a 
-				 GarbageCollectorMetrics object, and are
-                                 released just after. They are not kept in
-				 memory.
-
-JVM Memory Pool Table
----------------------
-
-JvmMemPoolTableMetaImpl.java   : Custom MetaData class for the jvmMemPoolTable.
-			         This is quite similar to what was done for
-                                 the jvmMemManagerTable in 
-                                 JvmMemManagerTableMetaImpl. Most of the code
-                                 here was obtain by cut&paste-ing from
-                                 JvmMemManagerTableMetaImpl and replacing
-                                 "Manager" with "Pool".
-
-JvmMemPoolEntryImpl.java       : Provide access to the data specific to
-				 MemoryPoolMetrics objects. Objects
-				 of this classes are created on the fly,
-				 when data needs to be returned from a 
-				 MemoryPoolMetrics object, and are
-                                 released just after. They are not kept in
-				 memory. Use  the request contextual cache
-				 in order to ensure consistency when
-				 returning MemoryUsage datas. 
-
-JVM Memory Manager / Memory Pool Relation  Table
-------------------------------------------------
-
-
-JvmMemMgrPoolRelTableMetaImpl.java : Custom MetaData class for the 
-                                 jvmMemMgrPoolRelTable. This meta data
-			         uses the JvmMemManagerTableMetaImpl and
-                                 JvmMemPoolTableMetaImpl in order to 
-                                 find out the content of the 
-			         jvmMemManagerTable and the mapping between 
-				 Memory Pool Name and Memory Pool Index.
-				 For each element of the jvmMemManagerTable
-                                 it calls the JSR 163 APIs to find the
-				 related Memory Pool, then finds out their
-				 index, and then creates the corresponding
-				 row in the jvmMemMgrPoolRelTable cached data.
-				 Like all the other tables, this table is
-				 virtual: the data is kept on a weak cache
-				 and recomputed on demand, if its validity
-				 as expired or if it has been gc'ed.
-
-JvmMemMgrPoolRelEntryImpl.java : A simple couple MemoryManager/MemoryPool.
-                                 Models a row in the jvmMemMgrPoolRelTable.
-				 Objects of this type are cached in the
-				 jvmMemMgrPoolRelTable cached data.
-
-#==============================================================================
-#==============================================================================
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvminstr/package.html	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-  <head>
-<!--
- 
- Copyright (c) 2003, 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
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
-
--->
-  </head>
-
-  <body>
-    Instrumented Classes for JSR 163 MIB. These are the classes that
-    tie the SNMP Runtime with the JSR 163 Management API.
-    <p><b>This API is a Sun Microsystems internal API  and is subject 
-          to change without notice.</b></p>
-  </body>
-</html>
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/EnumJvmClassesVerboseLevel.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,82 +0,0 @@
-/*
- * Copyright (c) 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.management.snmp.jvmmib;
-
-//
-// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB.
-//
-
-// java imports
-//
-import java.io.Serializable;
-import java.util.Hashtable;
-
-// RI imports
-//
-import com.sun.jmx.snmp.Enumerated;
-
-/**
- * The class is used for representing "JvmClassesVerboseLevel".
- */
-public class EnumJvmClassesVerboseLevel extends Enumerated implements Serializable {
-
-    static final long serialVersionUID = -620710366914810374L;
-    protected static Hashtable<Integer, String> intTable =
-            new Hashtable<>();
-    protected static Hashtable<String, Integer> stringTable =
-            new Hashtable<>();
-    static  {
-        intTable.put(2, "verbose");
-        intTable.put(1, "silent");
-        stringTable.put("verbose", 2);
-        stringTable.put("silent", 1);
-    }
-
-    public EnumJvmClassesVerboseLevel(int valueIndex) throws IllegalArgumentException {
-        super(valueIndex);
-    }
-
-    public EnumJvmClassesVerboseLevel(Integer valueIndex) throws IllegalArgumentException {
-        super(valueIndex);
-    }
-
-    public EnumJvmClassesVerboseLevel() throws IllegalArgumentException {
-        super();
-    }
-
-    public EnumJvmClassesVerboseLevel(String x) throws IllegalArgumentException {
-        super(x);
-    }
-
-    protected Hashtable<Integer,String> getIntTable() {
-        return intTable ;
-    }
-
-    protected Hashtable<String,Integer> getStringTable() {
-        return stringTable ;
-    }
-
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/EnumJvmJITCompilerTimeMonitoring.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,82 +0,0 @@
-/*
- * Copyright (c) 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.management.snmp.jvmmib;
-
-//
-// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB.
-//
-
-// java imports
-//
-import java.io.Serializable;
-import java.util.Hashtable;
-
-// RI imports
-//
-import com.sun.jmx.snmp.Enumerated;
-
-/**
- * The class is used for representing "JvmJITCompilerTimeMonitoring".
- */
-public class EnumJvmJITCompilerTimeMonitoring extends Enumerated implements Serializable {
-
-    static final long serialVersionUID = 3953565918146461236L;
-    protected static Hashtable<Integer, String> intTable =
-            new Hashtable<>();
-    protected static Hashtable<String, Integer> stringTable =
-            new Hashtable<>();
-    static  {
-        intTable.put(2, "supported");
-        intTable.put(1, "unsupported");
-        stringTable.put("supported", 2);
-        stringTable.put("unsupported", 1);
-    }
-
-    public EnumJvmJITCompilerTimeMonitoring(int valueIndex) throws IllegalArgumentException {
-        super(valueIndex);
-    }
-
-    public EnumJvmJITCompilerTimeMonitoring(Integer valueIndex) throws IllegalArgumentException {
-        super(valueIndex);
-    }
-
-    public EnumJvmJITCompilerTimeMonitoring() throws IllegalArgumentException {
-        super();
-    }
-
-    public EnumJvmJITCompilerTimeMonitoring(String x) throws IllegalArgumentException {
-        super(x);
-    }
-
-    protected Hashtable<Integer, String> getIntTable() {
-        return intTable ;
-    }
-
-    protected Hashtable<String, Integer> getStringTable() {
-        return stringTable ;
-    }
-
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/EnumJvmMemManagerState.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,83 +0,0 @@
-/*
- * Copyright (c) 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.management.snmp.jvmmib;
-
-//
-// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB.
-//
-
-// java imports
-//
-import java.io.Serializable;
-import java.util.Hashtable;
-
-// RI imports
-//
-import com.sun.jmx.snmp.Enumerated;
-
-/**
- * The class is used for representing "JvmMemManagerState".
- */
-public class EnumJvmMemManagerState extends Enumerated implements Serializable {
-
-    static final long serialVersionUID = 8249515157795166343L;
-
-    protected static Hashtable<Integer, String> intTable =
-            new Hashtable<>();
-    protected static Hashtable<String, Integer> stringTable =
-            new Hashtable<>();
-    static  {
-        intTable.put(2, "valid");
-        intTable.put(1, "invalid");
-        stringTable.put("valid", 2);
-        stringTable.put("invalid", 1);
-    }
-
-    public EnumJvmMemManagerState(int valueIndex) throws IllegalArgumentException {
-        super(valueIndex);
-    }
-
-    public EnumJvmMemManagerState(Integer valueIndex) throws IllegalArgumentException {
-        super(valueIndex);
-    }
-
-    public EnumJvmMemManagerState() throws IllegalArgumentException {
-        super();
-    }
-
-    public EnumJvmMemManagerState(String x) throws IllegalArgumentException {
-        super(x);
-    }
-
-    protected Hashtable<Integer, String> getIntTable() {
-        return intTable ;
-    }
-
-    protected Hashtable<String, Integer> getStringTable() {
-        return stringTable ;
-    }
-
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/EnumJvmMemPoolCollectThreshdSupport.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,82 +0,0 @@
-/*
- * Copyright (c) 2004, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.management.snmp.jvmmib;
-
-//
-// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB.
-//
-
-// java imports
-//
-import java.io.Serializable;
-import java.util.Hashtable;
-
-// RI imports
-//
-import com.sun.jmx.snmp.Enumerated;
-
-/**
- * The class is used for representing "JvmMemPoolCollectThreshdSupport".
- */
-public class EnumJvmMemPoolCollectThreshdSupport extends Enumerated implements Serializable {
-
-    static final long serialVersionUID = 8610091819732806282L;
-    protected static Hashtable<Integer, String> intTable =
-            new Hashtable<>();
-    protected static Hashtable<String, Integer> stringTable =
-            new Hashtable<>();
-    static  {
-        intTable.put(2, "supported");
-        intTable.put(1, "unsupported");
-        stringTable.put("supported", 2);
-        stringTable.put("unsupported", 1);
-    }
-
-    public EnumJvmMemPoolCollectThreshdSupport(int valueIndex) throws IllegalArgumentException {
-        super(valueIndex);
-    }
-
-    public EnumJvmMemPoolCollectThreshdSupport(Integer valueIndex) throws IllegalArgumentException {
-        super(valueIndex);
-    }
-
-    public EnumJvmMemPoolCollectThreshdSupport() throws IllegalArgumentException {
-        super();
-    }
-
-    public EnumJvmMemPoolCollectThreshdSupport(String x) throws IllegalArgumentException {
-        super(x);
-    }
-
-    protected Hashtable<Integer, String> getIntTable() {
-        return intTable ;
-    }
-
-    protected Hashtable<String, Integer> getStringTable() {
-        return stringTable ;
-    }
-
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/EnumJvmMemPoolState.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,82 +0,0 @@
-/*
- * Copyright (c) 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.management.snmp.jvmmib;
-
-//
-// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB.
-//
-
-// java imports
-//
-import java.io.Serializable;
-import java.util.Hashtable;
-
-// RI imports
-//
-import com.sun.jmx.snmp.Enumerated;
-
-/**
- * The class is used for representing "JvmMemPoolState".
- */
-public class EnumJvmMemPoolState extends Enumerated implements Serializable {
-
-    static final long serialVersionUID = 3038175407527743027L;
-    protected static Hashtable<Integer, String> intTable =
-            new Hashtable<>();
-    protected static Hashtable<String, Integer> stringTable =
-            new Hashtable<>();
-    static  {
-        intTable.put(2, "valid");
-        intTable.put(1, "invalid");
-        stringTable.put("valid", 2);
-        stringTable.put("invalid", 1);
-    }
-
-    public EnumJvmMemPoolState(int valueIndex) throws IllegalArgumentException {
-        super(valueIndex);
-    }
-
-    public EnumJvmMemPoolState(Integer valueIndex) throws IllegalArgumentException {
-        super(valueIndex);
-    }
-
-    public EnumJvmMemPoolState() throws IllegalArgumentException {
-        super();
-    }
-
-    public EnumJvmMemPoolState(String x) throws IllegalArgumentException {
-        super(x);
-    }
-
-    protected Hashtable<Integer,String> getIntTable() {
-        return intTable ;
-    }
-
-    protected Hashtable<String,Integer> getStringTable() {
-        return stringTable ;
-    }
-
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/EnumJvmMemPoolThreshdSupport.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,82 +0,0 @@
-/*
- * Copyright (c) 2004, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.management.snmp.jvmmib;
-
-//
-// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB.
-//
-
-// java imports
-//
-import java.io.Serializable;
-import java.util.Hashtable;
-
-// RI imports
-//
-import com.sun.jmx.snmp.Enumerated;
-
-/**
- * The class is used for representing "JvmMemPoolThreshdSupport".
- */
-public class EnumJvmMemPoolThreshdSupport extends Enumerated implements Serializable {
-
-    static final long serialVersionUID = 7014693561120661029L;
-    protected static Hashtable<Integer, String> intTable =
-            new Hashtable<>();
-    protected static Hashtable<String, Integer> stringTable =
-            new Hashtable<>();
-    static  {
-        intTable.put(2, "supported");
-        intTable.put(1, "unsupported");
-        stringTable.put("supported", 2);
-        stringTable.put("unsupported", 1);
-    }
-
-    public EnumJvmMemPoolThreshdSupport(int valueIndex) throws IllegalArgumentException {
-        super(valueIndex);
-    }
-
-    public EnumJvmMemPoolThreshdSupport(Integer valueIndex) throws IllegalArgumentException {
-        super(valueIndex);
-    }
-
-    public EnumJvmMemPoolThreshdSupport() throws IllegalArgumentException {
-        super();
-    }
-
-    public EnumJvmMemPoolThreshdSupport(String x) throws IllegalArgumentException {
-        super(x);
-    }
-
-    protected Hashtable<Integer,String> getIntTable() {
-        return intTable ;
-    }
-
-    protected Hashtable<String,Integer> getStringTable() {
-        return stringTable ;
-    }
-
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/EnumJvmMemPoolType.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,82 +0,0 @@
-/*
- * Copyright (c) 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.management.snmp.jvmmib;
-
-//
-// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB.
-//
-
-// java imports
-//
-import java.io.Serializable;
-import java.util.Hashtable;
-
-// RI imports
-//
-import com.sun.jmx.snmp.Enumerated;
-
-/**
- * The class is used for representing "JvmMemPoolType".
- */
-public class EnumJvmMemPoolType extends Enumerated implements Serializable {
-
-    static final long serialVersionUID = -7214498472962396555L;
-    protected static Hashtable<Integer, String> intTable =
-            new Hashtable<>();
-    protected static Hashtable<String, Integer> stringTable =
-            new Hashtable<>();
-    static  {
-        intTable.put(2, "heap");
-        intTable.put(1, "nonheap");
-        stringTable.put("heap", 2);
-        stringTable.put("nonheap", 1);
-    }
-
-    public EnumJvmMemPoolType(int valueIndex) throws IllegalArgumentException {
-        super(valueIndex);
-    }
-
-    public EnumJvmMemPoolType(Integer valueIndex) throws IllegalArgumentException {
-        super(valueIndex);
-    }
-
-    public EnumJvmMemPoolType() throws IllegalArgumentException {
-        super();
-    }
-
-    public EnumJvmMemPoolType(String x) throws IllegalArgumentException {
-        super(x);
-    }
-
-    protected Hashtable<Integer,String> getIntTable() {
-        return intTable ;
-    }
-
-    protected Hashtable<String,Integer> getStringTable() {
-        return stringTable ;
-    }
-
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/EnumJvmMemoryGCCall.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,88 +0,0 @@
-/*
- * Copyright (c) 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.management.snmp.jvmmib;
-
-//
-// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB.
-//
-
-// java imports
-//
-import java.io.Serializable;
-import java.util.Hashtable;
-
-// RI imports
-//
-import com.sun.jmx.snmp.Enumerated;
-
-/**
- * The class is used for representing "JvmMemoryGCCall".
- */
-public class EnumJvmMemoryGCCall extends Enumerated implements Serializable {
-
-    static final long serialVersionUID = -2869147994287351375L;
-    protected static Hashtable<Integer, String> intTable =
-            new Hashtable<>();
-    protected static Hashtable<String, Integer> stringTable =
-            new Hashtable<>();
-    static  {
-        intTable.put(2, "supported");
-        intTable.put(5, "failed");
-        intTable.put(4, "started");
-        intTable.put(1, "unsupported");
-        intTable.put(3, "start");
-        stringTable.put("supported", 2);
-        stringTable.put("failed", 5);
-        stringTable.put("started", 4);
-        stringTable.put("unsupported", 1);
-        stringTable.put("start", 3);
-    }
-
-    public EnumJvmMemoryGCCall(int valueIndex) throws IllegalArgumentException {
-        super(valueIndex);
-    }
-
-    public EnumJvmMemoryGCCall(Integer valueIndex) throws IllegalArgumentException {
-        super(valueIndex);
-    }
-
-    public EnumJvmMemoryGCCall() throws IllegalArgumentException {
-        super();
-    }
-
-    public EnumJvmMemoryGCCall(String x) throws IllegalArgumentException {
-        super(x);
-    }
-
-    protected Hashtable<Integer, String> getIntTable() {
-        return intTable ;
-    }
-
-    protected Hashtable<String, Integer> getStringTable() {
-        return stringTable ;
-    }
-
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/EnumJvmMemoryGCVerboseLevel.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,82 +0,0 @@
-/*
- * Copyright (c) 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.management.snmp.jvmmib;
-
-//
-// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB.
-//
-
-// java imports
-//
-import java.io.Serializable;
-import java.util.Hashtable;
-
-// RI imports
-//
-import com.sun.jmx.snmp.Enumerated;
-
-/**
- * The class is used for representing "JvmMemoryGCVerboseLevel".
- */
-public class EnumJvmMemoryGCVerboseLevel extends Enumerated implements Serializable {
-
-    static final long serialVersionUID = 1362427628755978190L;
-    protected static Hashtable<Integer, String> intTable =
-            new Hashtable<>();
-    protected static Hashtable<String, Integer> stringTable =
-            new Hashtable<>();
-    static  {
-        intTable.put(2, "verbose");
-        intTable.put(1, "silent");
-        stringTable.put("verbose", 2);
-        stringTable.put("silent", 1);
-    }
-
-    public EnumJvmMemoryGCVerboseLevel(int valueIndex) throws IllegalArgumentException {
-        super(valueIndex);
-    }
-
-    public EnumJvmMemoryGCVerboseLevel(Integer valueIndex) throws IllegalArgumentException {
-        super(valueIndex);
-    }
-
-    public EnumJvmMemoryGCVerboseLevel() throws IllegalArgumentException {
-        super();
-    }
-
-    public EnumJvmMemoryGCVerboseLevel(String x) throws IllegalArgumentException {
-        super(x);
-    }
-
-    protected Hashtable<Integer,String> getIntTable() {
-        return intTable ;
-    }
-
-    protected Hashtable<String,Integer> getStringTable() {
-        return stringTable ;
-    }
-
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/EnumJvmRTBootClassPathSupport.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,82 +0,0 @@
-/*
- * Copyright (c) 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.management.snmp.jvmmib;
-
-//
-// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB.
-//
-
-// java imports
-//
-import java.io.Serializable;
-import java.util.Hashtable;
-
-// RI imports
-//
-import com.sun.jmx.snmp.Enumerated;
-
-/**
- * The class is used for representing "JvmRTBootClassPathSupport".
- */
-public class EnumJvmRTBootClassPathSupport extends Enumerated implements Serializable {
-
-    static final long serialVersionUID = -5957542680437939894L;
-    protected static Hashtable<Integer, String> intTable =
-            new Hashtable<>();
-    protected static Hashtable<String, Integer> stringTable =
-            new Hashtable<>();
-    static  {
-        intTable.put(2, "supported");
-        intTable.put(1, "unsupported");
-        stringTable.put("supported", 2);
-        stringTable.put("unsupported", 1);
-    }
-
-    public EnumJvmRTBootClassPathSupport(int valueIndex) throws IllegalArgumentException {
-        super(valueIndex);
-    }
-
-    public EnumJvmRTBootClassPathSupport(Integer valueIndex) throws IllegalArgumentException {
-        super(valueIndex);
-    }
-
-    public EnumJvmRTBootClassPathSupport() throws IllegalArgumentException {
-        super();
-    }
-
-    public EnumJvmRTBootClassPathSupport(String x) throws IllegalArgumentException {
-        super(x);
-    }
-
-    protected Hashtable<Integer, String> getIntTable() {
-        return intTable ;
-    }
-
-    protected Hashtable<String, Integer> getStringTable() {
-        return stringTable ;
-    }
-
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/EnumJvmThreadContentionMonitoring.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,84 +0,0 @@
-/*
- * Copyright (c) 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.management.snmp.jvmmib;
-
-//
-// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB.
-//
-
-// java imports
-//
-import java.io.Serializable;
-import java.util.Hashtable;
-
-// RI imports
-//
-import com.sun.jmx.snmp.Enumerated;
-
-/**
- * The class is used for representing "JvmThreadContentionMonitoring".
- */
-public class EnumJvmThreadContentionMonitoring extends Enumerated implements Serializable {
-
-    static final long serialVersionUID = -6411827583604137210L;
-    protected static Hashtable<Integer, String> intTable =
-            new Hashtable<>();
-    protected static Hashtable<String, Integer> stringTable =
-            new Hashtable<>();
-    static  {
-        intTable.put(3, "enabled");
-        intTable.put(4, "disabled");
-        intTable.put(1, "unsupported");
-        stringTable.put("enabled", 3);
-        stringTable.put("disabled", 4);
-        stringTable.put("unsupported", 1);
-    }
-
-    public EnumJvmThreadContentionMonitoring(int valueIndex) throws IllegalArgumentException {
-        super(valueIndex);
-    }
-
-    public EnumJvmThreadContentionMonitoring(Integer valueIndex) throws IllegalArgumentException {
-        super(valueIndex);
-    }
-
-    public EnumJvmThreadContentionMonitoring() throws IllegalArgumentException {
-        super();
-    }
-
-    public EnumJvmThreadContentionMonitoring(String x) throws IllegalArgumentException {
-        super(x);
-    }
-
-    protected Hashtable<Integer,String> getIntTable() {
-        return intTable ;
-    }
-
-    protected Hashtable<String,Integer> getStringTable() {
-        return stringTable ;
-    }
-
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/EnumJvmThreadCpuTimeMonitoring.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,84 +0,0 @@
-/*
- * Copyright (c) 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.management.snmp.jvmmib;
-
-//
-// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB.
-//
-
-// java imports
-//
-import java.io.Serializable;
-import java.util.Hashtable;
-
-// RI imports
-//
-import com.sun.jmx.snmp.Enumerated;
-
-/**
- * The class is used for representing "JvmThreadCpuTimeMonitoring".
- */
-public class EnumJvmThreadCpuTimeMonitoring extends Enumerated implements Serializable {
-
-    static final long serialVersionUID = -532837824105215699L;
-    protected static Hashtable<Integer, String> intTable =
-            new Hashtable<>();
-    protected static Hashtable<String, Integer> stringTable =
-            new Hashtable<>();
-    static  {
-        intTable.put(3, "enabled");
-        intTable.put(4, "disabled");
-        intTable.put(1, "unsupported");
-        stringTable.put("enabled", 3);
-        stringTable.put("disabled", 4);
-        stringTable.put("unsupported", 1);
-    }
-
-    public EnumJvmThreadCpuTimeMonitoring(int valueIndex) throws IllegalArgumentException {
-        super(valueIndex);
-    }
-
-    public EnumJvmThreadCpuTimeMonitoring(Integer valueIndex) throws IllegalArgumentException {
-        super(valueIndex);
-    }
-
-    public EnumJvmThreadCpuTimeMonitoring() throws IllegalArgumentException {
-        super();
-    }
-
-    public EnumJvmThreadCpuTimeMonitoring(String x) throws IllegalArgumentException {
-        super(x);
-    }
-
-    protected Hashtable<Integer,String> getIntTable() {
-        return intTable ;
-    }
-
-    protected Hashtable<String,Integer> getStringTable() {
-        return stringTable ;
-    }
-
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JVM_MANAGEMENT_MIB.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,687 +0,0 @@
-/*
- * Copyright (c) 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.management.snmp.jvmmib;
-
-//
-// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
-//
-
-// java imports
-//
-import java.io.Serializable;
-import java.util.Hashtable;
-
-// jmx imports
-//
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-import javax.management.InstanceAlreadyExistsException;
-
-// jdmk imports
-//
-import com.sun.jmx.snmp.agent.SnmpMib;
-import com.sun.jmx.snmp.agent.SnmpMibNode;
-import com.sun.jmx.snmp.agent.SnmpMibTable;
-import com.sun.jmx.snmp.agent.SnmpStandardObjectServer;
-
-/**
- * The class is used for representing "JVM-MANAGEMENT-MIB".
- * You can edit the file if you want to modify the behaviour of the MIB.
- */
-public abstract class JVM_MANAGEMENT_MIB extends SnmpMib implements Serializable {
-
-    static final long serialVersionUID = 6895037919735816732L;
-    /**
-     * Default constructor. Initialize the Mib tree.
-     */
-    public JVM_MANAGEMENT_MIB() {
-        mibName = "JVM_MANAGEMENT_MIB";
-    }
-
-    /**
-     * Initialization of the MIB with no registration in Java DMK.
-     */
-    public void init() throws IllegalAccessException {
-        // Allow only one initialization of the MIB.
-        //
-        if (isInitialized == true) {
-            return ;
-        }
-
-        try  {
-            populate(null, null);
-        } catch(IllegalAccessException x)  {
-            throw x;
-        } catch(RuntimeException x)  {
-            throw x;
-        } catch(Exception x)  {
-            throw new Error(x.getMessage());
-        }
-
-        isInitialized = true;
-    }
-
-    /**
-     * Initialization of the MIB with AUTOMATIC REGISTRATION in Java DMK.
-     */
-    public ObjectName preRegister(MBeanServer server, ObjectName name)
-            throws Exception {
-        // Allow only one initialization of the MIB.
-        //
-        if (isInitialized == true) {
-            throw new InstanceAlreadyExistsException();
-        }
-
-        // Initialize MBeanServer information.
-        //
-        this.server = server;
-
-        populate(server, name);
-
-        isInitialized = true;
-        return name;
-    }
-
-    /**
-     * Initialization of the MIB with no registration in Java DMK.
-     */
-    public void populate(MBeanServer server, ObjectName name)
-        throws Exception {
-        // Allow only one initialization of the MIB.
-        //
-        if (isInitialized == true) {
-            return ;
-        }
-
-        if (objectserver == null)
-            objectserver = new SnmpStandardObjectServer();
-
-        // Initialization of the "JvmOS" group.
-        // To disable support of this group, redefine the
-        // "createJvmOSMetaNode()" factory method, and make it return "null"
-        //
-        initJvmOS(server);
-
-        // Initialization of the "JvmCompilation" group.
-        // To disable support of this group, redefine the
-        // "createJvmCompilationMetaNode()" factory method, and make it return "null"
-        //
-        initJvmCompilation(server);
-
-        // Initialization of the "JvmRuntime" group.
-        // To disable support of this group, redefine the
-        // "createJvmRuntimeMetaNode()" factory method, and make it return "null"
-        //
-        initJvmRuntime(server);
-
-        // Initialization of the "JvmThreading" group.
-        // To disable support of this group, redefine the
-        // "createJvmThreadingMetaNode()" factory method, and make it return "null"
-        //
-        initJvmThreading(server);
-
-        // Initialization of the "JvmMemory" group.
-        // To disable support of this group, redefine the
-        // "createJvmMemoryMetaNode()" factory method, and make it return "null"
-        //
-        initJvmMemory(server);
-
-        // Initialization of the "JvmClassLoading" group.
-        // To disable support of this group, redefine the
-        // "createJvmClassLoadingMetaNode()" factory method, and make it return "null"
-        //
-        initJvmClassLoading(server);
-
-        isInitialized = true;
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Initialization of the "JvmOS" group.
-    //
-    // ------------------------------------------------------------
-
-
-    /**
-     * Initialization of the "JvmOS" group.
-     *
-     * To disable support of this group, redefine the
-     * "createJvmOSMetaNode()" factory method, and make it return "null"
-     *
-     * @param server    MBeanServer for this group (may be null)
-     *
-     **/
-    protected void initJvmOS(MBeanServer server)
-        throws Exception {
-        final String oid = getGroupOid("JvmOS", "1.3.6.1.4.1.42.2.145.3.163.1.1.6");
-        ObjectName objname = null;
-        if (server != null) {
-            objname = getGroupObjectName("JvmOS", oid, mibName + ":name=sun.management.snmp.jvmmib.JvmOS");
-        }
-        final JvmOSMeta meta = createJvmOSMetaNode("JvmOS", oid, objname, server);
-        if (meta != null) {
-            meta.registerTableNodes( this, server );
-
-            // Note that when using standard metadata,
-            // the returned object must implement the "JvmOSMBean"
-            // interface.
-            //
-            final JvmOSMBean group = (JvmOSMBean) createJvmOSMBean("JvmOS", oid, objname, server);
-            meta.setInstance( group );
-            registerGroupNode("JvmOS", oid, objname, meta, group, server);
-        }
-    }
-
-
-    /**
-     * Factory method for "JvmOS" group metadata class.
-     *
-     * You can redefine this method if you need to replace the default
-     * generated metadata class with your own customized class.
-     *
-     * @param groupName Name of the group ("JvmOS")
-     * @param groupOid  OID of this group
-     * @param groupObjname ObjectName for this group (may be null)
-     * @param server    MBeanServer for this group (may be null)
-     *
-     * @return An instance of the metadata class generated for the
-     *         "JvmOS" group (JvmOSMeta)
-     *
-     **/
-    protected JvmOSMeta createJvmOSMetaNode(String groupName,
-                String groupOid, ObjectName groupObjname, MBeanServer server)  {
-        return new JvmOSMeta(this, objectserver);
-    }
-
-
-    /**
-     * Factory method for "JvmOS" group MBean.
-     *
-     * You can redefine this method if you need to replace the default
-     * generated MBean class with your own customized class.
-     *
-     * @param groupName Name of the group ("JvmOS")
-     * @param groupOid  OID of this group
-     * @param groupObjname ObjectName for this group (may be null)
-     * @param server    MBeanServer for this group (may be null)
-     *
-     * @return An instance of the MBean class generated for the
-     *         "JvmOS" group (JvmOS)
-     *
-     * Note that when using standard metadata,
-     * the returned object must implement the "JvmOSMBean"
-     * interface.
-     **/
-    protected abstract Object createJvmOSMBean(String groupName,
-                String groupOid,  ObjectName groupObjname, MBeanServer server);
-
-
-    // ------------------------------------------------------------
-    //
-    // Initialization of the "JvmCompilation" group.
-    //
-    // ------------------------------------------------------------
-
-
-    /**
-     * Initialization of the "JvmCompilation" group.
-     *
-     * To disable support of this group, redefine the
-     * "createJvmCompilationMetaNode()" factory method, and make it return "null"
-     *
-     * @param server    MBeanServer for this group (may be null)
-     *
-     **/
-    protected void initJvmCompilation(MBeanServer server)
-        throws Exception {
-        final String oid = getGroupOid("JvmCompilation", "1.3.6.1.4.1.42.2.145.3.163.1.1.5");
-        ObjectName objname = null;
-        if (server != null) {
-            objname = getGroupObjectName("JvmCompilation", oid, mibName + ":name=sun.management.snmp.jvmmib.JvmCompilation");
-        }
-        final JvmCompilationMeta meta = createJvmCompilationMetaNode("JvmCompilation", oid, objname, server);
-        if (meta != null) {
-            meta.registerTableNodes( this, server );
-
-            // Note that when using standard metadata,
-            // the returned object must implement the "JvmCompilationMBean"
-            // interface.
-            //
-            final JvmCompilationMBean group = (JvmCompilationMBean) createJvmCompilationMBean("JvmCompilation", oid, objname, server);
-            meta.setInstance( group );
-            registerGroupNode("JvmCompilation", oid, objname, meta, group, server);
-        }
-    }
-
-
-    /**
-     * Factory method for "JvmCompilation" group metadata class.
-     *
-     * You can redefine this method if you need to replace the default
-     * generated metadata class with your own customized class.
-     *
-     * @param groupName Name of the group ("JvmCompilation")
-     * @param groupOid  OID of this group
-     * @param groupObjname ObjectName for this group (may be null)
-     * @param server    MBeanServer for this group (may be null)
-     *
-     * @return An instance of the metadata class generated for the
-     *         "JvmCompilation" group (JvmCompilationMeta)
-     *
-     **/
-    protected JvmCompilationMeta createJvmCompilationMetaNode(String groupName,
-                String groupOid, ObjectName groupObjname, MBeanServer server)  {
-        return new JvmCompilationMeta(this, objectserver);
-    }
-
-
-    /**
-     * Factory method for "JvmCompilation" group MBean.
-     *
-     * You can redefine this method if you need to replace the default
-     * generated MBean class with your own customized class.
-     *
-     * @param groupName Name of the group ("JvmCompilation")
-     * @param groupOid  OID of this group
-     * @param groupObjname ObjectName for this group (may be null)
-     * @param server    MBeanServer for this group (may be null)
-     *
-     * @return An instance of the MBean class generated for the
-     *         "JvmCompilation" group (JvmCompilation)
-     *
-     * Note that when using standard metadata,
-     * the returned object must implement the "JvmCompilationMBean"
-     * interface.
-     **/
-    protected abstract Object createJvmCompilationMBean(String groupName,
-                String groupOid,  ObjectName groupObjname, MBeanServer server);
-
-
-    // ------------------------------------------------------------
-    //
-    // Initialization of the "JvmRuntime" group.
-    //
-    // ------------------------------------------------------------
-
-
-    /**
-     * Initialization of the "JvmRuntime" group.
-     *
-     * To disable support of this group, redefine the
-     * "createJvmRuntimeMetaNode()" factory method, and make it return "null"
-     *
-     * @param server    MBeanServer for this group (may be null)
-     *
-     **/
-    protected void initJvmRuntime(MBeanServer server)
-        throws Exception {
-        final String oid = getGroupOid("JvmRuntime", "1.3.6.1.4.1.42.2.145.3.163.1.1.4");
-        ObjectName objname = null;
-        if (server != null) {
-            objname = getGroupObjectName("JvmRuntime", oid, mibName + ":name=sun.management.snmp.jvmmib.JvmRuntime");
-        }
-        final JvmRuntimeMeta meta = createJvmRuntimeMetaNode("JvmRuntime", oid, objname, server);
-        if (meta != null) {
-            meta.registerTableNodes( this, server );
-
-            // Note that when using standard metadata,
-            // the returned object must implement the "JvmRuntimeMBean"
-            // interface.
-            //
-            final JvmRuntimeMBean group = (JvmRuntimeMBean) createJvmRuntimeMBean("JvmRuntime", oid, objname, server);
-            meta.setInstance( group );
-            registerGroupNode("JvmRuntime", oid, objname, meta, group, server);
-        }
-    }
-
-
-    /**
-     * Factory method for "JvmRuntime" group metadata class.
-     *
-     * You can redefine this method if you need to replace the default
-     * generated metadata class with your own customized class.
-     *
-     * @param groupName Name of the group ("JvmRuntime")
-     * @param groupOid  OID of this group
-     * @param groupObjname ObjectName for this group (may be null)
-     * @param server    MBeanServer for this group (may be null)
-     *
-     * @return An instance of the metadata class generated for the
-     *         "JvmRuntime" group (JvmRuntimeMeta)
-     *
-     **/
-    protected JvmRuntimeMeta createJvmRuntimeMetaNode(String groupName,
-                String groupOid, ObjectName groupObjname, MBeanServer server)  {
-        return new JvmRuntimeMeta(this, objectserver);
-    }
-
-
-    /**
-     * Factory method for "JvmRuntime" group MBean.
-     *
-     * You can redefine this method if you need to replace the default
-     * generated MBean class with your own customized class.
-     *
-     * @param groupName Name of the group ("JvmRuntime")
-     * @param groupOid  OID of this group
-     * @param groupObjname ObjectName for this group (may be null)
-     * @param server    MBeanServer for this group (may be null)
-     *
-     * @return An instance of the MBean class generated for the
-     *         "JvmRuntime" group (JvmRuntime)
-     *
-     * Note that when using standard metadata,
-     * the returned object must implement the "JvmRuntimeMBean"
-     * interface.
-     **/
-    protected abstract Object createJvmRuntimeMBean(String groupName,
-                String groupOid,  ObjectName groupObjname, MBeanServer server);
-
-
-    // ------------------------------------------------------------
-    //
-    // Initialization of the "JvmThreading" group.
-    //
-    // ------------------------------------------------------------
-
-
-    /**
-     * Initialization of the "JvmThreading" group.
-     *
-     * To disable support of this group, redefine the
-     * "createJvmThreadingMetaNode()" factory method, and make it return "null"
-     *
-     * @param server    MBeanServer for this group (may be null)
-     *
-     **/
-    protected void initJvmThreading(MBeanServer server)
-        throws Exception {
-        final String oid = getGroupOid("JvmThreading", "1.3.6.1.4.1.42.2.145.3.163.1.1.3");
-        ObjectName objname = null;
-        if (server != null) {
-            objname = getGroupObjectName("JvmThreading", oid, mibName + ":name=sun.management.snmp.jvmmib.JvmThreading");
-        }
-        final JvmThreadingMeta meta = createJvmThreadingMetaNode("JvmThreading", oid, objname, server);
-        if (meta != null) {
-            meta.registerTableNodes( this, server );
-
-            // Note that when using standard metadata,
-            // the returned object must implement the "JvmThreadingMBean"
-            // interface.
-            //
-            final JvmThreadingMBean group = (JvmThreadingMBean) createJvmThreadingMBean("JvmThreading", oid, objname, server);
-            meta.setInstance( group );
-            registerGroupNode("JvmThreading", oid, objname, meta, group, server);
-        }
-    }
-
-
-    /**
-     * Factory method for "JvmThreading" group metadata class.
-     *
-     * You can redefine this method if you need to replace the default
-     * generated metadata class with your own customized class.
-     *
-     * @param groupName Name of the group ("JvmThreading")
-     * @param groupOid  OID of this group
-     * @param groupObjname ObjectName for this group (may be null)
-     * @param server    MBeanServer for this group (may be null)
-     *
-     * @return An instance of the metadata class generated for the
-     *         "JvmThreading" group (JvmThreadingMeta)
-     *
-     **/
-    protected JvmThreadingMeta createJvmThreadingMetaNode(String groupName,
-                String groupOid, ObjectName groupObjname, MBeanServer server)  {
-        return new JvmThreadingMeta(this, objectserver);
-    }
-
-
-    /**
-     * Factory method for "JvmThreading" group MBean.
-     *
-     * You can redefine this method if you need to replace the default
-     * generated MBean class with your own customized class.
-     *
-     * @param groupName Name of the group ("JvmThreading")
-     * @param groupOid  OID of this group
-     * @param groupObjname ObjectName for this group (may be null)
-     * @param server    MBeanServer for this group (may be null)
-     *
-     * @return An instance of the MBean class generated for the
-     *         "JvmThreading" group (JvmThreading)
-     *
-     * Note that when using standard metadata,
-     * the returned object must implement the "JvmThreadingMBean"
-     * interface.
-     **/
-    protected abstract Object createJvmThreadingMBean(String groupName,
-                String groupOid,  ObjectName groupObjname, MBeanServer server);
-
-
-    // ------------------------------------------------------------
-    //
-    // Initialization of the "JvmMemory" group.
-    //
-    // ------------------------------------------------------------
-
-
-    /**
-     * Initialization of the "JvmMemory" group.
-     *
-     * To disable support of this group, redefine the
-     * "createJvmMemoryMetaNode()" factory method, and make it return "null"
-     *
-     * @param server    MBeanServer for this group (may be null)
-     *
-     **/
-    protected void initJvmMemory(MBeanServer server)
-        throws Exception {
-        final String oid = getGroupOid("JvmMemory", "1.3.6.1.4.1.42.2.145.3.163.1.1.2");
-        ObjectName objname = null;
-        if (server != null) {
-            objname = getGroupObjectName("JvmMemory", oid, mibName + ":name=sun.management.snmp.jvmmib.JvmMemory");
-        }
-        final JvmMemoryMeta meta = createJvmMemoryMetaNode("JvmMemory", oid, objname, server);
-        if (meta != null) {
-            meta.registerTableNodes( this, server );
-
-            // Note that when using standard metadata,
-            // the returned object must implement the "JvmMemoryMBean"
-            // interface.
-            //
-            final JvmMemoryMBean group = (JvmMemoryMBean) createJvmMemoryMBean("JvmMemory", oid, objname, server);
-            meta.setInstance( group );
-            registerGroupNode("JvmMemory", oid, objname, meta, group, server);
-        }
-    }
-
-
-    /**
-     * Factory method for "JvmMemory" group metadata class.
-     *
-     * You can redefine this method if you need to replace the default
-     * generated metadata class with your own customized class.
-     *
-     * @param groupName Name of the group ("JvmMemory")
-     * @param groupOid  OID of this group
-     * @param groupObjname ObjectName for this group (may be null)
-     * @param server    MBeanServer for this group (may be null)
-     *
-     * @return An instance of the metadata class generated for the
-     *         "JvmMemory" group (JvmMemoryMeta)
-     *
-     **/
-    protected JvmMemoryMeta createJvmMemoryMetaNode(String groupName,
-                String groupOid, ObjectName groupObjname, MBeanServer server)  {
-        return new JvmMemoryMeta(this, objectserver);
-    }
-
-
-    /**
-     * Factory method for "JvmMemory" group MBean.
-     *
-     * You can redefine this method if you need to replace the default
-     * generated MBean class with your own customized class.
-     *
-     * @param groupName Name of the group ("JvmMemory")
-     * @param groupOid  OID of this group
-     * @param groupObjname ObjectName for this group (may be null)
-     * @param server    MBeanServer for this group (may be null)
-     *
-     * @return An instance of the MBean class generated for the
-     *         "JvmMemory" group (JvmMemory)
-     *
-     * Note that when using standard metadata,
-     * the returned object must implement the "JvmMemoryMBean"
-     * interface.
-     **/
-    protected abstract Object createJvmMemoryMBean(String groupName,
-                String groupOid,  ObjectName groupObjname, MBeanServer server);
-
-
-    // ------------------------------------------------------------
-    //
-    // Initialization of the "JvmClassLoading" group.
-    //
-    // ------------------------------------------------------------
-
-
-    /**
-     * Initialization of the "JvmClassLoading" group.
-     *
-     * To disable support of this group, redefine the
-     * "createJvmClassLoadingMetaNode()" factory method, and make it return "null"
-     *
-     * @param server    MBeanServer for this group (may be null)
-     *
-     **/
-    protected void initJvmClassLoading(MBeanServer server)
-        throws Exception {
-        final String oid = getGroupOid("JvmClassLoading", "1.3.6.1.4.1.42.2.145.3.163.1.1.1");
-        ObjectName objname = null;
-        if (server != null) {
-            objname = getGroupObjectName("JvmClassLoading", oid, mibName + ":name=sun.management.snmp.jvmmib.JvmClassLoading");
-        }
-        final JvmClassLoadingMeta meta = createJvmClassLoadingMetaNode("JvmClassLoading", oid, objname, server);
-        if (meta != null) {
-            meta.registerTableNodes( this, server );
-
-            // Note that when using standard metadata,
-            // the returned object must implement the "JvmClassLoadingMBean"
-            // interface.
-            //
-            final JvmClassLoadingMBean group = (JvmClassLoadingMBean) createJvmClassLoadingMBean("JvmClassLoading", oid, objname, server);
-            meta.setInstance( group );
-            registerGroupNode("JvmClassLoading", oid, objname, meta, group, server);
-        }
-    }
-
-
-    /**
-     * Factory method for "JvmClassLoading" group metadata class.
-     *
-     * You can redefine this method if you need to replace the default
-     * generated metadata class with your own customized class.
-     *
-     * @param groupName Name of the group ("JvmClassLoading")
-     * @param groupOid  OID of this group
-     * @param groupObjname ObjectName for this group (may be null)
-     * @param server    MBeanServer for this group (may be null)
-     *
-     * @return An instance of the metadata class generated for the
-     *         "JvmClassLoading" group (JvmClassLoadingMeta)
-     *
-     **/
-    protected JvmClassLoadingMeta createJvmClassLoadingMetaNode(String groupName,
-                String groupOid, ObjectName groupObjname, MBeanServer server)  {
-        return new JvmClassLoadingMeta(this, objectserver);
-    }
-
-
-    /**
-     * Factory method for "JvmClassLoading" group MBean.
-     *
-     * You can redefine this method if you need to replace the default
-     * generated MBean class with your own customized class.
-     *
-     * @param groupName Name of the group ("JvmClassLoading")
-     * @param groupOid  OID of this group
-     * @param groupObjname ObjectName for this group (may be null)
-     * @param server    MBeanServer for this group (may be null)
-     *
-     * @return An instance of the MBean class generated for the
-     *         "JvmClassLoading" group (JvmClassLoading)
-     *
-     * Note that when using standard metadata,
-     * the returned object must implement the "JvmClassLoadingMBean"
-     * interface.
-     **/
-    protected abstract Object createJvmClassLoadingMBean(String groupName,
-                String groupOid,  ObjectName groupObjname, MBeanServer server);
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "registerTableMeta" method defined in "SnmpMib".
-    // See the "SnmpMib" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void registerTableMeta( String name, SnmpMibTable meta) {
-        if (metadatas == null) return;
-        if (name == null) return;
-        metadatas.put(name,meta);
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "getRegisteredTableMeta" method defined in "SnmpMib".
-    // See the "SnmpMib" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public SnmpMibTable getRegisteredTableMeta( String name ) {
-        if (metadatas == null) return null;
-        if (name == null) return null;
-        return metadatas.get(name);
-    }
-
-    public SnmpStandardObjectServer getStandardObjectServer() {
-        if (objectserver == null)
-            objectserver = new SnmpStandardObjectServer();
-        return objectserver;
-    }
-
-    private boolean isInitialized = false;
-
-    protected SnmpStandardObjectServer objectserver;
-
-    protected final Hashtable<String, SnmpMibTable> metadatas =
-            new Hashtable<String, SnmpMibTable>();
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JVM_MANAGEMENT_MIBOidTable.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,168 +0,0 @@
-/*
- * Copyright (c) 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.management.snmp.jvmmib;
-
-//
-// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB.
-//
-
-// java imports
-//
-import java.io.Serializable;
-
-// jmx imports
-//
-import com.sun.jmx.snmp.SnmpOidRecord;
-
-// jdmk imports
-//
-import com.sun.jmx.snmp.SnmpOidTableSupport;
-
-/**
- * The class contains metadata definitions for "JVM-MANAGEMENT-MIB".
- * Call SnmpOid.setSnmpOidTable(new JVM_MANAGEMENT_MIBOidTable()) to load the metadata in the SnmpOidTable.
- */
-public class JVM_MANAGEMENT_MIBOidTable extends SnmpOidTableSupport implements Serializable {
-
-    static final long serialVersionUID = -5010870014488732061L;
-    /**
-     * Default constructor. Initialize the Mib tree.
-     */
-    public JVM_MANAGEMENT_MIBOidTable() {
-        super("JVM_MANAGEMENT_MIB");
-        loadMib(varList);
-    }
-
-    static SnmpOidRecord varList [] = {
-        new SnmpOidRecord("jvmOSProcessorCount", "1.3.6.1.4.1.42.2.145.3.163.1.1.6.4", "I"),
-        new SnmpOidRecord("jvmOSVersion", "1.3.6.1.4.1.42.2.145.3.163.1.1.6.3", "S"),
-        new SnmpOidRecord("jvmOSArch", "1.3.6.1.4.1.42.2.145.3.163.1.1.6.2", "S"),
-        new SnmpOidRecord("jvmOSName", "1.3.6.1.4.1.42.2.145.3.163.1.1.6.1", "S"),
-        new SnmpOidRecord("jvmJITCompilerTimeMonitoring", "1.3.6.1.4.1.42.2.145.3.163.1.1.5.3", "I"),
-        new SnmpOidRecord("jvmJITCompilerTimeMs", "1.3.6.1.4.1.42.2.145.3.163.1.1.5.2", "C64"),
-        new SnmpOidRecord("jvmJITCompilerName", "1.3.6.1.4.1.42.2.145.3.163.1.1.5.1", "S"),
-        new SnmpOidRecord("jvmRTLibraryPathTable", "1.3.6.1.4.1.42.2.145.3.163.1.1.4.23", "TA"),
-        new SnmpOidRecord("jvmRTLibraryPathEntry", "1.3.6.1.4.1.42.2.145.3.163.1.1.4.23.1", "EN"),
-        new SnmpOidRecord("jvmRTLibraryPathItem", "1.3.6.1.4.1.42.2.145.3.163.1.1.4.23.1.2", "S"),
-        new SnmpOidRecord("jvmRTLibraryPathIndex", "1.3.6.1.4.1.42.2.145.3.163.1.1.4.23.1.1", "I"),
-        new SnmpOidRecord("jvmRTClassPathTable", "1.3.6.1.4.1.42.2.145.3.163.1.1.4.22", "TA"),
-        new SnmpOidRecord("jvmRTClassPathEntry", "1.3.6.1.4.1.42.2.145.3.163.1.1.4.22.1", "EN"),
-        new SnmpOidRecord("jvmRTClassPathItem", "1.3.6.1.4.1.42.2.145.3.163.1.1.4.22.1.2", "S"),
-        new SnmpOidRecord("jvmRTClassPathIndex", "1.3.6.1.4.1.42.2.145.3.163.1.1.4.22.1.1", "I"),
-        new SnmpOidRecord("jvmRTBootClassPathTable", "1.3.6.1.4.1.42.2.145.3.163.1.1.4.21", "TA"),
-        new SnmpOidRecord("jvmRTBootClassPathEntry", "1.3.6.1.4.1.42.2.145.3.163.1.1.4.21.1", "EN"),
-        new SnmpOidRecord("jvmRTBootClassPathItem", "1.3.6.1.4.1.42.2.145.3.163.1.1.4.21.1.2", "S"),
-        new SnmpOidRecord("jvmRTBootClassPathIndex", "1.3.6.1.4.1.42.2.145.3.163.1.1.4.21.1.1", "I"),
-        new SnmpOidRecord("jvmRTBootClassPathSupport", "1.3.6.1.4.1.42.2.145.3.163.1.1.4.9", "I"),
-        new SnmpOidRecord("jvmRTInputArgsTable", "1.3.6.1.4.1.42.2.145.3.163.1.1.4.20", "TA"),
-        new SnmpOidRecord("jvmRTInputArgsEntry", "1.3.6.1.4.1.42.2.145.3.163.1.1.4.20.1", "EN"),
-        new SnmpOidRecord("jvmRTInputArgsItem", "1.3.6.1.4.1.42.2.145.3.163.1.1.4.20.1.2", "S"),
-        new SnmpOidRecord("jvmRTInputArgsIndex", "1.3.6.1.4.1.42.2.145.3.163.1.1.4.20.1.1", "I"),
-        new SnmpOidRecord("jvmRTManagementSpecVersion", "1.3.6.1.4.1.42.2.145.3.163.1.1.4.8", "S"),
-        new SnmpOidRecord("jvmRTSpecVersion", "1.3.6.1.4.1.42.2.145.3.163.1.1.4.7", "S"),
-        new SnmpOidRecord("jvmRTSpecVendor", "1.3.6.1.4.1.42.2.145.3.163.1.1.4.6", "S"),
-        new SnmpOidRecord("jvmRTSpecName", "1.3.6.1.4.1.42.2.145.3.163.1.1.4.5", "S"),
-        new SnmpOidRecord("jvmRTVMVersion", "1.3.6.1.4.1.42.2.145.3.163.1.1.4.4", "S"),
-        new SnmpOidRecord("jvmRTVMVendor", "1.3.6.1.4.1.42.2.145.3.163.1.1.4.3", "S"),
-        new SnmpOidRecord("jvmRTStartTimeMs", "1.3.6.1.4.1.42.2.145.3.163.1.1.4.12", "C64"),
-        new SnmpOidRecord("jvmRTUptimeMs", "1.3.6.1.4.1.42.2.145.3.163.1.1.4.11", "C64"),
-        new SnmpOidRecord("jvmRTVMName", "1.3.6.1.4.1.42.2.145.3.163.1.1.4.2", "S"),
-        new SnmpOidRecord("jvmRTName", "1.3.6.1.4.1.42.2.145.3.163.1.1.4.1", "S"),
-        new SnmpOidRecord("jvmRTInputArgsCount", "1.3.6.1.4.1.42.2.145.3.163.1.1.4.10", "I"),
-        new SnmpOidRecord("jvmThreadCpuTimeMonitoring", "1.3.6.1.4.1.42.2.145.3.163.1.1.3.6", "I"),
-        new SnmpOidRecord("jvmThreadContentionMonitoring", "1.3.6.1.4.1.42.2.145.3.163.1.1.3.5", "I"),
-        new SnmpOidRecord("jvmThreadTotalStartedCount", "1.3.6.1.4.1.42.2.145.3.163.1.1.3.4", "C64"),
-        new SnmpOidRecord("jvmThreadPeakCount", "1.3.6.1.4.1.42.2.145.3.163.1.1.3.3", "C"),
-        new SnmpOidRecord("jvmThreadDaemonCount", "1.3.6.1.4.1.42.2.145.3.163.1.1.3.2", "G"),
-        new SnmpOidRecord("jvmThreadCount", "1.3.6.1.4.1.42.2.145.3.163.1.1.3.1", "G"),
-        new SnmpOidRecord("jvmThreadInstanceTable", "1.3.6.1.4.1.42.2.145.3.163.1.1.3.10", "TA"),
-        new SnmpOidRecord("jvmThreadInstanceEntry", "1.3.6.1.4.1.42.2.145.3.163.1.1.3.10.1", "EN"),
-        new SnmpOidRecord("jvmThreadInstName", "1.3.6.1.4.1.42.2.145.3.163.1.1.3.10.1.9", "S"),
-        new SnmpOidRecord("jvmThreadInstCpuTimeNs", "1.3.6.1.4.1.42.2.145.3.163.1.1.3.10.1.8", "C64"),
-        new SnmpOidRecord("jvmThreadInstWaitTimeMs", "1.3.6.1.4.1.42.2.145.3.163.1.1.3.10.1.7", "C64"),
-        new SnmpOidRecord("jvmThreadInstWaitCount", "1.3.6.1.4.1.42.2.145.3.163.1.1.3.10.1.6", "C64"),
-        new SnmpOidRecord("jvmThreadInstBlockTimeMs", "1.3.6.1.4.1.42.2.145.3.163.1.1.3.10.1.5", "C64"),
-        new SnmpOidRecord("jvmThreadInstBlockCount", "1.3.6.1.4.1.42.2.145.3.163.1.1.3.10.1.4", "C64"),
-        new SnmpOidRecord("jvmThreadInstState", "1.3.6.1.4.1.42.2.145.3.163.1.1.3.10.1.3", "S"),
-        new SnmpOidRecord("jvmThreadInstLockOwnerPtr", "1.3.6.1.4.1.42.2.145.3.163.1.1.3.10.1.11", "OI"),
-        new SnmpOidRecord("jvmThreadInstId", "1.3.6.1.4.1.42.2.145.3.163.1.1.3.10.1.2", "C64"),
-        new SnmpOidRecord("jvmThreadInstLockName", "1.3.6.1.4.1.42.2.145.3.163.1.1.3.10.1.10", "S"),
-        new SnmpOidRecord("jvmThreadInstIndex", "1.3.6.1.4.1.42.2.145.3.163.1.1.3.10.1.1", "S"),
-        new SnmpOidRecord("jvmThreadPeakCountReset", "1.3.6.1.4.1.42.2.145.3.163.1.1.3.7", "C64"),
-        new SnmpOidRecord("jvmMemMgrPoolRelTable", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.120", "TA"),
-        new SnmpOidRecord("jvmMemMgrPoolRelEntry", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.120.1", "EN"),
-        new SnmpOidRecord("jvmMemMgrRelPoolName", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.120.1.3", "S"),
-        new SnmpOidRecord("jvmMemMgrRelManagerName", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.120.1.2", "S"),
-        new SnmpOidRecord("jvmMemoryNonHeapMaxSize", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.23", "C64"),
-        new SnmpOidRecord("jvmMemoryNonHeapCommitted", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.22", "C64"),
-        new SnmpOidRecord("jvmMemoryNonHeapUsed", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.21", "C64"),
-        new SnmpOidRecord("jvmMemPoolTable", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.110", "TA"),
-        new SnmpOidRecord("jvmMemPoolEntry", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1", "EN"),
-        new SnmpOidRecord("jvmMemPoolCollectMaxSize", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.33", "C64"),
-        new SnmpOidRecord("jvmMemPoolCollectCommitted", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.32", "C64"),
-        new SnmpOidRecord("jvmMemPoolCollectUsed", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.31", "C64"),
-        new SnmpOidRecord("jvmMemPoolCollectThreshdSupport", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.133", "I"),
-        new SnmpOidRecord("jvmMemPoolCollectThreshdCount", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.132", "C64"),
-        new SnmpOidRecord("jvmMemPoolCollectThreshold", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.131", "C64"),
-        new SnmpOidRecord("jvmMemPoolMaxSize", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.13", "C64"),
-        new SnmpOidRecord("jvmMemPoolCommitted", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.12", "C64"),
-        new SnmpOidRecord("jvmMemPoolUsed", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.11", "C64"),
-        new SnmpOidRecord("jvmMemPoolInitSize", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.10", "C64"),
-        new SnmpOidRecord("jvmMemPoolThreshdSupport", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.112", "I"),
-        new SnmpOidRecord("jvmMemPoolThreshdCount", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.111", "C64"),
-        new SnmpOidRecord("jvmMemPoolThreshold", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.110", "C64"),
-        new SnmpOidRecord("jvmMemPoolPeakReset", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.5", "C64"),
-        new SnmpOidRecord("jvmMemPoolState", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.4", "I"),
-        new SnmpOidRecord("jvmMemPoolType", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.3", "I"),
-        new SnmpOidRecord("jvmMemPoolName", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.2", "S"),
-        new SnmpOidRecord("jvmMemPoolPeakMaxSize", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.23", "C64"),
-        new SnmpOidRecord("jvmMemPoolIndex", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.1", "I"),
-        new SnmpOidRecord("jvmMemPoolPeakCommitted", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.22", "C64"),
-        new SnmpOidRecord("jvmMemPoolPeakUsed", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.21", "C64"),
-        new SnmpOidRecord("jvmMemoryNonHeapInitSize", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.20", "C64"),
-        new SnmpOidRecord("jvmMemoryHeapMaxSize", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.13", "C64"),
-        new SnmpOidRecord("jvmMemoryHeapCommitted", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.12", "C64"),
-        new SnmpOidRecord("jvmMemoryGCCall", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.3", "I"),
-        new SnmpOidRecord("jvmMemoryHeapUsed", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.11", "C64"),
-        new SnmpOidRecord("jvmMemoryGCVerboseLevel", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.2", "I"),
-        new SnmpOidRecord("jvmMemGCTable", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.101", "TA"),
-        new SnmpOidRecord("jvmMemGCEntry", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.101.1", "EN"),
-        new SnmpOidRecord("jvmMemGCTimeMs", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.101.1.3", "C64"),
-        new SnmpOidRecord("jvmMemGCCount", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.101.1.2", "C64"),
-        new SnmpOidRecord("jvmMemoryHeapInitSize", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.10", "C64"),
-        new SnmpOidRecord("jvmMemoryPendingFinalCount", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.1", "G"),
-        new SnmpOidRecord("jvmMemManagerTable", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.100", "TA"),
-        new SnmpOidRecord("jvmMemManagerEntry", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.100.1", "EN"),
-        new SnmpOidRecord("jvmMemManagerState", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.100.1.3", "I"),
-        new SnmpOidRecord("jvmMemManagerName", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.100.1.2", "S"),
-        new SnmpOidRecord("jvmMemManagerIndex", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.100.1.1", "I"),
-        new SnmpOidRecord("jvmClassesVerboseLevel", "1.3.6.1.4.1.42.2.145.3.163.1.1.1.4", "I"),
-        new SnmpOidRecord("jvmClassesUnloadedCount", "1.3.6.1.4.1.42.2.145.3.163.1.1.1.3", "C64"),
-        new SnmpOidRecord("jvmClassesTotalLoadedCount", "1.3.6.1.4.1.42.2.145.3.163.1.1.1.2", "C64"),
-        new SnmpOidRecord("jvmClassesLoadedCount", "1.3.6.1.4.1.42.2.145.3.163.1.1.1.1", "G"),
-        new SnmpOidRecord("jvmLowMemoryPoolUsageNotif", "1.3.6.1.4.1.42.2.145.3.163.1.2.2.1.0.1", "NT"),
-        new SnmpOidRecord("jvmLowMemoryPoolCollectNotif", "1.3.6.1.4.1.42.2.145.3.163.1.2.2.1.0.2", "NT")    };
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmClassLoadingMBean.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,72 +0,0 @@
-/*
- * Copyright (c) 2003, 2004, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.management.snmp.jvmmib;
-
-//
-// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
-//
-
-
-// jmx imports
-//
-import com.sun.jmx.snmp.SnmpStatusException;
-
-/**
- * This interface is used for representing the remote management interface for the "JvmClassLoading" MBean.
- */
-public interface JvmClassLoadingMBean {
-
-    /**
-     * Getter for the "JvmClassesVerboseLevel" variable.
-     */
-    public EnumJvmClassesVerboseLevel getJvmClassesVerboseLevel() throws SnmpStatusException;
-
-    /**
-     * Setter for the "JvmClassesVerboseLevel" variable.
-     */
-    public void setJvmClassesVerboseLevel(EnumJvmClassesVerboseLevel x) throws SnmpStatusException;
-
-    /**
-     * Checker for the "JvmClassesVerboseLevel" variable.
-     */
-    public void checkJvmClassesVerboseLevel(EnumJvmClassesVerboseLevel x) throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmClassesUnloadedCount" variable.
-     */
-    public Long getJvmClassesUnloadedCount() throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmClassesTotalLoadedCount" variable.
-     */
-    public Long getJvmClassesTotalLoadedCount() throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmClassesLoadedCount" variable.
-     */
-    public Long getJvmClassesLoadedCount() throws SnmpStatusException;
-
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmClassLoadingMeta.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,329 +0,0 @@
-/*
- * Copyright (c) 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.management.snmp.jvmmib;
-
-//
-// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
-//
-
-// java imports
-//
-import java.io.Serializable;
-
-// jmx imports
-//
-import javax.management.MBeanServer;
-import com.sun.jmx.snmp.SnmpCounter;
-import com.sun.jmx.snmp.SnmpCounter64;
-import com.sun.jmx.snmp.SnmpGauge;
-import com.sun.jmx.snmp.SnmpInt;
-import com.sun.jmx.snmp.SnmpUnsignedInt;
-import com.sun.jmx.snmp.SnmpIpAddress;
-import com.sun.jmx.snmp.SnmpTimeticks;
-import com.sun.jmx.snmp.SnmpOpaque;
-import com.sun.jmx.snmp.SnmpString;
-import com.sun.jmx.snmp.SnmpStringFixed;
-import com.sun.jmx.snmp.SnmpOid;
-import com.sun.jmx.snmp.SnmpNull;
-import com.sun.jmx.snmp.SnmpValue;
-import com.sun.jmx.snmp.SnmpVarBind;
-import com.sun.jmx.snmp.SnmpStatusException;
-
-// jdmk imports
-//
-import com.sun.jmx.snmp.agent.SnmpMib;
-import com.sun.jmx.snmp.agent.SnmpMibGroup;
-import com.sun.jmx.snmp.agent.SnmpStandardObjectServer;
-import com.sun.jmx.snmp.agent.SnmpStandardMetaServer;
-import com.sun.jmx.snmp.agent.SnmpMibSubRequest;
-import com.sun.jmx.snmp.agent.SnmpMibTable;
-import com.sun.jmx.snmp.EnumRowStatus;
-import com.sun.jmx.snmp.SnmpDefinitions;
-
-/**
- * The class is used for representing SNMP metadata for the "JvmClassLoading" group.
- * The group is defined with the following oid: 1.3.6.1.4.1.42.2.145.3.163.1.1.1.
- */
-public class JvmClassLoadingMeta extends SnmpMibGroup
-     implements Serializable, SnmpStandardMetaServer {
-
-    static final long serialVersionUID = 5722857476941218568L;
-    /**
-     * Constructor for the metadata associated to "JvmClassLoading".
-     */
-    public JvmClassLoadingMeta(SnmpMib myMib, SnmpStandardObjectServer objserv) {
-        objectserver = objserv;
-        try {
-            registerObject(4);
-            registerObject(3);
-            registerObject(2);
-            registerObject(1);
-        } catch (IllegalAccessException e) {
-            throw new RuntimeException(e.getMessage());
-        }
-    }
-
-    /**
-     * Get the value of a scalar variable
-     */
-    public SnmpValue get(long var, Object data)
-        throws SnmpStatusException {
-        switch((int)var) {
-            case 4:
-                return new SnmpInt(node.getJvmClassesVerboseLevel());
-
-            case 3:
-                return new SnmpCounter64(node.getJvmClassesUnloadedCount());
-
-            case 2:
-                return new SnmpCounter64(node.getJvmClassesTotalLoadedCount());
-
-            case 1:
-                return new SnmpGauge(node.getJvmClassesLoadedCount());
-
-            default:
-                break;
-        }
-        throw new SnmpStatusException(SnmpStatusException.noSuchObject);
-    }
-
-    /**
-     * Set the value of a scalar variable
-     */
-    public SnmpValue set(SnmpValue x, long var, Object data)
-        throws SnmpStatusException {
-        switch((int)var) {
-            case 4:
-                if (x instanceof SnmpInt) {
-                    try  {
-                        node.setJvmClassesVerboseLevel( new EnumJvmClassesVerboseLevel (((SnmpInt)x).toInteger()));
-                    } catch(IllegalArgumentException e)  {
-                        throw new SnmpStatusException(SnmpStatusException.snmpRspWrongValue);
-                    }
-                    return new SnmpInt(node.getJvmClassesVerboseLevel());
-                } else {
-                    throw new SnmpStatusException(SnmpStatusException.snmpRspWrongType);
-                }
-
-            case 3:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 2:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 1:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            default:
-                break;
-        }
-        throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-    }
-
-    /**
-     * Check the value of a scalar variable
-     */
-    public void check(SnmpValue x, long var, Object data)
-        throws SnmpStatusException {
-        switch((int) var) {
-            case 4:
-                if (x instanceof SnmpInt) {
-                    try  {
-                        node.checkJvmClassesVerboseLevel( new EnumJvmClassesVerboseLevel (((SnmpInt)x).toInteger()));
-                    } catch(IllegalArgumentException e)  {
-                        throw new SnmpStatusException(SnmpStatusException.snmpRspWrongValue);
-                    }
-                } else {
-                    throw new SnmpStatusException(SnmpStatusException.snmpRspWrongType);
-                }
-                break;
-
-            case 3:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 2:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 1:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            default:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-        }
-    }
-
-    /**
-     * Allow to bind the metadata description to a specific object.
-     */
-    protected void setInstance(JvmClassLoadingMBean var) {
-        node = var;
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "get" method defined in "SnmpMibGroup".
-    // See the "SnmpMibGroup" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void get(SnmpMibSubRequest req, int depth)
-        throws SnmpStatusException {
-        objectserver.get(this,req,depth);
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "set" method defined in "SnmpMibGroup".
-    // See the "SnmpMibGroup" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void set(SnmpMibSubRequest req, int depth)
-        throws SnmpStatusException {
-        objectserver.set(this,req,depth);
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "check" method defined in "SnmpMibGroup".
-    // See the "SnmpMibGroup" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void check(SnmpMibSubRequest req, int depth)
-        throws SnmpStatusException {
-        objectserver.check(this,req,depth);
-    }
-
-    /**
-     * Returns true if "arc" identifies a scalar object.
-     */
-    public boolean isVariable(long arc) {
-
-        switch((int)arc) {
-            case 4:
-            case 3:
-            case 2:
-            case 1:
-                return true;
-            default:
-                break;
-        }
-        return false;
-    }
-
-    /**
-     * Returns true if "arc" identifies a readable scalar object.
-     */
-    public boolean isReadable(long arc) {
-
-        switch((int)arc) {
-            case 4:
-            case 3:
-            case 2:
-            case 1:
-                return true;
-            default:
-                break;
-        }
-        return false;
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "skipVariable" method defined in "SnmpMibGroup".
-    // See the "SnmpMibGroup" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public boolean  skipVariable(long var, Object data, int pduVersion) {
-        switch((int)var) {
-            case 3:
-            case 2:
-                if (pduVersion==SnmpDefinitions.snmpVersionOne) return true;
-                break;
-            default:
-                break;
-        }
-        return super.skipVariable(var,data,pduVersion);
-    }
-
-    /**
-     * Return the name of the attribute corresponding to the SNMP variable identified by "id".
-     */
-    public String getAttributeName(long id)
-        throws SnmpStatusException {
-        switch((int)id) {
-            case 4:
-                return "JvmClassesVerboseLevel";
-
-            case 3:
-                return "JvmClassesUnloadedCount";
-
-            case 2:
-                return "JvmClassesTotalLoadedCount";
-
-            case 1:
-                return "JvmClassesLoadedCount";
-
-            default:
-                break;
-        }
-        throw new SnmpStatusException(SnmpStatusException.noSuchObject);
-    }
-
-    /**
-     * Returns true if "arc" identifies a table object.
-     */
-    public boolean isTable(long arc) {
-
-        switch((int)arc) {
-            default:
-                break;
-        }
-        return false;
-    }
-
-    /**
-     * Returns the table object identified by "arc".
-     */
-    public SnmpMibTable getTable(long arc) {
-        return null;
-    }
-
-    /**
-     * Register the group's SnmpMibTable objects with the meta-data.
-     */
-    public void registerTableNodes(SnmpMib mib, MBeanServer server) {
-    }
-
-    protected JvmClassLoadingMBean node;
-    protected SnmpStandardObjectServer objectserver = null;
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmCompilationMBean.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 2003, 2004, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.management.snmp.jvmmib;
-
-//
-// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
-//
-
-
-// jmx imports
-//
-import com.sun.jmx.snmp.SnmpStatusException;
-
-/**
- * This interface is used for representing the remote management interface for the "JvmCompilation" MBean.
- */
-public interface JvmCompilationMBean {
-
-    /**
-     * Getter for the "JvmJITCompilerTimeMonitoring" variable.
-     */
-    public EnumJvmJITCompilerTimeMonitoring getJvmJITCompilerTimeMonitoring() throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmJITCompilerTimeMs" variable.
-     */
-    public Long getJvmJITCompilerTimeMs() throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmJITCompilerName" variable.
-     */
-    public String getJvmJITCompilerName() throws SnmpStatusException;
-
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmCompilationMeta.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,295 +0,0 @@
-/*
- * Copyright (c) 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.management.snmp.jvmmib;
-
-//
-// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
-//
-
-// java imports
-//
-import java.io.Serializable;
-
-// jmx imports
-//
-import javax.management.MBeanServer;
-import com.sun.jmx.snmp.SnmpCounter;
-import com.sun.jmx.snmp.SnmpCounter64;
-import com.sun.jmx.snmp.SnmpGauge;
-import com.sun.jmx.snmp.SnmpInt;
-import com.sun.jmx.snmp.SnmpUnsignedInt;
-import com.sun.jmx.snmp.SnmpIpAddress;
-import com.sun.jmx.snmp.SnmpTimeticks;
-import com.sun.jmx.snmp.SnmpOpaque;
-import com.sun.jmx.snmp.SnmpString;
-import com.sun.jmx.snmp.SnmpStringFixed;
-import com.sun.jmx.snmp.SnmpOid;
-import com.sun.jmx.snmp.SnmpNull;
-import com.sun.jmx.snmp.SnmpValue;
-import com.sun.jmx.snmp.SnmpVarBind;
-import com.sun.jmx.snmp.SnmpStatusException;
-
-// jdmk imports
-//
-import com.sun.jmx.snmp.agent.SnmpMib;
-import com.sun.jmx.snmp.agent.SnmpMibGroup;
-import com.sun.jmx.snmp.agent.SnmpStandardObjectServer;
-import com.sun.jmx.snmp.agent.SnmpStandardMetaServer;
-import com.sun.jmx.snmp.agent.SnmpMibSubRequest;
-import com.sun.jmx.snmp.agent.SnmpMibTable;
-import com.sun.jmx.snmp.EnumRowStatus;
-import com.sun.jmx.snmp.SnmpDefinitions;
-
-/**
- * The class is used for representing SNMP metadata for the "JvmCompilation" group.
- * The group is defined with the following oid: 1.3.6.1.4.1.42.2.145.3.163.1.1.5.
- */
-public class JvmCompilationMeta extends SnmpMibGroup
-     implements Serializable, SnmpStandardMetaServer {
-
-    static final long serialVersionUID = -95492874115033638L;
-    /**
-     * Constructor for the metadata associated to "JvmCompilation".
-     */
-    public JvmCompilationMeta(SnmpMib myMib, SnmpStandardObjectServer objserv) {
-        objectserver = objserv;
-        try {
-            registerObject(3);
-            registerObject(2);
-            registerObject(1);
-        } catch (IllegalAccessException e) {
-            throw new RuntimeException(e.getMessage());
-        }
-    }
-
-    /**
-     * Get the value of a scalar variable
-     */
-    public SnmpValue get(long var, Object data)
-        throws SnmpStatusException {
-        switch((int)var) {
-            case 3:
-                return new SnmpInt(node.getJvmJITCompilerTimeMonitoring());
-
-            case 2:
-                return new SnmpCounter64(node.getJvmJITCompilerTimeMs());
-
-            case 1:
-                return new SnmpString(node.getJvmJITCompilerName());
-
-            default:
-                break;
-        }
-        throw new SnmpStatusException(SnmpStatusException.noSuchObject);
-    }
-
-    /**
-     * Set the value of a scalar variable
-     */
-    public SnmpValue set(SnmpValue x, long var, Object data)
-        throws SnmpStatusException {
-        switch((int)var) {
-            case 3:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 2:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 1:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            default:
-                break;
-        }
-        throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-    }
-
-    /**
-     * Check the value of a scalar variable
-     */
-    public void check(SnmpValue x, long var, Object data)
-        throws SnmpStatusException {
-        switch((int) var) {
-            case 3:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 2:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 1:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            default:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-        }
-    }
-
-    /**
-     * Allow to bind the metadata description to a specific object.
-     */
-    protected void setInstance(JvmCompilationMBean var) {
-        node = var;
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "get" method defined in "SnmpMibGroup".
-    // See the "SnmpMibGroup" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void get(SnmpMibSubRequest req, int depth)
-        throws SnmpStatusException {
-        objectserver.get(this,req,depth);
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "set" method defined in "SnmpMibGroup".
-    // See the "SnmpMibGroup" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void set(SnmpMibSubRequest req, int depth)
-        throws SnmpStatusException {
-        objectserver.set(this,req,depth);
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "check" method defined in "SnmpMibGroup".
-    // See the "SnmpMibGroup" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void check(SnmpMibSubRequest req, int depth)
-        throws SnmpStatusException {
-        objectserver.check(this,req,depth);
-    }
-
-    /**
-     * Returns true if "arc" identifies a scalar object.
-     */
-    public boolean isVariable(long arc) {
-
-        switch((int)arc) {
-            case 3:
-            case 2:
-            case 1:
-                return true;
-            default:
-                break;
-        }
-        return false;
-    }
-
-    /**
-     * Returns true if "arc" identifies a readable scalar object.
-     */
-    public boolean isReadable(long arc) {
-
-        switch((int)arc) {
-            case 3:
-            case 2:
-            case 1:
-                return true;
-            default:
-                break;
-        }
-        return false;
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "skipVariable" method defined in "SnmpMibGroup".
-    // See the "SnmpMibGroup" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public boolean  skipVariable(long var, Object data, int pduVersion) {
-        switch((int)var) {
-            case 2:
-                if (pduVersion==SnmpDefinitions.snmpVersionOne) return true;
-                break;
-            default:
-                break;
-        }
-        return super.skipVariable(var,data,pduVersion);
-    }
-
-    /**
-     * Return the name of the attribute corresponding to the SNMP variable identified by "id".
-     */
-    public String getAttributeName(long id)
-        throws SnmpStatusException {
-        switch((int)id) {
-            case 3:
-                return "JvmJITCompilerTimeMonitoring";
-
-            case 2:
-                return "JvmJITCompilerTimeMs";
-
-            case 1:
-                return "JvmJITCompilerName";
-
-            default:
-                break;
-        }
-        throw new SnmpStatusException(SnmpStatusException.noSuchObject);
-    }
-
-    /**
-     * Returns true if "arc" identifies a table object.
-     */
-    public boolean isTable(long arc) {
-
-        switch((int)arc) {
-            default:
-                break;
-        }
-        return false;
-    }
-
-    /**
-     * Returns the table object identified by "arc".
-     */
-    public SnmpMibTable getTable(long arc) {
-        return null;
-    }
-
-    /**
-     * Register the group's SnmpMibTable objects with the meta-data.
-     */
-    public void registerTableNodes(SnmpMib mib, MBeanServer server) {
-    }
-
-    protected JvmCompilationMBean node;
-    protected SnmpStandardObjectServer objectserver = null;
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmMemGCEntryMBean.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 2003, 2004, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.management.snmp.jvmmib;
-
-//
-// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
-//
-
-
-// jmx imports
-//
-import com.sun.jmx.snmp.SnmpStatusException;
-
-/**
- * This interface is used for representing the remote management interface for the "JvmMemGCEntry" MBean.
- */
-public interface JvmMemGCEntryMBean {
-
-    /**
-     * Getter for the "JvmMemGCTimeMs" variable.
-     */
-    public Long getJvmMemGCTimeMs() throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmMemGCCount" variable.
-     */
-    public Long getJvmMemGCCount() throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmMemManagerIndex" variable.
-     */
-    public Integer getJvmMemManagerIndex() throws SnmpStatusException;
-
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmMemGCEntryMeta.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,255 +0,0 @@
-/*
- * Copyright (c) 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.management.snmp.jvmmib;
-
-//
-// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
-//
-
-// java imports
-//
-import java.io.Serializable;
-
-// jmx imports
-//
-import javax.management.MBeanServer;
-import com.sun.jmx.snmp.SnmpCounter;
-import com.sun.jmx.snmp.SnmpCounter64;
-import com.sun.jmx.snmp.SnmpGauge;
-import com.sun.jmx.snmp.SnmpInt;
-import com.sun.jmx.snmp.SnmpUnsignedInt;
-import com.sun.jmx.snmp.SnmpIpAddress;
-import com.sun.jmx.snmp.SnmpTimeticks;
-import com.sun.jmx.snmp.SnmpOpaque;
-import com.sun.jmx.snmp.SnmpString;
-import com.sun.jmx.snmp.SnmpStringFixed;
-import com.sun.jmx.snmp.SnmpOid;
-import com.sun.jmx.snmp.SnmpNull;
-import com.sun.jmx.snmp.SnmpValue;
-import com.sun.jmx.snmp.SnmpVarBind;
-import com.sun.jmx.snmp.SnmpStatusException;
-
-// jdmk imports
-//
-import com.sun.jmx.snmp.agent.SnmpMibNode;
-import com.sun.jmx.snmp.agent.SnmpMib;
-import com.sun.jmx.snmp.agent.SnmpMibEntry;
-import com.sun.jmx.snmp.agent.SnmpStandardObjectServer;
-import com.sun.jmx.snmp.agent.SnmpStandardMetaServer;
-import com.sun.jmx.snmp.agent.SnmpMibSubRequest;
-import com.sun.jmx.snmp.agent.SnmpMibTable;
-import com.sun.jmx.snmp.EnumRowStatus;
-import com.sun.jmx.snmp.SnmpDefinitions;
-
-/**
- * The class is used for representing SNMP metadata for the "JvmMemGCEntry" group.
- * The group is defined with the following oid: 1.3.6.1.4.1.42.2.145.3.163.1.1.2.101.1.
- */
-public class JvmMemGCEntryMeta extends SnmpMibEntry
-     implements Serializable, SnmpStandardMetaServer {
-
-     static final long serialVersionUID = 6082082529298387063L;
-    /**
-     * Constructor for the metadata associated to "JvmMemGCEntry".
-     */
-    public JvmMemGCEntryMeta(SnmpMib myMib, SnmpStandardObjectServer objserv) {
-        objectserver = objserv;
-        varList = new int[2];
-        varList[0] = 3;
-        varList[1] = 2;
-        SnmpMibNode.sort(varList);
-    }
-
-    /**
-     * Get the value of a scalar variable
-     */
-    public SnmpValue get(long var, Object data)
-        throws SnmpStatusException {
-        switch((int)var) {
-            case 3:
-                return new SnmpCounter64(node.getJvmMemGCTimeMs());
-
-            case 2:
-                return new SnmpCounter64(node.getJvmMemGCCount());
-
-            default:
-                break;
-        }
-        throw new SnmpStatusException(SnmpStatusException.noSuchObject);
-    }
-
-    /**
-     * Set the value of a scalar variable
-     */
-    public SnmpValue set(SnmpValue x, long var, Object data)
-        throws SnmpStatusException {
-        switch((int)var) {
-            case 3:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 2:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            default:
-                break;
-        }
-        throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-    }
-
-    /**
-     * Check the value of a scalar variable
-     */
-    public void check(SnmpValue x, long var, Object data)
-        throws SnmpStatusException {
-        switch((int) var) {
-            case 3:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 2:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            default:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-        }
-    }
-
-    /**
-     * Allow to bind the metadata description to a specific object.
-     */
-    protected void setInstance(JvmMemGCEntryMBean var) {
-        node = var;
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "get" method defined in "SnmpMibEntry".
-    // See the "SnmpMibEntry" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void get(SnmpMibSubRequest req, int depth)
-        throws SnmpStatusException {
-        objectserver.get(this,req,depth);
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "set" method defined in "SnmpMibEntry".
-    // See the "SnmpMibEntry" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void set(SnmpMibSubRequest req, int depth)
-        throws SnmpStatusException {
-        objectserver.set(this,req,depth);
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "check" method defined in "SnmpMibEntry".
-    // See the "SnmpMibEntry" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void check(SnmpMibSubRequest req, int depth)
-        throws SnmpStatusException {
-        objectserver.check(this,req,depth);
-    }
-
-    /**
-     * Returns true if "arc" identifies a scalar object.
-     */
-    public boolean isVariable(long arc) {
-
-        switch((int)arc) {
-            case 3:
-            case 2:
-                return true;
-            default:
-                break;
-        }
-        return false;
-    }
-
-    /**
-     * Returns true if "arc" identifies a readable scalar object.
-     */
-    public boolean isReadable(long arc) {
-
-        switch((int)arc) {
-            case 3:
-            case 2:
-                return true;
-            default:
-                break;
-        }
-        return false;
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "skipVariable" method defined in "SnmpMibEntry".
-    // See the "SnmpMibEntry" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public boolean  skipVariable(long var, Object data, int pduVersion) {
-        switch((int)var) {
-            case 3:
-            case 2:
-                if (pduVersion==SnmpDefinitions.snmpVersionOne) return true;
-                break;
-            default:
-                break;
-        }
-        return super.skipVariable(var,data,pduVersion);
-    }
-
-    /**
-     * Return the name of the attribute corresponding to the SNMP variable identified by "id".
-     */
-    public String getAttributeName(long id)
-        throws SnmpStatusException {
-        switch((int)id) {
-            case 3:
-                return "JvmMemGCTimeMs";
-
-            case 2:
-                return "JvmMemGCCount";
-
-            default:
-                break;
-        }
-        throw new SnmpStatusException(SnmpStatusException.noSuchObject);
-    }
-
-    protected JvmMemGCEntryMBean node;
-    protected SnmpStandardObjectServer objectserver = null;
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmMemGCTableMeta.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,265 +0,0 @@
-/*
- * Copyright (c) 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.management.snmp.jvmmib;
-
-//
-// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
-//
-
-// java imports
-//
-import java.io.Serializable;
-import java.util.Vector;
-
-// jmx imports
-//
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-import com.sun.jmx.snmp.SnmpCounter;
-import com.sun.jmx.snmp.SnmpCounter64;
-import com.sun.jmx.snmp.SnmpGauge;
-import com.sun.jmx.snmp.SnmpInt;
-import com.sun.jmx.snmp.SnmpUnsignedInt;
-import com.sun.jmx.snmp.SnmpIpAddress;
-import com.sun.jmx.snmp.SnmpTimeticks;
-import com.sun.jmx.snmp.SnmpOpaque;
-import com.sun.jmx.snmp.SnmpString;
-import com.sun.jmx.snmp.SnmpStringFixed;
-import com.sun.jmx.snmp.SnmpOid;
-import com.sun.jmx.snmp.SnmpNull;
-import com.sun.jmx.snmp.SnmpValue;
-import com.sun.jmx.snmp.SnmpVarBind;
-import com.sun.jmx.snmp.SnmpStatusException;
-
-// jdmk imports
-//
-import com.sun.jmx.snmp.agent.SnmpIndex;
-import com.sun.jmx.snmp.agent.SnmpMib;
-import com.sun.jmx.snmp.agent.SnmpMibTable;
-import com.sun.jmx.snmp.agent.SnmpMibSubRequest;
-import com.sun.jmx.snmp.agent.SnmpStandardObjectServer;
-
-/**
- * The class is used for implementing the "JvmMemGCTable" group.
- * The group is defined with the following oid: 1.3.6.1.4.1.42.2.145.3.163.1.1.2.101.
- */
-public class JvmMemGCTableMeta extends SnmpMibTable implements Serializable {
-
-    static final long serialVersionUID = -8843296871149264612L;
-    /**
-     * Constructor for the table. Initialize metadata for "JvmMemGCTableMeta".
-     * The reference on the MBean server is updated so the entries created through an SNMP SET will be AUTOMATICALLY REGISTERED in Java DMK.
-     */
-    public JvmMemGCTableMeta(SnmpMib myMib, SnmpStandardObjectServer objserv) {
-        super(myMib);
-        objectserver = objserv;
-    }
-
-
-    /**
-     * Factory method for "JvmMemGCEntry" entry metadata class.
-     *
-     * You can redefine this method if you need to replace the default
-     * generated metadata class with your own customized class.
-     *
-     * @param snmpEntryName Name of the SNMP Entry object (conceptual row) ("JvmMemGCEntry")
-     * @param tableName Name of the table in which the entries are registered ("JvmMemGCTable")
-     * @param mib The SnmpMib object in which this table is registered
-     * @param server MBeanServer for this table entries (may be null)
-     *
-     * @return An instance of the metadata class generated for the
-     *         "JvmMemGCEntry" conceptual row (JvmMemGCEntryMeta)
-     *
-     **/
-    protected JvmMemGCEntryMeta createJvmMemGCEntryMetaNode(String snmpEntryName, String tableName, SnmpMib mib, MBeanServer server)  {
-        return new JvmMemGCEntryMeta(mib, objectserver);
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "createNewEntry" method defined in "SnmpMibTable".
-    // See the "SnmpMibTable" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void createNewEntry(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
-        throws SnmpStatusException {
-        if (factory != null)
-            factory.createNewEntry(req, rowOid, depth, this);
-        else
-            throw new SnmpStatusException(
-                SnmpStatusException.snmpRspNoAccess);
-    }
-
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "isRegistrationRequired" method defined in "SnmpMibTable".
-    // See the "SnmpMibTable" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public boolean isRegistrationRequired()  {
-        return false;
-    }
-
-
-
-    public void registerEntryNode(SnmpMib mib, MBeanServer server)  {
-        node = createJvmMemGCEntryMetaNode("JvmMemGCEntry", "JvmMemGCTable", mib, server);
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "addEntry" method defined in "SnmpMibTable".
-    // See the "SnmpMibTable" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public synchronized void addEntry(SnmpOid rowOid, ObjectName objname,
-                 Object entry)
-        throws SnmpStatusException {
-        if (! (entry instanceof JvmMemGCEntryMBean) )
-            throw new ClassCastException("Entries for Table \"" +
-                           "JvmMemGCTable" + "\" must implement the \"" +
-                           "JvmMemGCEntryMBean" + "\" interface.");
-        super.addEntry(rowOid, objname, entry);
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "get" method defined in "SnmpMibTable".
-    // See the "SnmpMibTable" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void get(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
-        throws SnmpStatusException {
-        JvmMemGCEntryMBean entry = (JvmMemGCEntryMBean) getEntry(rowOid);
-        synchronized (this) {
-            node.setInstance(entry);
-            node.get(req,depth);
-        }
-    }
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "set" method defined in "SnmpMibTable".
-    // See the "SnmpMibTable" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void set(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
-        throws SnmpStatusException {
-        if (req.getSize() == 0) return;
-
-        JvmMemGCEntryMBean entry = (JvmMemGCEntryMBean) getEntry(rowOid);
-        synchronized (this) {
-            node.setInstance(entry);
-            node.set(req,depth);
-        }
-    }
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "check" method defined in "SnmpMibTable".
-    // See the "SnmpMibTable" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void check(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
-        throws SnmpStatusException {
-        if (req.getSize() == 0) return;
-
-        JvmMemGCEntryMBean entry = (JvmMemGCEntryMBean) getEntry(rowOid);
-        synchronized (this) {
-            node.setInstance(entry);
-            node.check(req,depth);
-        }
-    }
-
-    /**
-     * check that the given "var" identifies a columnar object.
-     */
-    public void validateVarEntryId( SnmpOid rowOid, long var, Object data )
-        throws SnmpStatusException {
-        node.validateVarId(var, data);
-    }
-
-    /**
-     * Returns true if "var" identifies a readable scalar object.
-     */
-    public boolean isReadableEntryId( SnmpOid rowOid, long var, Object data )
-        throws SnmpStatusException {
-        return node.isReadable(var);
-    }
-
-    /**
-     * Returns the arc of the next columnar object following "var".
-     */
-    public long getNextVarEntryId( SnmpOid rowOid, long var, Object data )
-        throws SnmpStatusException {
-        long nextvar = node.getNextVarId(var, data);
-        while (!isReadableEntryId(rowOid, nextvar, data))
-            nextvar = node.getNextVarId(nextvar, data);
-        return nextvar;
-    }
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "skipEntryVariable" method defined in "SnmpMibTable".
-    // See the "SnmpMibTable" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public boolean skipEntryVariable( SnmpOid rowOid, long var, Object data, int pduVersion) {
-        try {
-            JvmMemGCEntryMBean entry = (JvmMemGCEntryMBean) getEntry(rowOid);
-            synchronized (this) {
-                node.setInstance(entry);
-                return node.skipVariable(var, data, pduVersion);
-            }
-        } catch (SnmpStatusException x) {
-            return false;
-        }
-    }
-
-
-    /**
-     * Reference to the entry metadata.
-     */
-    private JvmMemGCEntryMeta node;
-
-    /**
-     * Reference to the object server.
-     */
-    protected SnmpStandardObjectServer objectserver;
-
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmMemManagerEntryMBean.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 2003, 2004, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.management.snmp.jvmmib;
-
-//
-// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
-//
-
-
-// jmx imports
-//
-import com.sun.jmx.snmp.SnmpStatusException;
-
-/**
- * This interface is used for representing the remote management interface for the "JvmMemManagerEntry" MBean.
- */
-public interface JvmMemManagerEntryMBean {
-
-    /**
-     * Getter for the "JvmMemManagerState" variable.
-     */
-    public EnumJvmMemManagerState getJvmMemManagerState() throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmMemManagerName" variable.
-     */
-    public String getJvmMemManagerName() throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmMemManagerIndex" variable.
-     */
-    public Integer getJvmMemManagerIndex() throws SnmpStatusException;
-
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmMemManagerEntryMeta.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,265 +0,0 @@
-/*
- * Copyright (c) 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.management.snmp.jvmmib;
-
-//
-// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
-//
-
-// java imports
-//
-import java.io.Serializable;
-
-// jmx imports
-//
-import javax.management.MBeanServer;
-import com.sun.jmx.snmp.SnmpCounter;
-import com.sun.jmx.snmp.SnmpCounter64;
-import com.sun.jmx.snmp.SnmpGauge;
-import com.sun.jmx.snmp.SnmpInt;
-import com.sun.jmx.snmp.SnmpUnsignedInt;
-import com.sun.jmx.snmp.SnmpIpAddress;
-import com.sun.jmx.snmp.SnmpTimeticks;
-import com.sun.jmx.snmp.SnmpOpaque;
-import com.sun.jmx.snmp.SnmpString;
-import com.sun.jmx.snmp.SnmpStringFixed;
-import com.sun.jmx.snmp.SnmpOid;
-import com.sun.jmx.snmp.SnmpNull;
-import com.sun.jmx.snmp.SnmpValue;
-import com.sun.jmx.snmp.SnmpVarBind;
-import com.sun.jmx.snmp.SnmpStatusException;
-
-// jdmk imports
-//
-import com.sun.jmx.snmp.agent.SnmpMibNode;
-import com.sun.jmx.snmp.agent.SnmpMib;
-import com.sun.jmx.snmp.agent.SnmpMibEntry;
-import com.sun.jmx.snmp.agent.SnmpStandardObjectServer;
-import com.sun.jmx.snmp.agent.SnmpStandardMetaServer;
-import com.sun.jmx.snmp.agent.SnmpMibSubRequest;
-import com.sun.jmx.snmp.agent.SnmpMibTable;
-import com.sun.jmx.snmp.EnumRowStatus;
-import com.sun.jmx.snmp.SnmpDefinitions;
-
-/**
- * The class is used for representing SNMP metadata for the "JvmMemManagerEntry" group.
- * The group is defined with the following oid: 1.3.6.1.4.1.42.2.145.3.163.1.1.2.100.1.
- */
-public class JvmMemManagerEntryMeta extends SnmpMibEntry
-     implements Serializable, SnmpStandardMetaServer {
-
-    static final long serialVersionUID = 8166956416408970453L;
-    /**
-     * Constructor for the metadata associated to "JvmMemManagerEntry".
-     */
-    public JvmMemManagerEntryMeta(SnmpMib myMib, SnmpStandardObjectServer objserv) {
-        objectserver = objserv;
-        varList = new int[2];
-        varList[0] = 3;
-        varList[1] = 2;
-        SnmpMibNode.sort(varList);
-    }
-
-    /**
-     * Get the value of a scalar variable
-     */
-    public SnmpValue get(long var, Object data)
-        throws SnmpStatusException {
-        switch((int)var) {
-            case 3:
-                return new SnmpInt(node.getJvmMemManagerState());
-
-            case 2:
-                return new SnmpString(node.getJvmMemManagerName());
-
-            case 1:
-                throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-            default:
-                break;
-        }
-        throw new SnmpStatusException(SnmpStatusException.noSuchObject);
-    }
-
-    /**
-     * Set the value of a scalar variable
-     */
-    public SnmpValue set(SnmpValue x, long var, Object data)
-        throws SnmpStatusException {
-        switch((int)var) {
-            case 3:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 2:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 1:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            default:
-                break;
-        }
-        throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-    }
-
-    /**
-     * Check the value of a scalar variable
-     */
-    public void check(SnmpValue x, long var, Object data)
-        throws SnmpStatusException {
-        switch((int) var) {
-            case 3:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 2:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 1:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            default:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-        }
-    }
-
-    /**
-     * Allow to bind the metadata description to a specific object.
-     */
-    protected void setInstance(JvmMemManagerEntryMBean var) {
-        node = var;
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "get" method defined in "SnmpMibEntry".
-    // See the "SnmpMibEntry" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void get(SnmpMibSubRequest req, int depth)
-        throws SnmpStatusException {
-        objectserver.get(this,req,depth);
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "set" method defined in "SnmpMibEntry".
-    // See the "SnmpMibEntry" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void set(SnmpMibSubRequest req, int depth)
-        throws SnmpStatusException {
-        objectserver.set(this,req,depth);
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "check" method defined in "SnmpMibEntry".
-    // See the "SnmpMibEntry" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void check(SnmpMibSubRequest req, int depth)
-        throws SnmpStatusException {
-        objectserver.check(this,req,depth);
-    }
-
-    /**
-     * Returns true if "arc" identifies a scalar object.
-     */
-    public boolean isVariable(long arc) {
-
-        switch((int)arc) {
-            case 3:
-            case 2:
-            case 1:
-                return true;
-            default:
-                break;
-        }
-        return false;
-    }
-
-    /**
-     * Returns true if "arc" identifies a readable scalar object.
-     */
-    public boolean isReadable(long arc) {
-
-        switch((int)arc) {
-            case 3:
-            case 2:
-                return true;
-            default:
-                break;
-        }
-        return false;
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "skipVariable" method defined in "SnmpMibEntry".
-    // See the "SnmpMibEntry" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public boolean  skipVariable(long var, Object data, int pduVersion) {
-        switch((int)var) {
-            case 1:
-                return true;
-            default:
-                break;
-        }
-        return super.skipVariable(var,data,pduVersion);
-    }
-
-    /**
-     * Return the name of the attribute corresponding to the SNMP variable identified by "id".
-     */
-    public String getAttributeName(long id)
-        throws SnmpStatusException {
-        switch((int)id) {
-            case 3:
-                return "JvmMemManagerState";
-
-            case 2:
-                return "JvmMemManagerName";
-
-            case 1:
-                return "JvmMemManagerIndex";
-
-            default:
-                break;
-        }
-        throw new SnmpStatusException(SnmpStatusException.noSuchObject);
-    }
-
-    protected JvmMemManagerEntryMBean node;
-    protected SnmpStandardObjectServer objectserver = null;
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmMemManagerTableMeta.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,265 +0,0 @@
-/*
- * Copyright (c) 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.management.snmp.jvmmib;
-
-//
-// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
-//
-
-// java imports
-//
-import java.io.Serializable;
-import java.util.Vector;
-
-// jmx imports
-//
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-import com.sun.jmx.snmp.SnmpCounter;
-import com.sun.jmx.snmp.SnmpCounter64;
-import com.sun.jmx.snmp.SnmpGauge;
-import com.sun.jmx.snmp.SnmpInt;
-import com.sun.jmx.snmp.SnmpUnsignedInt;
-import com.sun.jmx.snmp.SnmpIpAddress;
-import com.sun.jmx.snmp.SnmpTimeticks;
-import com.sun.jmx.snmp.SnmpOpaque;
-import com.sun.jmx.snmp.SnmpString;
-import com.sun.jmx.snmp.SnmpStringFixed;
-import com.sun.jmx.snmp.SnmpOid;
-import com.sun.jmx.snmp.SnmpNull;
-import com.sun.jmx.snmp.SnmpValue;
-import com.sun.jmx.snmp.SnmpVarBind;
-import com.sun.jmx.snmp.SnmpStatusException;
-
-// jdmk imports
-//
-import com.sun.jmx.snmp.agent.SnmpIndex;
-import com.sun.jmx.snmp.agent.SnmpMib;
-import com.sun.jmx.snmp.agent.SnmpMibTable;
-import com.sun.jmx.snmp.agent.SnmpMibSubRequest;
-import com.sun.jmx.snmp.agent.SnmpStandardObjectServer;
-
-/**
- * The class is used for implementing the "JvmMemManagerTable" group.
- * The group is defined with the following oid: 1.3.6.1.4.1.42.2.145.3.163.1.1.2.100.
- */
-public class JvmMemManagerTableMeta extends SnmpMibTable implements Serializable {
-
-    static final long serialVersionUID = 5026520607518015233L;
-    /**
-     * Constructor for the table. Initialize metadata for "JvmMemManagerTableMeta".
-     * The reference on the MBean server is updated so the entries created through an SNMP SET will be AUTOMATICALLY REGISTERED in Java DMK.
-     */
-    public JvmMemManagerTableMeta(SnmpMib myMib, SnmpStandardObjectServer objserv) {
-        super(myMib);
-        objectserver = objserv;
-    }
-
-
-    /**
-     * Factory method for "JvmMemManagerEntry" entry metadata class.
-     *
-     * You can redefine this method if you need to replace the default
-     * generated metadata class with your own customized class.
-     *
-     * @param snmpEntryName Name of the SNMP Entry object (conceptual row) ("JvmMemManagerEntry")
-     * @param tableName Name of the table in which the entries are registered ("JvmMemManagerTable")
-     * @param mib The SnmpMib object in which this table is registered
-     * @param server MBeanServer for this table entries (may be null)
-     *
-     * @return An instance of the metadata class generated for the
-     *         "JvmMemManagerEntry" conceptual row (JvmMemManagerEntryMeta)
-     *
-     **/
-    protected JvmMemManagerEntryMeta createJvmMemManagerEntryMetaNode(String snmpEntryName, String tableName, SnmpMib mib, MBeanServer server)  {
-        return new JvmMemManagerEntryMeta(mib, objectserver);
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "createNewEntry" method defined in "SnmpMibTable".
-    // See the "SnmpMibTable" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void createNewEntry(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
-        throws SnmpStatusException {
-        if (factory != null)
-            factory.createNewEntry(req, rowOid, depth, this);
-        else
-            throw new SnmpStatusException(
-                SnmpStatusException.snmpRspNoAccess);
-    }
-
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "isRegistrationRequired" method defined in "SnmpMibTable".
-    // See the "SnmpMibTable" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public boolean isRegistrationRequired()  {
-        return false;
-    }
-
-
-
-    public void registerEntryNode(SnmpMib mib, MBeanServer server)  {
-        node = createJvmMemManagerEntryMetaNode("JvmMemManagerEntry", "JvmMemManagerTable", mib, server);
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "addEntry" method defined in "SnmpMibTable".
-    // See the "SnmpMibTable" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public synchronized void addEntry(SnmpOid rowOid, ObjectName objname,
-                 Object entry)
-        throws SnmpStatusException {
-        if (! (entry instanceof JvmMemManagerEntryMBean) )
-            throw new ClassCastException("Entries for Table \"" +
-                           "JvmMemManagerTable" + "\" must implement the \"" +
-                           "JvmMemManagerEntryMBean" + "\" interface.");
-        super.addEntry(rowOid, objname, entry);
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "get" method defined in "SnmpMibTable".
-    // See the "SnmpMibTable" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void get(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
-        throws SnmpStatusException {
-        JvmMemManagerEntryMBean entry = (JvmMemManagerEntryMBean) getEntry(rowOid);
-        synchronized (this) {
-            node.setInstance(entry);
-            node.get(req,depth);
-        }
-    }
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "set" method defined in "SnmpMibTable".
-    // See the "SnmpMibTable" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void set(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
-        throws SnmpStatusException {
-        if (req.getSize() == 0) return;
-
-        JvmMemManagerEntryMBean entry = (JvmMemManagerEntryMBean) getEntry(rowOid);
-        synchronized (this) {
-            node.setInstance(entry);
-            node.set(req,depth);
-        }
-    }
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "check" method defined in "SnmpMibTable".
-    // See the "SnmpMibTable" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void check(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
-        throws SnmpStatusException {
-        if (req.getSize() == 0) return;
-
-        JvmMemManagerEntryMBean entry = (JvmMemManagerEntryMBean) getEntry(rowOid);
-        synchronized (this) {
-            node.setInstance(entry);
-            node.check(req,depth);
-        }
-    }
-
-    /**
-     * check that the given "var" identifies a columnar object.
-     */
-    public void validateVarEntryId( SnmpOid rowOid, long var, Object data )
-        throws SnmpStatusException {
-        node.validateVarId(var, data);
-    }
-
-    /**
-     * Returns true if "var" identifies a readable scalar object.
-     */
-    public boolean isReadableEntryId( SnmpOid rowOid, long var, Object data )
-        throws SnmpStatusException {
-        return node.isReadable(var);
-    }
-
-    /**
-     * Returns the arc of the next columnar object following "var".
-     */
-    public long getNextVarEntryId( SnmpOid rowOid, long var, Object data )
-        throws SnmpStatusException {
-        long nextvar = node.getNextVarId(var, data);
-        while (!isReadableEntryId(rowOid, nextvar, data))
-            nextvar = node.getNextVarId(nextvar, data);
-        return nextvar;
-    }
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "skipEntryVariable" method defined in "SnmpMibTable".
-    // See the "SnmpMibTable" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public boolean skipEntryVariable( SnmpOid rowOid, long var, Object data, int pduVersion) {
-        try {
-            JvmMemManagerEntryMBean entry = (JvmMemManagerEntryMBean) getEntry(rowOid);
-            synchronized (this) {
-                node.setInstance(entry);
-                return node.skipVariable(var, data, pduVersion);
-            }
-        } catch (SnmpStatusException x) {
-            return false;
-        }
-    }
-
-
-    /**
-     * Reference to the entry metadata.
-     */
-    private JvmMemManagerEntryMeta node;
-
-    /**
-     * Reference to the object server.
-     */
-    protected SnmpStandardObjectServer objectserver;
-
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmMemMgrPoolRelEntryMBean.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 2003, 2004, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.management.snmp.jvmmib;
-
-//
-// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
-//
-
-
-// jmx imports
-//
-import com.sun.jmx.snmp.SnmpStatusException;
-
-/**
- * This interface is used for representing the remote management interface for the "JvmMemMgrPoolRelEntry" MBean.
- */
-public interface JvmMemMgrPoolRelEntryMBean {
-
-    /**
-     * Getter for the "JvmMemMgrRelPoolName" variable.
-     */
-    public String getJvmMemMgrRelPoolName() throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmMemMgrRelManagerName" variable.
-     */
-    public String getJvmMemMgrRelManagerName() throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmMemManagerIndex" variable.
-     */
-    public Integer getJvmMemManagerIndex() throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmMemPoolIndex" variable.
-     */
-    public Integer getJvmMemPoolIndex() throws SnmpStatusException;
-
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmMemMgrPoolRelEntryMeta.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,247 +0,0 @@
-/*
- * Copyright (c) 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.management.snmp.jvmmib;
-
-//
-// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
-//
-
-// java imports
-//
-import java.io.Serializable;
-
-// jmx imports
-//
-import javax.management.MBeanServer;
-import com.sun.jmx.snmp.SnmpCounter;
-import com.sun.jmx.snmp.SnmpCounter64;
-import com.sun.jmx.snmp.SnmpGauge;
-import com.sun.jmx.snmp.SnmpInt;
-import com.sun.jmx.snmp.SnmpUnsignedInt;
-import com.sun.jmx.snmp.SnmpIpAddress;
-import com.sun.jmx.snmp.SnmpTimeticks;
-import com.sun.jmx.snmp.SnmpOpaque;
-import com.sun.jmx.snmp.SnmpString;
-import com.sun.jmx.snmp.SnmpStringFixed;
-import com.sun.jmx.snmp.SnmpOid;
-import com.sun.jmx.snmp.SnmpNull;
-import com.sun.jmx.snmp.SnmpValue;
-import com.sun.jmx.snmp.SnmpVarBind;
-import com.sun.jmx.snmp.SnmpStatusException;
-
-// jdmk imports
-//
-import com.sun.jmx.snmp.agent.SnmpMibNode;
-import com.sun.jmx.snmp.agent.SnmpMib;
-import com.sun.jmx.snmp.agent.SnmpMibEntry;
-import com.sun.jmx.snmp.agent.SnmpStandardObjectServer;
-import com.sun.jmx.snmp.agent.SnmpStandardMetaServer;
-import com.sun.jmx.snmp.agent.SnmpMibSubRequest;
-import com.sun.jmx.snmp.agent.SnmpMibTable;
-import com.sun.jmx.snmp.EnumRowStatus;
-import com.sun.jmx.snmp.SnmpDefinitions;
-
-/**
- * The class is used for representing SNMP metadata for the "JvmMemMgrPoolRelEntry" group.
- * The group is defined with the following oid: 1.3.6.1.4.1.42.2.145.3.163.1.1.2.120.1.
- */
-public class JvmMemMgrPoolRelEntryMeta extends SnmpMibEntry
-     implements Serializable, SnmpStandardMetaServer {
-
-    static final long serialVersionUID = 7414270971113459798L;
-    /**
-     * Constructor for the metadata associated to "JvmMemMgrPoolRelEntry".
-     */
-    public JvmMemMgrPoolRelEntryMeta(SnmpMib myMib, SnmpStandardObjectServer objserv) {
-        objectserver = objserv;
-        varList = new int[2];
-        varList[0] = 3;
-        varList[1] = 2;
-        SnmpMibNode.sort(varList);
-    }
-
-    /**
-     * Get the value of a scalar variable
-     */
-    public SnmpValue get(long var, Object data)
-        throws SnmpStatusException {
-        switch((int)var) {
-            case 3:
-                return new SnmpString(node.getJvmMemMgrRelPoolName());
-
-            case 2:
-                return new SnmpString(node.getJvmMemMgrRelManagerName());
-
-            default:
-                break;
-        }
-        throw new SnmpStatusException(SnmpStatusException.noSuchObject);
-    }
-
-    /**
-     * Set the value of a scalar variable
-     */
-    public SnmpValue set(SnmpValue x, long var, Object data)
-        throws SnmpStatusException {
-        switch((int)var) {
-            case 3:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 2:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            default:
-                break;
-        }
-        throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-    }
-
-    /**
-     * Check the value of a scalar variable
-     */
-    public void check(SnmpValue x, long var, Object data)
-        throws SnmpStatusException {
-        switch((int) var) {
-            case 3:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 2:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            default:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-        }
-    }
-
-    /**
-     * Allow to bind the metadata description to a specific object.
-     */
-    protected void setInstance(JvmMemMgrPoolRelEntryMBean var) {
-        node = var;
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "get" method defined in "SnmpMibEntry".
-    // See the "SnmpMibEntry" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void get(SnmpMibSubRequest req, int depth)
-        throws SnmpStatusException {
-        objectserver.get(this,req,depth);
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "set" method defined in "SnmpMibEntry".
-    // See the "SnmpMibEntry" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void set(SnmpMibSubRequest req, int depth)
-        throws SnmpStatusException {
-        objectserver.set(this,req,depth);
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "check" method defined in "SnmpMibEntry".
-    // See the "SnmpMibEntry" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void check(SnmpMibSubRequest req, int depth)
-        throws SnmpStatusException {
-        objectserver.check(this,req,depth);
-    }
-
-    /**
-     * Returns true if "arc" identifies a scalar object.
-     */
-    public boolean isVariable(long arc) {
-
-        switch((int)arc) {
-            case 3:
-            case 2:
-                return true;
-            default:
-                break;
-        }
-        return false;
-    }
-
-    /**
-     * Returns true if "arc" identifies a readable scalar object.
-     */
-    public boolean isReadable(long arc) {
-
-        switch((int)arc) {
-            case 3:
-            case 2:
-                return true;
-            default:
-                break;
-        }
-        return false;
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "skipVariable" method defined in "SnmpMibEntry".
-    // See the "SnmpMibEntry" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public boolean  skipVariable(long var, Object data, int pduVersion) {
-        return super.skipVariable(var,data,pduVersion);
-    }
-
-    /**
-     * Return the name of the attribute corresponding to the SNMP variable identified by "id".
-     */
-    public String getAttributeName(long id)
-        throws SnmpStatusException {
-        switch((int)id) {
-            case 3:
-                return "JvmMemMgrRelPoolName";
-
-            case 2:
-                return "JvmMemMgrRelManagerName";
-
-            default:
-                break;
-        }
-        throw new SnmpStatusException(SnmpStatusException.noSuchObject);
-    }
-
-    protected JvmMemMgrPoolRelEntryMBean node;
-    protected SnmpStandardObjectServer objectserver = null;
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmMemMgrPoolRelTableMeta.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,265 +0,0 @@
-/*
- * Copyright (c) 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.management.snmp.jvmmib;
-
-//
-// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
-//
-
-// java imports
-//
-import java.io.Serializable;
-import java.util.Vector;
-
-// jmx imports
-//
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-import com.sun.jmx.snmp.SnmpCounter;
-import com.sun.jmx.snmp.SnmpCounter64;
-import com.sun.jmx.snmp.SnmpGauge;
-import com.sun.jmx.snmp.SnmpInt;
-import com.sun.jmx.snmp.SnmpUnsignedInt;
-import com.sun.jmx.snmp.SnmpIpAddress;
-import com.sun.jmx.snmp.SnmpTimeticks;
-import com.sun.jmx.snmp.SnmpOpaque;
-import com.sun.jmx.snmp.SnmpString;
-import com.sun.jmx.snmp.SnmpStringFixed;
-import com.sun.jmx.snmp.SnmpOid;
-import com.sun.jmx.snmp.SnmpNull;
-import com.sun.jmx.snmp.SnmpValue;
-import com.sun.jmx.snmp.SnmpVarBind;
-import com.sun.jmx.snmp.SnmpStatusException;
-
-// jdmk imports
-//
-import com.sun.jmx.snmp.agent.SnmpIndex;
-import com.sun.jmx.snmp.agent.SnmpMib;
-import com.sun.jmx.snmp.agent.SnmpMibTable;
-import com.sun.jmx.snmp.agent.SnmpMibSubRequest;
-import com.sun.jmx.snmp.agent.SnmpStandardObjectServer;
-
-/**
- * The class is used for implementing the "JvmMemMgrPoolRelTable" group.
- * The group is defined with the following oid: 1.3.6.1.4.1.42.2.145.3.163.1.1.2.120.
- */
-public class JvmMemMgrPoolRelTableMeta extends SnmpMibTable implements Serializable {
-
-    static final long serialVersionUID = -310733366542788998L;
-    /**
-     * Constructor for the table. Initialize metadata for "JvmMemMgrPoolRelTableMeta".
-     * The reference on the MBean server is updated so the entries created through an SNMP SET will be AUTOMATICALLY REGISTERED in Java DMK.
-     */
-    public JvmMemMgrPoolRelTableMeta(SnmpMib myMib, SnmpStandardObjectServer objserv) {
-        super(myMib);
-        objectserver = objserv;
-    }
-
-
-    /**
-     * Factory method for "JvmMemMgrPoolRelEntry" entry metadata class.
-     *
-     * You can redefine this method if you need to replace the default
-     * generated metadata class with your own customized class.
-     *
-     * @param snmpEntryName Name of the SNMP Entry object (conceptual row) ("JvmMemMgrPoolRelEntry")
-     * @param tableName Name of the table in which the entries are registered ("JvmMemMgrPoolRelTable")
-     * @param mib The SnmpMib object in which this table is registered
-     * @param server MBeanServer for this table entries (may be null)
-     *
-     * @return An instance of the metadata class generated for the
-     *         "JvmMemMgrPoolRelEntry" conceptual row (JvmMemMgrPoolRelEntryMeta)
-     *
-     **/
-    protected JvmMemMgrPoolRelEntryMeta createJvmMemMgrPoolRelEntryMetaNode(String snmpEntryName, String tableName, SnmpMib mib, MBeanServer server)  {
-        return new JvmMemMgrPoolRelEntryMeta(mib, objectserver);
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "createNewEntry" method defined in "SnmpMibTable".
-    // See the "SnmpMibTable" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void createNewEntry(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
-        throws SnmpStatusException {
-        if (factory != null)
-            factory.createNewEntry(req, rowOid, depth, this);
-        else
-            throw new SnmpStatusException(
-                SnmpStatusException.snmpRspNoAccess);
-    }
-
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "isRegistrationRequired" method defined in "SnmpMibTable".
-    // See the "SnmpMibTable" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public boolean isRegistrationRequired()  {
-        return false;
-    }
-
-
-
-    public void registerEntryNode(SnmpMib mib, MBeanServer server)  {
-        node = createJvmMemMgrPoolRelEntryMetaNode("JvmMemMgrPoolRelEntry", "JvmMemMgrPoolRelTable", mib, server);
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "addEntry" method defined in "SnmpMibTable".
-    // See the "SnmpMibTable" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public synchronized void addEntry(SnmpOid rowOid, ObjectName objname,
-                 Object entry)
-        throws SnmpStatusException {
-        if (! (entry instanceof JvmMemMgrPoolRelEntryMBean) )
-            throw new ClassCastException("Entries for Table \"" +
-                           "JvmMemMgrPoolRelTable" + "\" must implement the \"" +
-                           "JvmMemMgrPoolRelEntryMBean" + "\" interface.");
-        super.addEntry(rowOid, objname, entry);
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "get" method defined in "SnmpMibTable".
-    // See the "SnmpMibTable" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void get(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
-        throws SnmpStatusException {
-        JvmMemMgrPoolRelEntryMBean entry = (JvmMemMgrPoolRelEntryMBean) getEntry(rowOid);
-        synchronized (this) {
-            node.setInstance(entry);
-            node.get(req,depth);
-        }
-    }
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "set" method defined in "SnmpMibTable".
-    // See the "SnmpMibTable" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void set(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
-        throws SnmpStatusException {
-        if (req.getSize() == 0) return;
-
-        JvmMemMgrPoolRelEntryMBean entry = (JvmMemMgrPoolRelEntryMBean) getEntry(rowOid);
-        synchronized (this) {
-            node.setInstance(entry);
-            node.set(req,depth);
-        }
-    }
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "check" method defined in "SnmpMibTable".
-    // See the "SnmpMibTable" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void check(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
-        throws SnmpStatusException {
-        if (req.getSize() == 0) return;
-
-        JvmMemMgrPoolRelEntryMBean entry = (JvmMemMgrPoolRelEntryMBean) getEntry(rowOid);
-        synchronized (this) {
-            node.setInstance(entry);
-            node.check(req,depth);
-        }
-    }
-
-    /**
-     * check that the given "var" identifies a columnar object.
-     */
-    public void validateVarEntryId( SnmpOid rowOid, long var, Object data )
-        throws SnmpStatusException {
-        node.validateVarId(var, data);
-    }
-
-    /**
-     * Returns true if "var" identifies a readable scalar object.
-     */
-    public boolean isReadableEntryId( SnmpOid rowOid, long var, Object data )
-        throws SnmpStatusException {
-        return node.isReadable(var);
-    }
-
-    /**
-     * Returns the arc of the next columnar object following "var".
-     */
-    public long getNextVarEntryId( SnmpOid rowOid, long var, Object data )
-        throws SnmpStatusException {
-        long nextvar = node.getNextVarId(var, data);
-        while (!isReadableEntryId(rowOid, nextvar, data))
-            nextvar = node.getNextVarId(nextvar, data);
-        return nextvar;
-    }
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "skipEntryVariable" method defined in "SnmpMibTable".
-    // See the "SnmpMibTable" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public boolean skipEntryVariable( SnmpOid rowOid, long var, Object data, int pduVersion) {
-        try {
-            JvmMemMgrPoolRelEntryMBean entry = (JvmMemMgrPoolRelEntryMBean) getEntry(rowOid);
-            synchronized (this) {
-                node.setInstance(entry);
-                return node.skipVariable(var, data, pduVersion);
-            }
-        } catch (SnmpStatusException x) {
-            return false;
-        }
-    }
-
-
-    /**
-     * Reference to the entry metadata.
-     */
-    private JvmMemMgrPoolRelEntryMeta node;
-
-    /**
-     * Reference to the object server.
-     */
-    protected SnmpStandardObjectServer objectserver;
-
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmMemPoolEntryMBean.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,177 +0,0 @@
-/*
- * Copyright (c) 2003, 2004, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.management.snmp.jvmmib;
-
-//
-// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
-//
-
-
-// jmx imports
-//
-import com.sun.jmx.snmp.SnmpStatusException;
-
-/**
- * This interface is used for representing the remote management interface for the "JvmMemPoolEntry" MBean.
- */
-public interface JvmMemPoolEntryMBean {
-
-    /**
-     * Getter for the "JvmMemPoolCollectMaxSize" variable.
-     */
-    public Long getJvmMemPoolCollectMaxSize() throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmMemPoolCollectCommitted" variable.
-     */
-    public Long getJvmMemPoolCollectCommitted() throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmMemPoolCollectUsed" variable.
-     */
-    public Long getJvmMemPoolCollectUsed() throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmMemPoolCollectThreshdSupport" variable.
-     */
-    public EnumJvmMemPoolCollectThreshdSupport getJvmMemPoolCollectThreshdSupport() throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmMemPoolCollectThreshdCount" variable.
-     */
-    public Long getJvmMemPoolCollectThreshdCount() throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmMemPoolCollectThreshold" variable.
-     */
-    public Long getJvmMemPoolCollectThreshold() throws SnmpStatusException;
-
-    /**
-     * Setter for the "JvmMemPoolCollectThreshold" variable.
-     */
-    public void setJvmMemPoolCollectThreshold(Long x) throws SnmpStatusException;
-
-    /**
-     * Checker for the "JvmMemPoolCollectThreshold" variable.
-     */
-    public void checkJvmMemPoolCollectThreshold(Long x) throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmMemPoolMaxSize" variable.
-     */
-    public Long getJvmMemPoolMaxSize() throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmMemPoolCommitted" variable.
-     */
-    public Long getJvmMemPoolCommitted() throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmMemPoolUsed" variable.
-     */
-    public Long getJvmMemPoolUsed() throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmMemPoolInitSize" variable.
-     */
-    public Long getJvmMemPoolInitSize() throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmMemPoolThreshdSupport" variable.
-     */
-    public EnumJvmMemPoolThreshdSupport getJvmMemPoolThreshdSupport() throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmMemPoolThreshdCount" variable.
-     */
-    public Long getJvmMemPoolThreshdCount() throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmMemPoolThreshold" variable.
-     */
-    public Long getJvmMemPoolThreshold() throws SnmpStatusException;
-
-    /**
-     * Setter for the "JvmMemPoolThreshold" variable.
-     */
-    public void setJvmMemPoolThreshold(Long x) throws SnmpStatusException;
-
-    /**
-     * Checker for the "JvmMemPoolThreshold" variable.
-     */
-    public void checkJvmMemPoolThreshold(Long x) throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmMemPoolPeakReset" variable.
-     */
-    public Long getJvmMemPoolPeakReset() throws SnmpStatusException;
-
-    /**
-     * Setter for the "JvmMemPoolPeakReset" variable.
-     */
-    public void setJvmMemPoolPeakReset(Long x) throws SnmpStatusException;
-
-    /**
-     * Checker for the "JvmMemPoolPeakReset" variable.
-     */
-    public void checkJvmMemPoolPeakReset(Long x) throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmMemPoolState" variable.
-     */
-    public EnumJvmMemPoolState getJvmMemPoolState() throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmMemPoolType" variable.
-     */
-    public EnumJvmMemPoolType getJvmMemPoolType() throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmMemPoolName" variable.
-     */
-    public String getJvmMemPoolName() throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmMemPoolPeakMaxSize" variable.
-     */
-    public Long getJvmMemPoolPeakMaxSize() throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmMemPoolIndex" variable.
-     */
-    public Integer getJvmMemPoolIndex() throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmMemPoolPeakCommitted" variable.
-     */
-    public Long getJvmMemPoolPeakCommitted() throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmMemPoolPeakUsed" variable.
-     */
-    public Long getJvmMemPoolPeakUsed() throws SnmpStatusException;
-
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmMemPoolEntryMeta.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,584 +0,0 @@
-/*
- * Copyright (c) 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.management.snmp.jvmmib;
-
-//
-// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
-//
-
-// java imports
-//
-import java.io.Serializable;
-
-// jmx imports
-//
-import javax.management.MBeanServer;
-import com.sun.jmx.snmp.SnmpCounter;
-import com.sun.jmx.snmp.SnmpCounter64;
-import com.sun.jmx.snmp.SnmpGauge;
-import com.sun.jmx.snmp.SnmpInt;
-import com.sun.jmx.snmp.SnmpUnsignedInt;
-import com.sun.jmx.snmp.SnmpIpAddress;
-import com.sun.jmx.snmp.SnmpTimeticks;
-import com.sun.jmx.snmp.SnmpOpaque;
-import com.sun.jmx.snmp.SnmpString;
-import com.sun.jmx.snmp.SnmpStringFixed;
-import com.sun.jmx.snmp.SnmpOid;
-import com.sun.jmx.snmp.SnmpNull;
-import com.sun.jmx.snmp.SnmpValue;
-import com.sun.jmx.snmp.SnmpVarBind;
-import com.sun.jmx.snmp.SnmpStatusException;
-
-// jdmk imports
-//
-import com.sun.jmx.snmp.agent.SnmpMibNode;
-import com.sun.jmx.snmp.agent.SnmpMib;
-import com.sun.jmx.snmp.agent.SnmpMibEntry;
-import com.sun.jmx.snmp.agent.SnmpStandardObjectServer;
-import com.sun.jmx.snmp.agent.SnmpStandardMetaServer;
-import com.sun.jmx.snmp.agent.SnmpMibSubRequest;
-import com.sun.jmx.snmp.agent.SnmpMibTable;
-import com.sun.jmx.snmp.EnumRowStatus;
-import com.sun.jmx.snmp.SnmpDefinitions;
-
-/**
- * The class is used for representing SNMP metadata for the "JvmMemPoolEntry" group.
- * The group is defined with the following oid: 1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.
- */
-public class JvmMemPoolEntryMeta extends SnmpMibEntry
-     implements Serializable, SnmpStandardMetaServer {
-
-    static final long serialVersionUID = 7220682779249102830L;
-    /**
-     * Constructor for the metadata associated to "JvmMemPoolEntry".
-     */
-    public JvmMemPoolEntryMeta(SnmpMib myMib, SnmpStandardObjectServer objserv) {
-        objectserver = objserv;
-        varList = new int[20];
-        varList[0] = 33;
-        varList[1] = 32;
-        varList[2] = 31;
-        varList[3] = 133;
-        varList[4] = 132;
-        varList[5] = 131;
-        varList[6] = 13;
-        varList[7] = 12;
-        varList[8] = 11;
-        varList[9] = 10;
-        varList[10] = 112;
-        varList[11] = 111;
-        varList[12] = 110;
-        varList[13] = 5;
-        varList[14] = 4;
-        varList[15] = 3;
-        varList[16] = 2;
-        varList[17] = 23;
-        varList[18] = 22;
-        varList[19] = 21;
-        SnmpMibNode.sort(varList);
-    }
-
-    /**
-     * Get the value of a scalar variable
-     */
-    public SnmpValue get(long var, Object data)
-        throws SnmpStatusException {
-        switch((int)var) {
-            case 33:
-                return new SnmpCounter64(node.getJvmMemPoolCollectMaxSize());
-
-            case 32:
-                return new SnmpCounter64(node.getJvmMemPoolCollectCommitted());
-
-            case 31:
-                return new SnmpCounter64(node.getJvmMemPoolCollectUsed());
-
-            case 133:
-                return new SnmpInt(node.getJvmMemPoolCollectThreshdSupport());
-
-            case 132:
-                return new SnmpCounter64(node.getJvmMemPoolCollectThreshdCount());
-
-            case 131:
-                return new SnmpCounter64(node.getJvmMemPoolCollectThreshold());
-
-            case 13:
-                return new SnmpCounter64(node.getJvmMemPoolMaxSize());
-
-            case 12:
-                return new SnmpCounter64(node.getJvmMemPoolCommitted());
-
-            case 11:
-                return new SnmpCounter64(node.getJvmMemPoolUsed());
-
-            case 10:
-                return new SnmpCounter64(node.getJvmMemPoolInitSize());
-
-            case 112:
-                return new SnmpInt(node.getJvmMemPoolThreshdSupport());
-
-            case 111:
-                return new SnmpCounter64(node.getJvmMemPoolThreshdCount());
-
-            case 110:
-                return new SnmpCounter64(node.getJvmMemPoolThreshold());
-
-            case 5:
-                return new SnmpCounter64(node.getJvmMemPoolPeakReset());
-
-            case 4:
-                return new SnmpInt(node.getJvmMemPoolState());
-
-            case 3:
-                return new SnmpInt(node.getJvmMemPoolType());
-
-            case 2:
-                return new SnmpString(node.getJvmMemPoolName());
-
-            case 23:
-                return new SnmpCounter64(node.getJvmMemPoolPeakMaxSize());
-
-            case 1:
-                throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-            case 22:
-                return new SnmpCounter64(node.getJvmMemPoolPeakCommitted());
-
-            case 21:
-                return new SnmpCounter64(node.getJvmMemPoolPeakUsed());
-
-            default:
-                break;
-        }
-        throw new SnmpStatusException(SnmpStatusException.noSuchObject);
-    }
-
-    /**
-     * Set the value of a scalar variable
-     */
-    public SnmpValue set(SnmpValue x, long var, Object data)
-        throws SnmpStatusException {
-        switch((int)var) {
-            case 33:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 32:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 31:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 133:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 132:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 131:
-                if (x instanceof SnmpCounter64) {
-                    node.setJvmMemPoolCollectThreshold(((SnmpCounter64)x).toLong());
-                    return new SnmpCounter64(node.getJvmMemPoolCollectThreshold());
-                } else {
-                    throw new SnmpStatusException(SnmpStatusException.snmpRspWrongType);
-                }
-
-            case 13:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 12:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 11:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 10:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 112:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 111:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 110:
-                if (x instanceof SnmpCounter64) {
-                    node.setJvmMemPoolThreshold(((SnmpCounter64)x).toLong());
-                    return new SnmpCounter64(node.getJvmMemPoolThreshold());
-                } else {
-                    throw new SnmpStatusException(SnmpStatusException.snmpRspWrongType);
-                }
-
-            case 5:
-                if (x instanceof SnmpCounter64) {
-                    node.setJvmMemPoolPeakReset(((SnmpCounter64)x).toLong());
-                    return new SnmpCounter64(node.getJvmMemPoolPeakReset());
-                } else {
-                    throw new SnmpStatusException(SnmpStatusException.snmpRspWrongType);
-                }
-
-            case 4:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 3:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 2:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 23:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 1:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 22:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 21:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            default:
-                break;
-        }
-        throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-    }
-
-    /**
-     * Check the value of a scalar variable
-     */
-    public void check(SnmpValue x, long var, Object data)
-        throws SnmpStatusException {
-        switch((int) var) {
-            case 33:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 32:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 31:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 133:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 132:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 131:
-                if (x instanceof SnmpCounter64) {
-                    node.checkJvmMemPoolCollectThreshold(((SnmpCounter64)x).toLong());
-                } else {
-                    throw new SnmpStatusException(SnmpStatusException.snmpRspWrongType);
-                }
-                break;
-
-            case 13:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 12:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 11:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 10:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 112:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 111:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 110:
-                if (x instanceof SnmpCounter64) {
-                    node.checkJvmMemPoolThreshold(((SnmpCounter64)x).toLong());
-                } else {
-                    throw new SnmpStatusException(SnmpStatusException.snmpRspWrongType);
-                }
-                break;
-
-            case 5:
-                if (x instanceof SnmpCounter64) {
-                    node.checkJvmMemPoolPeakReset(((SnmpCounter64)x).toLong());
-                } else {
-                    throw new SnmpStatusException(SnmpStatusException.snmpRspWrongType);
-                }
-                break;
-
-            case 4:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 3:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 2:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 23:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 1:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 22:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 21:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            default:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-        }
-    }
-
-    /**
-     * Allow to bind the metadata description to a specific object.
-     */
-    protected void setInstance(JvmMemPoolEntryMBean var) {
-        node = var;
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "get" method defined in "SnmpMibEntry".
-    // See the "SnmpMibEntry" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void get(SnmpMibSubRequest req, int depth)
-        throws SnmpStatusException {
-        objectserver.get(this,req,depth);
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "set" method defined in "SnmpMibEntry".
-    // See the "SnmpMibEntry" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void set(SnmpMibSubRequest req, int depth)
-        throws SnmpStatusException {
-        objectserver.set(this,req,depth);
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "check" method defined in "SnmpMibEntry".
-    // See the "SnmpMibEntry" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void check(SnmpMibSubRequest req, int depth)
-        throws SnmpStatusException {
-        objectserver.check(this,req,depth);
-    }
-
-    /**
-     * Returns true if "arc" identifies a scalar object.
-     */
-    public boolean isVariable(long arc) {
-
-        switch((int)arc) {
-            case 33:
-            case 32:
-            case 31:
-            case 133:
-            case 132:
-            case 131:
-            case 13:
-            case 12:
-            case 11:
-            case 10:
-            case 112:
-            case 111:
-            case 110:
-            case 5:
-            case 4:
-            case 3:
-            case 2:
-            case 23:
-            case 1:
-            case 22:
-            case 21:
-                return true;
-            default:
-                break;
-        }
-        return false;
-    }
-
-    /**
-     * Returns true if "arc" identifies a readable scalar object.
-     */
-    public boolean isReadable(long arc) {
-
-        switch((int)arc) {
-            case 33:
-            case 32:
-            case 31:
-            case 133:
-            case 132:
-            case 131:
-            case 13:
-            case 12:
-            case 11:
-            case 10:
-            case 112:
-            case 111:
-            case 110:
-            case 5:
-            case 4:
-            case 3:
-            case 2:
-            case 23:
-            case 22:
-            case 21:
-                return true;
-            default:
-                break;
-        }
-        return false;
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "skipVariable" method defined in "SnmpMibEntry".
-    // See the "SnmpMibEntry" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public boolean  skipVariable(long var, Object data, int pduVersion) {
-        switch((int)var) {
-            case 33:
-            case 32:
-            case 31:
-            case 132:
-            case 131:
-            case 13:
-            case 12:
-            case 11:
-            case 10:
-            case 111:
-            case 110:
-            case 5:
-            case 23:
-                if (pduVersion==SnmpDefinitions.snmpVersionOne) return true;
-                break;
-            case 1:
-                return true;
-            case 22:
-            case 21:
-                if (pduVersion==SnmpDefinitions.snmpVersionOne) return true;
-                break;
-            default:
-                break;
-        }
-        return super.skipVariable(var,data,pduVersion);
-    }
-
-    /**
-     * Return the name of the attribute corresponding to the SNMP variable identified by "id".
-     */
-    public String getAttributeName(long id)
-        throws SnmpStatusException {
-        switch((int)id) {
-            case 33:
-                return "JvmMemPoolCollectMaxSize";
-
-            case 32:
-                return "JvmMemPoolCollectCommitted";
-
-            case 31:
-                return "JvmMemPoolCollectUsed";
-
-            case 133:
-                return "JvmMemPoolCollectThreshdSupport";
-
-            case 132:
-                return "JvmMemPoolCollectThreshdCount";
-
-            case 131:
-                return "JvmMemPoolCollectThreshold";
-
-            case 13:
-                return "JvmMemPoolMaxSize";
-
-            case 12:
-                return "JvmMemPoolCommitted";
-
-            case 11:
-                return "JvmMemPoolUsed";
-
-            case 10:
-                return "JvmMemPoolInitSize";
-
-            case 112:
-                return "JvmMemPoolThreshdSupport";
-
-            case 111:
-                return "JvmMemPoolThreshdCount";
-
-            case 110:
-                return "JvmMemPoolThreshold";
-
-            case 5:
-                return "JvmMemPoolPeakReset";
-
-            case 4:
-                return "JvmMemPoolState";
-
-            case 3:
-                return "JvmMemPoolType";
-
-            case 2:
-                return "JvmMemPoolName";
-
-            case 23:
-                return "JvmMemPoolPeakMaxSize";
-
-            case 1:
-                return "JvmMemPoolIndex";
-
-            case 22:
-                return "JvmMemPoolPeakCommitted";
-
-            case 21:
-                return "JvmMemPoolPeakUsed";
-
-            default:
-                break;
-        }
-        throw new SnmpStatusException(SnmpStatusException.noSuchObject);
-    }
-
-    protected JvmMemPoolEntryMBean node;
-    protected SnmpStandardObjectServer objectserver = null;
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmMemPoolTableMeta.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,266 +0,0 @@
-/*
- * Copyright (c) 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.management.snmp.jvmmib;
-
-//
-// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
-//
-
-// java imports
-//
-import java.io.Serializable;
-import java.util.Vector;
-
-// jmx imports
-//
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-import com.sun.jmx.snmp.SnmpCounter;
-import com.sun.jmx.snmp.SnmpCounter64;
-import com.sun.jmx.snmp.SnmpGauge;
-import com.sun.jmx.snmp.SnmpInt;
-import com.sun.jmx.snmp.SnmpUnsignedInt;
-import com.sun.jmx.snmp.SnmpIpAddress;
-import com.sun.jmx.snmp.SnmpTimeticks;
-import com.sun.jmx.snmp.SnmpOpaque;
-import com.sun.jmx.snmp.SnmpString;
-import com.sun.jmx.snmp.SnmpStringFixed;
-import com.sun.jmx.snmp.SnmpOid;
-import com.sun.jmx.snmp.SnmpNull;
-import com.sun.jmx.snmp.SnmpValue;
-import com.sun.jmx.snmp.SnmpVarBind;
-import com.sun.jmx.snmp.SnmpStatusException;
-
-// jdmk imports
-//
-import com.sun.jmx.snmp.agent.SnmpIndex;
-import com.sun.jmx.snmp.agent.SnmpMib;
-import com.sun.jmx.snmp.agent.SnmpMibTable;
-import com.sun.jmx.snmp.agent.SnmpMibSubRequest;
-import com.sun.jmx.snmp.agent.SnmpStandardObjectServer;
-
-/**
- * The class is used for implementing the "JvmMemPoolTable" group.
- * The group is defined with the following oid: 1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.
- */
-public class JvmMemPoolTableMeta extends SnmpMibTable implements Serializable {
-
-    static final long serialVersionUID = -2799470815264898659L;
-
-    /**
-     * Constructor for the table. Initialize metadata for "JvmMemPoolTableMeta".
-     * The reference on the MBean server is updated so the entries created through an SNMP SET will be AUTOMATICALLY REGISTERED in Java DMK.
-     */
-    public JvmMemPoolTableMeta(SnmpMib myMib, SnmpStandardObjectServer objserv) {
-        super(myMib);
-        objectserver = objserv;
-    }
-
-
-    /**
-     * Factory method for "JvmMemPoolEntry" entry metadata class.
-     *
-     * You can redefine this method if you need to replace the default
-     * generated metadata class with your own customized class.
-     *
-     * @param snmpEntryName Name of the SNMP Entry object (conceptual row) ("JvmMemPoolEntry")
-     * @param tableName Name of the table in which the entries are registered ("JvmMemPoolTable")
-     * @param mib The SnmpMib object in which this table is registered
-     * @param server MBeanServer for this table entries (may be null)
-     *
-     * @return An instance of the metadata class generated for the
-     *         "JvmMemPoolEntry" conceptual row (JvmMemPoolEntryMeta)
-     *
-     **/
-    protected JvmMemPoolEntryMeta createJvmMemPoolEntryMetaNode(String snmpEntryName, String tableName, SnmpMib mib, MBeanServer server)  {
-        return new JvmMemPoolEntryMeta(mib, objectserver);
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "createNewEntry" method defined in "SnmpMibTable".
-    // See the "SnmpMibTable" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void createNewEntry(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
-        throws SnmpStatusException {
-        if (factory != null)
-            factory.createNewEntry(req, rowOid, depth, this);
-        else
-            throw new SnmpStatusException(
-                SnmpStatusException.snmpRspNoAccess);
-    }
-
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "isRegistrationRequired" method defined in "SnmpMibTable".
-    // See the "SnmpMibTable" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public boolean isRegistrationRequired()  {
-        return false;
-    }
-
-
-
-    public void registerEntryNode(SnmpMib mib, MBeanServer server)  {
-        node = createJvmMemPoolEntryMetaNode("JvmMemPoolEntry", "JvmMemPoolTable", mib, server);
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "addEntry" method defined in "SnmpMibTable".
-    // See the "SnmpMibTable" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public synchronized void addEntry(SnmpOid rowOid, ObjectName objname,
-                 Object entry)
-        throws SnmpStatusException {
-        if (! (entry instanceof JvmMemPoolEntryMBean) )
-            throw new ClassCastException("Entries for Table \"" +
-                           "JvmMemPoolTable" + "\" must implement the \"" +
-                           "JvmMemPoolEntryMBean" + "\" interface.");
-        super.addEntry(rowOid, objname, entry);
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "get" method defined in "SnmpMibTable".
-    // See the "SnmpMibTable" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void get(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
-        throws SnmpStatusException {
-        JvmMemPoolEntryMBean entry = (JvmMemPoolEntryMBean) getEntry(rowOid);
-        synchronized (this) {
-            node.setInstance(entry);
-            node.get(req,depth);
-        }
-    }
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "set" method defined in "SnmpMibTable".
-    // See the "SnmpMibTable" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void set(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
-        throws SnmpStatusException {
-        if (req.getSize() == 0) return;
-
-        JvmMemPoolEntryMBean entry = (JvmMemPoolEntryMBean) getEntry(rowOid);
-        synchronized (this) {
-            node.setInstance(entry);
-            node.set(req,depth);
-        }
-    }
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "check" method defined in "SnmpMibTable".
-    // See the "SnmpMibTable" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void check(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
-        throws SnmpStatusException {
-        if (req.getSize() == 0) return;
-
-        JvmMemPoolEntryMBean entry = (JvmMemPoolEntryMBean) getEntry(rowOid);
-        synchronized (this) {
-            node.setInstance(entry);
-            node.check(req,depth);
-        }
-    }
-
-    /**
-     * check that the given "var" identifies a columnar object.
-     */
-    public void validateVarEntryId( SnmpOid rowOid, long var, Object data )
-        throws SnmpStatusException {
-        node.validateVarId(var, data);
-    }
-
-    /**
-     * Returns true if "var" identifies a readable scalar object.
-     */
-    public boolean isReadableEntryId( SnmpOid rowOid, long var, Object data )
-        throws SnmpStatusException {
-        return node.isReadable(var);
-    }
-
-    /**
-     * Returns the arc of the next columnar object following "var".
-     */
-    public long getNextVarEntryId( SnmpOid rowOid, long var, Object data )
-        throws SnmpStatusException {
-        long nextvar = node.getNextVarId(var, data);
-        while (!isReadableEntryId(rowOid, nextvar, data))
-            nextvar = node.getNextVarId(nextvar, data);
-        return nextvar;
-    }
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "skipEntryVariable" method defined in "SnmpMibTable".
-    // See the "SnmpMibTable" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public boolean skipEntryVariable( SnmpOid rowOid, long var, Object data, int pduVersion) {
-        try {
-            JvmMemPoolEntryMBean entry = (JvmMemPoolEntryMBean) getEntry(rowOid);
-            synchronized (this) {
-                node.setInstance(entry);
-                return node.skipVariable(var, data, pduVersion);
-            }
-        } catch (SnmpStatusException x) {
-            return false;
-        }
-    }
-
-
-    /**
-     * Reference to the entry metadata.
-     */
-    private JvmMemPoolEntryMeta node;
-
-    /**
-     * Reference to the object server.
-     */
-    protected SnmpStandardObjectServer objectserver;
-
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmMemoryMBean.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,117 +0,0 @@
-/*
- * Copyright (c) 2003, 2004, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.management.snmp.jvmmib;
-
-//
-// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
-//
-
-
-// jmx imports
-//
-import com.sun.jmx.snmp.SnmpStatusException;
-
-/**
- * This interface is used for representing the remote management interface for the "JvmMemory" MBean.
- */
-public interface JvmMemoryMBean {
-
-    /**
-     * Getter for the "JvmMemoryNonHeapMaxSize" variable.
-     */
-    public Long getJvmMemoryNonHeapMaxSize() throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmMemoryNonHeapCommitted" variable.
-     */
-    public Long getJvmMemoryNonHeapCommitted() throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmMemoryNonHeapUsed" variable.
-     */
-    public Long getJvmMemoryNonHeapUsed() throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmMemoryNonHeapInitSize" variable.
-     */
-    public Long getJvmMemoryNonHeapInitSize() throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmMemoryHeapMaxSize" variable.
-     */
-    public Long getJvmMemoryHeapMaxSize() throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmMemoryHeapCommitted" variable.
-     */
-    public Long getJvmMemoryHeapCommitted() throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmMemoryGCCall" variable.
-     */
-    public EnumJvmMemoryGCCall getJvmMemoryGCCall() throws SnmpStatusException;
-
-    /**
-     * Setter for the "JvmMemoryGCCall" variable.
-     */
-    public void setJvmMemoryGCCall(EnumJvmMemoryGCCall x) throws SnmpStatusException;
-
-    /**
-     * Checker for the "JvmMemoryGCCall" variable.
-     */
-    public void checkJvmMemoryGCCall(EnumJvmMemoryGCCall x) throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmMemoryHeapUsed" variable.
-     */
-    public Long getJvmMemoryHeapUsed() throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmMemoryGCVerboseLevel" variable.
-     */
-    public EnumJvmMemoryGCVerboseLevel getJvmMemoryGCVerboseLevel() throws SnmpStatusException;
-
-    /**
-     * Setter for the "JvmMemoryGCVerboseLevel" variable.
-     */
-    public void setJvmMemoryGCVerboseLevel(EnumJvmMemoryGCVerboseLevel x) throws SnmpStatusException;
-
-    /**
-     * Checker for the "JvmMemoryGCVerboseLevel" variable.
-     */
-    public void checkJvmMemoryGCVerboseLevel(EnumJvmMemoryGCVerboseLevel x) throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmMemoryHeapInitSize" variable.
-     */
-    public Long getJvmMemoryHeapInitSize() throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmMemoryPendingFinalCount" variable.
-     */
-    public Long getJvmMemoryPendingFinalCount() throws SnmpStatusException;
-
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmMemoryMeta.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,655 +0,0 @@
-/*
- * Copyright (c) 2003, 2006, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.management.snmp.jvmmib;
-
-//
-// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
-//
-
-// java imports
-//
-import java.io.Serializable;
-
-// jmx imports
-//
-import javax.management.MBeanServer;
-import com.sun.jmx.snmp.SnmpCounter;
-import com.sun.jmx.snmp.SnmpCounter64;
-import com.sun.jmx.snmp.SnmpGauge;
-import com.sun.jmx.snmp.SnmpInt;
-import com.sun.jmx.snmp.SnmpUnsignedInt;
-import com.sun.jmx.snmp.SnmpIpAddress;
-import com.sun.jmx.snmp.SnmpTimeticks;
-import com.sun.jmx.snmp.SnmpOpaque;
-import com.sun.jmx.snmp.SnmpString;
-import com.sun.jmx.snmp.SnmpStringFixed;
-import com.sun.jmx.snmp.SnmpOid;
-import com.sun.jmx.snmp.SnmpNull;
-import com.sun.jmx.snmp.SnmpValue;
-import com.sun.jmx.snmp.SnmpVarBind;
-import com.sun.jmx.snmp.SnmpStatusException;
-
-// jdmk imports
-//
-import com.sun.jmx.snmp.agent.SnmpMib;
-import com.sun.jmx.snmp.agent.SnmpMibGroup;
-import com.sun.jmx.snmp.agent.SnmpStandardObjectServer;
-import com.sun.jmx.snmp.agent.SnmpStandardMetaServer;
-import com.sun.jmx.snmp.agent.SnmpMibSubRequest;
-import com.sun.jmx.snmp.agent.SnmpMibTable;
-import com.sun.jmx.snmp.EnumRowStatus;
-import com.sun.jmx.snmp.SnmpDefinitions;
-
-/**
- * The class is used for representing SNMP metadata for the "JvmMemory" group.
- * The group is defined with the following oid: 1.3.6.1.4.1.42.2.145.3.163.1.1.2.
- */
-public class JvmMemoryMeta extends SnmpMibGroup
-     implements Serializable, SnmpStandardMetaServer {
-    private static final long serialVersionUID = 9047644262627149214L;
-
-    /**
-     * Constructor for the metadata associated to "JvmMemory".
-     */
-    public JvmMemoryMeta(SnmpMib myMib, SnmpStandardObjectServer objserv) {
-        objectserver = objserv;
-        try {
-            registerObject(120);
-            registerObject(23);
-            registerObject(22);
-            registerObject(21);
-            registerObject(110);
-            registerObject(20);
-            registerObject(13);
-            registerObject(12);
-            registerObject(3);
-            registerObject(11);
-            registerObject(2);
-            registerObject(101);
-            registerObject(10);
-            registerObject(1);
-            registerObject(100);
-        } catch (IllegalAccessException e) {
-            throw new RuntimeException(e.getMessage());
-        }
-    }
-
-    /**
-     * Get the value of a scalar variable
-     */
-    public SnmpValue get(long var, Object data)
-        throws SnmpStatusException {
-        switch((int)var) {
-            case 120: {
-                throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-                }
-
-            case 23:
-                return new SnmpCounter64(node.getJvmMemoryNonHeapMaxSize());
-
-            case 22:
-                return new SnmpCounter64(node.getJvmMemoryNonHeapCommitted());
-
-            case 21:
-                return new SnmpCounter64(node.getJvmMemoryNonHeapUsed());
-
-            case 110: {
-                throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-                }
-
-            case 20:
-                return new SnmpCounter64(node.getJvmMemoryNonHeapInitSize());
-
-            case 13:
-                return new SnmpCounter64(node.getJvmMemoryHeapMaxSize());
-
-            case 12:
-                return new SnmpCounter64(node.getJvmMemoryHeapCommitted());
-
-            case 3:
-                return new SnmpInt(node.getJvmMemoryGCCall());
-
-            case 11:
-                return new SnmpCounter64(node.getJvmMemoryHeapUsed());
-
-            case 2:
-                return new SnmpInt(node.getJvmMemoryGCVerboseLevel());
-
-            case 101: {
-                throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-                }
-
-            case 10:
-                return new SnmpCounter64(node.getJvmMemoryHeapInitSize());
-
-            case 1:
-                return new SnmpGauge(node.getJvmMemoryPendingFinalCount());
-
-            case 100: {
-                throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-                }
-
-            default:
-                break;
-        }
-        throw new SnmpStatusException(SnmpStatusException.noSuchObject);
-    }
-
-    /**
-     * Set the value of a scalar variable
-     */
-    public SnmpValue set(SnmpValue x, long var, Object data)
-        throws SnmpStatusException {
-        switch((int)var) {
-            case 120: {
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-                }
-
-            case 23:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 22:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 21:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 110: {
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-                }
-
-            case 20:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 13:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 12:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 3:
-                if (x instanceof SnmpInt) {
-                    try  {
-                        node.setJvmMemoryGCCall( new EnumJvmMemoryGCCall (((SnmpInt)x).toInteger()));
-                    } catch(IllegalArgumentException e)  {
-                        throw new SnmpStatusException(SnmpStatusException.snmpRspWrongValue);
-                    }
-                    return new SnmpInt(node.getJvmMemoryGCCall());
-                } else {
-                    throw new SnmpStatusException(SnmpStatusException.snmpRspWrongType);
-                }
-
-            case 11:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 2:
-                if (x instanceof SnmpInt) {
-                    try  {
-                        node.setJvmMemoryGCVerboseLevel( new EnumJvmMemoryGCVerboseLevel (((SnmpInt)x).toInteger()));
-                    } catch(IllegalArgumentException e)  {
-                        throw new SnmpStatusException(SnmpStatusException.snmpRspWrongValue);
-                    }
-                    return new SnmpInt(node.getJvmMemoryGCVerboseLevel());
-                } else {
-                    throw new SnmpStatusException(SnmpStatusException.snmpRspWrongType);
-                }
-
-            case 101: {
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-                }
-
-            case 10:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 1:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 100: {
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-                }
-
-            default:
-                break;
-        }
-        throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-    }
-
-    /**
-     * Check the value of a scalar variable
-     */
-    public void check(SnmpValue x, long var, Object data)
-        throws SnmpStatusException {
-        switch((int) var) {
-            case 120: {
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-                }
-
-            case 23:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 22:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 21:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 110: {
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-                }
-
-            case 20:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 13:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 12:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 3:
-                if (x instanceof SnmpInt) {
-                    try  {
-                        node.checkJvmMemoryGCCall( new EnumJvmMemoryGCCall (((SnmpInt)x).toInteger()));
-                    } catch(IllegalArgumentException e)  {
-                        throw new SnmpStatusException(SnmpStatusException.snmpRspWrongValue);
-                    }
-                } else {
-                    throw new SnmpStatusException(SnmpStatusException.snmpRspWrongType);
-                }
-                break;
-
-            case 11:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 2:
-                if (x instanceof SnmpInt) {
-                    try  {
-                        node.checkJvmMemoryGCVerboseLevel( new EnumJvmMemoryGCVerboseLevel (((SnmpInt)x).toInteger()));
-                    } catch(IllegalArgumentException e)  {
-                        throw new SnmpStatusException(SnmpStatusException.snmpRspWrongValue);
-                    }
-                } else {
-                    throw new SnmpStatusException(SnmpStatusException.snmpRspWrongType);
-                }
-                break;
-
-            case 101: {
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-                }
-
-            case 10:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 1:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 100: {
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-                }
-
-            default:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-        }
-    }
-
-    /**
-     * Allow to bind the metadata description to a specific object.
-     */
-    protected void setInstance(JvmMemoryMBean var) {
-        node = var;
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "get" method defined in "SnmpMibGroup".
-    // See the "SnmpMibGroup" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void get(SnmpMibSubRequest req, int depth)
-        throws SnmpStatusException {
-        objectserver.get(this,req,depth);
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "set" method defined in "SnmpMibGroup".
-    // See the "SnmpMibGroup" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void set(SnmpMibSubRequest req, int depth)
-        throws SnmpStatusException {
-        objectserver.set(this,req,depth);
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "check" method defined in "SnmpMibGroup".
-    // See the "SnmpMibGroup" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void check(SnmpMibSubRequest req, int depth)
-        throws SnmpStatusException {
-        objectserver.check(this,req,depth);
-    }
-
-    /**
-     * Returns true if "arc" identifies a scalar object.
-     */
-    public boolean isVariable(long arc) {
-
-        switch((int)arc) {
-            case 23:
-            case 22:
-            case 21:
-            case 20:
-            case 13:
-            case 12:
-            case 3:
-            case 11:
-            case 2:
-            case 10:
-            case 1:
-                return true;
-            default:
-                break;
-        }
-        return false;
-    }
-
-    /**
-     * Returns true if "arc" identifies a readable scalar object.
-     */
-    public boolean isReadable(long arc) {
-
-        switch((int)arc) {
-            case 23:
-            case 22:
-            case 21:
-            case 20:
-            case 13:
-            case 12:
-            case 3:
-            case 11:
-            case 2:
-            case 10:
-            case 1:
-                return true;
-            default:
-                break;
-        }
-        return false;
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "skipVariable" method defined in "SnmpMibGroup".
-    // See the "SnmpMibGroup" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public boolean  skipVariable(long var, Object data, int pduVersion) {
-        switch((int)var) {
-            case 23:
-            case 22:
-            case 21:
-            case 20:
-            case 13:
-            case 12:
-            case 11:
-            case 10:
-                if (pduVersion==SnmpDefinitions.snmpVersionOne) return true;
-                break;
-            default:
-                break;
-        }
-        return super.skipVariable(var,data,pduVersion);
-    }
-
-    /**
-     * Return the name of the attribute corresponding to the SNMP variable identified by "id".
-     */
-    public String getAttributeName(long id)
-        throws SnmpStatusException {
-        switch((int)id) {
-            case 120: {
-                throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-                }
-
-            case 23:
-                return "JvmMemoryNonHeapMaxSize";
-
-            case 22:
-                return "JvmMemoryNonHeapCommitted";
-
-            case 21:
-                return "JvmMemoryNonHeapUsed";
-
-            case 110: {
-                throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-                }
-
-            case 20:
-                return "JvmMemoryNonHeapInitSize";
-
-            case 13:
-                return "JvmMemoryHeapMaxSize";
-
-            case 12:
-                return "JvmMemoryHeapCommitted";
-
-            case 3:
-                return "JvmMemoryGCCall";
-
-            case 11:
-                return "JvmMemoryHeapUsed";
-
-            case 2:
-                return "JvmMemoryGCVerboseLevel";
-
-            case 101: {
-                throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-                }
-
-            case 10:
-                return "JvmMemoryHeapInitSize";
-
-            case 1:
-                return "JvmMemoryPendingFinalCount";
-
-            case 100: {
-                throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-                }
-
-            default:
-                break;
-        }
-        throw new SnmpStatusException(SnmpStatusException.noSuchObject);
-    }
-
-    /**
-     * Returns true if "arc" identifies a table object.
-     */
-    public boolean isTable(long arc) {
-
-        switch((int)arc) {
-            case 120:
-                return true;
-            case 110:
-                return true;
-            case 101:
-                return true;
-            case 100:
-                return true;
-            default:
-                break;
-        }
-        return false;
-    }
-
-    /**
-     * Returns the table object identified by "arc".
-     */
-    public SnmpMibTable getTable(long arc) {
-
-        switch((int)arc) {
-            case 120:
-                return tableJvmMemMgrPoolRelTable;
-            case 110:
-                return tableJvmMemPoolTable;
-            case 101:
-                return tableJvmMemGCTable;
-            case 100:
-                return tableJvmMemManagerTable;
-        default:
-            break;
-        }
-        return null;
-    }
-
-    /**
-     * Register the group's SnmpMibTable objects with the meta-data.
-     */
-    public void registerTableNodes(SnmpMib mib, MBeanServer server) {
-        tableJvmMemMgrPoolRelTable = createJvmMemMgrPoolRelTableMetaNode("JvmMemMgrPoolRelTable", "JvmMemory", mib, server);
-        if ( tableJvmMemMgrPoolRelTable != null)  {
-            tableJvmMemMgrPoolRelTable.registerEntryNode(mib,server);
-            mib.registerTableMeta("JvmMemMgrPoolRelTable", tableJvmMemMgrPoolRelTable);
-        }
-
-        tableJvmMemPoolTable = createJvmMemPoolTableMetaNode("JvmMemPoolTable", "JvmMemory", mib, server);
-        if ( tableJvmMemPoolTable != null)  {
-            tableJvmMemPoolTable.registerEntryNode(mib,server);
-            mib.registerTableMeta("JvmMemPoolTable", tableJvmMemPoolTable);
-        }
-
-        tableJvmMemGCTable = createJvmMemGCTableMetaNode("JvmMemGCTable", "JvmMemory", mib, server);
-        if ( tableJvmMemGCTable != null)  {
-            tableJvmMemGCTable.registerEntryNode(mib,server);
-            mib.registerTableMeta("JvmMemGCTable", tableJvmMemGCTable);
-        }
-
-        tableJvmMemManagerTable = createJvmMemManagerTableMetaNode("JvmMemManagerTable", "JvmMemory", mib, server);
-        if ( tableJvmMemManagerTable != null)  {
-            tableJvmMemManagerTable.registerEntryNode(mib,server);
-            mib.registerTableMeta("JvmMemManagerTable", tableJvmMemManagerTable);
-        }
-
-    }
-
-
-    /**
-     * Factory method for "JvmMemMgrPoolRelTable" table metadata class.
-     *
-     * You can redefine this method if you need to replace the default
-     * generated metadata class with your own customized class.
-     *
-     * @param tableName Name of the table object ("JvmMemMgrPoolRelTable")
-     * @param groupName Name of the group to which this table belong ("JvmMemory")
-     * @param mib The SnmpMib object in which this table is registered
-     * @param server MBeanServer for this table entries (may be null)
-     *
-     * @return An instance of the metadata class generated for the
-     *         "JvmMemMgrPoolRelTable" table (JvmMemMgrPoolRelTableMeta)
-     *
-     **/
-    protected JvmMemMgrPoolRelTableMeta createJvmMemMgrPoolRelTableMetaNode(String tableName, String groupName, SnmpMib mib, MBeanServer server)  {
-        return new JvmMemMgrPoolRelTableMeta(mib, objectserver);
-    }
-
-
-    /**
-     * Factory method for "JvmMemPoolTable" table metadata class.
-     *
-     * You can redefine this method if you need to replace the default
-     * generated metadata class with your own customized class.
-     *
-     * @param tableName Name of the table object ("JvmMemPoolTable")
-     * @param groupName Name of the group to which this table belong ("JvmMemory")
-     * @param mib The SnmpMib object in which this table is registered
-     * @param server MBeanServer for this table entries (may be null)
-     *
-     * @return An instance of the metadata class generated for the
-     *         "JvmMemPoolTable" table (JvmMemPoolTableMeta)
-     *
-     **/
-    protected JvmMemPoolTableMeta createJvmMemPoolTableMetaNode(String tableName, String groupName, SnmpMib mib, MBeanServer server)  {
-        return new JvmMemPoolTableMeta(mib, objectserver);
-    }
-
-
-    /**
-     * Factory method for "JvmMemGCTable" table metadata class.
-     *
-     * You can redefine this method if you need to replace the default
-     * generated metadata class with your own customized class.
-     *
-     * @param tableName Name of the table object ("JvmMemGCTable")
-     * @param groupName Name of the group to which this table belong ("JvmMemory")
-     * @param mib The SnmpMib object in which this table is registered
-     * @param server MBeanServer for this table entries (may be null)
-     *
-     * @return An instance of the metadata class generated for the
-     *         "JvmMemGCTable" table (JvmMemGCTableMeta)
-     *
-     **/
-    protected JvmMemGCTableMeta createJvmMemGCTableMetaNode(String tableName, String groupName, SnmpMib mib, MBeanServer server)  {
-        return new JvmMemGCTableMeta(mib, objectserver);
-    }
-
-
-    /**
-     * Factory method for "JvmMemManagerTable" table metadata class.
-     *
-     * You can redefine this method if you need to replace the default
-     * generated metadata class with your own customized class.
-     *
-     * @param tableName Name of the table object ("JvmMemManagerTable")
-     * @param groupName Name of the group to which this table belong ("JvmMemory")
-     * @param mib The SnmpMib object in which this table is registered
-     * @param server MBeanServer for this table entries (may be null)
-     *
-     * @return An instance of the metadata class generated for the
-     *         "JvmMemManagerTable" table (JvmMemManagerTableMeta)
-     *
-     **/
-    protected JvmMemManagerTableMeta createJvmMemManagerTableMetaNode(String tableName, String groupName, SnmpMib mib, MBeanServer server)  {
-        return new JvmMemManagerTableMeta(mib, objectserver);
-    }
-
-    protected JvmMemoryMBean node;
-    protected SnmpStandardObjectServer objectserver = null;
-    protected JvmMemMgrPoolRelTableMeta tableJvmMemMgrPoolRelTable = null;
-    protected JvmMemPoolTableMeta tableJvmMemPoolTable = null;
-    protected JvmMemGCTableMeta tableJvmMemGCTable = null;
-    protected JvmMemManagerTableMeta tableJvmMemManagerTable = null;
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmOSMBean.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 2003, 2004, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.management.snmp.jvmmib;
-
-//
-// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
-//
-
-
-// jmx imports
-//
-import com.sun.jmx.snmp.SnmpStatusException;
-
-/**
- * This interface is used for representing the remote management interface for the "JvmOS" MBean.
- */
-public interface JvmOSMBean {
-
-    /**
-     * Getter for the "JvmOSProcessorCount" variable.
-     */
-    public Integer getJvmOSProcessorCount() throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmOSVersion" variable.
-     */
-    public String getJvmOSVersion() throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmOSArch" variable.
-     */
-    public String getJvmOSArch() throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmOSName" variable.
-     */
-    public String getJvmOSName() throws SnmpStatusException;
-
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmOSMeta.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,304 +0,0 @@
-/*
- * Copyright (c) 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.management.snmp.jvmmib;
-
-//
-// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
-//
-
-// java imports
-//
-import java.io.Serializable;
-
-// jmx imports
-//
-import javax.management.MBeanServer;
-import com.sun.jmx.snmp.SnmpCounter;
-import com.sun.jmx.snmp.SnmpCounter64;
-import com.sun.jmx.snmp.SnmpGauge;
-import com.sun.jmx.snmp.SnmpInt;
-import com.sun.jmx.snmp.SnmpUnsignedInt;
-import com.sun.jmx.snmp.SnmpIpAddress;
-import com.sun.jmx.snmp.SnmpTimeticks;
-import com.sun.jmx.snmp.SnmpOpaque;
-import com.sun.jmx.snmp.SnmpString;
-import com.sun.jmx.snmp.SnmpStringFixed;
-import com.sun.jmx.snmp.SnmpOid;
-import com.sun.jmx.snmp.SnmpNull;
-import com.sun.jmx.snmp.SnmpValue;
-import com.sun.jmx.snmp.SnmpVarBind;
-import com.sun.jmx.snmp.SnmpStatusException;
-
-// jdmk imports
-//
-import com.sun.jmx.snmp.agent.SnmpMib;
-import com.sun.jmx.snmp.agent.SnmpMibGroup;
-import com.sun.jmx.snmp.agent.SnmpStandardObjectServer;
-import com.sun.jmx.snmp.agent.SnmpStandardMetaServer;
-import com.sun.jmx.snmp.agent.SnmpMibSubRequest;
-import com.sun.jmx.snmp.agent.SnmpMibTable;
-import com.sun.jmx.snmp.EnumRowStatus;
-import com.sun.jmx.snmp.SnmpDefinitions;
-
-/**
- * The class is used for representing SNMP metadata for the "JvmOS" group.
- * The group is defined with the following oid: 1.3.6.1.4.1.42.2.145.3.163.1.1.6.
- */
-public class JvmOSMeta extends SnmpMibGroup
-     implements Serializable, SnmpStandardMetaServer {
-
-    static final long serialVersionUID = -2024138733580127133L;
-
-    /**
-     * Constructor for the metadata associated to "JvmOS".
-     */
-    public JvmOSMeta(SnmpMib myMib, SnmpStandardObjectServer objserv) {
-        objectserver = objserv;
-        try {
-            registerObject(4);
-            registerObject(3);
-            registerObject(2);
-            registerObject(1);
-        } catch (IllegalAccessException e) {
-            throw new RuntimeException(e.getMessage());
-        }
-    }
-
-    /**
-     * Get the value of a scalar variable
-     */
-    public SnmpValue get(long var, Object data)
-        throws SnmpStatusException {
-        switch((int)var) {
-            case 4:
-                return new SnmpInt(node.getJvmOSProcessorCount());
-
-            case 3:
-                return new SnmpString(node.getJvmOSVersion());
-
-            case 2:
-                return new SnmpString(node.getJvmOSArch());
-
-            case 1:
-                return new SnmpString(node.getJvmOSName());
-
-            default:
-                break;
-        }
-        throw new SnmpStatusException(SnmpStatusException.noSuchObject);
-    }
-
-    /**
-     * Set the value of a scalar variable
-     */
-    public SnmpValue set(SnmpValue x, long var, Object data)
-        throws SnmpStatusException {
-        switch((int)var) {
-            case 4:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 3:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 2:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 1:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            default:
-                break;
-        }
-        throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-    }
-
-    /**
-     * Check the value of a scalar variable
-     */
-    public void check(SnmpValue x, long var, Object data)
-        throws SnmpStatusException {
-        switch((int) var) {
-            case 4:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 3:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 2:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 1:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            default:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-        }
-    }
-
-    /**
-     * Allow to bind the metadata description to a specific object.
-     */
-    protected void setInstance(JvmOSMBean var) {
-        node = var;
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "get" method defined in "SnmpMibGroup".
-    // See the "SnmpMibGroup" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void get(SnmpMibSubRequest req, int depth)
-        throws SnmpStatusException {
-        objectserver.get(this,req,depth);
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "set" method defined in "SnmpMibGroup".
-    // See the "SnmpMibGroup" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void set(SnmpMibSubRequest req, int depth)
-        throws SnmpStatusException {
-        objectserver.set(this,req,depth);
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "check" method defined in "SnmpMibGroup".
-    // See the "SnmpMibGroup" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void check(SnmpMibSubRequest req, int depth)
-        throws SnmpStatusException {
-        objectserver.check(this,req,depth);
-    }
-
-    /**
-     * Returns true if "arc" identifies a scalar object.
-     */
-    public boolean isVariable(long arc) {
-
-        switch((int)arc) {
-            case 4:
-            case 3:
-            case 2:
-            case 1:
-                return true;
-            default:
-                break;
-        }
-        return false;
-    }
-
-    /**
-     * Returns true if "arc" identifies a readable scalar object.
-     */
-    public boolean isReadable(long arc) {
-
-        switch((int)arc) {
-            case 4:
-            case 3:
-            case 2:
-            case 1:
-                return true;
-            default:
-                break;
-        }
-        return false;
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "skipVariable" method defined in "SnmpMibGroup".
-    // See the "SnmpMibGroup" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public boolean  skipVariable(long var, Object data, int pduVersion) {
-        return super.skipVariable(var,data,pduVersion);
-    }
-
-    /**
-     * Return the name of the attribute corresponding to the SNMP variable identified by "id".
-     */
-    public String getAttributeName(long id)
-        throws SnmpStatusException {
-        switch((int)id) {
-            case 4:
-                return "JvmOSProcessorCount";
-
-            case 3:
-                return "JvmOSVersion";
-
-            case 2:
-                return "JvmOSArch";
-
-            case 1:
-                return "JvmOSName";
-
-            default:
-                break;
-        }
-        throw new SnmpStatusException(SnmpStatusException.noSuchObject);
-    }
-
-    /**
-     * Returns true if "arc" identifies a table object.
-     */
-    public boolean isTable(long arc) {
-
-        switch((int)arc) {
-            default:
-                break;
-        }
-        return false;
-    }
-
-    /**
-     * Returns the table object identified by "arc".
-     */
-    public SnmpMibTable getTable(long arc) {
-        return null;
-    }
-
-    /**
-     * Register the group's SnmpMibTable objects with the meta-data.
-     */
-    public void registerTableNodes(SnmpMib mib, MBeanServer server) {
-    }
-
-    protected JvmOSMBean node;
-    protected SnmpStandardObjectServer objectserver = null;
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmRTBootClassPathEntryMBean.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 2004, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.management.snmp.jvmmib;
-
-//
-// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
-//
-
-
-// jmx imports
-//
-import com.sun.jmx.snmp.SnmpStatusException;
-
-/**
- * This interface is used for representing the remote management interface for the "JvmRTBootClassPathEntry" MBean.
- */
-public interface JvmRTBootClassPathEntryMBean {
-
-    /**
-     * Getter for the "JvmRTBootClassPathItem" variable.
-     */
-    public String getJvmRTBootClassPathItem() throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmRTBootClassPathIndex" variable.
-     */
-    public Integer getJvmRTBootClassPathIndex() throws SnmpStatusException;
-
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmRTBootClassPathEntryMeta.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,250 +0,0 @@
-/*
- * Copyright (c) 2004, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.management.snmp.jvmmib;
-
-//
-// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
-//
-
-// java imports
-//
-import java.io.Serializable;
-
-// jmx imports
-//
-import javax.management.MBeanServer;
-import com.sun.jmx.snmp.SnmpCounter;
-import com.sun.jmx.snmp.SnmpCounter64;
-import com.sun.jmx.snmp.SnmpGauge;
-import com.sun.jmx.snmp.SnmpInt;
-import com.sun.jmx.snmp.SnmpUnsignedInt;
-import com.sun.jmx.snmp.SnmpIpAddress;
-import com.sun.jmx.snmp.SnmpTimeticks;
-import com.sun.jmx.snmp.SnmpOpaque;
-import com.sun.jmx.snmp.SnmpString;
-import com.sun.jmx.snmp.SnmpStringFixed;
-import com.sun.jmx.snmp.SnmpOid;
-import com.sun.jmx.snmp.SnmpNull;
-import com.sun.jmx.snmp.SnmpValue;
-import com.sun.jmx.snmp.SnmpVarBind;
-import com.sun.jmx.snmp.SnmpStatusException;
-
-// jdmk imports
-//
-import com.sun.jmx.snmp.agent.SnmpMibNode;
-import com.sun.jmx.snmp.agent.SnmpMib;
-import com.sun.jmx.snmp.agent.SnmpMibEntry;
-import com.sun.jmx.snmp.agent.SnmpStandardObjectServer;
-import com.sun.jmx.snmp.agent.SnmpStandardMetaServer;
-import com.sun.jmx.snmp.agent.SnmpMibSubRequest;
-import com.sun.jmx.snmp.agent.SnmpMibTable;
-import com.sun.jmx.snmp.EnumRowStatus;
-import com.sun.jmx.snmp.SnmpDefinitions;
-
-/**
- * The class is used for representing SNMP metadata for the "JvmRTBootClassPathEntry" group.
- * The group is defined with the following oid: 1.3.6.1.4.1.42.2.145.3.163.1.1.4.21.1.
- */
-public class JvmRTBootClassPathEntryMeta extends SnmpMibEntry
-     implements Serializable, SnmpStandardMetaServer {
-
-    static final long serialVersionUID = 7703840715080588941L;
-    /**
-     * Constructor for the metadata associated to "JvmRTBootClassPathEntry".
-     */
-    public JvmRTBootClassPathEntryMeta(SnmpMib myMib, SnmpStandardObjectServer objserv) {
-        objectserver = objserv;
-        varList = new int[1];
-        varList[0] = 2;
-        SnmpMibNode.sort(varList);
-    }
-
-    /**
-     * Get the value of a scalar variable
-     */
-    public SnmpValue get(long var, Object data)
-        throws SnmpStatusException {
-        switch((int)var) {
-            case 2:
-                return new SnmpString(node.getJvmRTBootClassPathItem());
-
-            case 1:
-                throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-            default:
-                break;
-        }
-        throw new SnmpStatusException(SnmpStatusException.noSuchObject);
-    }
-
-    /**
-     * Set the value of a scalar variable
-     */
-    public SnmpValue set(SnmpValue x, long var, Object data)
-        throws SnmpStatusException {
-        switch((int)var) {
-            case 2:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 1:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            default:
-                break;
-        }
-        throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-    }
-
-    /**
-     * Check the value of a scalar variable
-     */
-    public void check(SnmpValue x, long var, Object data)
-        throws SnmpStatusException {
-        switch((int) var) {
-            case 2:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 1:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            default:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-        }
-    }
-
-    /**
-     * Allow to bind the metadata description to a specific object.
-     */
-    protected void setInstance(JvmRTBootClassPathEntryMBean var) {
-        node = var;
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "get" method defined in "SnmpMibEntry".
-    // See the "SnmpMibEntry" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void get(SnmpMibSubRequest req, int depth)
-        throws SnmpStatusException {
-        objectserver.get(this,req,depth);
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "set" method defined in "SnmpMibEntry".
-    // See the "SnmpMibEntry" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void set(SnmpMibSubRequest req, int depth)
-        throws SnmpStatusException {
-        objectserver.set(this,req,depth);
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "check" method defined in "SnmpMibEntry".
-    // See the "SnmpMibEntry" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void check(SnmpMibSubRequest req, int depth)
-        throws SnmpStatusException {
-        objectserver.check(this,req,depth);
-    }
-
-    /**
-     * Returns true if "arc" identifies a scalar object.
-     */
-    public boolean isVariable(long arc) {
-
-        switch((int)arc) {
-            case 2:
-            case 1:
-                return true;
-            default:
-                break;
-        }
-        return false;
-    }
-
-    /**
-     * Returns true if "arc" identifies a readable scalar object.
-     */
-    public boolean isReadable(long arc) {
-
-        switch((int)arc) {
-            case 2:
-                return true;
-            default:
-                break;
-        }
-        return false;
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "skipVariable" method defined in "SnmpMibEntry".
-    // See the "SnmpMibEntry" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public boolean  skipVariable(long var, Object data, int pduVersion) {
-        switch((int)var) {
-            case 1:
-                return true;
-            default:
-                break;
-        }
-        return super.skipVariable(var,data,pduVersion);
-    }
-
-    /**
-     * Return the name of the attribute corresponding to the SNMP variable identified by "id".
-     */
-    public String getAttributeName(long id)
-        throws SnmpStatusException {
-        switch((int)id) {
-            case 2:
-                return "JvmRTBootClassPathItem";
-
-            case 1:
-                return "JvmRTBootClassPathIndex";
-
-            default:
-                break;
-        }
-        throw new SnmpStatusException(SnmpStatusException.noSuchObject);
-    }
-
-    protected JvmRTBootClassPathEntryMBean node;
-    protected SnmpStandardObjectServer objectserver = null;
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmRTBootClassPathTableMeta.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,265 +0,0 @@
-/*
- * Copyright (c) 2004, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.management.snmp.jvmmib;
-
-//
-// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
-//
-
-// java imports
-//
-import java.io.Serializable;
-import java.util.Vector;
-
-// jmx imports
-//
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-import com.sun.jmx.snmp.SnmpCounter;
-import com.sun.jmx.snmp.SnmpCounter64;
-import com.sun.jmx.snmp.SnmpGauge;
-import com.sun.jmx.snmp.SnmpInt;
-import com.sun.jmx.snmp.SnmpUnsignedInt;
-import com.sun.jmx.snmp.SnmpIpAddress;
-import com.sun.jmx.snmp.SnmpTimeticks;
-import com.sun.jmx.snmp.SnmpOpaque;
-import com.sun.jmx.snmp.SnmpString;
-import com.sun.jmx.snmp.SnmpStringFixed;
-import com.sun.jmx.snmp.SnmpOid;
-import com.sun.jmx.snmp.SnmpNull;
-import com.sun.jmx.snmp.SnmpValue;
-import com.sun.jmx.snmp.SnmpVarBind;
-import com.sun.jmx.snmp.SnmpStatusException;
-
-// jdmk imports
-//
-import com.sun.jmx.snmp.agent.SnmpIndex;
-import com.sun.jmx.snmp.agent.SnmpMib;
-import com.sun.jmx.snmp.agent.SnmpMibTable;
-import com.sun.jmx.snmp.agent.SnmpMibSubRequest;
-import com.sun.jmx.snmp.agent.SnmpStandardObjectServer;
-
-/**
- * The class is used for implementing the "JvmRTBootClassPathTable" group.
- * The group is defined with the following oid: 1.3.6.1.4.1.42.2.145.3.163.1.1.4.21.
- */
-public class JvmRTBootClassPathTableMeta extends SnmpMibTable implements Serializable {
-
-    static final long serialVersionUID = 42471379600792135L;
-    /**
-     * Constructor for the table. Initialize metadata for "JvmRTBootClassPathTableMeta".
-     * The reference on the MBean server is updated so the entries created through an SNMP SET will be AUTOMATICALLY REGISTERED in Java DMK.
-     */
-    public JvmRTBootClassPathTableMeta(SnmpMib myMib, SnmpStandardObjectServer objserv) {
-        super(myMib);
-        objectserver = objserv;
-    }
-
-
-    /**
-     * Factory method for "JvmRTBootClassPathEntry" entry metadata class.
-     *
-     * You can redefine this method if you need to replace the default
-     * generated metadata class with your own customized class.
-     *
-     * @param snmpEntryName Name of the SNMP Entry object (conceptual row) ("JvmRTBootClassPathEntry")
-     * @param tableName Name of the table in which the entries are registered ("JvmRTBootClassPathTable")
-     * @param mib The SnmpMib object in which this table is registered
-     * @param server MBeanServer for this table entries (may be null)
-     *
-     * @return An instance of the metadata class generated for the
-     *         "JvmRTBootClassPathEntry" conceptual row (JvmRTBootClassPathEntryMeta)
-     *
-     **/
-    protected JvmRTBootClassPathEntryMeta createJvmRTBootClassPathEntryMetaNode(String snmpEntryName, String tableName, SnmpMib mib, MBeanServer server)  {
-        return new JvmRTBootClassPathEntryMeta(mib, objectserver);
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "createNewEntry" method defined in "SnmpMibTable".
-    // See the "SnmpMibTable" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void createNewEntry(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
-        throws SnmpStatusException {
-        if (factory != null)
-            factory.createNewEntry(req, rowOid, depth, this);
-        else
-            throw new SnmpStatusException(
-                SnmpStatusException.snmpRspNoAccess);
-    }
-
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "isRegistrationRequired" method defined in "SnmpMibTable".
-    // See the "SnmpMibTable" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public boolean isRegistrationRequired()  {
-        return false;
-    }
-
-
-
-    public void registerEntryNode(SnmpMib mib, MBeanServer server)  {
-        node = createJvmRTBootClassPathEntryMetaNode("JvmRTBootClassPathEntry", "JvmRTBootClassPathTable", mib, server);
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "addEntry" method defined in "SnmpMibTable".
-    // See the "SnmpMibTable" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public synchronized void addEntry(SnmpOid rowOid, ObjectName objname,
-                 Object entry)
-        throws SnmpStatusException {
-        if (! (entry instanceof JvmRTBootClassPathEntryMBean) )
-            throw new ClassCastException("Entries for Table \"" +
-                           "JvmRTBootClassPathTable" + "\" must implement the \"" +
-                           "JvmRTBootClassPathEntryMBean" + "\" interface.");
-        super.addEntry(rowOid, objname, entry);
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "get" method defined in "SnmpMibTable".
-    // See the "SnmpMibTable" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void get(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
-        throws SnmpStatusException {
-        JvmRTBootClassPathEntryMBean entry = (JvmRTBootClassPathEntryMBean) getEntry(rowOid);
-        synchronized (this) {
-            node.setInstance(entry);
-            node.get(req,depth);
-        }
-    }
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "set" method defined in "SnmpMibTable".
-    // See the "SnmpMibTable" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void set(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
-        throws SnmpStatusException {
-        if (req.getSize() == 0) return;
-
-        JvmRTBootClassPathEntryMBean entry = (JvmRTBootClassPathEntryMBean) getEntry(rowOid);
-        synchronized (this) {
-            node.setInstance(entry);
-            node.set(req,depth);
-        }
-    }
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "check" method defined in "SnmpMibTable".
-    // See the "SnmpMibTable" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void check(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
-        throws SnmpStatusException {
-        if (req.getSize() == 0) return;
-
-        JvmRTBootClassPathEntryMBean entry = (JvmRTBootClassPathEntryMBean) getEntry(rowOid);
-        synchronized (this) {
-            node.setInstance(entry);
-            node.check(req,depth);
-        }
-    }
-
-    /**
-     * check that the given "var" identifies a columnar object.
-     */
-    public void validateVarEntryId( SnmpOid rowOid, long var, Object data )
-        throws SnmpStatusException {
-        node.validateVarId(var, data);
-    }
-
-    /**
-     * Returns true if "var" identifies a readable scalar object.
-     */
-    public boolean isReadableEntryId( SnmpOid rowOid, long var, Object data )
-        throws SnmpStatusException {
-        return node.isReadable(var);
-    }
-
-    /**
-     * Returns the arc of the next columnar object following "var".
-     */
-    public long getNextVarEntryId( SnmpOid rowOid, long var, Object data )
-        throws SnmpStatusException {
-        long nextvar = node.getNextVarId(var, data);
-        while (!isReadableEntryId(rowOid, nextvar, data))
-            nextvar = node.getNextVarId(nextvar, data);
-        return nextvar;
-    }
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "skipEntryVariable" method defined in "SnmpMibTable".
-    // See the "SnmpMibTable" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public boolean skipEntryVariable( SnmpOid rowOid, long var, Object data, int pduVersion) {
-        try {
-            JvmRTBootClassPathEntryMBean entry = (JvmRTBootClassPathEntryMBean) getEntry(rowOid);
-            synchronized (this) {
-                node.setInstance(entry);
-                return node.skipVariable(var, data, pduVersion);
-            }
-        } catch (SnmpStatusException x) {
-            return false;
-        }
-    }
-
-
-    /**
-     * Reference to the entry metadata.
-     */
-    private JvmRTBootClassPathEntryMeta node;
-
-    /**
-     * Reference to the object server.
-     */
-    protected SnmpStandardObjectServer objectserver;
-
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmRTClassPathEntryMBean.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 2004, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.management.snmp.jvmmib;
-
-//
-// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
-//
-
-
-// jmx imports
-//
-import com.sun.jmx.snmp.SnmpStatusException;
-
-/**
- * This interface is used for representing the remote management interface for the "JvmRTClassPathEntry" MBean.
- */
-public interface JvmRTClassPathEntryMBean {
-
-    /**
-     * Getter for the "JvmRTClassPathItem" variable.
-     */
-    public String getJvmRTClassPathItem() throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmRTClassPathIndex" variable.
-     */
-    public Integer getJvmRTClassPathIndex() throws SnmpStatusException;
-
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmRTClassPathEntryMeta.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,250 +0,0 @@
-/*
- * Copyright (c) 2004, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.management.snmp.jvmmib;
-
-//
-// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
-//
-
-// java imports
-//
-import java.io.Serializable;
-
-// jmx imports
-//
-import javax.management.MBeanServer;
-import com.sun.jmx.snmp.SnmpCounter;
-import com.sun.jmx.snmp.SnmpCounter64;
-import com.sun.jmx.snmp.SnmpGauge;
-import com.sun.jmx.snmp.SnmpInt;
-import com.sun.jmx.snmp.SnmpUnsignedInt;
-import com.sun.jmx.snmp.SnmpIpAddress;
-import com.sun.jmx.snmp.SnmpTimeticks;
-import com.sun.jmx.snmp.SnmpOpaque;
-import com.sun.jmx.snmp.SnmpString;
-import com.sun.jmx.snmp.SnmpStringFixed;
-import com.sun.jmx.snmp.SnmpOid;
-import com.sun.jmx.snmp.SnmpNull;
-import com.sun.jmx.snmp.SnmpValue;
-import com.sun.jmx.snmp.SnmpVarBind;
-import com.sun.jmx.snmp.SnmpStatusException;
-
-// jdmk imports
-//
-import com.sun.jmx.snmp.agent.SnmpMibNode;
-import com.sun.jmx.snmp.agent.SnmpMib;
-import com.sun.jmx.snmp.agent.SnmpMibEntry;
-import com.sun.jmx.snmp.agent.SnmpStandardObjectServer;
-import com.sun.jmx.snmp.agent.SnmpStandardMetaServer;
-import com.sun.jmx.snmp.agent.SnmpMibSubRequest;
-import com.sun.jmx.snmp.agent.SnmpMibTable;
-import com.sun.jmx.snmp.EnumRowStatus;
-import com.sun.jmx.snmp.SnmpDefinitions;
-
-/**
- * The class is used for representing SNMP metadata for the "JvmRTClassPathEntry" group.
- * The group is defined with the following oid: 1.3.6.1.4.1.42.2.145.3.163.1.1.4.22.1.
- */
-public class JvmRTClassPathEntryMeta extends SnmpMibEntry
-     implements Serializable, SnmpStandardMetaServer {
-
-    static final long serialVersionUID = 3388703998226830801L;
-    /**
-     * Constructor for the metadata associated to "JvmRTClassPathEntry".
-     */
-    public JvmRTClassPathEntryMeta(SnmpMib myMib, SnmpStandardObjectServer objserv) {
-        objectserver = objserv;
-        varList = new int[1];
-        varList[0] = 2;
-        SnmpMibNode.sort(varList);
-    }
-
-    /**
-     * Get the value of a scalar variable
-     */
-    public SnmpValue get(long var, Object data)
-        throws SnmpStatusException {
-        switch((int)var) {
-            case 2:
-                return new SnmpString(node.getJvmRTClassPathItem());
-
-            case 1:
-                throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-            default:
-                break;
-        }
-        throw new SnmpStatusException(SnmpStatusException.noSuchObject);
-    }
-
-    /**
-     * Set the value of a scalar variable
-     */
-    public SnmpValue set(SnmpValue x, long var, Object data)
-        throws SnmpStatusException {
-        switch((int)var) {
-            case 2:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 1:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            default:
-                break;
-        }
-        throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-    }
-
-    /**
-     * Check the value of a scalar variable
-     */
-    public void check(SnmpValue x, long var, Object data)
-        throws SnmpStatusException {
-        switch((int) var) {
-            case 2:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 1:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            default:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-        }
-    }
-
-    /**
-     * Allow to bind the metadata description to a specific object.
-     */
-    protected void setInstance(JvmRTClassPathEntryMBean var) {
-        node = var;
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "get" method defined in "SnmpMibEntry".
-    // See the "SnmpMibEntry" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void get(SnmpMibSubRequest req, int depth)
-        throws SnmpStatusException {
-        objectserver.get(this,req,depth);
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "set" method defined in "SnmpMibEntry".
-    // See the "SnmpMibEntry" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void set(SnmpMibSubRequest req, int depth)
-        throws SnmpStatusException {
-        objectserver.set(this,req,depth);
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "check" method defined in "SnmpMibEntry".
-    // See the "SnmpMibEntry" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void check(SnmpMibSubRequest req, int depth)
-        throws SnmpStatusException {
-        objectserver.check(this,req,depth);
-    }
-
-    /**
-     * Returns true if "arc" identifies a scalar object.
-     */
-    public boolean isVariable(long arc) {
-
-        switch((int)arc) {
-            case 2:
-            case 1:
-                return true;
-            default:
-                break;
-        }
-        return false;
-    }
-
-    /**
-     * Returns true if "arc" identifies a readable scalar object.
-     */
-    public boolean isReadable(long arc) {
-
-        switch((int)arc) {
-            case 2:
-                return true;
-            default:
-                break;
-        }
-        return false;
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "skipVariable" method defined in "SnmpMibEntry".
-    // See the "SnmpMibEntry" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public boolean  skipVariable(long var, Object data, int pduVersion) {
-        switch((int)var) {
-            case 1:
-                return true;
-            default:
-                break;
-        }
-        return super.skipVariable(var,data,pduVersion);
-    }
-
-    /**
-     * Return the name of the attribute corresponding to the SNMP variable identified by "id".
-     */
-    public String getAttributeName(long id)
-        throws SnmpStatusException {
-        switch((int)id) {
-            case 2:
-                return "JvmRTClassPathItem";
-
-            case 1:
-                return "JvmRTClassPathIndex";
-
-            default:
-                break;
-        }
-        throw new SnmpStatusException(SnmpStatusException.noSuchObject);
-    }
-
-    protected JvmRTClassPathEntryMBean node;
-    protected SnmpStandardObjectServer objectserver = null;
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmRTClassPathTableMeta.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,265 +0,0 @@
-/*
- * Copyright (c) 2004, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.management.snmp.jvmmib;
-
-//
-// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
-//
-
-// java imports
-//
-import java.io.Serializable;
-import java.util.Vector;
-
-// jmx imports
-//
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-import com.sun.jmx.snmp.SnmpCounter;
-import com.sun.jmx.snmp.SnmpCounter64;
-import com.sun.jmx.snmp.SnmpGauge;
-import com.sun.jmx.snmp.SnmpInt;
-import com.sun.jmx.snmp.SnmpUnsignedInt;
-import com.sun.jmx.snmp.SnmpIpAddress;
-import com.sun.jmx.snmp.SnmpTimeticks;
-import com.sun.jmx.snmp.SnmpOpaque;
-import com.sun.jmx.snmp.SnmpString;
-import com.sun.jmx.snmp.SnmpStringFixed;
-import com.sun.jmx.snmp.SnmpOid;
-import com.sun.jmx.snmp.SnmpNull;
-import com.sun.jmx.snmp.SnmpValue;
-import com.sun.jmx.snmp.SnmpVarBind;
-import com.sun.jmx.snmp.SnmpStatusException;
-
-// jdmk imports
-//
-import com.sun.jmx.snmp.agent.SnmpIndex;
-import com.sun.jmx.snmp.agent.SnmpMib;
-import com.sun.jmx.snmp.agent.SnmpMibTable;
-import com.sun.jmx.snmp.agent.SnmpMibSubRequest;
-import com.sun.jmx.snmp.agent.SnmpStandardObjectServer;
-
-/**
- * The class is used for implementing the "JvmRTClassPathTable" group.
- * The group is defined with the following oid: 1.3.6.1.4.1.42.2.145.3.163.1.1.4.22.
- */
-public class JvmRTClassPathTableMeta extends SnmpMibTable implements Serializable {
-
-    static final long serialVersionUID = -1518727175345404443L;
-    /**
-     * Constructor for the table. Initialize metadata for "JvmRTClassPathTableMeta".
-     * The reference on the MBean server is updated so the entries created through an SNMP SET will be AUTOMATICALLY REGISTERED in Java DMK.
-     */
-    public JvmRTClassPathTableMeta(SnmpMib myMib, SnmpStandardObjectServer objserv) {
-        super(myMib);
-        objectserver = objserv;
-    }
-
-
-    /**
-     * Factory method for "JvmRTClassPathEntry" entry metadata class.
-     *
-     * You can redefine this method if you need to replace the default
-     * generated metadata class with your own customized class.
-     *
-     * @param snmpEntryName Name of the SNMP Entry object (conceptual row) ("JvmRTClassPathEntry")
-     * @param tableName Name of the table in which the entries are registered ("JvmRTClassPathTable")
-     * @param mib The SnmpMib object in which this table is registered
-     * @param server MBeanServer for this table entries (may be null)
-     *
-     * @return An instance of the metadata class generated for the
-     *         "JvmRTClassPathEntry" conceptual row (JvmRTClassPathEntryMeta)
-     *
-     **/
-    protected JvmRTClassPathEntryMeta createJvmRTClassPathEntryMetaNode(String snmpEntryName, String tableName, SnmpMib mib, MBeanServer server)  {
-        return new JvmRTClassPathEntryMeta(mib, objectserver);
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "createNewEntry" method defined in "SnmpMibTable".
-    // See the "SnmpMibTable" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void createNewEntry(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
-        throws SnmpStatusException {
-        if (factory != null)
-            factory.createNewEntry(req, rowOid, depth, this);
-        else
-            throw new SnmpStatusException(
-                SnmpStatusException.snmpRspNoAccess);
-    }
-
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "isRegistrationRequired" method defined in "SnmpMibTable".
-    // See the "SnmpMibTable" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public boolean isRegistrationRequired()  {
-        return false;
-    }
-
-
-
-    public void registerEntryNode(SnmpMib mib, MBeanServer server)  {
-        node = createJvmRTClassPathEntryMetaNode("JvmRTClassPathEntry", "JvmRTClassPathTable", mib, server);
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "addEntry" method defined in "SnmpMibTable".
-    // See the "SnmpMibTable" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public synchronized void addEntry(SnmpOid rowOid, ObjectName objname,
-                 Object entry)
-        throws SnmpStatusException {
-        if (! (entry instanceof JvmRTClassPathEntryMBean) )
-            throw new ClassCastException("Entries for Table \"" +
-                           "JvmRTClassPathTable" + "\" must implement the \"" +
-                           "JvmRTClassPathEntryMBean" + "\" interface.");
-        super.addEntry(rowOid, objname, entry);
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "get" method defined in "SnmpMibTable".
-    // See the "SnmpMibTable" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void get(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
-        throws SnmpStatusException {
-        JvmRTClassPathEntryMBean entry = (JvmRTClassPathEntryMBean) getEntry(rowOid);
-        synchronized (this) {
-            node.setInstance(entry);
-            node.get(req,depth);
-        }
-    }
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "set" method defined in "SnmpMibTable".
-    // See the "SnmpMibTable" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void set(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
-        throws SnmpStatusException {
-        if (req.getSize() == 0) return;
-
-        JvmRTClassPathEntryMBean entry = (JvmRTClassPathEntryMBean) getEntry(rowOid);
-        synchronized (this) {
-            node.setInstance(entry);
-            node.set(req,depth);
-        }
-    }
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "check" method defined in "SnmpMibTable".
-    // See the "SnmpMibTable" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void check(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
-        throws SnmpStatusException {
-        if (req.getSize() == 0) return;
-
-        JvmRTClassPathEntryMBean entry = (JvmRTClassPathEntryMBean) getEntry(rowOid);
-        synchronized (this) {
-            node.setInstance(entry);
-            node.check(req,depth);
-        }
-    }
-
-    /**
-     * check that the given "var" identifies a columnar object.
-     */
-    public void validateVarEntryId( SnmpOid rowOid, long var, Object data )
-        throws SnmpStatusException {
-        node.validateVarId(var, data);
-    }
-
-    /**
-     * Returns true if "var" identifies a readable scalar object.
-     */
-    public boolean isReadableEntryId( SnmpOid rowOid, long var, Object data )
-        throws SnmpStatusException {
-        return node.isReadable(var);
-    }
-
-    /**
-     * Returns the arc of the next columnar object following "var".
-     */
-    public long getNextVarEntryId( SnmpOid rowOid, long var, Object data )
-        throws SnmpStatusException {
-        long nextvar = node.getNextVarId(var, data);
-        while (!isReadableEntryId(rowOid, nextvar, data))
-            nextvar = node.getNextVarId(nextvar, data);
-        return nextvar;
-    }
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "skipEntryVariable" method defined in "SnmpMibTable".
-    // See the "SnmpMibTable" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public boolean skipEntryVariable( SnmpOid rowOid, long var, Object data, int pduVersion) {
-        try {
-            JvmRTClassPathEntryMBean entry = (JvmRTClassPathEntryMBean) getEntry(rowOid);
-            synchronized (this) {
-                node.setInstance(entry);
-                return node.skipVariable(var, data, pduVersion);
-            }
-        } catch (SnmpStatusException x) {
-            return false;
-        }
-    }
-
-
-    /**
-     * Reference to the entry metadata.
-     */
-    private JvmRTClassPathEntryMeta node;
-
-    /**
-     * Reference to the object server.
-     */
-    protected SnmpStandardObjectServer objectserver;
-
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmRTInputArgsEntryMBean.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 2003, 2004, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.management.snmp.jvmmib;
-
-//
-// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
-//
-
-
-// jmx imports
-//
-import com.sun.jmx.snmp.SnmpStatusException;
-
-/**
- * This interface is used for representing the remote management interface for the "JvmRTInputArgsEntry" MBean.
- */
-public interface JvmRTInputArgsEntryMBean {
-
-    /**
-     * Getter for the "JvmRTInputArgsItem" variable.
-     */
-    public String getJvmRTInputArgsItem() throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmRTInputArgsIndex" variable.
-     */
-    public Integer getJvmRTInputArgsIndex() throws SnmpStatusException;
-
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmRTInputArgsEntryMeta.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,250 +0,0 @@
-/*
- * Copyright (c) 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.management.snmp.jvmmib;
-
-//
-// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
-//
-
-// java imports
-//
-import java.io.Serializable;
-
-// jmx imports
-//
-import javax.management.MBeanServer;
-import com.sun.jmx.snmp.SnmpCounter;
-import com.sun.jmx.snmp.SnmpCounter64;
-import com.sun.jmx.snmp.SnmpGauge;
-import com.sun.jmx.snmp.SnmpInt;
-import com.sun.jmx.snmp.SnmpUnsignedInt;
-import com.sun.jmx.snmp.SnmpIpAddress;
-import com.sun.jmx.snmp.SnmpTimeticks;
-import com.sun.jmx.snmp.SnmpOpaque;
-import com.sun.jmx.snmp.SnmpString;
-import com.sun.jmx.snmp.SnmpStringFixed;
-import com.sun.jmx.snmp.SnmpOid;
-import com.sun.jmx.snmp.SnmpNull;
-import com.sun.jmx.snmp.SnmpValue;
-import com.sun.jmx.snmp.SnmpVarBind;
-import com.sun.jmx.snmp.SnmpStatusException;
-
-// jdmk imports
-//
-import com.sun.jmx.snmp.agent.SnmpMibNode;
-import com.sun.jmx.snmp.agent.SnmpMib;
-import com.sun.jmx.snmp.agent.SnmpMibEntry;
-import com.sun.jmx.snmp.agent.SnmpStandardObjectServer;
-import com.sun.jmx.snmp.agent.SnmpStandardMetaServer;
-import com.sun.jmx.snmp.agent.SnmpMibSubRequest;
-import com.sun.jmx.snmp.agent.SnmpMibTable;
-import com.sun.jmx.snmp.EnumRowStatus;
-import com.sun.jmx.snmp.SnmpDefinitions;
-
-/**
- * The class is used for representing SNMP metadata for the "JvmRTInputArgsEntry" group.
- * The group is defined with the following oid: 1.3.6.1.4.1.42.2.145.3.163.1.1.4.20.1.
- */
-public class JvmRTInputArgsEntryMeta extends SnmpMibEntry
-     implements Serializable, SnmpStandardMetaServer {
-
-    static final long serialVersionUID = -7729576810347358025L;
-    /**
-     * Constructor for the metadata associated to "JvmRTInputArgsEntry".
-     */
-    public JvmRTInputArgsEntryMeta(SnmpMib myMib, SnmpStandardObjectServer objserv) {
-        objectserver = objserv;
-        varList = new int[1];
-        varList[0] = 2;
-        SnmpMibNode.sort(varList);
-    }
-
-    /**
-     * Get the value of a scalar variable
-     */
-    public SnmpValue get(long var, Object data)
-        throws SnmpStatusException {
-        switch((int)var) {
-            case 2:
-                return new SnmpString(node.getJvmRTInputArgsItem());
-
-            case 1:
-                throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-            default:
-                break;
-        }
-        throw new SnmpStatusException(SnmpStatusException.noSuchObject);
-    }
-
-    /**
-     * Set the value of a scalar variable
-     */
-    public SnmpValue set(SnmpValue x, long var, Object data)
-        throws SnmpStatusException {
-        switch((int)var) {
-            case 2:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 1:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            default:
-                break;
-        }
-        throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-    }
-
-    /**
-     * Check the value of a scalar variable
-     */
-    public void check(SnmpValue x, long var, Object data)
-        throws SnmpStatusException {
-        switch((int) var) {
-            case 2:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 1:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            default:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-        }
-    }
-
-    /**
-     * Allow to bind the metadata description to a specific object.
-     */
-    protected void setInstance(JvmRTInputArgsEntryMBean var) {
-        node = var;
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "get" method defined in "SnmpMibEntry".
-    // See the "SnmpMibEntry" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void get(SnmpMibSubRequest req, int depth)
-        throws SnmpStatusException {
-        objectserver.get(this,req,depth);
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "set" method defined in "SnmpMibEntry".
-    // See the "SnmpMibEntry" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void set(SnmpMibSubRequest req, int depth)
-        throws SnmpStatusException {
-        objectserver.set(this,req,depth);
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "check" method defined in "SnmpMibEntry".
-    // See the "SnmpMibEntry" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void check(SnmpMibSubRequest req, int depth)
-        throws SnmpStatusException {
-        objectserver.check(this,req,depth);
-    }
-
-    /**
-     * Returns true if "arc" identifies a scalar object.
-     */
-    public boolean isVariable(long arc) {
-
-        switch((int)arc) {
-            case 2:
-            case 1:
-                return true;
-            default:
-                break;
-        }
-        return false;
-    }
-
-    /**
-     * Returns true if "arc" identifies a readable scalar object.
-     */
-    public boolean isReadable(long arc) {
-
-        switch((int)arc) {
-            case 2:
-                return true;
-            default:
-                break;
-        }
-        return false;
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "skipVariable" method defined in "SnmpMibEntry".
-    // See the "SnmpMibEntry" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public boolean  skipVariable(long var, Object data, int pduVersion) {
-        switch((int)var) {
-            case 1:
-                return true;
-            default:
-                break;
-        }
-        return super.skipVariable(var,data,pduVersion);
-    }
-
-    /**
-     * Return the name of the attribute corresponding to the SNMP variable identified by "id".
-     */
-    public String getAttributeName(long id)
-        throws SnmpStatusException {
-        switch((int)id) {
-            case 2:
-                return "JvmRTInputArgsItem";
-
-            case 1:
-                return "JvmRTInputArgsIndex";
-
-            default:
-                break;
-        }
-        throw new SnmpStatusException(SnmpStatusException.noSuchObject);
-    }
-
-    protected JvmRTInputArgsEntryMBean node;
-    protected SnmpStandardObjectServer objectserver = null;
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmRTInputArgsTableMeta.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,265 +0,0 @@
-/*
- * Copyright (c) 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.management.snmp.jvmmib;
-
-//
-// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
-//
-
-// java imports
-//
-import java.io.Serializable;
-import java.util.Vector;
-
-// jmx imports
-//
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-import com.sun.jmx.snmp.SnmpCounter;
-import com.sun.jmx.snmp.SnmpCounter64;
-import com.sun.jmx.snmp.SnmpGauge;
-import com.sun.jmx.snmp.SnmpInt;
-import com.sun.jmx.snmp.SnmpUnsignedInt;
-import com.sun.jmx.snmp.SnmpIpAddress;
-import com.sun.jmx.snmp.SnmpTimeticks;
-import com.sun.jmx.snmp.SnmpOpaque;
-import com.sun.jmx.snmp.SnmpString;
-import com.sun.jmx.snmp.SnmpStringFixed;
-import com.sun.jmx.snmp.SnmpOid;
-import com.sun.jmx.snmp.SnmpNull;
-import com.sun.jmx.snmp.SnmpValue;
-import com.sun.jmx.snmp.SnmpVarBind;
-import com.sun.jmx.snmp.SnmpStatusException;
-
-// jdmk imports
-//
-import com.sun.jmx.snmp.agent.SnmpIndex;
-import com.sun.jmx.snmp.agent.SnmpMib;
-import com.sun.jmx.snmp.agent.SnmpMibTable;
-import com.sun.jmx.snmp.agent.SnmpMibSubRequest;
-import com.sun.jmx.snmp.agent.SnmpStandardObjectServer;
-
-/**
- * The class is used for implementing the "JvmRTInputArgsTable" group.
- * The group is defined with the following oid: 1.3.6.1.4.1.42.2.145.3.163.1.1.4.20.
- */
-public class JvmRTInputArgsTableMeta extends SnmpMibTable implements Serializable {
-
-    static final long serialVersionUID = 5395531763015738645L;
-    /**
-     * Constructor for the table. Initialize metadata for "JvmRTInputArgsTableMeta".
-     * The reference on the MBean server is updated so the entries created through an SNMP SET will be AUTOMATICALLY REGISTERED in Java DMK.
-     */
-    public JvmRTInputArgsTableMeta(SnmpMib myMib, SnmpStandardObjectServer objserv) {
-        super(myMib);
-        objectserver = objserv;
-    }
-
-
-    /**
-     * Factory method for "JvmRTInputArgsEntry" entry metadata class.
-     *
-     * You can redefine this method if you need to replace the default
-     * generated metadata class with your own customized class.
-     *
-     * @param snmpEntryName Name of the SNMP Entry object (conceptual row) ("JvmRTInputArgsEntry")
-     * @param tableName Name of the table in which the entries are registered ("JvmRTInputArgsTable")
-     * @param mib The SnmpMib object in which this table is registered
-     * @param server MBeanServer for this table entries (may be null)
-     *
-     * @return An instance of the metadata class generated for the
-     *         "JvmRTInputArgsEntry" conceptual row (JvmRTInputArgsEntryMeta)
-     *
-     **/
-    protected JvmRTInputArgsEntryMeta createJvmRTInputArgsEntryMetaNode(String snmpEntryName, String tableName, SnmpMib mib, MBeanServer server)  {
-        return new JvmRTInputArgsEntryMeta(mib, objectserver);
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "createNewEntry" method defined in "SnmpMibTable".
-    // See the "SnmpMibTable" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void createNewEntry(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
-        throws SnmpStatusException {
-        if (factory != null)
-            factory.createNewEntry(req, rowOid, depth, this);
-        else
-            throw new SnmpStatusException(
-                SnmpStatusException.snmpRspNoAccess);
-    }
-
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "isRegistrationRequired" method defined in "SnmpMibTable".
-    // See the "SnmpMibTable" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public boolean isRegistrationRequired()  {
-        return false;
-    }
-
-
-
-    public void registerEntryNode(SnmpMib mib, MBeanServer server)  {
-        node = createJvmRTInputArgsEntryMetaNode("JvmRTInputArgsEntry", "JvmRTInputArgsTable", mib, server);
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "addEntry" method defined in "SnmpMibTable".
-    // See the "SnmpMibTable" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public synchronized void addEntry(SnmpOid rowOid, ObjectName objname,
-                 Object entry)
-        throws SnmpStatusException {
-        if (! (entry instanceof JvmRTInputArgsEntryMBean) )
-            throw new ClassCastException("Entries for Table \"" +
-                           "JvmRTInputArgsTable" + "\" must implement the \"" +
-                           "JvmRTInputArgsEntryMBean" + "\" interface.");
-        super.addEntry(rowOid, objname, entry);
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "get" method defined in "SnmpMibTable".
-    // See the "SnmpMibTable" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void get(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
-        throws SnmpStatusException {
-        JvmRTInputArgsEntryMBean entry = (JvmRTInputArgsEntryMBean) getEntry(rowOid);
-        synchronized (this) {
-            node.setInstance(entry);
-            node.get(req,depth);
-        }
-    }
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "set" method defined in "SnmpMibTable".
-    // See the "SnmpMibTable" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void set(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
-        throws SnmpStatusException {
-        if (req.getSize() == 0) return;
-
-        JvmRTInputArgsEntryMBean entry = (JvmRTInputArgsEntryMBean) getEntry(rowOid);
-        synchronized (this) {
-            node.setInstance(entry);
-            node.set(req,depth);
-        }
-    }
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "check" method defined in "SnmpMibTable".
-    // See the "SnmpMibTable" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void check(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
-        throws SnmpStatusException {
-        if (req.getSize() == 0) return;
-
-        JvmRTInputArgsEntryMBean entry = (JvmRTInputArgsEntryMBean) getEntry(rowOid);
-        synchronized (this) {
-            node.setInstance(entry);
-            node.check(req,depth);
-        }
-    }
-
-    /**
-     * check that the given "var" identifies a columnar object.
-     */
-    public void validateVarEntryId( SnmpOid rowOid, long var, Object data )
-        throws SnmpStatusException {
-        node.validateVarId(var, data);
-    }
-
-    /**
-     * Returns true if "var" identifies a readable scalar object.
-     */
-    public boolean isReadableEntryId( SnmpOid rowOid, long var, Object data )
-        throws SnmpStatusException {
-        return node.isReadable(var);
-    }
-
-    /**
-     * Returns the arc of the next columnar object following "var".
-     */
-    public long getNextVarEntryId( SnmpOid rowOid, long var, Object data )
-        throws SnmpStatusException {
-        long nextvar = node.getNextVarId(var, data);
-        while (!isReadableEntryId(rowOid, nextvar, data))
-            nextvar = node.getNextVarId(nextvar, data);
-        return nextvar;
-    }
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "skipEntryVariable" method defined in "SnmpMibTable".
-    // See the "SnmpMibTable" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public boolean skipEntryVariable( SnmpOid rowOid, long var, Object data, int pduVersion) {
-        try {
-            JvmRTInputArgsEntryMBean entry = (JvmRTInputArgsEntryMBean) getEntry(rowOid);
-            synchronized (this) {
-                node.setInstance(entry);
-                return node.skipVariable(var, data, pduVersion);
-            }
-        } catch (SnmpStatusException x) {
-            return false;
-        }
-    }
-
-
-    /**
-     * Reference to the entry metadata.
-     */
-    private JvmRTInputArgsEntryMeta node;
-
-    /**
-     * Reference to the object server.
-     */
-    protected SnmpStandardObjectServer objectserver;
-
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmRTLibraryPathEntryMBean.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 2004, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.management.snmp.jvmmib;
-
-//
-// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
-//
-
-
-// jmx imports
-//
-import com.sun.jmx.snmp.SnmpStatusException;
-
-/**
- * This interface is used for representing the remote management interface for the "JvmRTLibraryPathEntry" MBean.
- */
-public interface JvmRTLibraryPathEntryMBean {
-
-    /**
-     * Getter for the "JvmRTLibraryPathItem" variable.
-     */
-    public String getJvmRTLibraryPathItem() throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmRTLibraryPathIndex" variable.
-     */
-    public Integer getJvmRTLibraryPathIndex() throws SnmpStatusException;
-
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmRTLibraryPathEntryMeta.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,250 +0,0 @@
-/*
- * Copyright (c) 2004, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.management.snmp.jvmmib;
-
-//
-// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
-//
-
-// java imports
-//
-import java.io.Serializable;
-
-// jmx imports
-//
-import javax.management.MBeanServer;
-import com.sun.jmx.snmp.SnmpCounter;
-import com.sun.jmx.snmp.SnmpCounter64;
-import com.sun.jmx.snmp.SnmpGauge;
-import com.sun.jmx.snmp.SnmpInt;
-import com.sun.jmx.snmp.SnmpUnsignedInt;
-import com.sun.jmx.snmp.SnmpIpAddress;
-import com.sun.jmx.snmp.SnmpTimeticks;
-import com.sun.jmx.snmp.SnmpOpaque;
-import com.sun.jmx.snmp.SnmpString;
-import com.sun.jmx.snmp.SnmpStringFixed;
-import com.sun.jmx.snmp.SnmpOid;
-import com.sun.jmx.snmp.SnmpNull;
-import com.sun.jmx.snmp.SnmpValue;
-import com.sun.jmx.snmp.SnmpVarBind;
-import com.sun.jmx.snmp.SnmpStatusException;
-
-// jdmk imports
-//
-import com.sun.jmx.snmp.agent.SnmpMibNode;
-import com.sun.jmx.snmp.agent.SnmpMib;
-import com.sun.jmx.snmp.agent.SnmpMibEntry;
-import com.sun.jmx.snmp.agent.SnmpStandardObjectServer;
-import com.sun.jmx.snmp.agent.SnmpStandardMetaServer;
-import com.sun.jmx.snmp.agent.SnmpMibSubRequest;
-import com.sun.jmx.snmp.agent.SnmpMibTable;
-import com.sun.jmx.snmp.EnumRowStatus;
-import com.sun.jmx.snmp.SnmpDefinitions;
-
-/**
- * The class is used for representing SNMP metadata for the "JvmRTLibraryPathEntry" group.
- * The group is defined with the following oid: 1.3.6.1.4.1.42.2.145.3.163.1.1.4.23.1.
- */
-public class JvmRTLibraryPathEntryMeta extends SnmpMibEntry
-     implements Serializable, SnmpStandardMetaServer {
-
-    static final long serialVersionUID = -5851555586263475792L;
-    /**
-     * Constructor for the metadata associated to "JvmRTLibraryPathEntry".
-     */
-    public JvmRTLibraryPathEntryMeta(SnmpMib myMib, SnmpStandardObjectServer objserv) {
-        objectserver = objserv;
-        varList = new int[1];
-        varList[0] = 2;
-        SnmpMibNode.sort(varList);
-    }
-
-    /**
-     * Get the value of a scalar variable
-     */
-    public SnmpValue get(long var, Object data)
-        throws SnmpStatusException {
-        switch((int)var) {
-            case 2:
-                return new SnmpString(node.getJvmRTLibraryPathItem());
-
-            case 1:
-                throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-            default:
-                break;
-        }
-        throw new SnmpStatusException(SnmpStatusException.noSuchObject);
-    }
-
-    /**
-     * Set the value of a scalar variable
-     */
-    public SnmpValue set(SnmpValue x, long var, Object data)
-        throws SnmpStatusException {
-        switch((int)var) {
-            case 2:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 1:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            default:
-                break;
-        }
-        throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-    }
-
-    /**
-     * Check the value of a scalar variable
-     */
-    public void check(SnmpValue x, long var, Object data)
-        throws SnmpStatusException {
-        switch((int) var) {
-            case 2:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 1:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            default:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-        }
-    }
-
-    /**
-     * Allow to bind the metadata description to a specific object.
-     */
-    protected void setInstance(JvmRTLibraryPathEntryMBean var) {
-        node = var;
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "get" method defined in "SnmpMibEntry".
-    // See the "SnmpMibEntry" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void get(SnmpMibSubRequest req, int depth)
-        throws SnmpStatusException {
-        objectserver.get(this,req,depth);
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "set" method defined in "SnmpMibEntry".
-    // See the "SnmpMibEntry" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void set(SnmpMibSubRequest req, int depth)
-        throws SnmpStatusException {
-        objectserver.set(this,req,depth);
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "check" method defined in "SnmpMibEntry".
-    // See the "SnmpMibEntry" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void check(SnmpMibSubRequest req, int depth)
-        throws SnmpStatusException {
-        objectserver.check(this,req,depth);
-    }
-
-    /**
-     * Returns true if "arc" identifies a scalar object.
-     */
-    public boolean isVariable(long arc) {
-
-        switch((int)arc) {
-            case 2:
-            case 1:
-                return true;
-            default:
-                break;
-        }
-        return false;
-    }
-
-    /**
-     * Returns true if "arc" identifies a readable scalar object.
-     */
-    public boolean isReadable(long arc) {
-
-        switch((int)arc) {
-            case 2:
-                return true;
-            default:
-                break;
-        }
-        return false;
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "skipVariable" method defined in "SnmpMibEntry".
-    // See the "SnmpMibEntry" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public boolean  skipVariable(long var, Object data, int pduVersion) {
-        switch((int)var) {
-            case 1:
-                return true;
-            default:
-                break;
-        }
-        return super.skipVariable(var,data,pduVersion);
-    }
-
-    /**
-     * Return the name of the attribute corresponding to the SNMP variable identified by "id".
-     */
-    public String getAttributeName(long id)
-        throws SnmpStatusException {
-        switch((int)id) {
-            case 2:
-                return "JvmRTLibraryPathItem";
-
-            case 1:
-                return "JvmRTLibraryPathIndex";
-
-            default:
-                break;
-        }
-        throw new SnmpStatusException(SnmpStatusException.noSuchObject);
-    }
-
-    protected JvmRTLibraryPathEntryMBean node;
-    protected SnmpStandardObjectServer objectserver = null;
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmRTLibraryPathTableMeta.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,265 +0,0 @@
-/*
- * Copyright (c) 2004, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.management.snmp.jvmmib;
-
-//
-// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
-//
-
-// java imports
-//
-import java.io.Serializable;
-import java.util.Vector;
-
-// jmx imports
-//
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-import com.sun.jmx.snmp.SnmpCounter;
-import com.sun.jmx.snmp.SnmpCounter64;
-import com.sun.jmx.snmp.SnmpGauge;
-import com.sun.jmx.snmp.SnmpInt;
-import com.sun.jmx.snmp.SnmpUnsignedInt;
-import com.sun.jmx.snmp.SnmpIpAddress;
-import com.sun.jmx.snmp.SnmpTimeticks;
-import com.sun.jmx.snmp.SnmpOpaque;
-import com.sun.jmx.snmp.SnmpString;
-import com.sun.jmx.snmp.SnmpStringFixed;
-import com.sun.jmx.snmp.SnmpOid;
-import com.sun.jmx.snmp.SnmpNull;
-import com.sun.jmx.snmp.SnmpValue;
-import com.sun.jmx.snmp.SnmpVarBind;
-import com.sun.jmx.snmp.SnmpStatusException;
-
-// jdmk imports
-//
-import com.sun.jmx.snmp.agent.SnmpIndex;
-import com.sun.jmx.snmp.agent.SnmpMib;
-import com.sun.jmx.snmp.agent.SnmpMibTable;
-import com.sun.jmx.snmp.agent.SnmpMibSubRequest;
-import com.sun.jmx.snmp.agent.SnmpStandardObjectServer;
-
-/**
- * The class is used for implementing the "JvmRTLibraryPathTable" group.
- * The group is defined with the following oid: 1.3.6.1.4.1.42.2.145.3.163.1.1.4.23.
- */
-public class JvmRTLibraryPathTableMeta extends SnmpMibTable implements Serializable {
-
-    static final long serialVersionUID = -632403620113109468L;
-    /**
-     * Constructor for the table. Initialize metadata for "JvmRTLibraryPathTableMeta".
-     * The reference on the MBean server is updated so the entries created through an SNMP SET will be AUTOMATICALLY REGISTERED in Java DMK.
-     */
-    public JvmRTLibraryPathTableMeta(SnmpMib myMib, SnmpStandardObjectServer objserv) {
-        super(myMib);
-        objectserver = objserv;
-    }
-
-
-    /**
-     * Factory method for "JvmRTLibraryPathEntry" entry metadata class.
-     *
-     * You can redefine this method if you need to replace the default
-     * generated metadata class with your own customized class.
-     *
-     * @param snmpEntryName Name of the SNMP Entry object (conceptual row) ("JvmRTLibraryPathEntry")
-     * @param tableName Name of the table in which the entries are registered ("JvmRTLibraryPathTable")
-     * @param mib The SnmpMib object in which this table is registered
-     * @param server MBeanServer for this table entries (may be null)
-     *
-     * @return An instance of the metadata class generated for the
-     *         "JvmRTLibraryPathEntry" conceptual row (JvmRTLibraryPathEntryMeta)
-     *
-     **/
-    protected JvmRTLibraryPathEntryMeta createJvmRTLibraryPathEntryMetaNode(String snmpEntryName, String tableName, SnmpMib mib, MBeanServer server)  {
-        return new JvmRTLibraryPathEntryMeta(mib, objectserver);
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "createNewEntry" method defined in "SnmpMibTable".
-    // See the "SnmpMibTable" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void createNewEntry(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
-        throws SnmpStatusException {
-        if (factory != null)
-            factory.createNewEntry(req, rowOid, depth, this);
-        else
-            throw new SnmpStatusException(
-                SnmpStatusException.snmpRspNoAccess);
-    }
-
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "isRegistrationRequired" method defined in "SnmpMibTable".
-    // See the "SnmpMibTable" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public boolean isRegistrationRequired()  {
-        return false;
-    }
-
-
-
-    public void registerEntryNode(SnmpMib mib, MBeanServer server)  {
-        node = createJvmRTLibraryPathEntryMetaNode("JvmRTLibraryPathEntry", "JvmRTLibraryPathTable", mib, server);
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "addEntry" method defined in "SnmpMibTable".
-    // See the "SnmpMibTable" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public synchronized void addEntry(SnmpOid rowOid, ObjectName objname,
-                 Object entry)
-        throws SnmpStatusException {
-        if (! (entry instanceof JvmRTLibraryPathEntryMBean) )
-            throw new ClassCastException("Entries for Table \"" +
-                           "JvmRTLibraryPathTable" + "\" must implement the \"" +
-                           "JvmRTLibraryPathEntryMBean" + "\" interface.");
-        super.addEntry(rowOid, objname, entry);
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "get" method defined in "SnmpMibTable".
-    // See the "SnmpMibTable" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void get(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
-        throws SnmpStatusException {
-        JvmRTLibraryPathEntryMBean entry = (JvmRTLibraryPathEntryMBean) getEntry(rowOid);
-        synchronized (this) {
-            node.setInstance(entry);
-            node.get(req,depth);
-        }
-    }
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "set" method defined in "SnmpMibTable".
-    // See the "SnmpMibTable" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void set(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
-        throws SnmpStatusException {
-        if (req.getSize() == 0) return;
-
-        JvmRTLibraryPathEntryMBean entry = (JvmRTLibraryPathEntryMBean) getEntry(rowOid);
-        synchronized (this) {
-            node.setInstance(entry);
-            node.set(req,depth);
-        }
-    }
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "check" method defined in "SnmpMibTable".
-    // See the "SnmpMibTable" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void check(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
-        throws SnmpStatusException {
-        if (req.getSize() == 0) return;
-
-        JvmRTLibraryPathEntryMBean entry = (JvmRTLibraryPathEntryMBean) getEntry(rowOid);
-        synchronized (this) {
-            node.setInstance(entry);
-            node.check(req,depth);
-        }
-    }
-
-    /**
-     * check that the given "var" identifies a columnar object.
-     */
-    public void validateVarEntryId( SnmpOid rowOid, long var, Object data )
-        throws SnmpStatusException {
-        node.validateVarId(var, data);
-    }
-
-    /**
-     * Returns true if "var" identifies a readable scalar object.
-     */
-    public boolean isReadableEntryId( SnmpOid rowOid, long var, Object data )
-        throws SnmpStatusException {
-        return node.isReadable(var);
-    }
-
-    /**
-     * Returns the arc of the next columnar object following "var".
-     */
-    public long getNextVarEntryId( SnmpOid rowOid, long var, Object data )
-        throws SnmpStatusException {
-        long nextvar = node.getNextVarId(var, data);
-        while (!isReadableEntryId(rowOid, nextvar, data))
-            nextvar = node.getNextVarId(nextvar, data);
-        return nextvar;
-    }
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "skipEntryVariable" method defined in "SnmpMibTable".
-    // See the "SnmpMibTable" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public boolean skipEntryVariable( SnmpOid rowOid, long var, Object data, int pduVersion) {
-        try {
-            JvmRTLibraryPathEntryMBean entry = (JvmRTLibraryPathEntryMBean) getEntry(rowOid);
-            synchronized (this) {
-                node.setInstance(entry);
-                return node.skipVariable(var, data, pduVersion);
-            }
-        } catch (SnmpStatusException x) {
-            return false;
-        }
-    }
-
-
-    /**
-     * Reference to the entry metadata.
-     */
-    private JvmRTLibraryPathEntryMeta node;
-
-    /**
-     * Reference to the object server.
-     */
-    protected SnmpStandardObjectServer objectserver;
-
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmRuntimeMBean.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,102 +0,0 @@
-/*
- * Copyright (c) 2003, 2004, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.management.snmp.jvmmib;
-
-//
-// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
-//
-
-
-// jmx imports
-//
-import com.sun.jmx.snmp.SnmpStatusException;
-
-/**
- * This interface is used for representing the remote management interface for the "JvmRuntime" MBean.
- */
-public interface JvmRuntimeMBean {
-
-    /**
-     * Getter for the "JvmRTBootClassPathSupport" variable.
-     */
-    public EnumJvmRTBootClassPathSupport getJvmRTBootClassPathSupport() throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmRTManagementSpecVersion" variable.
-     */
-    public String getJvmRTManagementSpecVersion() throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmRTSpecVersion" variable.
-     */
-    public String getJvmRTSpecVersion() throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmRTSpecVendor" variable.
-     */
-    public String getJvmRTSpecVendor() throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmRTSpecName" variable.
-     */
-    public String getJvmRTSpecName() throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmRTVMVersion" variable.
-     */
-    public String getJvmRTVMVersion() throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmRTVMVendor" variable.
-     */
-    public String getJvmRTVMVendor() throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmRTStartTimeMs" variable.
-     */
-    public Long getJvmRTStartTimeMs() throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmRTUptimeMs" variable.
-     */
-    public Long getJvmRTUptimeMs() throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmRTVMName" variable.
-     */
-    public String getJvmRTVMName() throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmRTName" variable.
-     */
-    public String getJvmRTName() throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmRTInputArgsCount" variable.
-     */
-    public Integer getJvmRTInputArgsCount() throws SnmpStatusException;
-
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmRuntimeMeta.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,628 +0,0 @@
-/*
- * Copyright (c) 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.management.snmp.jvmmib;
-
-//
-// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
-//
-
-// java imports
-//
-import java.io.Serializable;
-
-// jmx imports
-//
-import javax.management.MBeanServer;
-import com.sun.jmx.snmp.SnmpCounter;
-import com.sun.jmx.snmp.SnmpCounter64;
-import com.sun.jmx.snmp.SnmpGauge;
-import com.sun.jmx.snmp.SnmpInt;
-import com.sun.jmx.snmp.SnmpUnsignedInt;
-import com.sun.jmx.snmp.SnmpIpAddress;
-import com.sun.jmx.snmp.SnmpTimeticks;
-import com.sun.jmx.snmp.SnmpOpaque;
-import com.sun.jmx.snmp.SnmpString;
-import com.sun.jmx.snmp.SnmpStringFixed;
-import com.sun.jmx.snmp.SnmpOid;
-import com.sun.jmx.snmp.SnmpNull;
-import com.sun.jmx.snmp.SnmpValue;
-import com.sun.jmx.snmp.SnmpVarBind;
-import com.sun.jmx.snmp.SnmpStatusException;
-
-// jdmk imports
-//
-import com.sun.jmx.snmp.agent.SnmpMib;
-import com.sun.jmx.snmp.agent.SnmpMibGroup;
-import com.sun.jmx.snmp.agent.SnmpStandardObjectServer;
-import com.sun.jmx.snmp.agent.SnmpStandardMetaServer;
-import com.sun.jmx.snmp.agent.SnmpMibSubRequest;
-import com.sun.jmx.snmp.agent.SnmpMibTable;
-import com.sun.jmx.snmp.EnumRowStatus;
-import com.sun.jmx.snmp.SnmpDefinitions;
-
-/**
- * The class is used for representing SNMP metadata for the "JvmRuntime" group.
- * The group is defined with the following oid: 1.3.6.1.4.1.42.2.145.3.163.1.1.4.
- */
-public class JvmRuntimeMeta extends SnmpMibGroup
-     implements Serializable, SnmpStandardMetaServer {
-
-    static final long serialVersionUID = 1994595220765880109L;
-    /**
-     * Constructor for the metadata associated to "JvmRuntime".
-     */
-    public JvmRuntimeMeta(SnmpMib myMib, SnmpStandardObjectServer objserv) {
-        objectserver = objserv;
-        try {
-            registerObject(23);
-            registerObject(22);
-            registerObject(21);
-            registerObject(9);
-            registerObject(20);
-            registerObject(8);
-            registerObject(7);
-            registerObject(6);
-            registerObject(5);
-            registerObject(4);
-            registerObject(3);
-            registerObject(12);
-            registerObject(11);
-            registerObject(2);
-            registerObject(1);
-            registerObject(10);
-        } catch (IllegalAccessException e) {
-            throw new RuntimeException(e.getMessage());
-        }
-    }
-
-    /**
-     * Get the value of a scalar variable
-     */
-    public SnmpValue get(long var, Object data)
-        throws SnmpStatusException {
-        switch((int)var) {
-            case 23: {
-                throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-                }
-
-            case 22: {
-                throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-                }
-
-            case 21: {
-                throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-                }
-
-            case 9:
-                return new SnmpInt(node.getJvmRTBootClassPathSupport());
-
-            case 20: {
-                throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-                }
-
-            case 8:
-                return new SnmpString(node.getJvmRTManagementSpecVersion());
-
-            case 7:
-                return new SnmpString(node.getJvmRTSpecVersion());
-
-            case 6:
-                return new SnmpString(node.getJvmRTSpecVendor());
-
-            case 5:
-                return new SnmpString(node.getJvmRTSpecName());
-
-            case 4:
-                return new SnmpString(node.getJvmRTVMVersion());
-
-            case 3:
-                return new SnmpString(node.getJvmRTVMVendor());
-
-            case 12:
-                return new SnmpCounter64(node.getJvmRTStartTimeMs());
-
-            case 11:
-                return new SnmpCounter64(node.getJvmRTUptimeMs());
-
-            case 2:
-                return new SnmpString(node.getJvmRTVMName());
-
-            case 1:
-                return new SnmpString(node.getJvmRTName());
-
-            case 10:
-                return new SnmpInt(node.getJvmRTInputArgsCount());
-
-            default:
-                break;
-        }
-        throw new SnmpStatusException(SnmpStatusException.noSuchObject);
-    }
-
-    /**
-     * Set the value of a scalar variable
-     */
-    public SnmpValue set(SnmpValue x, long var, Object data)
-        throws SnmpStatusException {
-        switch((int)var) {
-            case 23: {
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-                }
-
-            case 22: {
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-                }
-
-            case 21: {
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-                }
-
-            case 9:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 20: {
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-                }
-
-            case 8:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 7:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 6:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 5:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 4:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 3:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 12:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 11:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 2:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 1:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 10:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            default:
-                break;
-        }
-        throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-    }
-
-    /**
-     * Check the value of a scalar variable
-     */
-    public void check(SnmpValue x, long var, Object data)
-        throws SnmpStatusException {
-        switch((int) var) {
-            case 23: {
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-                }
-
-            case 22: {
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-                }
-
-            case 21: {
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-                }
-
-            case 9:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 20: {
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-                }
-
-            case 8:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 7:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 6:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 5:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 4:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 3:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 12:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 11:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 2:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 1:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 10:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            default:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-        }
-    }
-
-    /**
-     * Allow to bind the metadata description to a specific object.
-     */
-    protected void setInstance(JvmRuntimeMBean var) {
-        node = var;
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "get" method defined in "SnmpMibGroup".
-    // See the "SnmpMibGroup" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void get(SnmpMibSubRequest req, int depth)
-        throws SnmpStatusException {
-        objectserver.get(this,req,depth);
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "set" method defined in "SnmpMibGroup".
-    // See the "SnmpMibGroup" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void set(SnmpMibSubRequest req, int depth)
-        throws SnmpStatusException {
-        objectserver.set(this,req,depth);
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "check" method defined in "SnmpMibGroup".
-    // See the "SnmpMibGroup" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void check(SnmpMibSubRequest req, int depth)
-        throws SnmpStatusException {
-        objectserver.check(this,req,depth);
-    }
-
-    /**
-     * Returns true if "arc" identifies a scalar object.
-     */
-    public boolean isVariable(long arc) {
-
-        switch((int)arc) {
-            case 9:
-            case 8:
-            case 7:
-            case 6:
-            case 5:
-            case 4:
-            case 3:
-            case 12:
-            case 11:
-            case 2:
-            case 1:
-            case 10:
-                return true;
-            default:
-                break;
-        }
-        return false;
-    }
-
-    /**
-     * Returns true if "arc" identifies a readable scalar object.
-     */
-    public boolean isReadable(long arc) {
-
-        switch((int)arc) {
-            case 9:
-            case 8:
-            case 7:
-            case 6:
-            case 5:
-            case 4:
-            case 3:
-            case 12:
-            case 11:
-            case 2:
-            case 1:
-            case 10:
-                return true;
-            default:
-                break;
-        }
-        return false;
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "skipVariable" method defined in "SnmpMibGroup".
-    // See the "SnmpMibGroup" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public boolean  skipVariable(long var, Object data, int pduVersion) {
-        switch((int)var) {
-            case 12:
-            case 11:
-                if (pduVersion==SnmpDefinitions.snmpVersionOne) return true;
-                break;
-            default:
-                break;
-        }
-        return super.skipVariable(var,data,pduVersion);
-    }
-
-    /**
-     * Return the name of the attribute corresponding to the SNMP variable identified by "id".
-     */
-    public String getAttributeName(long id)
-        throws SnmpStatusException {
-        switch((int)id) {
-            case 23: {
-                throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-                }
-
-            case 22: {
-                throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-                }
-
-            case 21: {
-                throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-                }
-
-            case 9:
-                return "JvmRTBootClassPathSupport";
-
-            case 20: {
-                throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-                }
-
-            case 8:
-                return "JvmRTManagementSpecVersion";
-
-            case 7:
-                return "JvmRTSpecVersion";
-
-            case 6:
-                return "JvmRTSpecVendor";
-
-            case 5:
-                return "JvmRTSpecName";
-
-            case 4:
-                return "JvmRTVMVersion";
-
-            case 3:
-                return "JvmRTVMVendor";
-
-            case 12:
-                return "JvmRTStartTimeMs";
-
-            case 11:
-                return "JvmRTUptimeMs";
-
-            case 2:
-                return "JvmRTVMName";
-
-            case 1:
-                return "JvmRTName";
-
-            case 10:
-                return "JvmRTInputArgsCount";
-
-            default:
-                break;
-        }
-        throw new SnmpStatusException(SnmpStatusException.noSuchObject);
-    }
-
-    /**
-     * Returns true if "arc" identifies a table object.
-     */
-    public boolean isTable(long arc) {
-
-        switch((int)arc) {
-            case 23:
-                return true;
-            case 22:
-                return true;
-            case 21:
-                return true;
-            case 20:
-                return true;
-            default:
-                break;
-        }
-        return false;
-    }
-
-    /**
-     * Returns the table object identified by "arc".
-     */
-    public SnmpMibTable getTable(long arc) {
-
-        switch((int)arc) {
-            case 23:
-                return tableJvmRTLibraryPathTable;
-            case 22:
-                return tableJvmRTClassPathTable;
-            case 21:
-                return tableJvmRTBootClassPathTable;
-            case 20:
-                return tableJvmRTInputArgsTable;
-        default:
-            break;
-        }
-        return null;
-    }
-
-    /**
-     * Register the group's SnmpMibTable objects with the meta-data.
-     */
-    public void registerTableNodes(SnmpMib mib, MBeanServer server) {
-        tableJvmRTLibraryPathTable = createJvmRTLibraryPathTableMetaNode("JvmRTLibraryPathTable", "JvmRuntime", mib, server);
-        if ( tableJvmRTLibraryPathTable != null)  {
-            tableJvmRTLibraryPathTable.registerEntryNode(mib,server);
-            mib.registerTableMeta("JvmRTLibraryPathTable", tableJvmRTLibraryPathTable);
-        }
-
-        tableJvmRTClassPathTable = createJvmRTClassPathTableMetaNode("JvmRTClassPathTable", "JvmRuntime", mib, server);
-        if ( tableJvmRTClassPathTable != null)  {
-            tableJvmRTClassPathTable.registerEntryNode(mib,server);
-            mib.registerTableMeta("JvmRTClassPathTable", tableJvmRTClassPathTable);
-        }
-
-        tableJvmRTBootClassPathTable = createJvmRTBootClassPathTableMetaNode("JvmRTBootClassPathTable", "JvmRuntime", mib, server);
-        if ( tableJvmRTBootClassPathTable != null)  {
-            tableJvmRTBootClassPathTable.registerEntryNode(mib,server);
-            mib.registerTableMeta("JvmRTBootClassPathTable", tableJvmRTBootClassPathTable);
-        }
-
-        tableJvmRTInputArgsTable = createJvmRTInputArgsTableMetaNode("JvmRTInputArgsTable", "JvmRuntime", mib, server);
-        if ( tableJvmRTInputArgsTable != null)  {
-            tableJvmRTInputArgsTable.registerEntryNode(mib,server);
-            mib.registerTableMeta("JvmRTInputArgsTable", tableJvmRTInputArgsTable);
-        }
-
-    }
-
-
-    /**
-     * Factory method for "JvmRTLibraryPathTable" table metadata class.
-     *
-     * You can redefine this method if you need to replace the default
-     * generated metadata class with your own customized class.
-     *
-     * @param tableName Name of the table object ("JvmRTLibraryPathTable")
-     * @param groupName Name of the group to which this table belong ("JvmRuntime")
-     * @param mib The SnmpMib object in which this table is registered
-     * @param server MBeanServer for this table entries (may be null)
-     *
-     * @return An instance of the metadata class generated for the
-     *         "JvmRTLibraryPathTable" table (JvmRTLibraryPathTableMeta)
-     *
-     **/
-    protected JvmRTLibraryPathTableMeta createJvmRTLibraryPathTableMetaNode(String tableName, String groupName, SnmpMib mib, MBeanServer server)  {
-        return new JvmRTLibraryPathTableMeta(mib, objectserver);
-    }
-
-
-    /**
-     * Factory method for "JvmRTClassPathTable" table metadata class.
-     *
-     * You can redefine this method if you need to replace the default
-     * generated metadata class with your own customized class.
-     *
-     * @param tableName Name of the table object ("JvmRTClassPathTable")
-     * @param groupName Name of the group to which this table belong ("JvmRuntime")
-     * @param mib The SnmpMib object in which this table is registered
-     * @param server MBeanServer for this table entries (may be null)
-     *
-     * @return An instance of the metadata class generated for the
-     *         "JvmRTClassPathTable" table (JvmRTClassPathTableMeta)
-     *
-     **/
-    protected JvmRTClassPathTableMeta createJvmRTClassPathTableMetaNode(String tableName, String groupName, SnmpMib mib, MBeanServer server)  {
-        return new JvmRTClassPathTableMeta(mib, objectserver);
-    }
-
-
-    /**
-     * Factory method for "JvmRTBootClassPathTable" table metadata class.
-     *
-     * You can redefine this method if you need to replace the default
-     * generated metadata class with your own customized class.
-     *
-     * @param tableName Name of the table object ("JvmRTBootClassPathTable")
-     * @param groupName Name of the group to which this table belong ("JvmRuntime")
-     * @param mib The SnmpMib object in which this table is registered
-     * @param server MBeanServer for this table entries (may be null)
-     *
-     * @return An instance of the metadata class generated for the
-     *         "JvmRTBootClassPathTable" table (JvmRTBootClassPathTableMeta)
-     *
-     **/
-    protected JvmRTBootClassPathTableMeta createJvmRTBootClassPathTableMetaNode(String tableName, String groupName, SnmpMib mib, MBeanServer server)  {
-        return new JvmRTBootClassPathTableMeta(mib, objectserver);
-    }
-
-
-    /**
-     * Factory method for "JvmRTInputArgsTable" table metadata class.
-     *
-     * You can redefine this method if you need to replace the default
-     * generated metadata class with your own customized class.
-     *
-     * @param tableName Name of the table object ("JvmRTInputArgsTable")
-     * @param groupName Name of the group to which this table belong ("JvmRuntime")
-     * @param mib The SnmpMib object in which this table is registered
-     * @param server MBeanServer for this table entries (may be null)
-     *
-     * @return An instance of the metadata class generated for the
-     *         "JvmRTInputArgsTable" table (JvmRTInputArgsTableMeta)
-     *
-     **/
-    protected JvmRTInputArgsTableMeta createJvmRTInputArgsTableMetaNode(String tableName, String groupName, SnmpMib mib, MBeanServer server)  {
-        return new JvmRTInputArgsTableMeta(mib, objectserver);
-    }
-
-    protected JvmRuntimeMBean node;
-    protected SnmpStandardObjectServer objectserver = null;
-    protected JvmRTLibraryPathTableMeta tableJvmRTLibraryPathTable = null;
-    protected JvmRTClassPathTableMeta tableJvmRTClassPathTable = null;
-    protected JvmRTBootClassPathTableMeta tableJvmRTBootClassPathTable = null;
-    protected JvmRTInputArgsTableMeta tableJvmRTInputArgsTable = null;
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmThreadInstanceEntryMBean.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,97 +0,0 @@
-/*
- * Copyright (c) 2003, 2004, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.management.snmp.jvmmib;
-
-//
-// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
-//
-
-
-// jmx imports
-//
-import com.sun.jmx.snmp.SnmpStatusException;
-
-/**
- * This interface is used for representing the remote management interface for the "JvmThreadInstanceEntry" MBean.
- */
-public interface JvmThreadInstanceEntryMBean {
-
-    /**
-     * Getter for the "JvmThreadInstName" variable.
-     */
-    public String getJvmThreadInstName() throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmThreadInstCpuTimeNs" variable.
-     */
-    public Long getJvmThreadInstCpuTimeNs() throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmThreadInstWaitTimeMs" variable.
-     */
-    public Long getJvmThreadInstWaitTimeMs() throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmThreadInstWaitCount" variable.
-     */
-    public Long getJvmThreadInstWaitCount() throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmThreadInstBlockTimeMs" variable.
-     */
-    public Long getJvmThreadInstBlockTimeMs() throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmThreadInstBlockCount" variable.
-     */
-    public Long getJvmThreadInstBlockCount() throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmThreadInstState" variable.
-     */
-    public Byte[] getJvmThreadInstState() throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmThreadInstLockOwnerPtr" variable.
-     */
-    public String getJvmThreadInstLockOwnerPtr() throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmThreadInstId" variable.
-     */
-    public Long getJvmThreadInstId() throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmThreadInstLockName" variable.
-     */
-    public String getJvmThreadInstLockName() throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmThreadInstIndex" variable.
-     */
-    public Byte[] getJvmThreadInstIndex() throws SnmpStatusException;
-
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmThreadInstanceEntryMeta.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,393 +0,0 @@
-/*
- * Copyright (c) 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.management.snmp.jvmmib;
-
-//
-// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
-//
-
-// java imports
-//
-import java.io.Serializable;
-
-// jmx imports
-//
-import javax.management.MBeanServer;
-import com.sun.jmx.snmp.SnmpCounter;
-import com.sun.jmx.snmp.SnmpCounter64;
-import com.sun.jmx.snmp.SnmpGauge;
-import com.sun.jmx.snmp.SnmpInt;
-import com.sun.jmx.snmp.SnmpUnsignedInt;
-import com.sun.jmx.snmp.SnmpIpAddress;
-import com.sun.jmx.snmp.SnmpTimeticks;
-import com.sun.jmx.snmp.SnmpOpaque;
-import com.sun.jmx.snmp.SnmpString;
-import com.sun.jmx.snmp.SnmpStringFixed;
-import com.sun.jmx.snmp.SnmpOid;
-import com.sun.jmx.snmp.SnmpNull;
-import com.sun.jmx.snmp.SnmpValue;
-import com.sun.jmx.snmp.SnmpVarBind;
-import com.sun.jmx.snmp.SnmpStatusException;
-
-// jdmk imports
-//
-import com.sun.jmx.snmp.agent.SnmpMibNode;
-import com.sun.jmx.snmp.agent.SnmpMib;
-import com.sun.jmx.snmp.agent.SnmpMibEntry;
-import com.sun.jmx.snmp.agent.SnmpStandardObjectServer;
-import com.sun.jmx.snmp.agent.SnmpStandardMetaServer;
-import com.sun.jmx.snmp.agent.SnmpMibSubRequest;
-import com.sun.jmx.snmp.agent.SnmpMibTable;
-import com.sun.jmx.snmp.EnumRowStatus;
-import com.sun.jmx.snmp.SnmpDefinitions;
-
-/**
- * The class is used for representing SNMP metadata for the "JvmThreadInstanceEntry" group.
- * The group is defined with the following oid: 1.3.6.1.4.1.42.2.145.3.163.1.1.3.10.1.
- */
-public class JvmThreadInstanceEntryMeta extends SnmpMibEntry
-     implements Serializable, SnmpStandardMetaServer {
-
-    static final long serialVersionUID = -2015330111801477399L;
-    /**
-     * Constructor for the metadata associated to "JvmThreadInstanceEntry".
-     */
-    public JvmThreadInstanceEntryMeta(SnmpMib myMib, SnmpStandardObjectServer objserv) {
-        objectserver = objserv;
-        varList = new int[10];
-        varList[0] = 9;
-        varList[1] = 8;
-        varList[2] = 7;
-        varList[3] = 6;
-        varList[4] = 5;
-        varList[5] = 4;
-        varList[6] = 3;
-        varList[7] = 11;
-        varList[8] = 2;
-        varList[9] = 10;
-        SnmpMibNode.sort(varList);
-    }
-
-    /**
-     * Get the value of a scalar variable
-     */
-    public SnmpValue get(long var, Object data)
-        throws SnmpStatusException {
-        switch((int)var) {
-            case 9:
-                return new SnmpString(node.getJvmThreadInstName());
-
-            case 8:
-                return new SnmpCounter64(node.getJvmThreadInstCpuTimeNs());
-
-            case 7:
-                return new SnmpCounter64(node.getJvmThreadInstWaitTimeMs());
-
-            case 6:
-                return new SnmpCounter64(node.getJvmThreadInstWaitCount());
-
-            case 5:
-                return new SnmpCounter64(node.getJvmThreadInstBlockTimeMs());
-
-            case 4:
-                return new SnmpCounter64(node.getJvmThreadInstBlockCount());
-
-            case 3:
-                return new SnmpString(node.getJvmThreadInstState());
-
-            case 11:
-                return new SnmpOid(node.getJvmThreadInstLockOwnerPtr());
-
-            case 2:
-                return new SnmpCounter64(node.getJvmThreadInstId());
-
-            case 10:
-                return new SnmpString(node.getJvmThreadInstLockName());
-
-            case 1:
-                throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-            default:
-                break;
-        }
-        throw new SnmpStatusException(SnmpStatusException.noSuchObject);
-    }
-
-    /**
-     * Set the value of a scalar variable
-     */
-    public SnmpValue set(SnmpValue x, long var, Object data)
-        throws SnmpStatusException {
-        switch((int)var) {
-            case 9:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 8:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 7:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 6:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 5:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 4:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 3:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 11:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 2:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 10:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 1:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            default:
-                break;
-        }
-        throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-    }
-
-    /**
-     * Check the value of a scalar variable
-     */
-    public void check(SnmpValue x, long var, Object data)
-        throws SnmpStatusException {
-        switch((int) var) {
-            case 9:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 8:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 7:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 6:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 5:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 4:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 3:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 11:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 2:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 10:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 1:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            default:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-        }
-    }
-
-    /**
-     * Allow to bind the metadata description to a specific object.
-     */
-    protected void setInstance(JvmThreadInstanceEntryMBean var) {
-        node = var;
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "get" method defined in "SnmpMibEntry".
-    // See the "SnmpMibEntry" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void get(SnmpMibSubRequest req, int depth)
-        throws SnmpStatusException {
-        objectserver.get(this,req,depth);
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "set" method defined in "SnmpMibEntry".
-    // See the "SnmpMibEntry" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void set(SnmpMibSubRequest req, int depth)
-        throws SnmpStatusException {
-        objectserver.set(this,req,depth);
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "check" method defined in "SnmpMibEntry".
-    // See the "SnmpMibEntry" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void check(SnmpMibSubRequest req, int depth)
-        throws SnmpStatusException {
-        objectserver.check(this,req,depth);
-    }
-
-    /**
-     * Returns true if "arc" identifies a scalar object.
-     */
-    public boolean isVariable(long arc) {
-
-        switch((int)arc) {
-            case 9:
-            case 8:
-            case 7:
-            case 6:
-            case 5:
-            case 4:
-            case 3:
-            case 11:
-            case 2:
-            case 10:
-            case 1:
-                return true;
-            default:
-                break;
-        }
-        return false;
-    }
-
-    /**
-     * Returns true if "arc" identifies a readable scalar object.
-     */
-    public boolean isReadable(long arc) {
-
-        switch((int)arc) {
-            case 9:
-            case 8:
-            case 7:
-            case 6:
-            case 5:
-            case 4:
-            case 3:
-            case 11:
-            case 2:
-            case 10:
-                return true;
-            default:
-                break;
-        }
-        return false;
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "skipVariable" method defined in "SnmpMibEntry".
-    // See the "SnmpMibEntry" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public boolean  skipVariable(long var, Object data, int pduVersion) {
-        switch((int)var) {
-            case 8:
-            case 7:
-            case 6:
-            case 5:
-            case 4:
-            case 2:
-                if (pduVersion==SnmpDefinitions.snmpVersionOne) return true;
-                break;
-            case 1:
-                return true;
-            default:
-                break;
-        }
-        return super.skipVariable(var,data,pduVersion);
-    }
-
-    /**
-     * Return the name of the attribute corresponding to the SNMP variable identified by "id".
-     */
-    public String getAttributeName(long id)
-        throws SnmpStatusException {
-        switch((int)id) {
-            case 9:
-                return "JvmThreadInstName";
-
-            case 8:
-                return "JvmThreadInstCpuTimeNs";
-
-            case 7:
-                return "JvmThreadInstWaitTimeMs";
-
-            case 6:
-                return "JvmThreadInstWaitCount";
-
-            case 5:
-                return "JvmThreadInstBlockTimeMs";
-
-            case 4:
-                return "JvmThreadInstBlockCount";
-
-            case 3:
-                return "JvmThreadInstState";
-
-            case 11:
-                return "JvmThreadInstLockOwnerPtr";
-
-            case 2:
-                return "JvmThreadInstId";
-
-            case 10:
-                return "JvmThreadInstLockName";
-
-            case 1:
-                return "JvmThreadInstIndex";
-
-            default:
-                break;
-        }
-        throw new SnmpStatusException(SnmpStatusException.noSuchObject);
-    }
-
-    protected JvmThreadInstanceEntryMBean node;
-    protected SnmpStandardObjectServer objectserver = null;
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmThreadInstanceTableMeta.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,265 +0,0 @@
-/*
- * Copyright (c) 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.management.snmp.jvmmib;
-
-//
-// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
-//
-
-// java imports
-//
-import java.io.Serializable;
-import java.util.Vector;
-
-// jmx imports
-//
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-import com.sun.jmx.snmp.SnmpCounter;
-import com.sun.jmx.snmp.SnmpCounter64;
-import com.sun.jmx.snmp.SnmpGauge;
-import com.sun.jmx.snmp.SnmpInt;
-import com.sun.jmx.snmp.SnmpUnsignedInt;
-import com.sun.jmx.snmp.SnmpIpAddress;
-import com.sun.jmx.snmp.SnmpTimeticks;
-import com.sun.jmx.snmp.SnmpOpaque;
-import com.sun.jmx.snmp.SnmpString;
-import com.sun.jmx.snmp.SnmpStringFixed;
-import com.sun.jmx.snmp.SnmpOid;
-import com.sun.jmx.snmp.SnmpNull;
-import com.sun.jmx.snmp.SnmpValue;
-import com.sun.jmx.snmp.SnmpVarBind;
-import com.sun.jmx.snmp.SnmpStatusException;
-
-// jdmk imports
-//
-import com.sun.jmx.snmp.agent.SnmpIndex;
-import com.sun.jmx.snmp.agent.SnmpMib;
-import com.sun.jmx.snmp.agent.SnmpMibTable;
-import com.sun.jmx.snmp.agent.SnmpMibSubRequest;
-import com.sun.jmx.snmp.agent.SnmpStandardObjectServer;
-
-/**
- * The class is used for implementing the "JvmThreadInstanceTable" group.
- * The group is defined with the following oid: 1.3.6.1.4.1.42.2.145.3.163.1.1.3.10.
- */
-public class JvmThreadInstanceTableMeta extends SnmpMibTable implements Serializable {
-
-    static final long serialVersionUID = 2519514732589115954L;
-    /**
-     * Constructor for the table. Initialize metadata for "JvmThreadInstanceTableMeta".
-     * The reference on the MBean server is updated so the entries created through an SNMP SET will be AUTOMATICALLY REGISTERED in Java DMK.
-     */
-    public JvmThreadInstanceTableMeta(SnmpMib myMib, SnmpStandardObjectServer objserv) {
-        super(myMib);
-        objectserver = objserv;
-    }
-
-
-    /**
-     * Factory method for "JvmThreadInstanceEntry" entry metadata class.
-     *
-     * You can redefine this method if you need to replace the default
-     * generated metadata class with your own customized class.
-     *
-     * @param snmpEntryName Name of the SNMP Entry object (conceptual row) ("JvmThreadInstanceEntry")
-     * @param tableName Name of the table in which the entries are registered ("JvmThreadInstanceTable")
-     * @param mib The SnmpMib object in which this table is registered
-     * @param server MBeanServer for this table entries (may be null)
-     *
-     * @return An instance of the metadata class generated for the
-     *         "JvmThreadInstanceEntry" conceptual row (JvmThreadInstanceEntryMeta)
-     *
-     **/
-    protected JvmThreadInstanceEntryMeta createJvmThreadInstanceEntryMetaNode(String snmpEntryName, String tableName, SnmpMib mib, MBeanServer server)  {
-        return new JvmThreadInstanceEntryMeta(mib, objectserver);
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "createNewEntry" method defined in "SnmpMibTable".
-    // See the "SnmpMibTable" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void createNewEntry(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
-        throws SnmpStatusException {
-        if (factory != null)
-            factory.createNewEntry(req, rowOid, depth, this);
-        else
-            throw new SnmpStatusException(
-                SnmpStatusException.snmpRspNoAccess);
-    }
-
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "isRegistrationRequired" method defined in "SnmpMibTable".
-    // See the "SnmpMibTable" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public boolean isRegistrationRequired()  {
-        return false;
-    }
-
-
-
-    public void registerEntryNode(SnmpMib mib, MBeanServer server)  {
-        node = createJvmThreadInstanceEntryMetaNode("JvmThreadInstanceEntry", "JvmThreadInstanceTable", mib, server);
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "addEntry" method defined in "SnmpMibTable".
-    // See the "SnmpMibTable" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public synchronized void addEntry(SnmpOid rowOid, ObjectName objname,
-                 Object entry)
-        throws SnmpStatusException {
-        if (! (entry instanceof JvmThreadInstanceEntryMBean) )
-            throw new ClassCastException("Entries for Table \"" +
-                           "JvmThreadInstanceTable" + "\" must implement the \"" +
-                           "JvmThreadInstanceEntryMBean" + "\" interface.");
-        super.addEntry(rowOid, objname, entry);
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "get" method defined in "SnmpMibTable".
-    // See the "SnmpMibTable" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void get(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
-        throws SnmpStatusException {
-        JvmThreadInstanceEntryMBean entry = (JvmThreadInstanceEntryMBean) getEntry(rowOid);
-        synchronized (this) {
-            node.setInstance(entry);
-            node.get(req,depth);
-        }
-    }
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "set" method defined in "SnmpMibTable".
-    // See the "SnmpMibTable" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void set(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
-        throws SnmpStatusException {
-        if (req.getSize() == 0) return;
-
-        JvmThreadInstanceEntryMBean entry = (JvmThreadInstanceEntryMBean) getEntry(rowOid);
-        synchronized (this) {
-            node.setInstance(entry);
-            node.set(req,depth);
-        }
-    }
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "check" method defined in "SnmpMibTable".
-    // See the "SnmpMibTable" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void check(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
-        throws SnmpStatusException {
-        if (req.getSize() == 0) return;
-
-        JvmThreadInstanceEntryMBean entry = (JvmThreadInstanceEntryMBean) getEntry(rowOid);
-        synchronized (this) {
-            node.setInstance(entry);
-            node.check(req,depth);
-        }
-    }
-
-    /**
-     * check that the given "var" identifies a columnar object.
-     */
-    public void validateVarEntryId( SnmpOid rowOid, long var, Object data )
-        throws SnmpStatusException {
-        node.validateVarId(var, data);
-    }
-
-    /**
-     * Returns true if "var" identifies a readable scalar object.
-     */
-    public boolean isReadableEntryId( SnmpOid rowOid, long var, Object data )
-        throws SnmpStatusException {
-        return node.isReadable(var);
-    }
-
-    /**
-     * Returns the arc of the next columnar object following "var".
-     */
-    public long getNextVarEntryId( SnmpOid rowOid, long var, Object data )
-        throws SnmpStatusException {
-        long nextvar = node.getNextVarId(var, data);
-        while (!isReadableEntryId(rowOid, nextvar, data))
-            nextvar = node.getNextVarId(nextvar, data);
-        return nextvar;
-    }
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "skipEntryVariable" method defined in "SnmpMibTable".
-    // See the "SnmpMibTable" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public boolean skipEntryVariable( SnmpOid rowOid, long var, Object data, int pduVersion) {
-        try {
-            JvmThreadInstanceEntryMBean entry = (JvmThreadInstanceEntryMBean) getEntry(rowOid);
-            synchronized (this) {
-                node.setInstance(entry);
-                return node.skipVariable(var, data, pduVersion);
-            }
-        } catch (SnmpStatusException x) {
-            return false;
-        }
-    }
-
-
-    /**
-     * Reference to the entry metadata.
-     */
-    private JvmThreadInstanceEntryMeta node;
-
-    /**
-     * Reference to the object server.
-     */
-    protected SnmpStandardObjectServer objectserver;
-
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmThreadingMBean.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,107 +0,0 @@
-/*
- * Copyright (c) 2003, 2004, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.management.snmp.jvmmib;
-
-//
-// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
-//
-
-
-// jmx imports
-//
-import com.sun.jmx.snmp.SnmpStatusException;
-
-/**
- * This interface is used for representing the remote management interface for the "JvmThreading" MBean.
- */
-public interface JvmThreadingMBean {
-
-    /**
-     * Getter for the "JvmThreadCpuTimeMonitoring" variable.
-     */
-    public EnumJvmThreadCpuTimeMonitoring getJvmThreadCpuTimeMonitoring() throws SnmpStatusException;
-
-    /**
-     * Setter for the "JvmThreadCpuTimeMonitoring" variable.
-     */
-    public void setJvmThreadCpuTimeMonitoring(EnumJvmThreadCpuTimeMonitoring x) throws SnmpStatusException;
-
-    /**
-     * Checker for the "JvmThreadCpuTimeMonitoring" variable.
-     */
-    public void checkJvmThreadCpuTimeMonitoring(EnumJvmThreadCpuTimeMonitoring x) throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmThreadContentionMonitoring" variable.
-     */
-    public EnumJvmThreadContentionMonitoring getJvmThreadContentionMonitoring() throws SnmpStatusException;
-
-    /**
-     * Setter for the "JvmThreadContentionMonitoring" variable.
-     */
-    public void setJvmThreadContentionMonitoring(EnumJvmThreadContentionMonitoring x) throws SnmpStatusException;
-
-    /**
-     * Checker for the "JvmThreadContentionMonitoring" variable.
-     */
-    public void checkJvmThreadContentionMonitoring(EnumJvmThreadContentionMonitoring x) throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmThreadTotalStartedCount" variable.
-     */
-    public Long getJvmThreadTotalStartedCount() throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmThreadPeakCount" variable.
-     */
-    public Long getJvmThreadPeakCount() throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmThreadDaemonCount" variable.
-     */
-    public Long getJvmThreadDaemonCount() throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmThreadCount" variable.
-     */
-    public Long getJvmThreadCount() throws SnmpStatusException;
-
-    /**
-     * Getter for the "JvmThreadPeakCountReset" variable.
-     */
-    public Long getJvmThreadPeakCountReset() throws SnmpStatusException;
-
-    /**
-     * Setter for the "JvmThreadPeakCountReset" variable.
-     */
-    public void setJvmThreadPeakCountReset(Long x) throws SnmpStatusException;
-
-    /**
-     * Checker for the "JvmThreadPeakCountReset" variable.
-     */
-    public void checkJvmThreadPeakCountReset(Long x) throws SnmpStatusException;
-
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/JvmThreadingMeta.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,455 +0,0 @@
-/*
- * Copyright (c) 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.management.snmp.jvmmib;
-
-//
-// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
-//
-
-// java imports
-//
-import java.io.Serializable;
-
-// jmx imports
-//
-import javax.management.MBeanServer;
-import com.sun.jmx.snmp.SnmpCounter;
-import com.sun.jmx.snmp.SnmpCounter64;
-import com.sun.jmx.snmp.SnmpGauge;
-import com.sun.jmx.snmp.SnmpInt;
-import com.sun.jmx.snmp.SnmpUnsignedInt;
-import com.sun.jmx.snmp.SnmpIpAddress;
-import com.sun.jmx.snmp.SnmpTimeticks;
-import com.sun.jmx.snmp.SnmpOpaque;
-import com.sun.jmx.snmp.SnmpString;
-import com.sun.jmx.snmp.SnmpStringFixed;
-import com.sun.jmx.snmp.SnmpOid;
-import com.sun.jmx.snmp.SnmpNull;
-import com.sun.jmx.snmp.SnmpValue;
-import com.sun.jmx.snmp.SnmpVarBind;
-import com.sun.jmx.snmp.SnmpStatusException;
-
-// jdmk imports
-//
-import com.sun.jmx.snmp.agent.SnmpMib;
-import com.sun.jmx.snmp.agent.SnmpMibGroup;
-import com.sun.jmx.snmp.agent.SnmpStandardObjectServer;
-import com.sun.jmx.snmp.agent.SnmpStandardMetaServer;
-import com.sun.jmx.snmp.agent.SnmpMibSubRequest;
-import com.sun.jmx.snmp.agent.SnmpMibTable;
-import com.sun.jmx.snmp.EnumRowStatus;
-import com.sun.jmx.snmp.SnmpDefinitions;
-
-/**
- * The class is used for representing SNMP metadata for the "JvmThreading" group.
- * The group is defined with the following oid: 1.3.6.1.4.1.42.2.145.3.163.1.1.3.
- */
-public class JvmThreadingMeta extends SnmpMibGroup
-     implements Serializable, SnmpStandardMetaServer {
-
-    static final long serialVersionUID = 5223833578005322854L;
-    /**
-     * Constructor for the metadata associated to "JvmThreading".
-     */
-    public JvmThreadingMeta(SnmpMib myMib, SnmpStandardObjectServer objserv) {
-        objectserver = objserv;
-        try {
-            registerObject(6);
-            registerObject(5);
-            registerObject(4);
-            registerObject(3);
-            registerObject(2);
-            registerObject(1);
-            registerObject(10);
-            registerObject(7);
-        } catch (IllegalAccessException e) {
-            throw new RuntimeException(e.getMessage());
-        }
-    }
-
-    /**
-     * Get the value of a scalar variable
-     */
-    public SnmpValue get(long var, Object data)
-        throws SnmpStatusException {
-        switch((int)var) {
-            case 6:
-                return new SnmpInt(node.getJvmThreadCpuTimeMonitoring());
-
-            case 5:
-                return new SnmpInt(node.getJvmThreadContentionMonitoring());
-
-            case 4:
-                return new SnmpCounter64(node.getJvmThreadTotalStartedCount());
-
-            case 3:
-                return new SnmpCounter(node.getJvmThreadPeakCount());
-
-            case 2:
-                return new SnmpGauge(node.getJvmThreadDaemonCount());
-
-            case 1:
-                return new SnmpGauge(node.getJvmThreadCount());
-
-            case 10: {
-                throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-                }
-
-            case 7:
-                return new SnmpCounter64(node.getJvmThreadPeakCountReset());
-
-            default:
-                break;
-        }
-        throw new SnmpStatusException(SnmpStatusException.noSuchObject);
-    }
-
-    /**
-     * Set the value of a scalar variable
-     */
-    public SnmpValue set(SnmpValue x, long var, Object data)
-        throws SnmpStatusException {
-        switch((int)var) {
-            case 6:
-                if (x instanceof SnmpInt) {
-                    try  {
-                        node.setJvmThreadCpuTimeMonitoring( new EnumJvmThreadCpuTimeMonitoring (((SnmpInt)x).toInteger()));
-                    } catch(IllegalArgumentException e)  {
-                        throw new SnmpStatusException(SnmpStatusException.snmpRspWrongValue);
-                    }
-                    return new SnmpInt(node.getJvmThreadCpuTimeMonitoring());
-                } else {
-                    throw new SnmpStatusException(SnmpStatusException.snmpRspWrongType);
-                }
-
-            case 5:
-                if (x instanceof SnmpInt) {
-                    try  {
-                        node.setJvmThreadContentionMonitoring( new EnumJvmThreadContentionMonitoring (((SnmpInt)x).toInteger()));
-                    } catch(IllegalArgumentException e)  {
-                        throw new SnmpStatusException(SnmpStatusException.snmpRspWrongValue);
-                    }
-                    return new SnmpInt(node.getJvmThreadContentionMonitoring());
-                } else {
-                    throw new SnmpStatusException(SnmpStatusException.snmpRspWrongType);
-                }
-
-            case 4:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 3:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 2:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 1:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 10: {
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-                }
-
-            case 7:
-                if (x instanceof SnmpCounter64) {
-                    node.setJvmThreadPeakCountReset(((SnmpCounter64)x).toLong());
-                    return new SnmpCounter64(node.getJvmThreadPeakCountReset());
-                } else {
-                    throw new SnmpStatusException(SnmpStatusException.snmpRspWrongType);
-                }
-
-            default:
-                break;
-        }
-        throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-    }
-
-    /**
-     * Check the value of a scalar variable
-     */
-    public void check(SnmpValue x, long var, Object data)
-        throws SnmpStatusException {
-        switch((int) var) {
-            case 6:
-                if (x instanceof SnmpInt) {
-                    try  {
-                        node.checkJvmThreadCpuTimeMonitoring( new EnumJvmThreadCpuTimeMonitoring (((SnmpInt)x).toInteger()));
-                    } catch(IllegalArgumentException e)  {
-                        throw new SnmpStatusException(SnmpStatusException.snmpRspWrongValue);
-                    }
-                } else {
-                    throw new SnmpStatusException(SnmpStatusException.snmpRspWrongType);
-                }
-                break;
-
-            case 5:
-                if (x instanceof SnmpInt) {
-                    try  {
-                        node.checkJvmThreadContentionMonitoring( new EnumJvmThreadContentionMonitoring (((SnmpInt)x).toInteger()));
-                    } catch(IllegalArgumentException e)  {
-                        throw new SnmpStatusException(SnmpStatusException.snmpRspWrongValue);
-                    }
-                } else {
-                    throw new SnmpStatusException(SnmpStatusException.snmpRspWrongType);
-                }
-                break;
-
-            case 4:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 3:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 2:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 1:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-
-            case 10: {
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-                }
-
-            case 7:
-                if (x instanceof SnmpCounter64) {
-                    node.checkJvmThreadPeakCountReset(((SnmpCounter64)x).toLong());
-                } else {
-                    throw new SnmpStatusException(SnmpStatusException.snmpRspWrongType);
-                }
-                break;
-
-            default:
-                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
-        }
-    }
-
-    /**
-     * Allow to bind the metadata description to a specific object.
-     */
-    protected void setInstance(JvmThreadingMBean var) {
-        node = var;
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "get" method defined in "SnmpMibGroup".
-    // See the "SnmpMibGroup" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void get(SnmpMibSubRequest req, int depth)
-        throws SnmpStatusException {
-        objectserver.get(this,req,depth);
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "set" method defined in "SnmpMibGroup".
-    // See the "SnmpMibGroup" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void set(SnmpMibSubRequest req, int depth)
-        throws SnmpStatusException {
-        objectserver.set(this,req,depth);
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "check" method defined in "SnmpMibGroup".
-    // See the "SnmpMibGroup" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public void check(SnmpMibSubRequest req, int depth)
-        throws SnmpStatusException {
-        objectserver.check(this,req,depth);
-    }
-
-    /**
-     * Returns true if "arc" identifies a scalar object.
-     */
-    public boolean isVariable(long arc) {
-
-        switch((int)arc) {
-            case 6:
-            case 5:
-            case 4:
-            case 3:
-            case 2:
-            case 1:
-            case 7:
-                return true;
-            default:
-                break;
-        }
-        return false;
-    }
-
-    /**
-     * Returns true if "arc" identifies a readable scalar object.
-     */
-    public boolean isReadable(long arc) {
-
-        switch((int)arc) {
-            case 6:
-            case 5:
-            case 4:
-            case 3:
-            case 2:
-            case 1:
-            case 7:
-                return true;
-            default:
-                break;
-        }
-        return false;
-    }
-
-
-    // ------------------------------------------------------------
-    //
-    // Implements the "skipVariable" method defined in "SnmpMibGroup".
-    // See the "SnmpMibGroup" Javadoc API for more details.
-    //
-    // ------------------------------------------------------------
-
-    public boolean  skipVariable(long var, Object data, int pduVersion) {
-        switch((int)var) {
-            case 4:
-            case 7:
-                if (pduVersion==SnmpDefinitions.snmpVersionOne) return true;
-                break;
-            default:
-                break;
-        }
-        return super.skipVariable(var,data,pduVersion);
-    }
-
-    /**
-     * Return the name of the attribute corresponding to the SNMP variable identified by "id".
-     */
-    public String getAttributeName(long id)
-        throws SnmpStatusException {
-        switch((int)id) {
-            case 6:
-                return "JvmThreadCpuTimeMonitoring";
-
-            case 5:
-                return "JvmThreadContentionMonitoring";
-
-            case 4:
-                return "JvmThreadTotalStartedCount";
-
-            case 3:
-                return "JvmThreadPeakCount";
-
-            case 2:
-                return "JvmThreadDaemonCount";
-
-            case 1:
-                return "JvmThreadCount";
-
-            case 10: {
-                throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
-                }
-
-            case 7:
-                return "JvmThreadPeakCountReset";
-
-            default:
-                break;
-        }
-        throw new SnmpStatusException(SnmpStatusException.noSuchObject);
-    }
-
-    /**
-     * Returns true if "arc" identifies a table object.
-     */
-    public boolean isTable(long arc) {
-
-        switch((int)arc) {
-            case 10:
-                return true;
-            default:
-                break;
-        }
-        return false;
-    }
-
-    /**
-     * Returns the table object identified by "arc".
-     */
-    public SnmpMibTable getTable(long arc) {
-
-        switch((int)arc) {
-            case 10:
-                return tableJvmThreadInstanceTable;
-        default:
-            break;
-        }
-        return null;
-    }
-
-    /**
-     * Register the group's SnmpMibTable objects with the meta-data.
-     */
-    public void registerTableNodes(SnmpMib mib, MBeanServer server) {
-        tableJvmThreadInstanceTable = createJvmThreadInstanceTableMetaNode("JvmThreadInstanceTable", "JvmThreading", mib, server);
-        if ( tableJvmThreadInstanceTable != null)  {
-            tableJvmThreadInstanceTable.registerEntryNode(mib,server);
-            mib.registerTableMeta("JvmThreadInstanceTable", tableJvmThreadInstanceTable);
-        }
-
-    }
-
-
-    /**
-     * Factory method for "JvmThreadInstanceTable" table metadata class.
-     *
-     * You can redefine this method if you need to replace the default
-     * generated metadata class with your own customized class.
-     *
-     * @param tableName Name of the table object ("JvmThreadInstanceTable")
-     * @param groupName Name of the group to which this table belong ("JvmThreading")
-     * @param mib The SnmpMib object in which this table is registered
-     * @param server MBeanServer for this table entries (may be null)
-     *
-     * @return An instance of the metadata class generated for the
-     *         "JvmThreadInstanceTable" table (JvmThreadInstanceTableMeta)
-     *
-     **/
-    protected JvmThreadInstanceTableMeta createJvmThreadInstanceTableMetaNode(String tableName, String groupName, SnmpMib mib, MBeanServer server)  {
-        return new JvmThreadInstanceTableMeta(mib, objectserver);
-    }
-
-    protected JvmThreadingMBean node;
-    protected SnmpStandardObjectServer objectserver = null;
-    protected JvmThreadInstanceTableMeta tableJvmThreadInstanceTable = null;
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/jvmmib/package.html	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-  <head>
-<!--
- 
- Copyright (c) 2003, 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
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
-
--->
-  </head>
-
-  <body>
-    SNMP Classes for JSR 163 MIB, generated for Tiger SNMP Runtime.
-    <p><b>This API is a Sun Microsystems internal API  and is subject 
-          to change without notice.</b></p>
-  </body>
-</html>
-
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/package.html	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-<html>
-  <head>
-<!--
- 
- Copyright (c) 2003, 2005, 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
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
-
--->
-  </head>
-
-  <body>
-    This package is the root package for the JSR 163 JVM Management MIB 
-    instrumentation.
-    <ul>
-    <li>{@link sun.management.snmp.jvmmib}: SNMP Classes for JSR 163 MIB,
-        generated for Tiger SNMP Runtime.</li> 
-    <li>{@link sun.management.snmp.jvminstr}: Instrumented Classes for JSR 163 MIB</li> 
-    <li>{@link sun.management.snmp.util}: Generic utility classes used for intsrumenting the MIB</li> 
-    </ul>
-    <p><b>This API is a Sun Microsystems internal API  and is subject 
-          to change without notice.</b></p>
-  </body>
-</html>
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/util/JvmContextFactory.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,110 +0,0 @@
-/*
- * Copyright (c) 2003, 2006, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package sun.management.snmp.util;
-
-import com.sun.jmx.mbeanserver.Util;
-import com.sun.jmx.snmp.agent.SnmpUserDataFactory;
-import com.sun.jmx.snmp.SnmpPdu;
-import com.sun.jmx.snmp.SnmpStatusException;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-
-
-public class JvmContextFactory implements SnmpUserDataFactory {
-
-    /**
-     * Called by the <CODE>SnmpAdaptorServer</CODE> adaptor.
-     * Allocate a contextual object containing some user data. This method
-     * is called once for each incoming SNMP request. The scope
-     * of this object will be the whole request. Since the request can be
-     * handled in several threads, the user should make sure that this
-     * object can be accessed in a thread-safe manner. The SNMP framework
-     * will never access this object directly - it will simply pass
-     * it to the <code>SnmpMibAgent</code> within
-     * <code>SnmpMibRequest</code> objects - from where it can be retrieved
-     * through the {@link com.sun.jmx.snmp.agent.SnmpMibRequest#getUserData() getUserData()} accessor.
-     * <code>null</code> is considered to be a valid return value.
-     *
-     * This method is called just after the SnmpPduPacket has been
-     * decoded.
-     *
-     * @param requestPdu The SnmpPduPacket received from the SNMP manager.
-     *        <b>This parameter is owned by the SNMP framework and must be
-     *        considered as transient.</b> If you wish to keep some of its
-     *        content after this method returns (by storing it in the
-     *        returned object for instance) you should clone that
-     *        information.
-     *
-     * @return A newly allocated user-data contextual object, or
-     *         <code>null</code>
-     * @exception SnmpStatusException If an SnmpStatusException is thrown,
-     *            the request will be aborted.
-     *
-     * @since Java DMK 5.0
-     **/
-    public Object allocateUserData(SnmpPdu requestPdu)
-        throws SnmpStatusException {
-        return Collections.synchronizedMap(new HashMap<Object, Object>());
-    }
-
-    /**
-     * Called by the <CODE>SnmpAdaptorServer</CODE> adaptor.
-     * Release a previously allocated contextual object containing user-data.
-     * This method is called just before the responsePdu is sent back to the
-     * manager. It gives the user a chance to alter the responsePdu packet
-     * before it is encoded, and to free any resources that might have
-     * been allocated when creating the contextual object.
-     *
-     * @param userData The contextual object being released.
-     * @param responsePdu The SnmpPduPacket that will be sent back to the
-     *        SNMP manager.
-     *        <b>This parameter is owned by the SNMP framework and must be
-     *        considered as transient.</b> If you wish to keep some of its
-     *        content after this method returns you should clone that
-     *        information.
-     *
-     * @exception SnmpStatusException If an SnmpStatusException is thrown,
-     *            the responsePdu is dropped and nothing is returned to
-     *            to the manager.
-     *
-     * @since Java DMK 5.0
-     **/
-    public void releaseUserData(Object userData, SnmpPdu responsePdu)
-        throws SnmpStatusException {
-        ((Map<?, ?>)userData).clear();
-    }
-
-
-    public static Map<Object, Object> getUserData() {
-        final Object userData =
-            com.sun.jmx.snmp.ThreadContext.get("SnmpUserData");
-
-        if (userData instanceof Map<?, ?>) return Util.cast(userData);
-        else return null;
-    }
-
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/util/MibLogger.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,203 +0,0 @@
-/*
- * Copyright (c) 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package sun.management.snmp.util;
-
-import java.util.logging.Logger;
-import java.util.logging.Level;
-
-public class MibLogger {
-
-    final Logger logger;
-    final String className;
-
-    static String getClassName(Class<?> clazz) {
-        if (clazz == null) return null;
-        if (clazz.isArray())
-            return getClassName(clazz.getComponentType()) + "[]";
-        final String fullname = clazz.getName();
-        final int lastpoint   = fullname.lastIndexOf('.');
-        final int len         = fullname.length();
-        if ((lastpoint < 0) || (lastpoint >= len))
-            return fullname;
-        else return fullname.substring(lastpoint+1,len);
-    }
-
-    static String getLoggerName(Class<?> clazz) {
-        if (clazz == null) return "sun.management.snmp.jvminstr";
-        Package p = clazz.getPackage();
-        if (p == null) return "sun.management.snmp.jvminstr";
-        final String pname = p.getName();
-        if (pname == null) return "sun.management.snmp.jvminstr";
-        else return pname;
-    }
-
-    public MibLogger(Class<?> clazz) {
-        this(getLoggerName(clazz),getClassName(clazz));
-    }
-
-    public MibLogger(Class<?> clazz, String postfix) {
-        this(getLoggerName(clazz)+((postfix==null)?"":"."+postfix),
-             getClassName(clazz));
-    }
-
-    public MibLogger(String className) {
-        this("sun.management.snmp.jvminstr",className);
-    }
-
-    public MibLogger(String loggerName, String className) {
-        Logger l = null;
-        try {
-            l = Logger.getLogger(loggerName);
-        } catch (Exception x) {
-            // OK. Should not happen
-        }
-        logger = l;
-        this.className=className;
-    }
-
-    protected Logger getLogger() {
-        return logger;
-    }
-
-    public boolean isTraceOn() {
-        final Logger l = getLogger();
-        if (l==null) return false;
-        return l.isLoggable(Level.FINE);
-    }
-
-    public boolean isDebugOn() {
-        final Logger l = getLogger();
-        if (l==null) return false;
-        return l.isLoggable(Level.FINEST);
-    }
-
-    public boolean isInfoOn() {
-        final Logger l = getLogger();
-        if (l==null) return false;
-        return l.isLoggable(Level.INFO);
-    }
-
-    public boolean isConfigOn() {
-        final Logger l = getLogger();
-        if (l==null) return false;
-        return l.isLoggable(Level.CONFIG);
-    }
-
-    public void config(String func, String msg) {
-        final Logger l = getLogger();
-        if (l!=null) l.logp(Level.CONFIG,className,
-                        func,msg);
-    }
-
-    public void config(String func, Throwable t) {
-        final Logger l = getLogger();
-        if (l!=null) l.logp(Level.CONFIG,className,
-                        func,t.toString(),t);
-    }
-
-    public void config(String func, String msg, Throwable t) {
-        final Logger l = getLogger();
-        if (l!=null) l.logp(Level.CONFIG,className,
-                        func,msg,t);
-    }
-
-    public void error(String func, String msg) {
-        final Logger l = getLogger();
-        if (l!=null) l.logp(Level.SEVERE,className,
-                        func,msg);
-    }
-
-    public void info(String func, String msg) {
-        final Logger l = getLogger();
-        if (l!=null) l.logp(Level.INFO,className,
-                        func,msg);
-    }
-
-    public void info(String func, Throwable t) {
-        final Logger l = getLogger();
-        if (l!=null) l.logp(Level.INFO,className,
-                        func,t.toString(),t);
-    }
-
-    public void info(String func, String msg, Throwable t) {
-        final Logger l = getLogger();
-        if (l!=null) l.logp(Level.INFO,className,
-                        func,msg,t);
-    }
-
-    public void warning(String func, String msg) {
-        final Logger l = getLogger();
-        if (l!=null) l.logp(Level.WARNING,className,
-                        func,msg);
-    }
-
-    public void warning(String func, Throwable t) {
-        final Logger l = getLogger();
-        if (l!=null) l.logp(Level.WARNING,className,
-                        func,t.toString(),t);
-    }
-
-    public void warning(String func, String msg, Throwable t) {
-        final Logger l = getLogger();
-        if (l!=null) l.logp(Level.WARNING,className,
-                        func,msg,t);
-    }
-
-    public void trace(String func, String msg) {
-        final Logger l = getLogger();
-        if (l!=null) l.logp(Level.FINE,className,
-                        func,msg);
-    }
-
-    public void trace(String func, Throwable t) {
-        final Logger l = getLogger();
-        if (l!=null) l.logp(Level.FINE,className,
-                        func,t.toString(),t);
-    }
-
-    public void trace(String func, String msg, Throwable t) {
-        final Logger l = getLogger();
-        if (l!=null) l.logp(Level.FINE,className,
-                        func,msg,t);
-    }
-
-    public void debug(String func, String msg) {
-        final Logger l = getLogger();
-        if (l!=null) l.logp(Level.FINEST,className,
-                        func,msg);
-    }
-
-    public void debug(String func, Throwable t) {
-        final Logger l = getLogger();
-        if (l!=null) l.logp(Level.FINEST,className,
-                        func,t.toString(),t);
-    }
-
-    public void debug(String func, String msg, Throwable t) {
-        final Logger l = getLogger();
-        if (l!=null) l.logp(Level.FINEST,className,
-                        func,msg,t);
-    }
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/util/SnmpCachedData.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,168 +0,0 @@
-/*
- * Copyright (c) 2003, 2006, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package sun.management.snmp.util;
-
-import com.sun.jmx.snmp.SnmpOid;
-
-import java.io.Serializable;
-
-import java.util.Comparator;
-import java.util.Arrays;
-import java.util.TreeMap;
-import java.util.List;
-import java.util.Iterator;
-
-import java.lang.ref.WeakReference;
-
-/**
- * This class is used to cache table data.
- **/
-public class SnmpCachedData implements SnmpTableHandler {
-
-    /**
-     * Compares two SnmpOid.
-     **/
-    public static final Comparator<SnmpOid> oidComparator =
-        new Comparator<SnmpOid>() {
-            public int compare(SnmpOid o1, SnmpOid o2) {
-                return o1.compareTo(o2);
-            }
-            public boolean equals(Object o1, Object o2) {
-                if (o1 == o2) return true;
-                else return o1.equals(o2);
-            }
-        };
-
-    /**
-     * Constructs a new instance of SnmpCachedData. Instances are
-     * immutable.
-     * @param lastUpdated Time stamp as returned by
-     *        {@link System#currentTimeMillis System.currentTimeMillis()}
-     * @param indexes The table entry indexes, sorted in ascending order.
-     * @param datas   The table datas, sorted according to the
-     *                order in <code>indexes</code>: <code>datas[i]</code>
-     *                is the data that corresponds to
-     *                <code>indexes[i]</code>
-     **/
-    public SnmpCachedData(long lastUpdated, SnmpOid indexes[],
-                          Object  datas[]) {
-        this.lastUpdated = lastUpdated;
-        this.indexes     = indexes;
-        this.datas       = datas;
-    }
-
-    /**
-     * Constructs a new instance of SnmpCachedData. Instances are
-     * immutable.
-     * @param lastUpdated Time stamp as returned by
-     *        {@link System#currentTimeMillis System.currentTimeMillis()}
-     * @param indexMap The table indexed table data, sorted in ascending
-     *                 order by {@link #oidComparator}. The keys must be
-     *                 instances of {@link SnmpOid}.
-     **/
-    public SnmpCachedData(long lastUpdated, TreeMap<SnmpOid, Object> indexMap) {
-        this(lastUpdated, indexMap, true);
-    }
-    /**
-     * Constructs a new instance of SnmpCachedData. Instances are
-     * immutable.
-     * @param lastUpdated Time stamp as returned by
-     *        {@link System#currentTimeMillis System.currentTimeMillis()}
-     * @param indexMap The table indexed table data, sorted in ascending
-     *                 order by {@link #oidComparator}. The keys must be
-     *                 instances of {@link SnmpOid}.
-     **/
-    public SnmpCachedData(long lastUpdated, TreeMap<SnmpOid, Object> indexMap,
-                          boolean b) {
-
-        final int size = indexMap.size();
-        this.lastUpdated = lastUpdated;
-        this.indexes     = new SnmpOid[size];
-        this.datas       = new Object[size];
-
-        if(b) {
-            indexMap.keySet().toArray(this.indexes);
-            indexMap.values().toArray(this.datas);
-        } else
-            indexMap.values().toArray(this.datas);
-    }
-
-    /**
-     * Time stamp as returned by
-     * {@link System#currentTimeMillis System.currentTimeMillis()}
-     **/
-    public final long    lastUpdated;
-
-    /**
-     * The table entry indexes, sorted in ascending order.
-     **/
-    public final SnmpOid indexes[];
-
-    /**
-     * The table datas, sorted according to the
-     * order in <code>indexes</code>: <code>datas[i]</code>
-     * is the data that corresponds to <code>indexes[i]</code>
-     **/
-    public final Object  datas[];
-
-    /**
-     * The position of the given <var>index</var>, as returned by
-     * <code>java.util.Arrays.binarySearch()</code>
-     **/
-    public final int find(SnmpOid index) {
-        return Arrays.binarySearch(indexes,index,oidComparator);
-    }
-
-    // SnmpTableHandler.getData()
-    public  Object getData(SnmpOid index) {
-        final int pos = find(index);
-        if ((pos < 0)||(pos >= datas.length)) return null;
-        return datas[pos];
-    }
-
-    // SnmpTableHandler.getNext()
-    public  SnmpOid getNext(SnmpOid index) {
-        if (index == null) {
-            if (indexes.length>0) return indexes[0];
-            else return null;
-        }
-        final int pos = find(index);
-        if (pos > -1) {
-            if (pos < (indexes.length -1) ) return indexes[pos+1];
-            else return null;
-        }
-        final int insertion = -pos -1;
-        if ((insertion > -1) && (insertion < indexes.length))
-            return indexes[insertion];
-        else return null;
-    }
-
-    // SnmpTableHandler.contains()
-    public  boolean contains(SnmpOid index) {
-        final int pos = find(index);
-        return ((pos > -1)&&(pos < indexes.length));
-    }
-
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/util/SnmpListTableCache.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,118 +0,0 @@
-/*
- * Copyright (c) 2003, 2014, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package sun.management.snmp.util;
-
-import com.sun.jmx.snmp.SnmpOid;
-
-import java.io.Serializable;
-
-import java.util.Comparator;
-import java.util.Arrays;
-import java.util.TreeMap;
-import java.util.List;
-import java.util.Iterator;
-
-import java.lang.ref.WeakReference;
-
-/**
- * This abstract class implements a weak cache for a table whose data
- * is obtained from a {@link  List}.
- *
- * <p><b>NOTE: This class is not synchronized, subclasses must implement
- *          the appropriate synchronization whwn needed.</b></p>
- **/
-@SuppressWarnings("serial") // JDK implementation class
-public abstract class SnmpListTableCache extends SnmpTableCache {
-
-
-    /**
-     * The index of the entry corresponding to the given <var>item</var>.
-     * <br>This method is called by {@link #updateCachedDatas(Object,List)}.
-     * The given <var>item</var> is expected to be always associated with
-     * the same index.
-     * @param context The context passed to
-     *        {@link #updateCachedDatas(Object,List)}.
-     * @param rawDatas Raw table datas passed to
-     *        {@link #updateCachedDatas(Object,List)}.
-     * @param rank Rank of the given <var>item</var> in the
-     *        <var>rawDatas</var> list iterator.
-     * @param item The raw data object for which an index must be determined.
-     **/
-    protected abstract SnmpOid getIndex(Object context, List<?> rawDatas,
-                                        int rank, Object item);
-
-    /**
-     * The data for the entry corresponding to the given <var>item</var>.
-     * <br>This method is called by {@link #updateCachedDatas(Object,List)}.
-     * @param context The context passed to
-     *        {@link #updateCachedDatas(Object,List)}.
-     * @param rawDatas Raw table datas passed to
-     *        {@link #updateCachedDatas(Object,List)}.
-     * @param rank Rank of the given <var>item</var> in the
-     *        <var>rawDatas</var> list iterator.
-     * @param item The raw data object from which the entry data must be
-     *        extracted.
-     * @return By default <var>item</var> is returned.
-     **/
-    protected Object getData(Object context, List<?> rawDatas,
-                             int rank, Object item) {
-        return item;
-    }
-
-    /**
-     * Recompute cached data.
-     * @param context A context object, valid during the duration of
-     *        of the call to this method, and that will be passed to
-     *        {@link #getIndex} and {@link #getData}. <br>
-     *        This method is intended to be called by
-     *        {@link #updateCachedDatas(Object)}. It is assumed that
-     *        the context is be allocated by  before this method is called,
-     *        and released just after this method has returned.<br>
-     *        This class does not use the context object: it is a simple
-     *        hook for subclassed.
-     * @param rawDatas The table datas from which the cached data will be
-     *        computed.
-     * @return the computed cached data.
-     **/
-    protected SnmpCachedData updateCachedDatas(Object context, List<?> rawDatas) {
-        final int size = ((rawDatas == null)?0:rawDatas.size());
-        if (size == 0) return  null;
-
-        final long time = System.currentTimeMillis();
-        final Iterator<?> it  = rawDatas.iterator();
-        final TreeMap<SnmpOid, Object> map =
-                new TreeMap<>(SnmpCachedData.oidComparator);
-        for (int rank=0; it.hasNext() ; rank++) {
-            final Object  item  = it.next();
-            final SnmpOid index = getIndex(context, rawDatas, rank, item);
-            final Object  data  = getData(context, rawDatas, rank, item);
-            if (index == null) continue;
-            map.put(index,data);
-        }
-
-        return new SnmpCachedData(time,map);
-    }
-
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/util/SnmpLoadedClassData.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,106 +0,0 @@
-/*
- * Copyright (c) 2003, 2006, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package sun.management.snmp.util;
-
-import com.sun.jmx.snmp.SnmpOid;
-import com.sun.jmx.snmp.SnmpStatusException;
-
-import java.io.Serializable;
-
-import java.util.Comparator;
-import java.util.Arrays;
-import java.util.TreeMap;
-import java.util.List;
-import java.util.Iterator;
-
-import java.lang.ref.WeakReference;
-
-/**
- * This class is used to cache LoadedClass table data.
- * WARNING : MUST IMPLEMENT THE SnmpTableHandler directly. Some changes in daniel classes.
- **/
-public final class SnmpLoadedClassData extends SnmpCachedData {
-
-    /**
-     * Constructs a new instance of SnmpLoadedClassData. Instances are
-     * immutable.
-     * @param lastUpdated Time stamp as returned by
-     *        {@link System#currentTimeMillis System.currentTimeMillis()}
-     * @param indexMap The table indexed table data, sorted in ascending
-     *                 order by {@link #oidComparator}. The keys must be
-     *                 instances of {@link SnmpOid}.
-     **/
-    public SnmpLoadedClassData(long lastUpdated, TreeMap<SnmpOid, Object> indexMap) {
-        super(lastUpdated, indexMap, false);
-    }
-
-
-    // SnmpTableHandler.getData()
-    public final Object getData(SnmpOid index) {
-        int pos = 0;
-
-        try {
-            pos = (int) index.getOidArc(0);
-        }catch(SnmpStatusException e) {
-            return null;
-        }
-
-        if (pos >= datas.length) return null;
-        return datas[pos];
-    }
-
-    // SnmpTableHandler.getNext()
-    public final SnmpOid getNext(SnmpOid index) {
-        int pos = 0;
-        if (index == null) {
-            if( (datas!= null) && (datas.length >= 1) )
-                return new SnmpOid(0);
-        }
-        try {
-            pos = (int) index.getOidArc(0);
-        }catch(SnmpStatusException e) {
-            return null;
-        }
-
-        if(pos < (datas.length - 1))
-            return new SnmpOid(pos+1);
-        else
-            return null;
-    }
-
-    // SnmpTableHandler.contains()
-    public final boolean contains(SnmpOid index) {
-        int pos = 0;
-
-        try {
-            pos = (int) index.getOidArc(0);
-        }catch(SnmpStatusException e) {
-            return false;
-        }
-
-        return (pos < datas.length);
-    }
-
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/util/SnmpNamedListTableCache.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,267 +0,0 @@
-/*
- * Copyright (c) 2003, 2014, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package sun.management.snmp.util;
-
-import com.sun.jmx.snmp.SnmpOid;
-import com.sun.jmx.mbeanserver.Util;
-
-import java.io.Serializable;
-
-import java.util.Comparator;
-import java.util.Arrays;
-import java.util.Map;
-import java.util.TreeMap;
-import java.util.List;
-import java.util.Iterator;
-
-import java.lang.ref.WeakReference;
-
-
-/**
- * This abstract class implements a weak cache that holds table data, for
- * a table whose data is obtained from a list  where a name can be obtained
- * for each item in the list.
- * <p>This object maintains a map between an entry name and its associated
- * SnmpOid index, so that a given entry is always associated to the same
- * index.</p>
- * <p><b>NOTE: This class is not synchronized, subclasses must implement
- *          the appropriate synchronization whwn needed.</b></p>
- **/
-@SuppressWarnings("serial") // JDK implementation class
-public abstract class SnmpNamedListTableCache extends SnmpListTableCache {
-
-    /**
-     * This map associate an entry name with the SnmpOid index that's
-     * been allocated for it.
-     **/
-    protected TreeMap<String, SnmpOid> names = new TreeMap<>();
-
-    /**
-     * The last allocate index.
-     **/
-    protected long last = 0;
-
-    /**
-     * true if the index has wrapped.
-     **/
-    boolean   wrapped = false;
-
-    /**
-     * Returns the key to use as name for the given <var>item</var>.
-     * <br>This method is called by {@link #getIndex(Object,List,int,Object)}.
-     * The given <var>item</var> is expected to be always associated with
-     * the same name.
-     * @param context The context passed to
-     *        {@link #updateCachedDatas(Object,List)}.
-     * @param rawDatas Raw table datas passed to
-     *        {@link #updateCachedDatas(Object,List)}.
-     * @param rank Rank of the given <var>item</var> in the
-     *        <var>rawDatas</var> list iterator.
-     * @param item The raw data object for which a key name must be determined.
-     **/
-    protected abstract String getKey(Object context, List<?> rawDatas,
-                                     int rank, Object item);
-
-    /**
-     * Find a new index for the entry corresponding to the
-     * given <var>item</var>.
-     * <br>This method is called by {@link #getIndex(Object,List,int,Object)}
-     * when a new index needs to be allocated for an <var>item</var>. The
-     * index returned must not be already in used.
-     * @param context The context passed to
-     *        {@link #updateCachedDatas(Object,List)}.
-     * @param rawDatas Raw table datas passed to
-     *        {@link #updateCachedDatas(Object,List)}.
-     * @param rank Rank of the given <var>item</var> in the
-     *        <var>rawDatas</var> list iterator.
-     * @param item The raw data object for which an index must be determined.
-     **/
-    protected SnmpOid makeIndex(Object context, List<?> rawDatas,
-                                int rank, Object item) {
-
-        // check we are in the limits of an unsigned32.
-        if (++last > 0x00000000FFFFFFFFL) {
-            // we just wrapped.
-            log.debug("makeIndex", "Index wrapping...");
-            last = 0;
-            wrapped=true;
-        }
-
-        // If we never wrapped, we can safely return last as new index.
-        if (!wrapped) return new SnmpOid(last);
-
-        // We wrapped. We must look for an unused index.
-        for (int i=1;i < 0x00000000FFFFFFFFL;i++) {
-            if (++last >  0x00000000FFFFFFFFL) last = 1;
-            final SnmpOid testOid = new SnmpOid(last);
-
-            // Was this index already in use?
-            if (names == null) return testOid;
-            if (names.containsValue(testOid)) continue;
-
-            // Have we just used it in a previous iteration?
-            if (context == null) return testOid;
-            if (((Map)context).containsValue(testOid)) continue;
-
-            // Ok, not in use.
-            return testOid;
-        }
-        // all indexes are in use! we're stuck.
-        // // throw new IndexOutOfBoundsException("No index available.");
-        // better to return null and log an error.
-        return null;
-    }
-
-    /**
-     * Call {@link #getKey(Object,List,int,Object)} in order to get
-     * the item name. Then check whether an index was already allocated
-     * for the entry by that name. If yes return it. Otherwise, call
-     * {@link #makeIndex(Object,List,int,Object)} to compute a new
-     * index for that entry.
-     * Finally store the association between
-     * the name and index in the context TreeMap.
-     * @param context The context passed to
-     *        {@link #updateCachedDatas(Object,List)}.
-     *        It is expected to
-     *        be an instance of  {@link TreeMap}.
-     * @param rawDatas Raw table datas passed to
-     *        {@link #updateCachedDatas(Object,List)}.
-     * @param rank Rank of the given <var>item</var> in the
-     *        <var>rawDatas</var> list iterator.
-     * @param item The raw data object for which an index must be determined.
-     **/
-    protected SnmpOid getIndex(Object context, List<?> rawDatas,
-                               int rank, Object item) {
-        final String key   = getKey(context,rawDatas,rank,item);
-        final Object index = (names==null||key==null)?null:names.get(key);
-        final SnmpOid result =
-            ((index != null)?((SnmpOid)index):makeIndex(context,rawDatas,
-                                                      rank,item));
-        if ((context != null) && (key != null) && (result != null)) {
-            Map<Object, Object> map = Util.cast(context);
-            map.put(key,result);
-        }
-        log.debug("getIndex","key="+key+", index="+result);
-        return result;
-    }
-
-    /**
-     * Allocate a new {@link TreeMap} to serve as context, then
-     * call {@link SnmpListTableCache#updateCachedDatas(Object,List)}, and
-     * finally replace the {@link #names} TreeMap by the new allocated
-     * TreeMap.
-     * @param rawDatas The table datas from which the cached data will be
-     *        computed.
-     **/
-    protected SnmpCachedData updateCachedDatas(Object context, List<?> rawDatas) {
-        TreeMap<String,SnmpOid> ctxt = new TreeMap<>();
-        final SnmpCachedData result =
-            super.updateCachedDatas(context,rawDatas);
-        names = ctxt;
-        return result;
-    }
-
-
-    /**
-     * Load a list of raw data from which to build the cached data.
-     * This method is called when nothing is found in the request
-     * contextual cache.
-     * @param userData The request contextual cache allocated by
-     *        the {@link JvmContextFactory}.
-     *
-     **/
-    protected abstract List<?>  loadRawDatas(Map<Object,Object> userData);
-
-    /**
-     *The name under which the raw data is to be found/put in
-     *        the request contextual cache.
-     **/
-    protected abstract String getRawDatasKey();
-
-    /**
-     * Get a list of raw data from which to build the cached data.
-     * Obtains a list of raw data by first looking it up in the
-     * request contextual cache <var>userData</var> under the given
-     * <var>key</var>. If nothing is found in the cache, calls
-     * {@link #loadRawDatas(Map)} to obtain a new rawData list,
-     * and cache the result in <var>userData</var> under <var>key</var>.
-     * @param userData The request contextual cache allocated by
-     *        the {@link JvmContextFactory}.
-     * @param key The name under which the raw data is to be found/put in
-     *        the request contextual cache.
-     *
-     **/
-    protected List<?> getRawDatas(Map<Object, Object> userData, String key) {
-        List<?> rawDatas = null;
-
-        // Look for memory manager list in request contextual cache.
-        if (userData != null)
-            rawDatas =  (List<?>)userData.get(key);
-
-        if (rawDatas == null) {
-            // No list in contextual cache, get it from API
-            rawDatas = loadRawDatas(userData);
-
-
-            // Put list in cache...
-            if (rawDatas != null && userData != null)
-                userData.put(key, rawDatas);
-        }
-
-        return rawDatas;
-    }
-
-    /**
-     * Update cahed datas.
-     * Obtains a {@link List} of raw datas by calling
-     * {@link #getRawDatas(Map,String) getRawDatas((Map)context,getRawDatasKey())}.<br>
-     * Then allocate a new {@link TreeMap} to serve as temporary map between
-     * names and indexes, and call {@link #updateCachedDatas(Object,List)}
-     * with that temporary map as context.<br>
-     * Finally replaces the {@link #names} TreeMap by the temporary
-     * TreeMap.
-     * @param context The request contextual cache allocated by the
-     *        {@link JvmContextFactory}.
-     **/
-    protected SnmpCachedData updateCachedDatas(Object context) {
-
-        final Map<Object, Object> userData =
-            (context instanceof Map)?Util.<Map<Object, Object>>cast(context):null;
-
-        // Look for memory manager list in request contextual cache.
-        final List<?> rawDatas = getRawDatas(userData,getRawDatasKey());
-
-        log.debug("updateCachedDatas","rawDatas.size()=" +
-              ((rawDatas==null)?"<no data>":""+rawDatas.size()));
-
-        TreeMap<String,SnmpOid> ctxt = new TreeMap<>();
-        final SnmpCachedData result =
-            super.updateCachedDatas(ctxt,rawDatas);
-        names = ctxt;
-        return result;
-    }
-
-    static final MibLogger log = new MibLogger(SnmpNamedListTableCache.class);
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/util/SnmpTableCache.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,120 +0,0 @@
-/*
- * Copyright (c) 2003, 2014, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package sun.management.snmp.util;
-
-import com.sun.jmx.snmp.SnmpOid;
-
-import java.io.Serializable;
-
-import java.util.Comparator;
-import java.util.Arrays;
-import java.util.TreeMap;
-import java.util.List;
-import java.util.Iterator;
-
-import java.lang.ref.WeakReference;
-
-/**
- * This abstract class implements a weak cache that holds table data.
- * <p>The table data is stored in an instance of
- * {@link SnmpCachedData}, which is kept in a {@link WeakReference}.
- * If the WeakReference is null or empty, the cached data is recomputed.</p>
- *
- * <p><b>NOTE: This class is not synchronized, subclasses must implement
- *          the appropriate synchronization when needed.</b></p>
- **/
-@SuppressWarnings("serial") // JDK implementation class
-public abstract class SnmpTableCache implements Serializable {
-
-    /**
-     * Interval of time in ms during which the cached table data
-     * is considered valid.
-     **/
-    protected long validity;
-
-    /**
-     * A weak refernce holding cached table data.
-     **/
-    protected transient WeakReference<SnmpCachedData> datas;
-
-    /**
-     * true if the given cached table data is obsolete.
-     **/
-    protected boolean isObsolete(SnmpCachedData cached) {
-        if (cached   == null) return true;
-        if (validity < 0)     return false;
-        return ((System.currentTimeMillis() - cached.lastUpdated) > validity);
-    }
-
-    /**
-     * Returns the cached table data.
-     * Returns null if the cached data is obsolete, or if there is no
-     * cached data, or if the cached data was garbage collected.
-     * @return a still valid cached data or null.
-     **/
-    protected SnmpCachedData getCachedDatas() {
-        if (datas == null) return null;
-        final SnmpCachedData cached = datas.get();
-        if ((cached == null) || isObsolete(cached)) return null;
-        return cached;
-    }
-
-    /**
-     * Returns the cached table data, if it is still valid,
-     * or recompute it if it is obsolete.
-     * <p>
-     * When cache data is recomputed, store it in the weak reference,
-     * unless {@link #validity} is 0: then the data will not be stored
-     * at all.<br>
-     * This method calls {@link #isObsolete(SnmpCachedData)} to determine
-     * whether the cached data is obsolete, and {
-     * {@link #updateCachedDatas(Object)} to recompute it.
-     * </p>
-     * @param context A context object.
-     * @return the valid cached data, or the recomputed table data.
-     **/
-    protected synchronized SnmpCachedData getTableDatas(Object context) {
-        final SnmpCachedData cached   = getCachedDatas();
-        if (cached != null) return cached;
-        final SnmpCachedData computedDatas = updateCachedDatas(context);
-        if (validity != 0) datas = new WeakReference<>(computedDatas);
-        return computedDatas;
-    }
-
-    /**
-     * Recompute cached data.
-     * @param context A context object, as passed to
-     *        {@link #getTableDatas(Object)}
-     **/
-    protected abstract SnmpCachedData updateCachedDatas(Object context);
-
-    /**
-     * Return a table handler that holds the table data.
-     * This method should return the cached table data if it is still
-     * valid, recompute it and cache the new value if it's not.
-     **/
-    public abstract SnmpTableHandler getTableHandler();
-
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/util/SnmpTableHandler.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 2003, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package sun.management.snmp.util;
-
-import com.sun.jmx.snmp.SnmpOid;
-
-/**
- * Defines the interface implemented by an object that holds
- * table data.
- **/
-public interface SnmpTableHandler {
-
-    /**
-     * Returns the data associated with the given index.
-     * If the given index is not found, null is returned.
-     * Note that returning null does not necessarily means that
-     * the index was not found.
-     **/
-    public Object  getData(SnmpOid index);
-
-    /**
-     * Returns the index that immediately follows the given
-     * <var>index</var>. The returned index is strictly greater
-     * than the given <var>index</var>, and is contained in the table.
-     * <br>If the given <var>index</var> is null, returns the first
-     * index in the table.
-     * <br>If there are no index after the given <var>index</var>,
-     * returns null.
-     **/
-    public SnmpOid getNext(SnmpOid index);
-
-    /**
-     * Returns true if the given <var>index</var> is present.
-     **/
-    public boolean contains(SnmpOid index);
-
-}
--- a/jdk/src/jdk.snmp/share/classes/sun/management/snmp/util/package.html	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-  <head>
-<!--
- 
- Copyright (c) 2003, 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
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
-
--->
-  </head>
-
-  <body>
-    Generic utility classes used for intsrumenting the MIB.
-    <p><b>This API is a Sun Microsystems internal API  and is subject 
-          to change without notice.</b></p>
-  </body>
-</html>
--- a/jdk/src/linux/doc/man/extcheck.1	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,91 +0,0 @@
-'\" t
-.\"  Copyright (c) 1998, 2013, 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.
-.\"
-.\" This code is distributed in the hope that it will be useful, but WITHOUT
-.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-.\" version 2 for more details (a copy is included in the LICENSE file that
-.\" accompanied this code).
-.\"
-.\" You should have received a copy of the GNU General Public License version
-.\" 2 along with this work; if not, write to the Free Software Foundation,
-.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-.\"
-.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-.\" or visit www.oracle.com if you need additional information or have any
-.\" questions.
-.\"
-.\"     Arch: generic
-.\"     Software: JDK 8
-.\"     Date: 21 November 2013
-.\"     SectDesc: Basic Tools
-.\"     Title: extcheck.1
-.\"
-.if n .pl 99999
-.TH extcheck 1 "21 November 2013" "JDK 8" "Basic Tools"
-.\" -----------------------------------------------------------------
-.\" * Define some portability stuff
-.\" -----------------------------------------------------------------
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.\" http://bugs.debian.org/507673
-.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.ie \n(.g .ds Aq \(aq
-.el       .ds Aq '
-.\" -----------------------------------------------------------------
-.\" * set default formatting
-.\" -----------------------------------------------------------------
-.\" disable hyphenation
-.nh
-.\" disable justification (adjust text to left margin only)
-.ad l
-.\" -----------------------------------------------------------------
-.\" * MAIN CONTENT STARTS HERE *
-.\" -----------------------------------------------------------------
-
-.SH NAME    
-extcheck \- Detects version conflicts between a target Java Archive (JAR) file and currently installed extension JAR files\&.
-.SH SYNOPSIS    
-.sp     
-.nf     
-
-\fBextcheck\fR [\fIoptions\fR] \fItargetfile\&.jar\fR
-.fi     
-.sp     
-.TP     
-\fIoptions\fR
-The command-line options\&. See Options\&.
-.TP     
-\fItargetfile\&.jar\fR
-The target JAR file against which the currently installed extension JAR files are compared to detect version conflicts\&.
-.SH DESCRIPTION    
-The \f3extcheck\fR command checks a specified JAR file for title and version conflicts with any extensions installed in the Java SE SDK\&. Before installing an extension, you can use this utility to see whether the same or a more recent version of the extension is already installed\&.
-.PP
-The \f3extcheck\fR command compares the Specification-title and Specification-version headers in the manifest of the \f3targetfile\&.jar\fR file against the corresponding headers in all JAR files currently installed in the extension directory\&. By default, the extension directory is \f3jre/lib/ext\fR on Oracle Solaris and \f3\ejre\elib\eext\fR on Windows\&. The \f3extcheck\fR command compares version numbers in the same way as the \f3java\&.lang\&.Package\&.isCompatibleWith\fR method\&.
-.PP
-If no conflict is detected, then the return code is 0\&.
-.PP
-If the manifest of any JAR file in the extensions directory has the same \f3Specification-title\fR and the same or a newer \f3Specification-version\fR number, then a non-zero error code is returned\&. A non-zero error code is also returned when \f3targetfile\&.jar\fR does not have the \f3Specification-title\fR or \f3Specification-version\fR attributes in its manifest file\&.
-.SH OPTIONS    
-.TP
--verbose
-.br
-Lists JAR files in the extension directory as they are checked\&. Additionally, manifest attributes of the target JAR file and any conflicting JAR files are also reported\&.
-.TP
--J\fIoption\fR
-.br
-Passes \fIoption\fR to the Java Virtual Machine (JVM), where option is one of the options described on the reference page for the Java launcher\&. For example, \f3-J-Xms48m\fR sets the startup memory to 48 MB\&. See java(1)\&.
-.SH SEE\ ALSO    
-.TP 0.2i    
-\(bu
-jar(1)
-.RE
-.br
-'pl 8.5i
-'bp
--- a/jdk/src/linux/doc/man/ja/extcheck.1	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,108 +0,0 @@
-'\" t
-.\" Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
-.\" Title: extcheck
-.\" Language: English
-.\" Date: 2013ǯ11·î21Æü
-.\" SectDesc: ´ðËܥġ¼¥ë
-.\" Software: JDK 8
-.\" Arch: ÈÆÍÑ
-.\"
-.\" 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.
-.\"
-.\" This code is distributed in the hope that it will be useful, but WITHOUT
-.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-.\" version 2 for more details (a copy is included in the LICENSE file that
-.\" accompanied this code).
-.\"
-.\" You should have received a copy of the GNU General Public License version
-.\" 2 along with this work; if not, write to the Free Software Foundation,
-.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-.\"
-.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-.\" or visit www.oracle.com if you need additional information or have any
-.\" questions.
-.\"
-.pl 99999
-.TH "extcheck" "1" "2013ǯ11·î21Æü" "JDK 8" "´ðËܥġ¼¥ë"
-.\" -----------------------------------------------------------------
-.\" * Define some portability stuff
-.\" -----------------------------------------------------------------
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.\" http://bugs.debian.org/507673
-.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.ie \n(.g .ds Aq \(aq
-.el       .ds Aq '
-.\" -----------------------------------------------------------------
-.\" * set default formatting
-.\" -----------------------------------------------------------------
-.\" disable hyphenation
-.nh
-.\" disable justification (adjust text to left margin only)
-.ad l
-.\" -----------------------------------------------------------------
-.\" * MAIN CONTENT STARTS HERE *
-.\" -----------------------------------------------------------------
-.SH "NAME"
-extcheck \- ¥¿¡¼¥²¥Ã¥È¤ÎJava¥¢¡¼¥«¥¤¥Ö(JAR)¥Õ¥¡¥¤¥ë¤È¸½ºß¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤Æ¤¤¤ë³ÈÄ¥µ¡Ç½¤ÎJAR¥Õ¥¡¥¤¥ë´Ö¤Î¥Ð¡¼¥¸¥ç¥ó¤Î¶¥¹ç¤ò¸¡½Ð¤·¤Þ¤¹¡£
-.SH "³µÍ×"
-.sp
-.if n \{\
-.RS 4
-.\}
-.nf
-\fIextcheck\fR [\fIoptions\fR] \fItargetfile\&.jar\fR
-.fi
-.if n \{\
-.RE
-.\}
-.PP
-\fIoptions\fR
-.RS 4
-¥³¥Þ¥ó¥É¥é¥¤¥ó¡¦¥ª¥×¥·¥ç¥ó¡£¥ª¥×¥·¥ç¥ó¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£
-.RE
-.PP
-\fItargetfile\&.jar\fR
-.RS 4
-¥Ð¡¼¥¸¥ç¥ó¤Î¶¥¹ç¤ò¸¡½Ð¤¹¤ë¤¿¤á¤Ë¡¢¸½ºß¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤Æ¤¤¤ë³ÈÄ¥µ¡Ç½JAR¥Õ¥¡¥¤¥ë¤ÈÈæ³Ó¤¹¤ë¥¿¡¼¥²¥Ã¥ÈJAR¥Õ¥¡¥¤¥ë¡£
-.RE
-.SH "ÀâÌÀ"
-.PP
-\fIextcheck\fR¥³¥Þ¥ó¥É¤Ï¡¢»ØÄꤵ¤ì¤¿JAR¥Õ¥¡¥¤¥ë¤Î¥¿¥¤¥È¥ë¤ª¤è¤Ó¥Ð¡¼¥¸¥ç¥ó¤¬Java SE SDK¤Ë¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤Æ¤¤¤ë³ÈÄ¥µ¡Ç½¤È¶¥¹ç¤·¤Æ¤¤¤Ê¤¤¤«¤ò¥Á¥§¥Ã¥¯¤·¤Þ¤¹¡£³ÈÄ¥µ¡Ç½¤ò¥¤¥ó¥¹¥È¡¼¥ë¤¹¤ëÁ°¤Ë¡¢¤³¤Î¥æ¡¼¥Æ¥£¥ê¥Æ¥£¤ò»ÈÍѤ·¤Æ¡¢Æ±¤¸¥Ð¡¼¥¸¥ç¥ó¤Þ¤¿¤Ï¤è¤ê¿·¤·¤¤¥Ð¡¼¥¸¥ç¥ó¤Î³ÈÄ¥µ¡Ç½¤¬¤¹¤Ç¤Ë¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤Æ¤¤¤Ê¤¤¤«¤É¤¦¤«¤òÄ´¤Ù¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£
-.PP
-\fIextcheck\fR¥³¥Þ¥ó¥É¤Ï¡¢\fItargetfile\&.jar\fR¥Õ¥¡¥¤¥ë¤Î¥Þ¥Ë¥Õ¥§¥¹¥ÈÆâ¤Î¥Ø¥Ã¥À¡¼Specification\-title¤ª¤è¤ÓSpecification\-version¤ò¡¢³ÈÄ¥µ¡Ç½¥Ç¥£¥ì¥¯¥È¥êÆâ¤Ë¸½ºß¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤Æ¤¤¤ë¤¹¤Ù¤Æ¤ÎJAR¥Õ¥¡¥¤¥ëÆâ¤ÎÂбþ¤¹¤ë¥Ø¥Ã¥À¡¼¤ÈÈæ³Ó¤·¤Þ¤¹¡£¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¢³ÈÄ¥µ¡Ç½¥Ç¥£¥ì¥¯¥È¥ê¤Ï¡¢Oracle Solaris¤Î¾ì¹ç¤Ï\fIjre/lib/ext\fR¡¢Windows¤Î¾ì¹ç¤Ï\fI\ejre\elib\eext\fR¤Ç¤¹¡£\fIextcheck\fR¥³¥Þ¥ó¥É¤Ï¡¢\fIjava\&.lang\&.Package\&.isCompatibleWith\fR¥á¥½¥Ã¥É¤ÈƱÍͤÎÊýË¡¤Ç¥Ð¡¼¥¸¥ç¥óÈÖ¹æ¤òÈæ³Ó¤·¤Þ¤¹¡£
-.PP
-¶¥¹ç¤¬¸¡½Ð¤µ¤ì¤Ê¤¤¾ì¹ç¡¢¥ê¥¿¡¼¥ó¡¦¥³¡¼¥É¤Ï0¤Ç¤¹¡£
-.PP
-³ÈÄ¥µ¡Ç½¥Ç¥£¥ì¥¯¥È¥êÆâ¤Î¤¤¤º¤ì¤«¤ÎJAR¥Õ¥¡¥¤¥ë¤Î¥Þ¥Ë¥Õ¥§¥¹¥È¤Ë¡¢Æ±°ì¤Î\fISpecification\-title\fR¡¢¤ª¤è¤ÓƱ°ì¤Þ¤¿¤Ï¤è¤ê¿·¤·¤¤\fISpecification\-version\fRÈֹ椬¤¢¤ë¾ì¹ç¤Ï¡¢¥¼¥í¤Ç¤Ê¤¤¥¨¥é¡¼¡¦¥³¡¼¥É¤¬ÊÖ¤µ¤ì¤Þ¤¹¡£\fItargetfile\&.jar\fR¤Î¥Þ¥Ë¥Õ¥§¥¹¥È¡¦¥Õ¥¡¥¤¥ë¤Ë\fISpecification\-title\fR¤Þ¤¿¤Ï\fISpecification\-version\fR°À­¤¬¤Ê¤¤¾ì¹ç¤â¡¢¥¼¥í¤Ç¤Ê¤¤¥¨¥é¡¼¡¦¥³¡¼¥É¤¬ÊÖ¤µ¤ì¤Þ¤¹¡£
-.SH "¥ª¥×¥·¥ç¥ó"
-.PP
-\-verbose
-.RS 4
-³ÈÄ¥µ¡Ç½¥Ç¥£¥ì¥¯¥È¥êÆâ¤ÎJAR¥Õ¥¡¥¤¥ë¤ò¡¢¥Á¥§¥Ã¥¯»þ¤Ë°ìÍ÷ɽ¼¨¤·¤Þ¤¹¡£¤Þ¤¿¡¢¥¿¡¼¥²¥Ã¥ÈJAR¥Õ¥¡¥¤¥ë¤Î¥Þ¥Ë¥Õ¥§¥¹¥È¤Î°À­¡¢¤ª¤è¤Ó¶¥¹ç¤¹¤ëJAR¥Õ¥¡¥¤¥ë¤Ë¤Ä¤¤¤Æ¤âÊó¹ð¤·¤Þ¤¹¡£
-.RE
-.PP
-\-J\fIoption\fR
-.RS 4
-Java²¾ÁÛ¥Þ¥·¥ó(JVM)¤Ë\fIoption\fR¤òÅϤ·¤Þ¤¹¡£option¤Ë¤Ï¡¢Javaµ¯Æ°¥Ä¡¼¥ë¤Î¥ê¥Õ¥¡¥ì¥ó¥¹¡¦¥Ú¡¼¥¸¤Ëµ­ºÜ¤µ¤ì¤Æ¤¤¤ë¥ª¥×¥·¥ç¥ó¤ò1¤Ä»ØÄꤷ¤Þ¤¹¡£¤¿¤È¤¨¤Ð¡¢\fI\-J\-Xms48m\fR¤È»ØÄꤹ¤ë¤È¡¢¥¹¥¿¡¼¥È¥¢¥Ã¥×¡¦¥á¥â¥ê¡¼¤Ï48MB¤ËÀßÄꤵ¤ì¤Þ¤¹¡£java(1)¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£
-.RE
-.SH "´ØÏ¢¹àÌÜ"
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-jar(1)
-.RE
-.br
-'pl 8.5i
-'bp
--- a/jdk/src/solaris/doc/sun/man/man1/extcheck.1	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,91 +0,0 @@
-'\" t
-.\"  Copyright (c) 1998, 2013, 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.
-.\"
-.\" This code is distributed in the hope that it will be useful, but WITHOUT
-.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-.\" version 2 for more details (a copy is included in the LICENSE file that
-.\" accompanied this code).
-.\"
-.\" You should have received a copy of the GNU General Public License version
-.\" 2 along with this work; if not, write to the Free Software Foundation,
-.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-.\"
-.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-.\" or visit www.oracle.com if you need additional information or have any
-.\" questions.
-.\"
-.\"     Arch: generic
-.\"     Software: JDK 8
-.\"     Date: 21 November 2013
-.\"     SectDesc: Basic Tools
-.\"     Title: extcheck.1
-.\"
-.if n .pl 99999
-.TH extcheck 1 "21 November 2013" "JDK 8" "Basic Tools"
-.\" -----------------------------------------------------------------
-.\" * Define some portability stuff
-.\" -----------------------------------------------------------------
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.\" http://bugs.debian.org/507673
-.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.ie \n(.g .ds Aq \(aq
-.el       .ds Aq '
-.\" -----------------------------------------------------------------
-.\" * set default formatting
-.\" -----------------------------------------------------------------
-.\" disable hyphenation
-.nh
-.\" disable justification (adjust text to left margin only)
-.ad l
-.\" -----------------------------------------------------------------
-.\" * MAIN CONTENT STARTS HERE *
-.\" -----------------------------------------------------------------
-
-.SH NAME    
-extcheck \- Detects version conflicts between a target Java Archive (JAR) file and currently installed extension JAR files\&.
-.SH SYNOPSIS    
-.sp     
-.nf     
-
-\fBextcheck\fR [\fIoptions\fR] \fItargetfile\&.jar\fR
-.fi     
-.sp     
-.TP     
-\fIoptions\fR
-The command-line options\&. See Options\&.
-.TP     
-\fItargetfile\&.jar\fR
-The target JAR file against which the currently installed extension JAR files are compared to detect version conflicts\&.
-.SH DESCRIPTION    
-The \f3extcheck\fR command checks a specified JAR file for title and version conflicts with any extensions installed in the Java SE SDK\&. Before installing an extension, you can use this utility to see whether the same or a more recent version of the extension is already installed\&.
-.PP
-The \f3extcheck\fR command compares the Specification-title and Specification-version headers in the manifest of the \f3targetfile\&.jar\fR file against the corresponding headers in all JAR files currently installed in the extension directory\&. By default, the extension directory is \f3jre/lib/ext\fR on Oracle Solaris and \f3\ejre\elib\eext\fR on Windows\&. The \f3extcheck\fR command compares version numbers in the same way as the \f3java\&.lang\&.Package\&.isCompatibleWith\fR method\&.
-.PP
-If no conflict is detected, then the return code is 0\&.
-.PP
-If the manifest of any JAR file in the extensions directory has the same \f3Specification-title\fR and the same or a newer \f3Specification-version\fR number, then a non-zero error code is returned\&. A non-zero error code is also returned when \f3targetfile\&.jar\fR does not have the \f3Specification-title\fR or \f3Specification-version\fR attributes in its manifest file\&.
-.SH OPTIONS    
-.TP
--verbose
-.br
-Lists JAR files in the extension directory as they are checked\&. Additionally, manifest attributes of the target JAR file and any conflicting JAR files are also reported\&.
-.TP
--J\fIoption\fR
-.br
-Passes \fIoption\fR to the Java Virtual Machine (JVM), where option is one of the options described on the reference page for the Java launcher\&. For example, \f3-J-Xms48m\fR sets the startup memory to 48 MB\&. See java(1)\&.
-.SH SEE\ ALSO    
-.TP 0.2i    
-\(bu
-jar(1)
-.RE
-.br
-'pl 8.5i
-'bp
--- a/jdk/src/solaris/doc/sun/man/man1/ja/extcheck.1	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,108 +0,0 @@
-'\" t
-.\" Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
-.\" Title: extcheck
-.\" Language: English
-.\" Date: 2013ǯ11·î21Æü
-.\" SectDesc: ´ðËܥġ¼¥ë
-.\" Software: JDK 8
-.\" Arch: ÈÆÍÑ
-.\"
-.\" 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.
-.\"
-.\" This code is distributed in the hope that it will be useful, but WITHOUT
-.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-.\" version 2 for more details (a copy is included in the LICENSE file that
-.\" accompanied this code).
-.\"
-.\" You should have received a copy of the GNU General Public License version
-.\" 2 along with this work; if not, write to the Free Software Foundation,
-.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-.\"
-.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-.\" or visit www.oracle.com if you need additional information or have any
-.\" questions.
-.\"
-.pl 99999
-.TH "extcheck" "1" "2013ǯ11·î21Æü" "JDK 8" "´ðËܥġ¼¥ë"
-.\" -----------------------------------------------------------------
-.\" * Define some portability stuff
-.\" -----------------------------------------------------------------
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.\" http://bugs.debian.org/507673
-.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.ie \n(.g .ds Aq \(aq
-.el       .ds Aq '
-.\" -----------------------------------------------------------------
-.\" * set default formatting
-.\" -----------------------------------------------------------------
-.\" disable hyphenation
-.nh
-.\" disable justification (adjust text to left margin only)
-.ad l
-.\" -----------------------------------------------------------------
-.\" * MAIN CONTENT STARTS HERE *
-.\" -----------------------------------------------------------------
-.SH "NAME"
-extcheck \- ¥¿¡¼¥²¥Ã¥È¤ÎJava¥¢¡¼¥«¥¤¥Ö(JAR)¥Õ¥¡¥¤¥ë¤È¸½ºß¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤Æ¤¤¤ë³ÈÄ¥µ¡Ç½¤ÎJAR¥Õ¥¡¥¤¥ë´Ö¤Î¥Ð¡¼¥¸¥ç¥ó¤Î¶¥¹ç¤ò¸¡½Ð¤·¤Þ¤¹¡£
-.SH "³µÍ×"
-.sp
-.if n \{\
-.RS 4
-.\}
-.nf
-\fIextcheck\fR [\fIoptions\fR] \fItargetfile\&.jar\fR
-.fi
-.if n \{\
-.RE
-.\}
-.PP
-\fIoptions\fR
-.RS 4
-¥³¥Þ¥ó¥É¥é¥¤¥ó¡¦¥ª¥×¥·¥ç¥ó¡£¥ª¥×¥·¥ç¥ó¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£
-.RE
-.PP
-\fItargetfile\&.jar\fR
-.RS 4
-¥Ð¡¼¥¸¥ç¥ó¤Î¶¥¹ç¤ò¸¡½Ð¤¹¤ë¤¿¤á¤Ë¡¢¸½ºß¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤Æ¤¤¤ë³ÈÄ¥µ¡Ç½JAR¥Õ¥¡¥¤¥ë¤ÈÈæ³Ó¤¹¤ë¥¿¡¼¥²¥Ã¥ÈJAR¥Õ¥¡¥¤¥ë¡£
-.RE
-.SH "ÀâÌÀ"
-.PP
-\fIextcheck\fR¥³¥Þ¥ó¥É¤Ï¡¢»ØÄꤵ¤ì¤¿JAR¥Õ¥¡¥¤¥ë¤Î¥¿¥¤¥È¥ë¤ª¤è¤Ó¥Ð¡¼¥¸¥ç¥ó¤¬Java SE SDK¤Ë¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤Æ¤¤¤ë³ÈÄ¥µ¡Ç½¤È¶¥¹ç¤·¤Æ¤¤¤Ê¤¤¤«¤ò¥Á¥§¥Ã¥¯¤·¤Þ¤¹¡£³ÈÄ¥µ¡Ç½¤ò¥¤¥ó¥¹¥È¡¼¥ë¤¹¤ëÁ°¤Ë¡¢¤³¤Î¥æ¡¼¥Æ¥£¥ê¥Æ¥£¤ò»ÈÍѤ·¤Æ¡¢Æ±¤¸¥Ð¡¼¥¸¥ç¥ó¤Þ¤¿¤Ï¤è¤ê¿·¤·¤¤¥Ð¡¼¥¸¥ç¥ó¤Î³ÈÄ¥µ¡Ç½¤¬¤¹¤Ç¤Ë¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤Æ¤¤¤Ê¤¤¤«¤É¤¦¤«¤òÄ´¤Ù¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£
-.PP
-\fIextcheck\fR¥³¥Þ¥ó¥É¤Ï¡¢\fItargetfile\&.jar\fR¥Õ¥¡¥¤¥ë¤Î¥Þ¥Ë¥Õ¥§¥¹¥ÈÆâ¤Î¥Ø¥Ã¥À¡¼Specification\-title¤ª¤è¤ÓSpecification\-version¤ò¡¢³ÈÄ¥µ¡Ç½¥Ç¥£¥ì¥¯¥È¥êÆâ¤Ë¸½ºß¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤Æ¤¤¤ë¤¹¤Ù¤Æ¤ÎJAR¥Õ¥¡¥¤¥ëÆâ¤ÎÂбþ¤¹¤ë¥Ø¥Ã¥À¡¼¤ÈÈæ³Ó¤·¤Þ¤¹¡£¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¢³ÈÄ¥µ¡Ç½¥Ç¥£¥ì¥¯¥È¥ê¤Ï¡¢Oracle Solaris¤Î¾ì¹ç¤Ï\fIjre/lib/ext\fR¡¢Windows¤Î¾ì¹ç¤Ï\fI\ejre\elib\eext\fR¤Ç¤¹¡£\fIextcheck\fR¥³¥Þ¥ó¥É¤Ï¡¢\fIjava\&.lang\&.Package\&.isCompatibleWith\fR¥á¥½¥Ã¥É¤ÈƱÍͤÎÊýË¡¤Ç¥Ð¡¼¥¸¥ç¥óÈÖ¹æ¤òÈæ³Ó¤·¤Þ¤¹¡£
-.PP
-¶¥¹ç¤¬¸¡½Ð¤µ¤ì¤Ê¤¤¾ì¹ç¡¢¥ê¥¿¡¼¥ó¡¦¥³¡¼¥É¤Ï0¤Ç¤¹¡£
-.PP
-³ÈÄ¥µ¡Ç½¥Ç¥£¥ì¥¯¥È¥êÆâ¤Î¤¤¤º¤ì¤«¤ÎJAR¥Õ¥¡¥¤¥ë¤Î¥Þ¥Ë¥Õ¥§¥¹¥È¤Ë¡¢Æ±°ì¤Î\fISpecification\-title\fR¡¢¤ª¤è¤ÓƱ°ì¤Þ¤¿¤Ï¤è¤ê¿·¤·¤¤\fISpecification\-version\fRÈֹ椬¤¢¤ë¾ì¹ç¤Ï¡¢¥¼¥í¤Ç¤Ê¤¤¥¨¥é¡¼¡¦¥³¡¼¥É¤¬ÊÖ¤µ¤ì¤Þ¤¹¡£\fItargetfile\&.jar\fR¤Î¥Þ¥Ë¥Õ¥§¥¹¥È¡¦¥Õ¥¡¥¤¥ë¤Ë\fISpecification\-title\fR¤Þ¤¿¤Ï\fISpecification\-version\fR°À­¤¬¤Ê¤¤¾ì¹ç¤â¡¢¥¼¥í¤Ç¤Ê¤¤¥¨¥é¡¼¡¦¥³¡¼¥É¤¬ÊÖ¤µ¤ì¤Þ¤¹¡£
-.SH "¥ª¥×¥·¥ç¥ó"
-.PP
-\-verbose
-.RS 4
-³ÈÄ¥µ¡Ç½¥Ç¥£¥ì¥¯¥È¥êÆâ¤ÎJAR¥Õ¥¡¥¤¥ë¤ò¡¢¥Á¥§¥Ã¥¯»þ¤Ë°ìÍ÷ɽ¼¨¤·¤Þ¤¹¡£¤Þ¤¿¡¢¥¿¡¼¥²¥Ã¥ÈJAR¥Õ¥¡¥¤¥ë¤Î¥Þ¥Ë¥Õ¥§¥¹¥È¤Î°À­¡¢¤ª¤è¤Ó¶¥¹ç¤¹¤ëJAR¥Õ¥¡¥¤¥ë¤Ë¤Ä¤¤¤Æ¤âÊó¹ð¤·¤Þ¤¹¡£
-.RE
-.PP
-\-J\fIoption\fR
-.RS 4
-Java²¾ÁÛ¥Þ¥·¥ó(JVM)¤Ë\fIoption\fR¤òÅϤ·¤Þ¤¹¡£option¤Ë¤Ï¡¢Javaµ¯Æ°¥Ä¡¼¥ë¤Î¥ê¥Õ¥¡¥ì¥ó¥¹¡¦¥Ú¡¼¥¸¤Ëµ­ºÜ¤µ¤ì¤Æ¤¤¤ë¥ª¥×¥·¥ç¥ó¤ò1¤Ä»ØÄꤷ¤Þ¤¹¡£¤¿¤È¤¨¤Ð¡¢\fI\-J\-Xms48m\fR¤È»ØÄꤹ¤ë¤È¡¢¥¹¥¿¡¼¥È¥¢¥Ã¥×¡¦¥á¥â¥ê¡¼¤Ï48MB¤ËÀßÄꤵ¤ì¤Þ¤¹¡£java(1)¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£
-.RE
-.SH "´ØÏ¢¹àÌÜ"
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-jar(1)
-.RE
-.br
-'pl 8.5i
-'bp
--- a/jdk/test/ProblemList.txt	Thu Oct 23 11:19:25 2014 -0700
+++ b/jdk/test/ProblemList.txt	Thu Oct 23 13:44:28 2014 -0700
@@ -134,8 +134,6 @@
 # 8044591
 com/sun/management/GarbageCollectorMXBean/GarbageCollectionNotificationContentTest.java   generic-all
 com/sun/management/GarbageCollectorMXBean/GarbageCollectionNotificationTest.java          generic-all
-# 8056143
-java/lang/management/MemoryMXBean/LowMemoryTest.java                                      generic-all
 
 # 8058492
 java/lang/management/ThreadMXBean/FindDeadlocks.java                                      generic-all
@@ -308,7 +306,7 @@
 sun/tools/jstatd/TestJstatdPort.java                    generic-all
 sun/tools/jstatd/TestJstatdPortAndServer.java                    generic-all
 
-# 8046285 8027668 
+# 8046285 8027668
 sun/tools/jstatd/TestJstatdExternalRegistry.java                generic-all
 
 # 6456333
--- a/jdk/test/TEST.groups	Thu Oct 23 11:19:25 2014 -0700
+++ b/jdk/test/TEST.groups	Thu Oct 23 13:44:28 2014 -0700
@@ -120,6 +120,7 @@
 jdk_security2 = \
     javax/crypto \
     javax/xml/crypto \
+    com/oracle/security/ucrypto \
     com/sun/crypto
 
 jdk_security3 = \
@@ -181,7 +182,6 @@
 #
 core_tools = \
     tools \
-    com/sun/tools/extcheck \
     sun/tools/java \
     sun/tools/native2ascii \
     sun/tools/jrunscript
@@ -390,6 +390,10 @@
   :jdk_desktop \
   com/sun/corba \
   com/sun/jndi/cosnaming \
+  com/oracle/security/ucrypto/Test8004873.java \
+  com/oracle/security/ucrypto/TestAES.java \
+  com/oracle/security/ucrypto/TestDigest.java \
+  com/oracle/security/ucrypto/TestRSA.java \
   sun/net/ftp \
   sun/net/www/protocol/ftp \
   sun/security/tools/policytool \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/com/oracle/security/ucrypto/CipherSignNotSupported.java	Thu Oct 23 13:44:28 2014 -0700
@@ -0,0 +1,100 @@
+/*
+ * Copyright (c) 2014, 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.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * @test
+ * @bug 8029849
+ * @summary Make sure signing via encrypt and verifying via decrypt are not
+ * supported by OracleUcrypto provider.
+ * @author Anthony Scarpino
+ */
+
+import java.util.Random;
+import java.security.KeyPairGenerator;
+import java.security.KeyPair;
+import javax.crypto.Cipher;
+import java.security.InvalidKeyException;
+import java.security.NoSuchAlgorithmException;
+import java.security.Provider;
+
+public class CipherSignNotSupported extends UcryptoTest {
+
+    public static void main(String[] args) throws Exception {
+        main(new CipherSignNotSupported(), null);
+    }
+
+    public void doTest(Provider p) throws Exception {
+        Cipher c = null;
+        Random random = new Random();
+        byte[] pt = new byte[117];
+        byte[] ct = new byte[200];
+        random.nextBytes(pt);
+
+        try {
+            c = Cipher.getInstance("RSA/ECB/PKCS1Padding", p);
+        } catch (NoSuchAlgorithmException e) {
+            if (System.getProperty("os.version").compareTo("5.10") == 0) {
+                System.out.println("RSA not supported in S10");
+                return;
+            }
+            throw e;
+        }
+
+        KeyPairGenerator kpg = KeyPairGenerator.getInstance("RSA");
+        kpg.initialize(1024);
+        KeyPair kp = kpg.generateKeyPair();
+
+        // Encryption
+        c.init(Cipher.ENCRYPT_MODE, kp.getPublic());
+        ct = c.doFinal(pt);
+        // Decryption
+        c.init(Cipher.DECRYPT_MODE, kp.getPrivate());
+        c.doFinal(ct);
+        // Sign
+        try {
+            c.init(Cipher.ENCRYPT_MODE, kp.getPrivate());
+            ct = c.doFinal(pt);
+            throw new RuntimeException("Encrypt operation should have failed.");
+        } catch (InvalidKeyException e) {
+            if (e.getMessage().compareTo("RSAPublicKey required for " +
+                    "encryption") != 0) {
+                System.out.println("Wrong exception thrown.");
+                throw e;
+            }
+        }
+        // Verify
+        try {
+            c.init(Cipher.DECRYPT_MODE, kp.getPublic());
+            c.doFinal(ct);
+            throw new RuntimeException("Decrypt operation should have failed.");
+        } catch (InvalidKeyException e) {
+            if (e.getMessage().compareTo("RSAPrivateCrtKey required for " +
+                    "decryption") != 0) {
+                System.out.println("Wrong exception thrown.");
+                throw e;
+            }
+        }
+
+        System.out.println("Pass");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/com/oracle/security/ucrypto/Test8004873.java	Thu Oct 23 13:44:28 2014 -0700
@@ -0,0 +1,102 @@
+/*
+ * Copyright (c) 2014, 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.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug     8004873
+ * @summary Need to include data buffered by Padding impl when calculating
+ * output buffer sizes.
+ */
+
+import java.io.*;
+import java.security.*;
+import java.security.spec.*;
+import java.util.*;
+import javax.crypto.*;
+import javax.crypto.spec.*;
+
+public class Test8004873 extends UcryptoTest {
+
+    private static final String[] PADDEDCIPHER_ALGOS = {
+        "AES/ECB/PKCS5Padding",
+        "AES/CBC/PKCS5Padding",
+        "AES/CFB128/PKCS5Padding"
+    };
+
+    private static final SecretKey AES_KEY;
+
+    static {
+        byte[] keyValue = {
+            62, 124, -2, -15, 86, -25, 18, -112, 110, 31, 96, 59,
+            89, 70, 60, 103};
+        AES_KEY = new SecretKeySpec(keyValue, "AES");
+    }
+
+    public static void main(String[] args) throws Exception {
+        main(new Test8004873(), null);
+    }
+
+    public void doTest(Provider prov) throws Exception {
+        boolean result = true;
+        for (String algo : PADDEDCIPHER_ALGOS) {
+            if (!testOOS(algo, prov)) {
+                result = false;
+                System.out.println(algo + " Test Failed!");
+            }
+        }
+        if (!result) {
+            throw new Exception("One or more test failed!");
+        }
+    }
+
+    private boolean testOOS(String algo, Provider prov)
+        throws Exception {
+
+        String password = "abcd1234";
+        Cipher c;
+        try {
+            c = Cipher.getInstance(algo, prov);
+        } catch(NoSuchAlgorithmException nsae) {
+            System.out.println("Skipping Unsupported algo: " + algo);
+            return true;
+        }
+        c.init(Cipher.ENCRYPT_MODE, AES_KEY);
+        AlgorithmParameters params = c.getParameters();
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        CipherOutputStream cos = new CipherOutputStream(baos, c);
+        ObjectOutputStream oos = new ObjectOutputStream(cos);
+        oos.writeObject(password);
+        oos.flush();
+        oos.close();
+        byte[] encrypted = baos.toByteArray();
+
+        c.init(Cipher.DECRYPT_MODE, AES_KEY, params);
+
+        ByteArrayInputStream bais = new ByteArrayInputStream(encrypted);
+        CipherInputStream cis = new CipherInputStream(bais, c);
+        ObjectInputStream ois = new ObjectInputStream(cis);
+
+        String recovered = (String) ois.readObject();
+        return recovered.equals(password);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/com/oracle/security/ucrypto/TestAES.java	Thu Oct 23 13:44:28 2014 -0700
@@ -0,0 +1,343 @@
+/*
+ * Copyright (c) 2014, 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.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 7088989 8014374
+ * @summary Ensure the AES ciphers of OracleUcrypto provider works correctly
+ */
+
+import java.io.*;
+import java.security.*;
+import java.security.spec.*;
+import java.util.*;
+import javax.crypto.*;
+import javax.crypto.spec.*;
+
+public class TestAES extends UcryptoTest {
+
+    private static final String[] PADDEDCIPHER_ALGOS = {
+        "AES/ECB/PKCS5Padding",
+        "AES/CBC/PKCS5Padding",
+        "AES/CFB128/PKCS5Padding"
+    };
+
+    private static final String[] CIPHER_ALGOS = {
+        "AES/ECB/NoPadding",
+        "AES/CBC/NoPadding",
+        "AES/CFB128/NoPadding",
+        "AES/CTR/NoPadding",
+    };
+
+    private static final SecretKey CIPHER_KEY =
+        new SecretKeySpec(new byte[16], "AES");
+
+    public static void main(String[] args) throws Exception {
+        main(new TestAES(), null);
+    }
+
+    public void doTest(Provider prov) throws Exception {
+        // Provider for testing Interoperability
+        Provider sunJCEProv = Security.getProvider("SunJCE");
+
+        testCipherInterop(CIPHER_ALGOS, CIPHER_KEY, prov, sunJCEProv);
+        testCipherInterop(PADDEDCIPHER_ALGOS, CIPHER_KEY, prov, sunJCEProv);
+
+        testCipherOffset(CIPHER_ALGOS, CIPHER_KEY, prov);
+        testCipherOffset(PADDEDCIPHER_ALGOS, CIPHER_KEY, prov);
+
+        testCipherKeyWrapping(PADDEDCIPHER_ALGOS, CIPHER_KEY, prov, sunJCEProv);
+        testCipherGCM(CIPHER_KEY, prov);
+    }
+
+    private static void testCipherInterop(String[] algos, SecretKey key,
+                                          Provider p,
+                                          Provider interopP) {
+        boolean testPassed = true;
+        byte[] in = new byte[32];
+        (new SecureRandom()).nextBytes(in);
+
+        for (String algo : algos) {
+            try {
+                // check ENC
+                Cipher c;
+                try {
+                    c = Cipher.getInstance(algo, p);
+                } catch (NoSuchAlgorithmException nsae) {
+                    System.out.println("Skipping Unsupported CIP algo: " + algo);
+                    continue;
+                }
+                c.init(Cipher.ENCRYPT_MODE, key, (AlgorithmParameters)null, null);
+                byte[] eout = c.doFinal(in, 0, in.length);
+
+                AlgorithmParameters params = c.getParameters();
+                Cipher c2 = Cipher.getInstance(algo, interopP);
+                c2.init(Cipher.ENCRYPT_MODE, key, params, null);
+                byte[] eout2 = c2.doFinal(in, 0, in.length);
+
+                if (!Arrays.equals(eout, eout2)) {
+                    System.out.println(algo + ": DIFF FAILED");
+                    testPassed = false;
+                } else {
+                    System.out.println(algo + ": ENC Passed");
+                }
+
+                // check DEC
+                c.init(Cipher.DECRYPT_MODE, key, params, null);
+                byte[] dout = c.doFinal(eout);
+                c2.init(Cipher.DECRYPT_MODE, key, params, null);
+                byte[] dout2 = c2.doFinal(eout2);
+
+                if (!Arrays.equals(dout, dout2)) {
+                    System.out.println(algo + ": DIFF FAILED");
+                    testPassed = false;
+                } else {
+                    System.out.println(algo + ": DEC Passed");
+                }
+            } catch(Exception ex) {
+                System.out.println("Unexpected Exception: " + algo);
+                ex.printStackTrace();
+                testPassed = false;
+            }
+        }
+
+        if (!testPassed) {
+            throw new RuntimeException("One or more CIPHER test failed!");
+        } else {
+            System.out.println("CIPHER Interop Tests Passed");
+        }
+    }
+
+    private static void testCipherOffset(String[] algos, SecretKey key,
+                                         Provider p) {
+        boolean testPassed = true;
+        byte[] in = new byte[16];
+        (new SecureRandom()).nextBytes(in);
+        int blockSize = 16;
+
+        for (int j = 1; j < (in.length - 1); j++) {
+            System.out.println("Input offset size: " + j);
+            for (int i = 0; i < algos.length; i++) {
+                try {
+                    // check ENC
+                    Cipher c;
+                    try {
+                        c = Cipher.getInstance(algos[i], p);
+                    } catch (NoSuchAlgorithmException nsae) {
+                        System.out.println("Skip Unsupported CIP algo: " + algos[i]);
+                        continue;
+                    }
+                    c.init(Cipher.ENCRYPT_MODE, key, (AlgorithmParameters)null, null);
+                    byte[] eout = new byte[c.getOutputSize(in.length)];
+                    int firstPartLen = in.length - j - 1;
+                    //System.out.print("1st UPDATE: " + firstPartLen);
+                    int k = c.update(in, 0, firstPartLen, eout, 0);
+                    k += c.update(in, firstPartLen, 1, eout, k);
+                    k += c.doFinal(in, firstPartLen+1, j, eout, k);
+
+                    AlgorithmParameters params = c.getParameters();
+
+                    Cipher c2 = Cipher.getInstance(algos[i], p);
+                    c2.init(Cipher.ENCRYPT_MODE, key, params, null);
+                    byte[] eout2 = new byte[c2.getOutputSize(in.length)];
+                    int k2 = c2.update(in, 0, j, eout2, 0);
+                    k2 += c2.update(in, j, 1, eout2, k2);
+                    k2 += c2.doFinal(in, j+1, firstPartLen, eout2, k2);
+
+                    if (!checkArrays(eout, k, eout2, k2)) testPassed = false;
+
+                    // check DEC
+                    c.init(Cipher.DECRYPT_MODE, key, params, null);
+                    byte[] dout = new byte[c.getOutputSize(eout.length)];
+                    k = c.update(eout, 0, firstPartLen, dout, 0);
+                    k += c.update(eout, firstPartLen, 1, dout, k);
+                    k += c.doFinal(eout, firstPartLen+1, eout.length - firstPartLen - 1, dout, k);
+                    if (!checkArrays(in, in.length, dout, k)) testPassed = false;
+                } catch(Exception ex) {
+                    System.out.println("Unexpected Exception: " + algos[i]);
+                    ex.printStackTrace();
+                    testPassed = false;
+                }
+            }
+        }
+        if (!testPassed) {
+            throw new RuntimeException("One or more CIPHER test failed!");
+        } else {
+            System.out.println("CIPHER Offset Tests Passed");
+        }
+    }
+
+    private static void testCipherKeyWrapping(String[] algos, SecretKey key,
+                                              Provider p, Provider interopP)
+        throws NoSuchAlgorithmException {
+        boolean testPassed = true;
+
+        // Test SecretKey, PrivateKey and PublicKey
+        Key[] tbwKeys = new Key[3];
+        int[] tbwKeyTypes = { Cipher.SECRET_KEY, Cipher.PRIVATE_KEY, Cipher.PUBLIC_KEY };
+        tbwKeys[0] = new SecretKeySpec(new byte[20], "Blowfish");
+        KeyPairGenerator kpg = KeyPairGenerator.getInstance("RSA");
+        kpg.initialize(1024);
+        KeyPair kp = kpg.generateKeyPair();
+        tbwKeys[1] = kp.getPrivate();
+        tbwKeys[2] = kp.getPublic();
+
+        for (int i = 0; i < algos.length; i++) {
+            try {
+                System.out.println(algos[i] + " - Native WRAP/Java UNWRAP");
+
+                Cipher c1;
+                try {
+                    c1 = Cipher.getInstance(algos[i], p);
+                } catch (NoSuchAlgorithmException nsae) {
+                    System.out.println("Skipping Unsupported CIP algo: " + algos[i]);
+                    continue;
+                }
+                c1.init(Cipher.WRAP_MODE, key, (AlgorithmParameters)null, null);
+                AlgorithmParameters params = c1.getParameters();
+                Cipher c2 = Cipher.getInstance(algos[i], interopP);
+                c2.init(Cipher.UNWRAP_MODE, key, params, null);
+
+                for (int j = 0; j < tbwKeys.length ; j++) {
+                    byte[] wrappedKey = c1.wrap(tbwKeys[j]);
+                    Key recovered = c2.unwrap(wrappedKey,
+                                              tbwKeys[j].getAlgorithm(), tbwKeyTypes[j]);
+                    if (!checkKeys(tbwKeys[j], recovered)) testPassed = false;
+                }
+
+                System.out.println(algos[i] + " - Java WRAP/Native UNWRAP");
+                c1 = Cipher.getInstance(algos[i], interopP);
+                c1.init(Cipher.WRAP_MODE, key, (AlgorithmParameters)null, null);
+                params = c1.getParameters();
+                c2 = Cipher.getInstance(algos[i], p);
+                c2.init(Cipher.UNWRAP_MODE, key, params, null);
+
+                for (int j = 0; j < tbwKeys.length ; j++) {
+                    byte[] wrappedKey = c1.wrap(tbwKeys[j]);
+                    Key recovered = c2.unwrap(wrappedKey,
+                                              tbwKeys[j].getAlgorithm(), tbwKeyTypes[j]);
+                    if (!checkKeys(tbwKeys[j], recovered)) testPassed = false;
+                }
+
+            } catch(Exception ex) {
+                System.out.println("Unexpected Exception: " + algos[i]);
+                ex.printStackTrace();
+                testPassed = false;
+            }
+        }
+        if (!testPassed) {
+            throw new RuntimeException("One or more CIPHER test failed!");
+        } else {
+            System.out.println("CIPHER KeyWrapping Tests Passed");
+        }
+    }
+
+
+    private static void testCipherGCM(SecretKey key,
+                                      Provider p) {
+        boolean testPassed = true;
+        byte[] in = new byte[16];
+        (new SecureRandom()).nextBytes(in);
+
+        byte[] iv = new byte[16];
+        (new SecureRandom()).nextBytes(iv);
+
+
+        String algo = "AES/GCM/NoPadding";
+        int tagLen[] = { 128, 120, 112, 104, 96, 64, 32 };
+
+        try {
+            Cipher c;
+            try {
+                c = Cipher.getInstance(algo, p);
+            } catch (NoSuchAlgorithmException nsae) {
+                System.out.println("Skipping Unsupported CIP algo: " + algo);
+                return;
+            }
+            for (int i = 0; i < tagLen.length; i++) {
+                // change iv value to pass the key+iv uniqueness cehck for
+                // GCM encryption
+                iv[0] += 1;
+                AlgorithmParameterSpec paramSpec = new GCMParameterSpec(tagLen[i], iv);
+                // check ENC
+                c.init(Cipher.ENCRYPT_MODE, key, paramSpec, null);
+                c.updateAAD(iv);
+                byte[] eout = c.doFinal(in, 0, in.length);
+
+                AlgorithmParameters param = c.getParameters();
+                // check DEC
+                c.init(Cipher.DECRYPT_MODE, key, param, null);
+                c.updateAAD(iv);
+                byte[] dout = c.doFinal(eout, 0, eout.length);
+
+                if (!Arrays.equals(dout, in)) {
+                    System.out.println(algo + ": PT and RT DIFF FAILED");
+                    testPassed = false;
+                } else {
+                    System.out.println(algo + ": tagLen " + tagLen[i] + " done");
+                }
+            }
+        } catch(Exception ex) {
+            System.out.println("Unexpected Exception: " + algo);
+            ex.printStackTrace();
+            testPassed = false;
+        }
+        if (!testPassed) {
+            throw new RuntimeException("One or more CIPHER test failed!");
+        } else {
+            System.out.println("CIPHER GCM Tests Passed");
+        }
+    }
+
+    private static boolean checkArrays(byte[] a1, int a1Len, byte[] a2, int a2Len) {
+        boolean equal = true;
+        if (a1Len != a2Len) {
+            System.out.println("DIFFERENT OUT LENGTH");
+            equal = false;
+        } else {
+            for (int p = 0; p < a1Len; p++) {
+                if (a1[p] != a2[p]) {
+                    System.out.println("DIFF FAILED");
+                    equal = false;
+                    break;
+                }
+            }
+        }
+        return equal;
+    }
+
+    private static boolean checkKeys(Key k1, Key k2) {
+        boolean equal = true;
+        if (!k1.getAlgorithm().equalsIgnoreCase(k2.getAlgorithm())) {
+            System.out.println("DIFFERENT Key Algorithm");
+            equal = false;
+        } else if (!k1.getFormat().equalsIgnoreCase(k2.getFormat())) {
+            System.out.println("DIFFERENT Key Format");
+            equal = false;
+        } else if (!Arrays.equals(k1.getEncoded(), k2.getEncoded())) {
+            System.out.println("DIFFERENT Key Encoding");
+            equal = false;
+        }
+        return equal;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/com/oracle/security/ucrypto/TestCICOWithGCM.java	Thu Oct 23 13:44:28 2014 -0700
@@ -0,0 +1,104 @@
+/*
+ * Copyright (c) 2014, 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.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8014374
+ * @summary Test basic CipherInputStream/OutputStream func w/ GCM mode.
+ * @author Valerie Peng
+ */
+
+import java.security.*;
+import javax.crypto.*;
+import javax.crypto.spec.*;
+import java.math.*;
+import java.io.*;
+import com.sun.crypto.provider.*;
+
+import java.util.*;
+
+public class TestCICOWithGCM extends UcryptoTest {
+    public static void main(String[] args) throws Exception {
+        main(new TestCICOWithGCM(), null);
+    }
+
+    public void doTest(Provider p) throws Exception {
+        // check if GCM support exists
+        try {
+            Cipher.getInstance("AES/GCM/NoPadding", p);
+        } catch (NoSuchAlgorithmException nsae) {
+            System.out.println("Skipping Test due to no GCM support");
+            return;
+        }
+
+        Random rdm = new Random();
+
+        //init Secret Key
+        byte[] keyValue = new byte[16];
+        rdm.nextBytes(keyValue);
+        SecretKey key = new SecretKeySpec(keyValue, "AES");
+
+        //do initialization of the plainText
+        byte[] plainText = new byte[800];
+        rdm.nextBytes(plainText);
+
+        //init ciphers
+        Cipher encCipher = Cipher.getInstance("AES/GCM/NoPadding", p);
+        encCipher.init(Cipher.ENCRYPT_MODE, key);
+        Cipher decCipher = Cipher.getInstance("AES/GCM/NoPadding", p);
+        decCipher.init(Cipher.DECRYPT_MODE, key, encCipher.getParameters());
+
+        //init cipher streams
+        ByteArrayInputStream baInput = new ByteArrayInputStream(plainText);
+        CipherInputStream ciInput = new CipherInputStream(baInput, encCipher);
+        ByteArrayOutputStream baOutput = new ByteArrayOutputStream();
+        CipherOutputStream ciOutput = new CipherOutputStream(baOutput, decCipher);
+
+        //do test
+        byte[] buffer = new byte[800];
+        int len = ciInput.read(buffer);
+        System.out.println("read " + len + " bytes from input buffer");
+
+        while (len != -1) {
+            ciOutput.write(buffer, 0, len);
+            System.out.println("wite " + len + " bytes to output buffer");
+            len = ciInput.read(buffer);
+            if (len != -1) {
+                System.out.println("read " + len + " bytes from input buffer");
+            } else {
+                System.out.println("finished reading");
+            }
+        }
+
+        ciOutput.flush();
+        ciInput.close();
+        ciOutput.close();
+        byte[] recovered = baOutput.toByteArray();
+        System.out.println("recovered " + recovered.length + " bytes");
+        if (!Arrays.equals(plainText, recovered)) {
+            throw new RuntimeException("diff check failed!");
+        } else {
+            System.out.println("diff check passed");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/com/oracle/security/ucrypto/TestCICOWithGCMAndAAD.java	Thu Oct 23 13:44:28 2014 -0700
@@ -0,0 +1,118 @@
+/*
+ * Copyright (c) 2014, 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.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8014374
+ * @summary Test CipherInputStream/OutputStream func w/ GCM mode and AAD.
+ * @author Valerie Peng
+ */
+
+import java.io.*;
+import java.security.*;
+import java.util.*;
+import javax.crypto.*;
+import javax.crypto.spec.*;
+
+public class TestCICOWithGCMAndAAD extends UcryptoTest {
+    public static void main(String[] args) throws Exception {
+        main(new TestCICOWithGCMAndAAD(), null);
+    }
+
+    public void doTest(Provider p) throws Exception {
+        // check if GCM support exists
+        try {
+            Cipher.getInstance("AES/GCM/NoPadding", p);
+        } catch (NoSuchAlgorithmException nsae) {
+            System.out.println("Skipping Test due to no GCM support");
+            return;
+        }
+
+        Random rdm = new Random();
+
+        //init Secret Key
+        byte[] keyValue = new byte[16];
+        rdm.nextBytes(keyValue);
+        SecretKey key = new SecretKeySpec(keyValue, "AES");
+
+        //Do initialization of the plainText
+        byte[] plainText = new byte[400];
+        rdm.nextBytes(plainText);
+
+        byte[] aad = new byte[128];
+        rdm.nextBytes(aad);
+        byte[] aad2 = aad.clone();
+        aad2[50]++;
+
+        GCMParameterSpec spec = new GCMParameterSpec(128, new byte[16]);
+        Cipher encCipher = Cipher.getInstance("AES/GCM/NoPadding", p);
+        encCipher.init(Cipher.ENCRYPT_MODE, key, spec);
+        encCipher.updateAAD(aad);
+        Cipher decCipher = Cipher.getInstance("AES/GCM/NoPadding", p);
+        decCipher.init(Cipher.DECRYPT_MODE, key, spec);  //encCipher.getParameters());
+        decCipher.updateAAD(aad);
+
+        byte[] recovered = test(encCipher, decCipher, plainText);
+        if (!Arrays.equals(plainText, recovered)) {
+            throw new Exception("sameAAD: diff check failed!");
+        } else System.out.println("sameAAD: passed");
+
+        encCipher.init(Cipher.ENCRYPT_MODE, key);
+        encCipher.updateAAD(aad2);
+        recovered = test(encCipher, decCipher, plainText);
+        if (recovered != null && recovered.length != 0) {
+            throw new Exception("diffAAD: no data should be returned!");
+        } else System.out.println("diffAAD: passed");
+   }
+
+   private static byte[] test(Cipher encCipher, Cipher decCipher, byte[] plainText)
+            throws Exception {
+        //init cipher streams
+        ByteArrayInputStream baInput = new ByteArrayInputStream(plainText);
+        CipherInputStream ciInput = new CipherInputStream(baInput, encCipher);
+        ByteArrayOutputStream baOutput = new ByteArrayOutputStream();
+        CipherOutputStream ciOutput = new CipherOutputStream(baOutput, decCipher);
+
+        //do test
+        byte[] buffer = new byte[200];
+        int len = ciInput.read(buffer);
+        System.out.println("read " + len + " bytes from input buffer");
+
+        while (len != -1) {
+            ciOutput.write(buffer, 0, len);
+            System.out.println("wite " + len + " bytes to output buffer");
+            len = ciInput.read(buffer);
+            if (len != -1) {
+                System.out.println("read " + len + " bytes from input buffer");
+            } else {
+                System.out.println("finished reading");
+            }
+        }
+
+        ciOutput.flush();
+        ciInput.close();
+        ciOutput.close();
+
+        return baOutput.toByteArray();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/com/oracle/security/ucrypto/TestDigest.java	Thu Oct 23 13:44:28 2014 -0700
@@ -0,0 +1,128 @@
+/*
+ * Copyright (c) 2014, 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.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug     7088989
+ * @summary Ensure the various message digests works correctly
+ */
+
+import java.io.*;
+import java.security.*;
+import java.security.spec.*;
+import java.util.*;
+import javax.crypto.*;
+import javax.crypto.spec.*;
+
+public class TestDigest extends UcryptoTest {
+
+    private static final String[] MD_ALGOS = {
+        "MD5",
+        "SHA",
+        "SHA-256",
+        "SHA-384",
+        "SHA-512"
+    };
+
+    public static void main(String[] args) throws Exception {
+        main(new TestDigest(), null);
+    }
+
+    public void doTest(Provider p) {
+        boolean testPassed = true;
+        byte[] msg = new byte[200];
+        (new SecureRandom()).nextBytes(msg);
+        String interopProvName = "SUN";
+
+        for (String a : MD_ALGOS) {
+            try {
+                MessageDigest md, md2;
+                try {
+                    md = MessageDigest.getInstance(a, p);
+                } catch (NoSuchAlgorithmException nsae) {
+                    System.out.println("Skipping Unsupported MD algo: " + a);
+                    continue;
+                }
+                md2 = MessageDigest.getInstance(a, interopProvName);
+                // Test Interoperability for update+digest calls
+                for (int i = 0; i < 3; i++) {
+                    md.update(msg);
+                    byte[] digest = md.digest();
+                    md2.update(msg);
+                    byte[] digest2 = md2.digest();
+                    if (!Arrays.equals(digest, digest2)) {
+                        System.out.println("DIFF1 FAILED for: " + a + " at iter " + i);
+                        testPassed = false;
+                    }
+                }
+
+                // Test Interoperability for digest calls
+                md = MessageDigest.getInstance(a, p);
+                md2 = MessageDigest.getInstance(a, interopProvName);
+
+                for (int i = 0; i < 3; i++) {
+                    byte[] digest = md.digest();
+                    byte[] digest2 = md2.digest();
+                    if (!Arrays.equals(digest, digest2)) {
+                        System.out.println("DIFF2 FAILED for: " + a + " at iter " + i);
+                        testPassed = false;
+                    }
+                }
+
+                // Test Cloning functionality
+                md = MessageDigest.getInstance(a, p);
+                md2 = (MessageDigest) md.clone(); // clone right after construction
+                byte[] digest = md.digest();
+                byte[] digest2 = md2.digest();
+                if (!Arrays.equals(digest, digest2)) {
+                    System.out.println("DIFF-3.1 FAILED for: " + a);
+                    testPassed = false;
+                }
+                md.update(msg);
+                md2 = (MessageDigest) md.clone(); // clone again after update call
+                digest = md.digest();
+                digest2 = md2.digest();
+                if (!Arrays.equals(digest, digest2)) {
+                    System.out.println("DIFF-3.2 FAILED for: " + a);
+                    testPassed = false;
+                }
+                md2 = (MessageDigest) md.clone(); // clone after digest
+                digest = md.digest();
+                digest2 = md2.digest();
+                if (!Arrays.equals(digest, digest2)) {
+                    System.out.println("DIFF-3.3 FAILED for: " + a);
+                    testPassed = false;
+                }
+            } catch(Exception ex) {
+                System.out.println("Unexpected Exception: " + a);
+                ex.printStackTrace();
+                testPassed = false;
+            }
+        }
+        if (!testPassed) {
+            throw new RuntimeException("One or more MD test failed!");
+        } else {
+            System.out.println("MD Tests Passed");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/com/oracle/security/ucrypto/TestGCMKeyAndIvCheck.java	Thu Oct 23 13:44:28 2014 -0700
@@ -0,0 +1,179 @@
+/*
+ * Copyright (c) 2014, 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.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8014374
+ * @summary Ensure that same key+iv can't be repeatedly used for encryption.
+ * @author Valerie Peng
+ */
+
+import java.security.*;
+import javax.crypto.*;
+import javax.crypto.spec.*;
+import java.math.*;
+import com.sun.crypto.provider.*;
+
+import java.util.*;
+
+public class TestGCMKeyAndIvCheck extends UcryptoTest {
+
+    private static final byte[] AAD = new byte[5];
+    private static final byte[] PT = new byte[33];
+
+    private static void checkISE(Cipher c) throws Exception {
+        // Subsequent encryptions should fail
+        try {
+            c.updateAAD(AAD);
+            throw new Exception("Should throw ISE for updateAAD()");
+        } catch (IllegalStateException ise) {
+            // expected
+        }
+
+        try {
+            c.update(PT);
+            throw new Exception("Should throw ISE for update()");
+        } catch (IllegalStateException ise) {
+            // expected
+        }
+        try {
+            c.doFinal(PT);
+            throw new Exception("Should throw ISE for doFinal()");
+        } catch (IllegalStateException ise) {
+            // expected
+        }
+    }
+
+    public static void main(String[] args) throws Exception {
+        main(new TestGCMKeyAndIvCheck(), null);
+    }
+
+    public void doTest(Provider p) throws Exception {
+        Cipher c;
+        try {
+            c = Cipher.getInstance("AES/GCM/NoPadding", p);
+        } catch (NoSuchAlgorithmException nsae) {
+            System.out.println("Skipping Test due to No GCM support");
+            return;
+        }
+
+        SecretKey key = new SecretKeySpec(new byte[16], "AES");
+        // First try parameter-less init.
+        c.init(Cipher.ENCRYPT_MODE, key);
+        c.updateAAD(AAD);
+        byte[] ctPlusTag = c.doFinal(PT);
+
+        // subsequent encryption should fail unless re-init w/ different key+iv
+        checkISE(c);
+
+        // Validate the retrieved parameters against the IV and tag length.
+        AlgorithmParameters params = c.getParameters();
+        if (params == null) {
+            throw new Exception("getParameters() should not return null");
+        }
+        GCMParameterSpec spec = params.getParameterSpec(GCMParameterSpec.class);
+        if (spec.getTLen() != (ctPlusTag.length - PT.length)*8) {
+            throw new Exception("Parameters contains incorrect TLen value");
+        }
+        if (!Arrays.equals(spec.getIV(), c.getIV())) {
+            throw new Exception("Parameters contains incorrect IV value");
+        }
+
+        // Should be ok to use the same key+iv for decryption
+        c.init(Cipher.DECRYPT_MODE, key, params);
+        c.updateAAD(AAD);
+        byte[] recovered = c.doFinal(ctPlusTag);
+        if (!Arrays.equals(recovered, PT)) {
+            throw new Exception("decryption result mismatch");
+        }
+
+        // Now try to encrypt again using the same key+iv; should fail also
+        try {
+            c.init(Cipher.ENCRYPT_MODE, key, params);
+            throw new Exception("Should throw exception when same key+iv is used");
+        } catch (InvalidAlgorithmParameterException iape) {
+            // expected
+        }
+
+        // Now try to encrypt again using parameter-less init; should work
+        c.init(Cipher.ENCRYPT_MODE, key);
+        c.doFinal(PT);
+
+        // make sure a different iv is used
+        byte[] iv = c.getIV();
+        if (Arrays.equals(spec.getIV(), iv)) {
+            throw new Exception("IV should be different now");
+        }
+
+        // Now try to encrypt again using a different parameter; should work
+        c.init(Cipher.ENCRYPT_MODE, key, new GCMParameterSpec(128, new byte[30]));
+        c.updateAAD(AAD);
+        c.doFinal(PT);
+        // subsequent encryption should fail unless re-init w/ different key+iv
+        checkISE(c);
+
+        // Now try decryption twice in a row; no re-init required and
+        // same parameters is used.
+        c.init(Cipher.DECRYPT_MODE, key, params);
+        c.updateAAD(AAD);
+        recovered = c.doFinal(ctPlusTag);
+
+        c.updateAAD(AAD);
+        recovered = c.doFinal(ctPlusTag);
+        if (!Arrays.equals(recovered, PT)) {
+            throw new Exception("decryption result mismatch");
+        }
+
+        // Now try decryption again and re-init using the same parameters
+        c.init(Cipher.DECRYPT_MODE, key, params);
+        c.updateAAD(AAD);
+        recovered = c.doFinal(ctPlusTag);
+
+        // init to decrypt w/o parameters; should fail with IKE as
+        // javadoc specified
+        try {
+            c.init(Cipher.DECRYPT_MODE, key);
+            throw new Exception("Should throw IKE for dec w/o params");
+        } catch (InvalidKeyException ike) {
+            // expected
+        }
+
+        // Lastly, try encryption AND decryption w/ wrong type of parameters,
+        // e.g. IvParameterSpec
+        try {
+            c.init(Cipher.ENCRYPT_MODE, key, new IvParameterSpec(iv));
+            throw new Exception("Should throw IAPE");
+        } catch (InvalidAlgorithmParameterException iape) {
+            // expected
+        }
+        try {
+            c.init(Cipher.DECRYPT_MODE, key, new IvParameterSpec(iv));
+            throw new Exception("Should throw IAPE");
+        } catch (InvalidAlgorithmParameterException iape) {
+            // expected
+        }
+
+        System.out.println("Test Passed!");
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/com/oracle/security/ucrypto/TestGCMKeyWrap.java	Thu Oct 23 13:44:28 2014 -0700
@@ -0,0 +1,86 @@
+/*
+ * Copyright (c) 2014, 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.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8014374
+ * @summary Ensure key wrap/unwrap works using AES/GCM/NoPadding
+ */
+
+import java.io.*;
+import java.security.*;
+import java.security.spec.*;
+import java.util.*;
+import javax.crypto.*;
+import javax.crypto.spec.*;
+
+public class TestGCMKeyWrap extends UcryptoTest {
+
+    public static void main(String[] args) throws Exception {
+        main(new TestGCMKeyWrap(), null);
+    }
+
+    public void doTest(Provider p) throws Exception {
+        // check if GCM support exists
+        try {
+            Cipher.getInstance("AES/GCM/NoPadding", p);
+        } catch (NoSuchAlgorithmException nsae) {
+            System.out.println("Skipping Test due to no GCM support");
+            return;
+        }
+
+        Random rdm = new Random();
+
+        //init Secret Key
+        byte[] keyValue = new byte[16];
+        rdm.nextBytes(keyValue);
+        SecretKey key = new SecretKeySpec(keyValue, "AES");
+
+        Cipher cipher = Cipher.getInstance("AES/GCM/NoPadding", p);
+        cipher.init(Cipher.WRAP_MODE, key);
+
+        byte[] wrappedKey = cipher.wrap(key);
+
+        try { // make sure ISE is thrown if re-using the same key/IV
+            wrappedKey = cipher.wrap(key);
+            throw new Exception("FAIL: expected ISE not thrown");
+        } catch(IllegalStateException ise){
+            System.out.println("Expected ISE thrown for re-wrapping");
+        }
+
+        //unwrap the key
+        AlgorithmParameters params = cipher.getParameters();
+        cipher.init(Cipher.UNWRAP_MODE, key, params);
+        Key unwrappedKey = cipher.unwrap(wrappedKey, "AES", Cipher.SECRET_KEY);
+
+        //check if we can unwrap second time
+        unwrappedKey = cipher.unwrap(wrappedKey, "AES", Cipher.SECRET_KEY);
+
+        // Comparison
+        if (!Arrays.equals(key.getEncoded(), unwrappedKey.getEncoded())) {
+            throw new Exception("FAIL: keys are not equal");
+        } else {
+            System.out.println("Passed key equality check");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/com/oracle/security/ucrypto/TestGCMWithSBE.java	Thu Oct 23 13:44:28 2014 -0700
@@ -0,0 +1,113 @@
+/*
+ * Copyright (c) 2014, 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.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8036970
+ * @summary Ensure that Cipher object is still usable after SBE.
+ * @author Valerie Peng
+ */
+
+import java.security.*;
+import javax.crypto.*;
+import javax.crypto.spec.*;
+import java.math.*;
+import com.sun.crypto.provider.*;
+
+import java.util.*;
+
+public class TestGCMWithSBE extends UcryptoTest {
+
+    private static final byte[] PT = new byte[32];
+    private static final byte[] ONE_BYTE = new byte[1];
+
+    public static void main(String[] args) throws Exception {
+        main(new TestGCMWithSBE(), null);
+    }
+
+    public void doTest(Provider p) throws Exception {
+        Cipher c;
+        try {
+            c = Cipher.getInstance("AES/GCM/NoPadding", p);
+        } catch (NoSuchAlgorithmException nsae) {
+            System.out.println("Skipping Test due to No GCM support");
+            return;
+        }
+
+        SecretKey key = new SecretKeySpec(new byte[16], "AES");
+        c.init(Cipher.ENCRYPT_MODE, key);
+
+        // test SBE with update calls
+        byte[] ct1 = null;
+        try {
+            c.update(PT, 0, PT.length, ONE_BYTE);
+        } catch (ShortBufferException sbe) {
+            // retry should work
+            ct1 = c.update(PT, 0, PT.length);
+        }
+
+        byte[] ct2PlusTag = null;
+        // test SBE with doFinal calls
+        try {
+            c.doFinal(ONE_BYTE, 0);
+        } catch (ShortBufferException sbe) {
+            // retry should work
+            ct2PlusTag = c.doFinal();
+        }
+
+        // Validate the retrieved parameters against the IV and tag length.
+        AlgorithmParameters params = c.getParameters();
+        if (params == null) {
+            throw new Exception("getParameters() should not return null");
+        }
+        GCMParameterSpec spec = params.getParameterSpec(GCMParameterSpec.class);
+        if (spec.getTLen() != (ct1.length + ct2PlusTag.length - PT.length)*8) {
+            throw new Exception("Parameters contains incorrect TLen value");
+        }
+        if (!Arrays.equals(spec.getIV(), c.getIV())) {
+            throw new Exception("Parameters contains incorrect IV value");
+        }
+
+        // Should be ok to use the same key+iv for decryption
+        c.init(Cipher.DECRYPT_MODE, key, params);
+        byte[] pt1 = c.update(ct1);
+        if (pt1 != null && pt1.length != 0) {
+            throw new Exception("Recovered text should not be returned "
+                + "to caller before tag verification");
+        }
+
+        byte[] pt2 = null;
+        try {
+            c.doFinal(ct2PlusTag, 0, ct2PlusTag.length, ONE_BYTE);
+        } catch (ShortBufferException sbe) {
+            // retry should work
+            pt2 = c.doFinal(ct2PlusTag);
+        }
+        if (!Arrays.equals(pt2, PT)) {
+            throw new Exception("decryption result mismatch");
+        }
+
+        System.out.println("Test Passed!");
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/com/oracle/security/ucrypto/TestKATForGCM.java	Thu Oct 23 13:44:28 2014 -0700
@@ -0,0 +1,304 @@
+/*
+ * Copyright (c) 2014, 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.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8014374
+ * @summary Known Answer Test for AES cipher with GCM mode
+ * @author Valerie Peng
+ */
+
+import java.security.*;
+import javax.crypto.*;
+import javax.crypto.spec.*;
+import java.math.*;
+
+import java.util.*;
+
+public class TestKATForGCM extends UcryptoTest {
+    public static void main(String[] args) throws Exception {
+        main(new TestKATForGCM(), null);
+    }
+
+    // Utility methods
+    private static byte[] HexToBytes(String hexVal) {
+        if (hexVal == null) return new byte[0];
+        byte[] result = new byte[hexVal.length()/2];
+        for (int i = 0; i < result.length; i++) {
+            // 2 characters at a time
+            String byteVal = hexVal.substring(2*i, 2*i +2);
+            result[i] = Integer.valueOf(byteVal, 16).byteValue();
+        }
+        return result;
+    }
+
+    private static class TestVector {
+        SecretKey key;
+        byte[] plainText;
+        byte[] aad;
+        byte[] cipherText;
+        byte[] tag;
+        GCMParameterSpec spec;
+        String info;
+
+        TestVector(String key, String iv, String pt, String aad,
+                   String ct, String tag) {
+            this.key = new SecretKeySpec(HexToBytes(key), "AES");
+            this.plainText = HexToBytes(pt);
+            this.aad = HexToBytes(aad);
+            this.cipherText = HexToBytes(ct);
+            this.tag = HexToBytes(tag);
+            this.spec = new GCMParameterSpec(this.tag.length * 8, HexToBytes(iv));
+            this.info = "key=" + key + ", iv=" + iv + ", pt=" + pt +
+                ",aad=" + aad + ", ct=" + ct + ", tag=" + tag;
+        }
+
+        public String toString() {
+            return info;
+        }
+    }
+
+    // These test vectors are found off NIST's CAVP page
+    // http://csrc.nist.gov/groups/STM/cavp/index.html
+    // inside the link named "GCM Test Vectors", i.e.
+    // http://csrc.nist.gov/groups/STM/cavp/documents/mac/gcmtestvectors.zip
+    // CAVS 14.0, set of test vectors w/ count = 0, keysize = 128
+    private static TestVector[] testValues = {
+        // 96-bit iv w/ 128/120/112/104/96-bit tags
+        // no plain text, no aad
+        new TestVector("11754cd72aec309bf52f7687212e8957",
+                       "3c819d9a9bed087615030b65",
+                       null, null, null,
+                       "250327c674aaf477aef2675748cf6971"),
+        new TestVector("272f16edb81a7abbea887357a58c1917",
+                       "794ec588176c703d3d2a7a07",
+                       null, null, null,
+                       "b6e6f197168f5049aeda32dafbdaeb"),
+        new TestVector("81b6844aab6a568c4556a2eb7eae752f",
+                       "ce600f59618315a6829bef4d",
+                       null, null, null,
+                       "89b43e9dbc1b4f597dbbc7655bb5"),
+        new TestVector("cde2f9a9b1a004165ef9dc981f18651b",
+                       "29512c29566c7322e1e33e8e",
+                       null, null, null,
+                       "2e58ce7dabd107c82759c66a75"),
+        new TestVector("b01e45cc3088aaba9fa43d81d481823f",
+                       "5a2c4a66468713456a4bd5e1",
+                       null, null, null,
+                       "014280f944f53c681164b2ff"),
+        // 96-bit iv w/ 128/120/112/104/96-bit tags
+        // no plain text, 16-byte aad
+        new TestVector("77be63708971c4e240d1cb79e8d77feb",
+                       "e0e00f19fed7ba0136a797f3",
+                       null,
+                       "7a43ec1d9c0a5a78a0b16533a6213cab",
+                       null,
+                       "209fcc8d3675ed938e9c7166709dd946"),
+        new TestVector("da0b615656135194ba6d3c851099bc48",
+                       "d39d4b4d3cc927885090e6c3",
+                       null,
+                       "e7e5e6f8dac913036cb2ff29e8625e0e",
+                       null,
+                       "ab967711a5770461724460b07237e2"),
+        new TestVector("7e0986937a88eef894235aba4a2f43b2",
+                       "92c4a631695907166b422d60",
+                       null,
+                       "85c185f8518f9f2cd597a8f9208fc76b",
+                       null,
+                       "3bb916b728df94fe9d1916736be1"),
+        new TestVector("c3db570d7f0c21e86b028f11465d1dc9",
+                       "f86970f58ceef89fc7cb679e",
+                       null,
+                       "c095240708c0f57c288d86090ae34ee1",
+                       null,
+                       "e043c52160d652e82c7262fcf4"),
+        new TestVector("bea48ae4980d27f357611014d4486625",
+                       "32bddb5c3aa998a08556454c",
+                       null,
+                       "8a50b0b8c7654bced884f7f3afda2ead",
+                       null,
+                       "8e0f6d8bf05ffebe6f500eb1"),
+        // 96-bit iv w/ 128/120/112/104/96-bit tags
+        // no plain text, 20-byte aad
+        new TestVector("2fb45e5b8f993a2bfebc4b15b533e0b4",
+                       "5b05755f984d2b90f94b8027",
+                       null,
+                       "e85491b2202caf1d7dce03b97e09331c32473941",
+                       null,
+                       "c75b7832b2a2d9bd827412b6ef5769db"),
+        new TestVector("9bf406339fcef9675bbcf156aa1a0661",
+                       "8be4a9543d40f542abacac95",
+                       null,
+                       "7167cbf56971793186333a6685bbd58d47d379b3",
+                       null,
+                       "5e7968d7bbd5ba58cfcc750e2ef8f1"),
+        new TestVector("a2e962fff70fd0f4d63be728b80556fc",
+                       "1fa7103483de43d09bc23db4",
+                       null,
+                       "2a58edf1d53f46e4e7ee5e77ee7aeb60fc360658",
+                       null,
+                       "fa37f2dbbefab1451eae1d0d74ca"),
+        new TestVector("6bf4fdce82926dcdfc52616ed5f23695",
+                       "cc0f5899a10615567e1193ed",
+                       null,
+                       "3340655592374c1da2f05aac3ee111014986107f",
+                       null,
+                       "8ad3385cce3b5e7c985908192c"),
+        new TestVector("4df7a13e43c3d7b66b1a72fac5ba398e",
+                       "97179a3a2d417908dcf0fb28",
+                       null,
+                       "cbb7fc0010c255661e23b07dbd804b1e06ae70ac",
+                       null,
+                       "37791edae6c137ea946cfb40"),
+        // 96-bit iv w/ 128-bit tags, 13/16/32/51-byte plain text, no aad
+        new TestVector("fe9bb47deb3a61e423c2231841cfd1fb",
+                       "4d328eb776f500a2f7fb47aa",
+                       "f1cc3818e421876bb6b8bbd6c9",
+                       null,
+                       "b88c5c1977b35b517b0aeae967",
+                       "43fd4727fe5cdb4b5b42818dea7ef8c9"),
+        new TestVector("7fddb57453c241d03efbed3ac44e371c",
+                       "ee283a3fc75575e33efd4887",
+                       "d5de42b461646c255c87bd2962d3b9a2",
+                       null,
+                       "2ccda4a5415cb91e135c2a0f78c9b2fd",
+                       "b36d1df9b9d5e596f83e8b7f52971cb3"),
+        new TestVector("9971071059abc009e4f2bd69869db338",
+                       "07a9a95ea3821e9c13c63251",
+                       "f54bc3501fed4f6f6dfb5ea80106df0bd836e6826225b75c0222f6e859b35983",
+                       null,
+                       "0556c159f84ef36cb1602b4526b12009c775611bffb64dc0d9ca9297cd2c6a01",
+                       "7870d9117f54811a346970f1de090c41"),
+        new TestVector("594157ec4693202b030f33798b07176d",
+                       "49b12054082660803a1df3df",
+
+"3feef98a976a1bd634f364ac428bb59cd51fb159ec1789946918dbd50ea6c9d594a3a31a5269b0da6936c29d063a5fa2cc8a1c",
+                      null,
+
+"c1b7a46a335f23d65b8db4008a49796906e225474f4fe7d39e55bf2efd97fd82d4167de082ae30fa01e465a601235d8d68bc69",
+                      "ba92d3661ce8b04687e8788d55417dc2"),
+        // 96-bit iv w/ 128-bit tags, 16-byte plain text, 16/20/48/90-byte aad
+        new TestVector("c939cc13397c1d37de6ae0e1cb7c423c",
+                       "b3d8cc017cbb89b39e0f67e2",
+                       "c3b3c41f113a31b73d9a5cd432103069",
+                       "24825602bd12a984e0092d3e448eda5f",
+                       "93fe7d9e9bfd10348a5606e5cafa7354",
+                       "0032a1dc85f1c9786925a2e71d8272dd"),
+        new TestVector("d4a22488f8dd1d5c6c19a7d6ca17964c",
+                       "f3d5837f22ac1a0425e0d1d5",
+                       "7b43016a16896497fb457be6d2a54122",
+                       "f1c5d424b83f96c6ad8cb28ca0d20e475e023b5a",
+                       "c2bd67eef5e95cac27e3b06e3031d0a8",
+                       "f23eacf9d1cdf8737726c58648826e9c"),
+        new TestVector("89850dd398e1f1e28443a33d40162664",
+                       "e462c58482fe8264aeeb7231",
+                       "2805cdefb3ef6cc35cd1f169f98da81a",
+"d74e99d1bdaa712864eec422ac507bddbe2b0d4633cd3dff29ce5059b49fe868526c59a2a3a604457bc2afea866e7606",
+                       "ba80e244b7fc9025cd031d0f63677e06",
+                       "d84a8c3eac57d1bb0e890a8f461d1065"),
+        new TestVector("bd7c5c63b7542b56a00ebe71336a1588",
+                       "87721f23ba9c3c8ea5571abc",
+                       "de15ddbb1e202161e8a79af6a55ac6f3",
+"a6ec8075a0d3370eb7598918f3b93e48444751624997b899a87fa6a9939f844e008aa8b70e9f4c3b1a19d3286bf543e7127bfecba1ad17a5ec53fccc26faecacc4c75369498eaa7d706aef634d0009279b11e4ba6c993e5e9ed9",
+                       "41eb28c0fee4d762de972361c863bc80",
+                       "9cb567220d0b252eb97bff46e4b00ff8"),
+        // 8/1024-bit iv w/ 128-bit tag, no plain text, no aad
+        new TestVector("1672c3537afa82004c6b8a46f6f0d026",
+                       "05",
+                       null, null, null,
+                       "8e2ad721f9455f74d8b53d3141f27e8e"),
+        new TestVector("d0f1f4defa1e8c08b4b26d576392027c",
+"42b4f01eb9f5a1ea5b1eb73b0fb0baed54f387ecaa0393c7d7dffc6af50146ecc021abf7eb9038d4303d91f8d741a11743166c0860208bcc02c6258fd9511a2fa626f96d60b72fcff773af4e88e7a923506e4916ecbd814651e9f445adef4ad6a6b6c7290cc13b956130eef5b837c939fcac0cbbcc9656cd75b13823ee5acdac",
+                       null, null, null,
+                       "7ab49b57ddf5f62c427950111c5c4f0d"),
+        // 8-bit iv w/ 128-bit tag, 13-byte plain text, 90-byte aad
+        new TestVector("9f79239f0904eace50784b863e723f6b",
+                       "d9",
+                       "bdb0bb10c87965acd34d146171",
+"44db436089327726c5f01139e1f339735c9e85514ccc2f167bad728010fb34a9072a9794c8a5e7361b1d0dbcdc9ac4091e354bb2896561f0486645252e9c78c86beece91bfa4f7cc4a8794ce1f305b1b735efdbf1ed1563c0be0",
+                       "7e5a7c8dadb3f0c7335b4d9d8d",
+                       "6b6ef1f53723a89f3bb7c6d043840717"),
+        // 1024-bit iv w/ 128-bit tag, 51-byte plain text, 48-byte aad
+        new TestVector("141f1ce91989b07e7eb6ae1dbd81ea5e",
+
+"49451da24bd6074509d3cebc2c0394c972e6934b45a1d91f3ce1d3ca69e194aa1958a7c21b6f21d530ce6d2cc5256a3f846b6f9d2f38df0102c4791e57df038f6e69085646007df999751e248e06c47245f4cd3b8004585a7470dee1690e9d2d63169a58d243c0b57b3e5b4a481a3e4e8c60007094ef3adea2e8f05dd3a1396f",
+"d384305af2388699aa302f510913fed0f2cb63ba42efa8c5c9de2922a2ec2fe87719dadf1eb0aef212b51e74c9c5b934104a43",
+"630cf18a91cc5a6481ac9eefd65c24b1a3c93396bd7294d6b8ba323951727666c947a21894a079ef061ee159c05beeb4",
+"f4c34e5fbe74c0297313268296cd561d59ccc95bbfcdfcdc71b0097dbd83240446b28dc088abd42b0fc687f208190ff24c0548",
+                      "dbb93bbb56d0439cd09f620a57687f5d"),
+    };
+
+    public void doTest(Provider p) throws Exception {
+        boolean testFailed = false;
+        Cipher c = null;
+        try {
+            c = Cipher.getInstance("AES/GCM/NoPadding", p);
+        } catch (NoSuchAlgorithmException nsae) {
+            System.out.println("Skipping Test due to no GCM support");
+            return;
+        }
+
+        for (int i = 0; i < testValues.length; i++) {
+            try {
+                c.init(Cipher.ENCRYPT_MODE, testValues[i].key, testValues[i].spec);
+                c.updateAAD(testValues[i].aad);
+                byte[] ctPlusTag = c.doFinal(testValues[i].plainText);
+
+                c.init(Cipher.DECRYPT_MODE, testValues[i].key, testValues[i].spec);
+                c.updateAAD(testValues[i].aad);
+                byte[] pt = c.doFinal(ctPlusTag); // should fail if tag mismatched
+
+                // check encryption/decryption results just to be sure
+                if (!Arrays.equals(testValues[i].plainText, pt)) {
+                    System.out.println("PlainText diff failed for test# " + i);
+                    testFailed = true;
+                }
+                int ctLen = testValues[i].cipherText.length;
+                if (!Arrays.equals(testValues[i].cipherText,
+                                   Arrays.copyOf(ctPlusTag, ctLen))) {
+                    System.out.println("CipherText diff failed for test# " + i);
+                    testFailed = true;
+                }
+                int tagLen = testValues[i].tag.length;
+                if (!Arrays.equals
+                    (testValues[i].tag,
+                     Arrays.copyOfRange(ctPlusTag, ctLen, ctLen+tagLen))) {
+                    System.out.println("Tag diff failed for test# " + i);
+                    testFailed = true;
+                }
+            } catch (Exception ex) {
+                // continue testing other test vectors
+                System.out.println("Failed Test Vector: " + testValues[i]);
+                ex.printStackTrace();
+                testFailed = true;
+                continue;
+            }
+        }
+        if (testFailed) {
+            throw new Exception("Test Failed");
+        }
+        // passed all tests...hooray!
+        System.out.println("Test Passed");
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/com/oracle/security/ucrypto/TestMalformedRSA.java	Thu Oct 23 13:44:28 2014 -0700
@@ -0,0 +1,257 @@
+/*
+ * Copyright (c) 2014, 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.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8024606
+ * @summary NegativeArraySizeException in NativeRSACipher
+ */
+
+import java.io.*;
+import java.security.*;
+import java.security.spec.*;
+import java.util.*;
+import java.math.*;
+import javax.crypto.*;
+
+public class TestMalformedRSA extends UcryptoTest {
+
+    // KAT
+    private static final byte PLAINTEXT[] = Arrays.copyOf
+        (new String("Known plaintext message utilized" +
+                    "for RSA Encryption &  Decryption" +
+                    "block, SHA1, SHA256, SHA384  and" +
+                    "SHA512 RSA Signature KAT tests.").getBytes(), 128);
+
+    private static final byte MOD[] = {
+        (byte)0xd5, (byte)0x84, (byte)0x95, (byte)0x07, (byte)0xf4, (byte)0xd0,
+        (byte)0x1f, (byte)0x82, (byte)0xf3, (byte)0x79, (byte)0xf4, (byte)0x99,
+        (byte)0x48, (byte)0x10, (byte)0xe1, (byte)0x71, (byte)0xa5, (byte)0x62,
+        (byte)0x22, (byte)0xa3, (byte)0x4b, (byte)0x00, (byte)0xe3, (byte)0x5b,
+        (byte)0x3a, (byte)0xcc, (byte)0x10, (byte)0x83, (byte)0xe0, (byte)0xaf,
+        (byte)0x61, (byte)0x13, (byte)0x54, (byte)0x6a, (byte)0xa2, (byte)0x6a,
+        (byte)0x2c, (byte)0x5e, (byte)0xb3, (byte)0xcc, (byte)0xa3, (byte)0x71,
+        (byte)0x9a, (byte)0xb2, (byte)0x3e, (byte)0x78, (byte)0xec, (byte)0xb5,
+        (byte)0x0e, (byte)0x6e, (byte)0x31, (byte)0x3b, (byte)0x77, (byte)0x1f,
+        (byte)0x6e, (byte)0x94, (byte)0x41, (byte)0x60, (byte)0xd5, (byte)0x6e,
+        (byte)0xd9, (byte)0xc6, (byte)0xf9, (byte)0x29, (byte)0xc3, (byte)0x40,
+        (byte)0x36, (byte)0x25, (byte)0xdb, (byte)0xea, (byte)0x0b, (byte)0x07,
+        (byte)0xae, (byte)0x76, (byte)0xfd, (byte)0x99, (byte)0x29, (byte)0xf4,
+        (byte)0x22, (byte)0xc1, (byte)0x1a, (byte)0x8f, (byte)0x05, (byte)0xfe,
+        (byte)0x98, (byte)0x09, (byte)0x07, (byte)0x05, (byte)0xc2, (byte)0x0f,
+        (byte)0x0b, (byte)0x11, (byte)0x83, (byte)0x39, (byte)0xca, (byte)0xc7,
+        (byte)0x43, (byte)0x63, (byte)0xff, (byte)0x33, (byte)0x80, (byte)0xe7,
+        (byte)0xc3, (byte)0x78, (byte)0xae, (byte)0xf1, (byte)0x73, (byte)0x52,
+        (byte)0x98, (byte)0x1d, (byte)0xde, (byte)0x5c, (byte)0x53, (byte)0x6e,
+        (byte)0x01, (byte)0x73, (byte)0x0d, (byte)0x12, (byte)0x7e, (byte)0x77,
+        (byte)0x03, (byte)0xf1, (byte)0xef, (byte)0x1b, (byte)0xc8, (byte)0xa8,
+        (byte)0x0f, (byte)0x97
+    };
+
+    private static final byte PUB_EXP[] = {(byte)0x01, (byte)0x00, (byte)0x01};
+
+    private static final byte PRIV_EXP[] = {
+        (byte)0x85, (byte)0x27, (byte)0x47, (byte)0x61, (byte)0x4c, (byte)0xd4,
+        (byte)0xb5, (byte)0xb2, (byte)0x0e, (byte)0x70, (byte)0x91, (byte)0x8f,
+        (byte)0x3d, (byte)0x97, (byte)0xf9, (byte)0x5f, (byte)0xcc, (byte)0x09,
+        (byte)0x65, (byte)0x1c, (byte)0x7c, (byte)0x5b, (byte)0xb3, (byte)0x6d,
+        (byte)0x63, (byte)0x3f, (byte)0x7b, (byte)0x55, (byte)0x22, (byte)0xbb,
+        (byte)0x7c, (byte)0x48, (byte)0x77, (byte)0xae, (byte)0x80, (byte)0x56,
+        (byte)0xc2, (byte)0x10, (byte)0xd5, (byte)0x03, (byte)0xdb, (byte)0x31,
+        (byte)0xaf, (byte)0x8d, (byte)0x54, (byte)0xd4, (byte)0x48, (byte)0x99,
+        (byte)0xa8, (byte)0xc4, (byte)0x23, (byte)0x43, (byte)0xb8, (byte)0x48,
+        (byte)0x0b, (byte)0xc7, (byte)0xbc, (byte)0xf5, (byte)0xcc, (byte)0x64,
+        (byte)0x72, (byte)0xbf, (byte)0x59, (byte)0x06, (byte)0x04, (byte)0x1c,
+        (byte)0x32, (byte)0xf5, (byte)0x14, (byte)0x2e, (byte)0x6e, (byte)0xe2,
+        (byte)0x0f, (byte)0x5c, (byte)0xde, (byte)0x36, (byte)0x3c, (byte)0x6e,
+        (byte)0x7c, (byte)0x4d, (byte)0xcc, (byte)0xd3, (byte)0x00, (byte)0x6e,
+        (byte)0xe5, (byte)0x45, (byte)0x46, (byte)0xef, (byte)0x4d, (byte)0x25,
+        (byte)0x46, (byte)0x6d, (byte)0x7f, (byte)0xed, (byte)0xbb, (byte)0x4f,
+        (byte)0x4d, (byte)0x9f, (byte)0xda, (byte)0x87, (byte)0x47, (byte)0x8f,
+        (byte)0x74, (byte)0x44, (byte)0xb7, (byte)0xbe, (byte)0x9d, (byte)0xf5,
+        (byte)0xdd, (byte)0xd2, (byte)0x4c, (byte)0xa5, (byte)0xab, (byte)0x74,
+        (byte)0xe5, (byte)0x29, (byte)0xa1, (byte)0xd2, (byte)0x45, (byte)0x3b,
+        (byte)0x33, (byte)0xde, (byte)0xd5, (byte)0xae, (byte)0xf7, (byte)0x03,
+        (byte)0x10, (byte)0x21
+    };
+
+    private static final byte PRIME_P[] = {
+        (byte)0xf9, (byte)0x74, (byte)0x8f, (byte)0x16, (byte)0x02, (byte)0x6b,
+        (byte)0xa0, (byte)0xee, (byte)0x7f, (byte)0x28, (byte)0x97, (byte)0x91,
+        (byte)0xdc, (byte)0xec, (byte)0xc0, (byte)0x7c, (byte)0x49, (byte)0xc2,
+        (byte)0x85, (byte)0x76, (byte)0xee, (byte)0x66, (byte)0x74, (byte)0x2d,
+        (byte)0x1a, (byte)0xb8, (byte)0xf7, (byte)0x2f, (byte)0x11, (byte)0x5b,
+        (byte)0x36, (byte)0xd8, (byte)0x46, (byte)0x33, (byte)0x3b, (byte)0xd8,
+        (byte)0xf3, (byte)0x2d, (byte)0xa1, (byte)0x03, (byte)0x83, (byte)0x2b,
+        (byte)0xec, (byte)0x35, (byte)0x43, (byte)0x32, (byte)0xff, (byte)0xdd,
+        (byte)0x81, (byte)0x7c, (byte)0xfd, (byte)0x65, (byte)0x13, (byte)0x04,
+        (byte)0x7c, (byte)0xfc, (byte)0x03, (byte)0x97, (byte)0xf0, (byte)0xd5,
+        (byte)0x62, (byte)0xdc, (byte)0x0d, (byte)0xbf
+    };
+
+    private static final byte PRIME_Q[] = {
+        (byte)0xdb, (byte)0x1e, (byte)0xa7, (byte)0x3d, (byte)0xe7, (byte)0xfa,
+        (byte)0x8b, (byte)0x04, (byte)0x83, (byte)0x48, (byte)0xf3, (byte)0xa5,
+        (byte)0x31, (byte)0x9d, (byte)0x35, (byte)0x5e, (byte)0x4d, (byte)0x54,
+        (byte)0x77, (byte)0xcc, (byte)0x84, (byte)0x09, (byte)0xf3, (byte)0x11,
+        (byte)0x0d, (byte)0x54, (byte)0xed, (byte)0x85, (byte)0x39, (byte)0xa9,
+        (byte)0xca, (byte)0xa8, (byte)0xea, (byte)0xae, (byte)0x19, (byte)0x9c,
+        (byte)0x75, (byte)0xdb, (byte)0x88, (byte)0xb8, (byte)0x04, (byte)0x8d,
+        (byte)0x54, (byte)0xc6, (byte)0xa4, (byte)0x80, (byte)0xf8, (byte)0x93,
+        (byte)0xf0, (byte)0xdb, (byte)0x19, (byte)0xef, (byte)0xd7, (byte)0x87,
+        (byte)0x8a, (byte)0x8f, (byte)0x5a, (byte)0x09, (byte)0x2e, (byte)0x54,
+        (byte)0xf3, (byte)0x45, (byte)0x24, (byte)0x29
+    };
+
+    private static final byte EXP_P[] = {
+        (byte)0x6a, (byte)0xd1, (byte)0x25, (byte)0x80, (byte)0x18, (byte)0x33,
+        (byte)0x3c, (byte)0x2b, (byte)0x44, (byte)0x19, (byte)0xfe, (byte)0xa5,
+        (byte)0x40, (byte)0x03, (byte)0xc4, (byte)0xfc, (byte)0xb3, (byte)0x9c,
+        (byte)0xef, (byte)0x07, (byte)0x99, (byte)0x58, (byte)0x17, (byte)0xc1,
+        (byte)0x44, (byte)0xa3, (byte)0x15, (byte)0x7d, (byte)0x7b, (byte)0x22,
+        (byte)0x22, (byte)0xdf, (byte)0x03, (byte)0x58, (byte)0x66, (byte)0xf5,
+        (byte)0x24, (byte)0x54, (byte)0x52, (byte)0x91, (byte)0x2d, (byte)0x76,
+        (byte)0xfe, (byte)0x63, (byte)0x64, (byte)0x4e, (byte)0x0f, (byte)0x50,
+        (byte)0x2b, (byte)0x65, (byte)0x79, (byte)0x1f, (byte)0xf1, (byte)0xbf,
+        (byte)0xc7, (byte)0x41, (byte)0x26, (byte)0xcc, (byte)0xc6, (byte)0x1c,
+        (byte)0xa9, (byte)0x83, (byte)0x6f, (byte)0x03
+    };
+
+    private static final byte EXP_Q[] = {
+        (byte)0x12, (byte)0x84, (byte)0x1a, (byte)0x99, (byte)0xce, (byte)0x9a,
+        (byte)0x8b, (byte)0x58, (byte)0xcc, (byte)0x47, (byte)0x43, (byte)0xdf,
+        (byte)0x77, (byte)0xbb, (byte)0xd3, (byte)0x20, (byte)0xae, (byte)0xe4,
+        (byte)0x2e, (byte)0x63, (byte)0x67, (byte)0xdc, (byte)0xf7, (byte)0x5f,
+        (byte)0x3f, (byte)0x83, (byte)0x27, (byte)0xb7, (byte)0x14, (byte)0x52,
+        (byte)0x56, (byte)0xbf, (byte)0xc3, (byte)0x65, (byte)0x06, (byte)0xe1,
+        (byte)0x03, (byte)0xcc, (byte)0x93, (byte)0x57, (byte)0x09, (byte)0x7b,
+        (byte)0x6f, (byte)0xe8, (byte)0x81, (byte)0x4a, (byte)0x2c, (byte)0xb7,
+        (byte)0x43, (byte)0xa9, (byte)0x20, (byte)0x1d, (byte)0xf6, (byte)0x56,
+        (byte)0x8b, (byte)0xcc, (byte)0xe5, (byte)0x4c, (byte)0xd5, (byte)0x4f,
+        (byte)0x74, (byte)0x67, (byte)0x29, (byte)0x51
+    };
+
+    private static final byte CRT_COEFF[] = {
+        (byte)0x23, (byte)0xab, (byte)0xf4, (byte)0x03, (byte)0x2f, (byte)0x29,
+        (byte)0x95, (byte)0x74, (byte)0xac, (byte)0x1a, (byte)0x33, (byte)0x96,
+        (byte)0x62, (byte)0xed, (byte)0xf7, (byte)0xf6, (byte)0xae, (byte)0x07,
+        (byte)0x2a, (byte)0x2e, (byte)0xe8, (byte)0xab, (byte)0xfb, (byte)0x1e,
+        (byte)0xb9, (byte)0xb2, (byte)0x88, (byte)0x1e, (byte)0x85, (byte)0x05,
+        (byte)0x42, (byte)0x64, (byte)0x03, (byte)0xb2, (byte)0x8b, (byte)0xc1,
+        (byte)0x81, (byte)0x75, (byte)0xd7, (byte)0xba, (byte)0xaa, (byte)0xd4,
+        (byte)0x31, (byte)0x3c, (byte)0x8a, (byte)0x96, (byte)0x23, (byte)0x9d,
+        (byte)0x3f, (byte)0x06, (byte)0x3e, (byte)0x44, (byte)0xa9, (byte)0x62,
+        (byte)0x2f, (byte)0x61, (byte)0x5a, (byte)0x51, (byte)0x82, (byte)0x2c,
+        (byte)0x04, (byte)0x85, (byte)0x73, (byte)0xd1
+    };
+
+    private static KeyPair genPredefinedRSAKeyPair() throws Exception {
+        KeyFactory kf = KeyFactory.getInstance("RSA");
+        BigInteger mod = new BigInteger(MOD);
+        BigInteger pub = new BigInteger(PUB_EXP);
+
+        PrivateKey privKey = kf.generatePrivate
+            (new RSAPrivateCrtKeySpec
+             (mod, pub, new BigInteger(PRIV_EXP),
+              new BigInteger(PRIME_P), new BigInteger(PRIME_Q),
+              new BigInteger(EXP_P), new BigInteger(EXP_Q),
+              new BigInteger(CRT_COEFF)));
+        PublicKey pubKey = kf.generatePublic(new RSAPublicKeySpec(mod, pub));
+        return new KeyPair(pubKey, privKey);
+    }
+
+    private static final String CIP_ALGOS[] = {
+        "RSA/ECB/NoPadding",
+        "RSA/ECB/PKCS1Padding"
+    };
+    private static final int INPUT_SIZE_REDUCTION[] = {
+        0,
+        11,
+    };
+
+    private static KeyPair kp[] = null;
+
+    public static void main(String argv[]) throws Exception {
+        main(new TestMalformedRSA(), null);
+    }
+
+    public void doTest(Provider prov) throws Exception {
+        // first test w/ predefine KeyPair
+        KeyPair pkp = genPredefinedRSAKeyPair();
+        System.out.println("Test against Predefined RSA Key Pair");
+        testCipher(pkp, 128, false, prov);
+    }
+
+
+    private static void testCipher(KeyPair kp, int inputSizeInBytes,
+                                   boolean checkInterop, Provider prov)
+        throws Exception {
+        Cipher c1, c2;
+        for (int i = 0; i < CIP_ALGOS.length; i++) {
+            String algo = CIP_ALGOS[i];
+            try {
+                c1 = Cipher.getInstance(algo, prov);
+            } catch (NoSuchAlgorithmException nsae) {
+                System.out.println("Skip unsupported Cipher algo: " + algo);
+                continue;
+            }
+
+            if (checkInterop) {
+                c2 = Cipher.getInstance(algo, "SunJCE");
+            } else {
+                c2 = Cipher.getInstance(algo, prov);
+            }
+            byte[] data = Arrays.copyOf
+                 (PLAINTEXT, inputSizeInBytes - INPUT_SIZE_REDUCTION[i]);
+
+            testEncryption(c1, c2, kp, data);
+        }
+    }
+
+    private static void testEncryption(Cipher c1, Cipher c2,
+            KeyPair kp, byte[] data) throws Exception {
+
+        // C1 Encrypt + C2 Decrypt
+        byte[] out1 = null;
+        byte[] recoveredText = null;
+        try {
+            c1.init(Cipher.ENCRYPT_MODE, kp.getPublic());
+            out1 = c1.doFinal(data);
+
+            // damage the cipher text
+            out1[out1.length - 1] = (byte)(out1[out1.length - 1] ^ 0xFF);
+
+            c2.init(Cipher.DECRYPT_MODE, kp.getPrivate());
+            recoveredText = c2.doFinal(out1);
+
+            // Note that decryption of "RSA/ECB/NoPadding" don't throw
+            // BadPaddingException
+            System.out.println("\t=> PASS: " + c2.getAlgorithm());
+        } catch (BadPaddingException ex) {
+            System.out.println("\tDEC ERROR: " + c2.getAlgorithm());
+            System.out.println("\t=> PASS: expected BadPaddingException");
+            ex.printStackTrace();
+        }
+
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/com/oracle/security/ucrypto/TestRSA.java	Thu Oct 23 13:44:28 2014 -0700
@@ -0,0 +1,422 @@
+/*
+ * Copyright (c) 2014, 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.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug     7088989
+ * @summary Ensure the RSA ciphers and signatures works correctly
+ */
+
+import java.io.*;
+import java.security.*;
+import java.security.spec.*;
+import java.util.*;
+import java.math.*;
+import javax.crypto.*;
+
+public class TestRSA extends UcryptoTest {
+
+    // KAT
+    private static final byte PLAINTEXT[] = Arrays.copyOf
+        (new String("Known plaintext message utilized" +
+                    "for RSA Encryption &  Decryption" +
+                    "block, SHA1, SHA256, SHA384  and" +
+                    "SHA512 RSA Signature KAT tests.").getBytes(), 128);
+
+    private static final byte MOD[] = {
+        (byte)0xd5, (byte)0x84, (byte)0x95, (byte)0x07, (byte)0xf4, (byte)0xd0,
+        (byte)0x1f, (byte)0x82, (byte)0xf3, (byte)0x79, (byte)0xf4, (byte)0x99,
+        (byte)0x48, (byte)0x10, (byte)0xe1, (byte)0x71, (byte)0xa5, (byte)0x62,
+        (byte)0x22, (byte)0xa3, (byte)0x4b, (byte)0x00, (byte)0xe3, (byte)0x5b,
+        (byte)0x3a, (byte)0xcc, (byte)0x10, (byte)0x83, (byte)0xe0, (byte)0xaf,
+        (byte)0x61, (byte)0x13, (byte)0x54, (byte)0x6a, (byte)0xa2, (byte)0x6a,
+        (byte)0x2c, (byte)0x5e, (byte)0xb3, (byte)0xcc, (byte)0xa3, (byte)0x71,
+        (byte)0x9a, (byte)0xb2, (byte)0x3e, (byte)0x78, (byte)0xec, (byte)0xb5,
+        (byte)0x0e, (byte)0x6e, (byte)0x31, (byte)0x3b, (byte)0x77, (byte)0x1f,
+        (byte)0x6e, (byte)0x94, (byte)0x41, (byte)0x60, (byte)0xd5, (byte)0x6e,
+        (byte)0xd9, (byte)0xc6, (byte)0xf9, (byte)0x29, (byte)0xc3, (byte)0x40,
+        (byte)0x36, (byte)0x25, (byte)0xdb, (byte)0xea, (byte)0x0b, (byte)0x07,
+        (byte)0xae, (byte)0x76, (byte)0xfd, (byte)0x99, (byte)0x29, (byte)0xf4,
+        (byte)0x22, (byte)0xc1, (byte)0x1a, (byte)0x8f, (byte)0x05, (byte)0xfe,
+        (byte)0x98, (byte)0x09, (byte)0x07, (byte)0x05, (byte)0xc2, (byte)0x0f,
+        (byte)0x0b, (byte)0x11, (byte)0x83, (byte)0x39, (byte)0xca, (byte)0xc7,
+        (byte)0x43, (byte)0x63, (byte)0xff, (byte)0x33, (byte)0x80, (byte)0xe7,
+        (byte)0xc3, (byte)0x78, (byte)0xae, (byte)0xf1, (byte)0x73, (byte)0x52,
+        (byte)0x98, (byte)0x1d, (byte)0xde, (byte)0x5c, (byte)0x53, (byte)0x6e,
+        (byte)0x01, (byte)0x73, (byte)0x0d, (byte)0x12, (byte)0x7e, (byte)0x77,
+        (byte)0x03, (byte)0xf1, (byte)0xef, (byte)0x1b, (byte)0xc8, (byte)0xa8,
+        (byte)0x0f, (byte)0x97
+    };
+
+    private static final byte PUB_EXP[] = {(byte)0x01, (byte)0x00, (byte)0x01};
+
+    private static final byte PRIV_EXP[] = {
+        (byte)0x85, (byte)0x27, (byte)0x47, (byte)0x61, (byte)0x4c, (byte)0xd4,
+        (byte)0xb5, (byte)0xb2, (byte)0x0e, (byte)0x70, (byte)0x91, (byte)0x8f,
+        (byte)0x3d, (byte)0x97, (byte)0xf9, (byte)0x5f, (byte)0xcc, (byte)0x09,
+        (byte)0x65, (byte)0x1c, (byte)0x7c, (byte)0x5b, (byte)0xb3, (byte)0x6d,
+        (byte)0x63, (byte)0x3f, (byte)0x7b, (byte)0x55, (byte)0x22, (byte)0xbb,
+        (byte)0x7c, (byte)0x48, (byte)0x77, (byte)0xae, (byte)0x80, (byte)0x56,
+        (byte)0xc2, (byte)0x10, (byte)0xd5, (byte)0x03, (byte)0xdb, (byte)0x31,
+        (byte)0xaf, (byte)0x8d, (byte)0x54, (byte)0xd4, (byte)0x48, (byte)0x99,
+        (byte)0xa8, (byte)0xc4, (byte)0x23, (byte)0x43, (byte)0xb8, (byte)0x48,
+        (byte)0x0b, (byte)0xc7, (byte)0xbc, (byte)0xf5, (byte)0xcc, (byte)0x64,
+        (byte)0x72, (byte)0xbf, (byte)0x59, (byte)0x06, (byte)0x04, (byte)0x1c,
+        (byte)0x32, (byte)0xf5, (byte)0x14, (byte)0x2e, (byte)0x6e, (byte)0xe2,
+        (byte)0x0f, (byte)0x5c, (byte)0xde, (byte)0x36, (byte)0x3c, (byte)0x6e,
+        (byte)0x7c, (byte)0x4d, (byte)0xcc, (byte)0xd3, (byte)0x00, (byte)0x6e,
+        (byte)0xe5, (byte)0x45, (byte)0x46, (byte)0xef, (byte)0x4d, (byte)0x25,
+        (byte)0x46, (byte)0x6d, (byte)0x7f, (byte)0xed, (byte)0xbb, (byte)0x4f,
+        (byte)0x4d, (byte)0x9f, (byte)0xda, (byte)0x87, (byte)0x47, (byte)0x8f,
+        (byte)0x74, (byte)0x44, (byte)0xb7, (byte)0xbe, (byte)0x9d, (byte)0xf5,
+        (byte)0xdd, (byte)0xd2, (byte)0x4c, (byte)0xa5, (byte)0xab, (byte)0x74,
+        (byte)0xe5, (byte)0x29, (byte)0xa1, (byte)0xd2, (byte)0x45, (byte)0x3b,
+        (byte)0x33, (byte)0xde, (byte)0xd5, (byte)0xae, (byte)0xf7, (byte)0x03,
+        (byte)0x10, (byte)0x21
+    };
+
+    private static final byte PRIME_P[] = {
+        (byte)0xf9, (byte)0x74, (byte)0x8f, (byte)0x16, (byte)0x02, (byte)0x6b,
+        (byte)0xa0, (byte)0xee, (byte)0x7f, (byte)0x28, (byte)0x97, (byte)0x91,
+        (byte)0xdc, (byte)0xec, (byte)0xc0, (byte)0x7c, (byte)0x49, (byte)0xc2,
+        (byte)0x85, (byte)0x76, (byte)0xee, (byte)0x66, (byte)0x74, (byte)0x2d,
+        (byte)0x1a, (byte)0xb8, (byte)0xf7, (byte)0x2f, (byte)0x11, (byte)0x5b,
+        (byte)0x36, (byte)0xd8, (byte)0x46, (byte)0x33, (byte)0x3b, (byte)0xd8,
+        (byte)0xf3, (byte)0x2d, (byte)0xa1, (byte)0x03, (byte)0x83, (byte)0x2b,
+        (byte)0xec, (byte)0x35, (byte)0x43, (byte)0x32, (byte)0xff, (byte)0xdd,
+        (byte)0x81, (byte)0x7c, (byte)0xfd, (byte)0x65, (byte)0x13, (byte)0x04,
+        (byte)0x7c, (byte)0xfc, (byte)0x03, (byte)0x97, (byte)0xf0, (byte)0xd5,
+        (byte)0x62, (byte)0xdc, (byte)0x0d, (byte)0xbf
+    };
+
+    private static final byte PRIME_Q[] = {
+        (byte)0xdb, (byte)0x1e, (byte)0xa7, (byte)0x3d, (byte)0xe7, (byte)0xfa,
+        (byte)0x8b, (byte)0x04, (byte)0x83, (byte)0x48, (byte)0xf3, (byte)0xa5,
+        (byte)0x31, (byte)0x9d, (byte)0x35, (byte)0x5e, (byte)0x4d, (byte)0x54,
+        (byte)0x77, (byte)0xcc, (byte)0x84, (byte)0x09, (byte)0xf3, (byte)0x11,
+        (byte)0x0d, (byte)0x54, (byte)0xed, (byte)0x85, (byte)0x39, (byte)0xa9,
+        (byte)0xca, (byte)0xa8, (byte)0xea, (byte)0xae, (byte)0x19, (byte)0x9c,
+        (byte)0x75, (byte)0xdb, (byte)0x88, (byte)0xb8, (byte)0x04, (byte)0x8d,
+        (byte)0x54, (byte)0xc6, (byte)0xa4, (byte)0x80, (byte)0xf8, (byte)0x93,
+        (byte)0xf0, (byte)0xdb, (byte)0x19, (byte)0xef, (byte)0xd7, (byte)0x87,
+        (byte)0x8a, (byte)0x8f, (byte)0x5a, (byte)0x09, (byte)0x2e, (byte)0x54,
+        (byte)0xf3, (byte)0x45, (byte)0x24, (byte)0x29
+    };
+
+    private static final byte EXP_P[] = {
+        (byte)0x6a, (byte)0xd1, (byte)0x25, (byte)0x80, (byte)0x18, (byte)0x33,
+        (byte)0x3c, (byte)0x2b, (byte)0x44, (byte)0x19, (byte)0xfe, (byte)0xa5,
+        (byte)0x40, (byte)0x03, (byte)0xc4, (byte)0xfc, (byte)0xb3, (byte)0x9c,
+        (byte)0xef, (byte)0x07, (byte)0x99, (byte)0x58, (byte)0x17, (byte)0xc1,
+        (byte)0x44, (byte)0xa3, (byte)0x15, (byte)0x7d, (byte)0x7b, (byte)0x22,
+        (byte)0x22, (byte)0xdf, (byte)0x03, (byte)0x58, (byte)0x66, (byte)0xf5,
+        (byte)0x24, (byte)0x54, (byte)0x52, (byte)0x91, (byte)0x2d, (byte)0x76,
+        (byte)0xfe, (byte)0x63, (byte)0x64, (byte)0x4e, (byte)0x0f, (byte)0x50,
+        (byte)0x2b, (byte)0x65, (byte)0x79, (byte)0x1f, (byte)0xf1, (byte)0xbf,
+        (byte)0xc7, (byte)0x41, (byte)0x26, (byte)0xcc, (byte)0xc6, (byte)0x1c,
+        (byte)0xa9, (byte)0x83, (byte)0x6f, (byte)0x03
+    };
+
+    private static final byte EXP_Q[] = {
+        (byte)0x12, (byte)0x84, (byte)0x1a, (byte)0x99, (byte)0xce, (byte)0x9a,
+        (byte)0x8b, (byte)0x58, (byte)0xcc, (byte)0x47, (byte)0x43, (byte)0xdf,
+        (byte)0x77, (byte)0xbb, (byte)0xd3, (byte)0x20, (byte)0xae, (byte)0xe4,
+        (byte)0x2e, (byte)0x63, (byte)0x67, (byte)0xdc, (byte)0xf7, (byte)0x5f,
+        (byte)0x3f, (byte)0x83, (byte)0x27, (byte)0xb7, (byte)0x14, (byte)0x52,
+        (byte)0x56, (byte)0xbf, (byte)0xc3, (byte)0x65, (byte)0x06, (byte)0xe1,
+        (byte)0x03, (byte)0xcc, (byte)0x93, (byte)0x57, (byte)0x09, (byte)0x7b,
+        (byte)0x6f, (byte)0xe8, (byte)0x81, (byte)0x4a, (byte)0x2c, (byte)0xb7,
+        (byte)0x43, (byte)0xa9, (byte)0x20, (byte)0x1d, (byte)0xf6, (byte)0x56,
+        (byte)0x8b, (byte)0xcc, (byte)0xe5, (byte)0x4c, (byte)0xd5, (byte)0x4f,
+        (byte)0x74, (byte)0x67, (byte)0x29, (byte)0x51
+    };
+
+    private static final byte CRT_COEFF[] = {
+        (byte)0x23, (byte)0xab, (byte)0xf4, (byte)0x03, (byte)0x2f, (byte)0x29,
+        (byte)0x95, (byte)0x74, (byte)0xac, (byte)0x1a, (byte)0x33, (byte)0x96,
+        (byte)0x62, (byte)0xed, (byte)0xf7, (byte)0xf6, (byte)0xae, (byte)0x07,
+        (byte)0x2a, (byte)0x2e, (byte)0xe8, (byte)0xab, (byte)0xfb, (byte)0x1e,
+        (byte)0xb9, (byte)0xb2, (byte)0x88, (byte)0x1e, (byte)0x85, (byte)0x05,
+        (byte)0x42, (byte)0x64, (byte)0x03, (byte)0xb2, (byte)0x8b, (byte)0xc1,
+        (byte)0x81, (byte)0x75, (byte)0xd7, (byte)0xba, (byte)0xaa, (byte)0xd4,
+        (byte)0x31, (byte)0x3c, (byte)0x8a, (byte)0x96, (byte)0x23, (byte)0x9d,
+        (byte)0x3f, (byte)0x06, (byte)0x3e, (byte)0x44, (byte)0xa9, (byte)0x62,
+        (byte)0x2f, (byte)0x61, (byte)0x5a, (byte)0x51, (byte)0x82, (byte)0x2c,
+        (byte)0x04, (byte)0x85, (byte)0x73, (byte)0xd1
+    };
+
+    private static KeyPair genRSAKey(int keyLength) throws Exception {
+        KeyPairGenerator kpg = KeyPairGenerator.getInstance("RSA");
+        kpg.initialize(keyLength);
+        return kpg.generateKeyPair();
+    }
+
+    private static KeyPair genPredefinedRSAKeyPair() throws Exception {
+        KeyFactory kf = KeyFactory.getInstance("RSA");
+        BigInteger mod = new BigInteger(MOD);
+        BigInteger pub = new BigInteger(PUB_EXP);
+
+        PrivateKey privKey = kf.generatePrivate
+            (new RSAPrivateCrtKeySpec
+             (mod, pub, new BigInteger(PRIV_EXP),
+              new BigInteger(PRIME_P), new BigInteger(PRIME_Q),
+              new BigInteger(EXP_P), new BigInteger(EXP_Q),
+              new BigInteger(CRT_COEFF)));
+        PublicKey pubKey = kf.generatePublic(new RSAPublicKeySpec(mod, pub));
+        return new KeyPair(pubKey, privKey);
+    }
+
+    private static final String CIP_ALGOS[] = {
+        "RSA/ECB/NoPadding",
+        "RSA/ECB/PKCS1Padding"
+    };
+    private static final int INPUT_SIZE_REDUCTION[] = {
+        0,
+        11,
+    };
+    private static final String SIG_ALGOS[] = {
+        "MD5WithRSA",
+        "SHA1WithRSA",
+        "SHA256WithRSA",
+        "SHA384WithRSA",
+        "SHA512WithRSA"
+    };
+
+    private static KeyPair kp[] = null;
+
+    public static void main(String argv[]) throws Exception {
+        main(new TestRSA(), null);
+    }
+
+    public void doTest(Provider prov) throws Exception {
+        // first test w/ predefine KeyPair
+        KeyPair pkp = genPredefinedRSAKeyPair();
+        System.out.println("Test against Predefined RSA Key Pair");
+        testCipher(pkp, 128, true, prov);
+        testSignature(pkp, true, prov);
+
+        for (int i = 0; i < 10; i++) {
+            // then test w/ various key lengths
+            int keyLens[] = { 1024, 2048 };
+            kp = new KeyPair[keyLens.length];
+
+            testCipher(keyLens, false, prov);
+            testSignature(keyLens, false, prov);
+        }
+    }
+
+
+    private static void testCipher(KeyPair kp, int inputSizeInBytes,
+                                   boolean checkInterop, Provider prov)
+        throws Exception {
+        Cipher c1, c2;
+        for (int i = 0; i < CIP_ALGOS.length; i++) {
+            String algo = CIP_ALGOS[i];
+            try {
+                c1 = Cipher.getInstance(algo, prov);
+            } catch (NoSuchAlgorithmException nsae) {
+                System.out.println("Skip unsupported Cipher algo: " + algo);
+                continue;
+            }
+
+            if (checkInterop) {
+                c2 = Cipher.getInstance(algo, "SunJCE");
+            } else {
+                c2 = Cipher.getInstance(algo, prov);
+            }
+            byte[] data = Arrays.copyOf
+                 (PLAINTEXT, inputSizeInBytes - INPUT_SIZE_REDUCTION[i]);
+
+            testEncryption(c1, c2, kp, data);
+        }
+    }
+
+    private static void testCipher(int keyLens[], boolean checkInterop,
+                                   Provider prov)
+        throws Exception {
+        // RSA CipherText will always differ due to the random nonce in padding
+        // so we check whether both
+        // 1) Java Encrypt/C Decrypt
+        // 2) C Encrypt/Java Decrypt
+        // works
+        Cipher c1, c2;
+        for (int i = 0; i < CIP_ALGOS.length; i++) {
+            String algo = CIP_ALGOS[i];
+            try {
+                c1 = Cipher.getInstance(algo, prov);
+            } catch (NoSuchAlgorithmException nsae) {
+                System.out.println("Skip unsupported Cipher algo: " + algo);
+                continue;
+            }
+
+            if (checkInterop) {
+                c2 = Cipher.getInstance(algo, "SunJCE");
+            } else {
+                c2 = Cipher.getInstance(algo, prov);
+            }
+
+            for (int h = 0; h < keyLens.length; h++) {
+                // Defer key pair generation until now when it'll soon be used.
+                if (kp[h] == null) {
+                    kp[h] = genRSAKey(keyLens[h]);
+                }
+                System.out.println("\tTesting Cipher " + algo + " w/ KeySize " + keyLens[h]);
+                byte[] data = Arrays.copyOf
+                    (PLAINTEXT, keyLens[h]/8 - INPUT_SIZE_REDUCTION[i]);
+                testEncryption(c1, c2, kp[h], data);
+            }
+        }
+    }
+
+    private static void testEncryption(Cipher c1, Cipher c2, KeyPair kp, byte[] data)
+        throws Exception {
+        // C1 Encrypt + C2 Decrypt
+        byte[] out1 = null;
+        byte[] recoveredText = null;
+        try {
+            c1.init(Cipher.ENCRYPT_MODE, kp.getPublic());
+            out1 = c1.doFinal(data);
+            c2.init(Cipher.DECRYPT_MODE, kp.getPrivate());
+            recoveredText = c2.doFinal(out1);
+        } catch (Exception ex) {
+            System.out.println("\tDEC ERROR: unexpected exception");
+            ex.printStackTrace();
+            throw ex;
+        }
+        if(!Arrays.equals(recoveredText, data)) {
+            throw new RuntimeException("\tDEC ERROR: different PT bytes!");
+        }
+        // C2 Encrypt + C1 Decrypt
+        byte[] cipherText = null;
+        try {
+            c2.init(Cipher.ENCRYPT_MODE, kp.getPublic());
+            cipherText = c2.doFinal(data);
+            c1.init(Cipher.DECRYPT_MODE, kp.getPrivate());
+            try {
+                out1 = c1.doFinal(cipherText);
+            } catch (Exception ex) {
+                System.out.println("\tENC ERROR: invalid encrypted output");
+                ex.printStackTrace();
+                throw ex;
+            }
+        } catch (Exception ex) {
+            System.out.println("\tENC ERROR: unexpected exception");
+            ex.printStackTrace();
+            throw ex;
+        }
+        if (!Arrays.equals(out1, data)) {
+            throw new RuntimeException("\tENC ERROR: Decrypted result DIFF!");
+        }
+        System.out.println("\t=> PASS");
+    }
+
+    private static void testSignature(KeyPair kp, boolean checkInterop,
+                                      Provider prov) throws Exception {
+        byte[] data = PLAINTEXT;
+        Signature sig1, sig2;
+        for (int i = 0; i < SIG_ALGOS.length; i++) {
+            String algo = SIG_ALGOS[i];
+            try {
+                sig1 = Signature.getInstance(algo, prov);
+            } catch (NoSuchAlgorithmException nsae) {
+                System.out.println("Skip unsupported Signature algo: " + algo);
+                continue;
+            }
+
+            if (checkInterop) {
+                sig2 = Signature.getInstance(algo, "SunRsaSign");
+            } else {
+                sig2 = Signature.getInstance(algo, prov);
+            }
+            testSigning(sig1, sig2, kp, data);
+        }
+    }
+
+    private static void testSignature(int keyLens[], boolean checkInterop,
+                                      Provider prov) throws Exception {
+        byte[] data = PLAINTEXT;
+        Signature sig1, sig2;
+        for (int i = 0; i < SIG_ALGOS.length; i++) {
+            String algo = SIG_ALGOS[i];
+            try {
+                sig1 = Signature.getInstance(algo, prov);
+            } catch (NoSuchAlgorithmException nsae) {
+                System.out.println("Skip unsupported Signature algo: " + algo);
+                continue;
+            }
+
+            if (checkInterop) {
+                sig2 = Signature.getInstance(algo, "SunRsaSign");
+            } else {
+                sig2 = Signature.getInstance(algo, prov);
+            }
+
+            for (int h = 0; h < keyLens.length; h++) {
+                // Defer key pair generation until now when it'll soon be used.
+                if (kp[h] == null) {
+                    kp[h] = genRSAKey(keyLens[h]);
+                }
+                System.out.println("\tTesting Signature " + algo + " w/ KeySize " + keyLens[h]);
+
+                testSigning(sig1, sig2, kp[h], data);
+            }
+        }
+    }
+
+    private static void testSigning(Signature sig1, Signature sig2, KeyPair kp, byte[] data)
+            throws Exception {
+        boolean sameSig = false;
+        byte[] out = null;
+        try {
+            sig1.initSign(kp.getPrivate());
+            sig1.update(data);
+            out = sig1.sign();
+        } catch (Exception ex) {
+            System.out.println("\tSIGN ERROR: unexpected exception!");
+            ex.printStackTrace();
+        }
+
+        sig2.initSign(kp.getPrivate());
+        sig2.update(data);
+        byte[] out2 = sig2.sign();
+        if (!Arrays.equals(out2, out)) {
+            throw new RuntimeException("\tSIGN ERROR: Signature DIFF!");
+        }
+
+        boolean verify = false;
+        try {
+            System.out.println("\tVERIFY1 using native out");
+            sig1.initVerify(kp.getPublic());
+            sig1.update(data);
+            verify = sig1.verify(out);
+            if (!verify) {
+                throw new RuntimeException("VERIFY1 FAIL!");
+            }
+        } catch (Exception ex) {
+            System.out.println("\tVERIFY1 ERROR: unexpected exception!");
+            ex.printStackTrace();
+            throw ex;
+        }
+        System.out.println("\t=> PASS");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/com/oracle/security/ucrypto/UcryptoTest.java	Thu Oct 23 13:44:28 2014 -0700
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2014, 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.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+import java.io.*;
+import java.util.*;
+import java.lang.reflect.*;
+import java.security.*;
+
+// common infrastructure for OracleUcrypto provider tests
+public abstract class UcryptoTest {
+
+    protected static final boolean hasUcrypto;
+    static {
+        hasUcrypto = (Security.getProvider("OracleUcrypto") != null);
+    }
+
+    private static Provider getCustomizedUcrypto(String config) throws Exception {
+        Class clazz = Class.forName("com.oracle.security.ucrypto.OracleUcrypto");
+        Constructor cons = clazz.getConstructor(new Class[] {String.class});
+        Object obj = cons.newInstance(new Object[] {config});
+        return (Provider)obj;
+    }
+
+    public abstract void doTest(Provider p) throws Exception;
+
+    public static void main(UcryptoTest test, String config) throws Exception {
+        Provider prov = null;
+        if (hasUcrypto) {
+            if (config != null) {
+                prov = getCustomizedUcrypto(config);
+            } else {
+                prov = Security.getProvider("OracleUcrypto");
+            }
+        }
+        if (prov == null) {
+            // un-available, skip testing...
+            System.out.println("No OracleUcrypto provider found, skipping test");
+            return;
+        }
+        test.doTest(prov);
+    }
+}
--- a/jdk/test/com/sun/jmx/snmp/SnmpOidHashCode.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,191 +0,0 @@
-/*
- * Copyright (c) 2003, 2008, 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.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @summary Test that SnmpOid hashCode is consistent with equals.
- * @bug     4955105
- * @build   SnmpOidHashCode
- * @run     main SnmpOidHashCode
- */
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-
-public class SnmpOidHashCode {
-    public static final String[] oids = {
-        "1.1.1.1.1.1.1.1.1",
-        "1.1.1.1.1.1.1.1",
-        "1.1.1.1.2.1.1.1.1",
-        "1.1.1.1.1.2.1.1.1",
-        "1.3.2",
-        "2.3.1",
-        "1.2.67."+Integer.MAX_VALUE+"."+Integer.MAX_VALUE+
-        "."+Integer.MAX_VALUE+"."+Integer.MAX_VALUE+"."+Integer.MAX_VALUE+
-        "1",
-        "1.2."+0xFFFFFFFFL+".3."+0xFFFFFFFFL+".4."+0xFFFFFFFFL+
-        ".5."+0xFFFFFFFFL+".6."+0xFFFFFFFFL+".7."+0xFFFFFFFFL+
-        ".8."+0xFFFFFFFFL+".9."+0xFFFFFFFFL+".10."+0xFFFFFFFFL+
-        ".11."+0xFFFFFFFFL+".12."+0xFFFFFFFFL+".13."+0xFFFFFFFFL+
-        ".14."+0xFFFFFFFFL+".15."+0xFFFFFFFFL+".16."+0xFFFFFFFFL+
-        ".17."+0xFFFFFFFFL+".18."+0xFFFFFFFFL+".19."+0xFFFFFFFFL+
-        ".20."+0xFFFFFFFFL+".21."+0xFFFFFFFFL+".22."+0xFFFFFFFFL+
-        ".23."+0xFFFFFFFFL+".24."+0xFFFFFFFFL+".25."+0xFFFFFFFFL+
-        ".26."+0xFFFFFFFFL+".27."+0xFFFFFFFFL+".28."+0xFFFFFFFFL+
-        ".29."+0xFFFFFFFFL+
-        ".30."+0xFFFFFFFFL+".31."+0xFFFFFFFFL+".32."+0xFFFFFFFFL+
-        ".33."+0xFFFFFFFFL+".34."+0xFFFFFFFFL+".35."+0xFFFFFFFFL+
-        ".36."+0xFFFFFFFFL+".37."+0xFFFFFFFFL+".38."+0xFFFFFFFFL+
-        ".39."+0xFFFFFFFFL
-    };
-
-    // We use an SnmpOidBuilder in order to adapt this test case to a
-    // configuration where the SNMP packages are not present in rt.jar.
-    //
-    public static final class SnmpOidBuilder {
-        public static final String SNMP_OID_CLASS_NAME =
-            "com.sun.jmx.snmp.SnmpOid";
-        private static final Class<?> SNMP_OID_CLASS;
-        private static final Constructor<?> SNMP_OID_CTOR;
-        static {
-            Class<?> snmpOidClass;
-            try {
-                snmpOidClass =
-                    Class.forName(SNMP_OID_CLASS_NAME, true, null);
-            } catch (ClassNotFoundException x) {
-                snmpOidClass = null;
-                System.err.println("WARNING: can't load "+SNMP_OID_CLASS_NAME);
-            } catch (NoClassDefFoundError x) {
-                snmpOidClass = null;
-                System.err.println("WARNING: can't load "+SNMP_OID_CLASS_NAME);
-            }
-            SNMP_OID_CLASS = snmpOidClass;
-            if (SNMP_OID_CLASS != null) {
-                try {
-                  SNMP_OID_CTOR = snmpOidClass.getConstructor(String.class);
-                } catch (Exception x) {
-                    throw new ExceptionInInitializerError(x);
-                }
-            } else {
-                SNMP_OID_CTOR = null;
-            }
-        }
-
-        public static boolean isSnmpPresent() {
-            System.out.println(SnmpOidHashCode.class.getName()+
-                    ": Testing for SNMP Packages...");
-            return SNMP_OID_CLASS != null;
-        }
-
-        public static Object newSnmpOid(String oid)
-            throws InstantiationException,
-                   IllegalAccessException,
-                   InvocationTargetException {
-            return SNMP_OID_CTOR.newInstance(oid);
-        }
-
-    }
-
-    private static Object newSnmpOid(String oid) throws Exception {
-        try {
-            return SnmpOidBuilder.newSnmpOid(oid);
-        } catch (InvocationTargetException x) {
-            final Throwable cause = x.getCause();
-            if (cause instanceof Exception) throw (Exception)cause;
-            if (cause instanceof Error) throw (Error)cause;
-            throw x;
-        }
-    }
-
-    public static void main(String args[]) {
-        if (!SnmpOidBuilder.isSnmpPresent()) {
-            System.err.println("WARNING: "+
-                    SnmpOidBuilder.SNMP_OID_CLASS_NAME+" not present.");
-            System.err.println(SnmpOidHashCode.class.getName()+
-                    ": test skipped.");
-            return;
-        }
-        try {
-            int errCount=0;
-            int collisions=0;
-            for (int i=0;i<oids.length;i++) {
-                System.out.println("Testing " + oids[i]);
-                final Object o1 = newSnmpOid(oids[i]);
-                final int startCount=errCount;
-                for (int j=0;j<oids.length;j++) {
-                    final Object o2 = newSnmpOid(oids[j]);
-                    if (o1.equals(o2)) {
-                        if (!(oids[i].equals(oids[j]))) {
-                            System.err.println("OIDs differ but " +
-                                               "equals yields true: " +
-                                               "\n\to1="+oids[i]+
-                                               "\n\to2="+oids[j]);
-                            errCount++;
-                        }
-                        if (o1.hashCode() != o2.hashCode()) {
-                            System.err.println("OIDs are equal but " +
-                                               "hashCode differ:" +
-                                               "\n\thashCode("+o1+")="+
-                                               o1.hashCode()+", "+
-                                               "\n\thashCode("+o2+")="+
-                                               o2.hashCode());
-                            errCount++;
-                        }
-                    } else {
-                        if (oids[i].equals(oids[j])) {
-                            System.err.println("OIDs are equal but " +
-                                               "equals yields false: " +
-                                               "\n\to1="+oids[i]+
-                                               "\n\to2="+oids[j]);
-                            errCount++;
-                        }
-                        if (o1.hashCode() == o2.hashCode()) collisions++;
-                    }
-                }
-                if (errCount == startCount)
-                    System.out.println("*** Test Passed for: " + o1);
-                else
-                    System.out.println("*** Test Failed (" +
-                                       (errCount - startCount) + ") for: "
-                                       + o1);
-            }
-
-            if (errCount == 0) {
-                System.out.println("*** -----------------------------------");
-                System.out.println("*** Test SnmpOidHashCode " +
-                                   "succesfully passed (" + collisions +
-                                   " collisions).");
-                System.out.println("*** -----------------------------------");
-            } else {
-                System.err.println("*** -----------------------------------");
-                System.err.println("*** Test SnmpOidHashCode failed: " +
-                                   errCount + " failures (" + collisions +
-                                   " collisions).");
-                System.err.println("*** -----------------------------------");
-                System.exit(1);
-            }
-        } catch(Exception x) {
-            x.printStackTrace();
-            System.exit(2);
-        }
-    }
-}
--- a/jdk/test/com/sun/jmx/snmp/TimeTicksWrapping.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,241 +0,0 @@
-/*
- * Copyright (c) 2003, 2008, 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.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @summary Test that SnmpTimeTicks wraps around when it is passed a long
- *          value
- * @bug     4955105
- * @build   TimeTicksWrapping
- * @run     main TimeTicksWrapping
- */
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-
-public class TimeTicksWrapping {
-    // We use an SnmpTimeticksBuilder in order to adapt this test case to a
-    // configuration where the SNMP packages are not present in rt.jar.
-    //
-    public static final class SnmpTimeticksBuilder {
-        public static final long   MAX_VALUE = 0x0ffffffffL;
-        public static final String SNMP_TIME_TICKS_CLASS_NAME =
-            "com.sun.jmx.snmp.SnmpTimeticks";
-        private static final Class<?> SNMP_TIME_TICKS_CLASS;
-        private static final Constructor<?> SNMP_long_CTOR;
-        private static final Constructor<?> SNMP_LONG_CTOR;
-        private static final Method SNMP_LONG_VALUE;
-        static {
-            Class<?> snmpTimeTicksClass;
-            try {
-                snmpTimeTicksClass =
-                    Class.forName(SNMP_TIME_TICKS_CLASS_NAME, true, null);
-            } catch (ClassNotFoundException x) {
-                snmpTimeTicksClass = null;
-                System.err.println("WARNING: can't load "+
-                        SNMP_TIME_TICKS_CLASS_NAME);
-            } catch (NoClassDefFoundError x) {
-                snmpTimeTicksClass = null;
-                System.err.println("WARNING: can't load "+
-                        SNMP_TIME_TICKS_CLASS_NAME);
-            }
-            SNMP_TIME_TICKS_CLASS = snmpTimeTicksClass;
-            if (SNMP_TIME_TICKS_CLASS != null) {
-                try {
-                  SNMP_long_CTOR =
-                          SNMP_TIME_TICKS_CLASS.getConstructor(long.class);
-                } catch (Exception x) {
-                    throw new ExceptionInInitializerError(x);
-                }
-            } else {
-                SNMP_long_CTOR = null;
-            }
-            if (SNMP_TIME_TICKS_CLASS != null) {
-                try {
-                  SNMP_LONG_CTOR =
-                          SNMP_TIME_TICKS_CLASS.getConstructor(Long.class);
-                } catch (Exception x) {
-                    throw new ExceptionInInitializerError(x);
-                }
-            } else {
-                SNMP_LONG_CTOR = null;
-            }
-            if (SNMP_TIME_TICKS_CLASS != null) {
-                try {
-                  SNMP_LONG_VALUE =
-                          SNMP_TIME_TICKS_CLASS.getMethod("longValue");
-                } catch (Exception x) {
-                    throw new ExceptionInInitializerError(x);
-                }
-            } else {
-                SNMP_LONG_VALUE = null;
-            }
-
-        }
-
-        private final Object timeticks;
-
-        public SnmpTimeticksBuilder(long ticks) throws Exception {
-            timeticks = newSnmpTimeticks(ticks);
-        }
-        public SnmpTimeticksBuilder(Long ticks) throws Exception {
-            timeticks = newSnmpTimeticks(ticks);
-        }
-        public long longValue() throws Exception {
-            return longValue(timeticks);
-        }
-
-        public static boolean isSnmpPresent() {
-            System.out.println(TimeTicksWrapping.class.getName()+
-                    ": Testing for SNMP Packages...");
-            return SNMP_TIME_TICKS_CLASS != null;
-        }
-
-        private static Object newSnmpTimeticks(long time)
-                throws Exception {
-            try {
-                return SNMP_long_CTOR.newInstance(time);
-            } catch (InvocationTargetException x) {
-                final Throwable cause = x.getCause();
-                if (cause instanceof Exception) throw (Exception) cause;
-                if (cause instanceof Error) throw (Error) cause;
-                throw x;
-            }
-        }
-
-        private static Object newSnmpTimeticks(Long time)
-            throws Exception {
-            try {
-                return SNMP_LONG_CTOR.newInstance(time);
-            } catch (InvocationTargetException x) {
-                final Throwable cause = x.getCause();
-                if (cause instanceof Exception) throw (Exception) cause;
-                if (cause instanceof Error) throw (Error) cause;
-                throw x;
-            }
-        }
-
-        private static long longValue(Object o)
-                throws Exception {
-            try {
-                return ((Long)SNMP_LONG_VALUE.invoke(o)).longValue();
-            } catch (InvocationTargetException x) {
-                final Throwable cause = x.getCause();
-                if (cause instanceof Exception) throw (Exception) cause;
-                if (cause instanceof Error) throw (Error) cause;
-                throw x;
-            }
-        }
-
-    }
-
-    public static final long[] oks = {
-        0L, 1L, (long)Integer.MAX_VALUE, (long)Integer.MAX_VALUE*2,
-        (long)Integer.MAX_VALUE*2+1L, (long)Integer.MAX_VALUE*2+2L,
-        (long)Integer.MAX_VALUE*3,
-        SnmpTimeticksBuilder.MAX_VALUE, SnmpTimeticksBuilder.MAX_VALUE+1L,
-        SnmpTimeticksBuilder.MAX_VALUE*3-1L, Long.MAX_VALUE
-    };
-
-    public static final long[] kos = {
-        -1L, (long)Integer.MIN_VALUE, (long)Integer.MIN_VALUE*2,
-        (long)Integer.MIN_VALUE*2-1L, (long)Integer.MIN_VALUE*3,
-        -SnmpTimeticksBuilder.MAX_VALUE, -(SnmpTimeticksBuilder.MAX_VALUE+1L),
-        -(SnmpTimeticksBuilder.MAX_VALUE*3-1L), Long.MIN_VALUE
-    };
-
-
-    public static void main(String args[]) {
-        if (!SnmpTimeticksBuilder.isSnmpPresent()) {
-            System.err.println("WARNING: "+
-                    SnmpTimeticksBuilder.SNMP_TIME_TICKS_CLASS_NAME+
-                    " not present.");
-            System.err.println(TimeTicksWrapping.class.getName()+
-                    ": test skipped.");
-            return;
-        }
-        try {
-            SnmpTimeticksBuilder t = null;
-
-            for (int i=0;i<oks.length;i++) {
-                final long t1,t2,t3;
-                t1 = (new SnmpTimeticksBuilder(oks[i])).longValue();
-                t2 = (new SnmpTimeticksBuilder(new Long(oks[i]))).longValue();
-                t3 = oks[i]%0x0100000000L;
-                if (t1 != t3)
-                    throw new Exception("Value should have wrapped: " +
-                                        oks[i] + " expected: " + t3);
-                if (t2 != t3)
-                    throw new Exception("Value should have wrapped: " +
-                                        "Long("+oks[i]+") expected: " + t3);
-
-                if (t1 > SnmpTimeticksBuilder.MAX_VALUE)
-                    throw new Exception("Value should have wrapped " +
-                                        "for " + oks[i] + ": " +
-                                        t1 + " exceeds max: " +
-                                        SnmpTimeticksBuilder.MAX_VALUE);
-                if (t2 > SnmpTimeticksBuilder.MAX_VALUE)
-                    throw new Exception("Value should have wrapped " +
-                                        "for " + oks[i] + ": " +
-                                        t2 + " exceeds max: " +
-                                        SnmpTimeticksBuilder.MAX_VALUE);
-
-                if (t1 < 0)
-                    throw new Exception("Value should have wrapped: " +
-                                        "for " + oks[i] + ": " +
-                                        t1 + " is negative");
-                if (t2 < 0)
-                    throw new Exception("Value should have wrapped: " +
-                                        "for " + oks[i] + ": " +
-                                        t2 + " is negative");
-
-                System.out.println("TimeTicks[" + oks[i] +
-                                   "] rightfully accepted: " + t3);
-            }
-
-            for (int i=0;i<kos.length;i++) {
-                try {
-                    t = new SnmpTimeticksBuilder(kos[i]);
-                    throw new Exception("Value should have been rejected: " +
-                                        kos[i]);
-                } catch (IllegalArgumentException x) {
-                    // OK!
-                }
-                try {
-                    t = new SnmpTimeticksBuilder(new Long(kos[i]));
-                    throw new Exception("Value should have been rejected: " +
-                                        "Long("+kos[i]+")");
-                } catch (IllegalArgumentException x) {
-                    // OK!
-                }
-
-                System.out.println("TimeTicks[" + kos[i] +
-                                   "] rightfully rejected.");
-            }
-
-        } catch(Exception x) {
-            x.printStackTrace();
-            System.exit(1);
-        }
-    }
-}
--- a/jdk/test/com/sun/tools/attach/StartManagementAgent.java	Thu Oct 23 11:19:25 2014 -0700
+++ b/jdk/test/com/sun/tools/attach/StartManagementAgent.java	Thu Oct 23 13:44:28 2014 -0700
@@ -100,6 +100,7 @@
             ex.printStackTrace(System.err);
         } catch (Throwable t) {
             t.printStackTrace(System.err);
+            throw t;
         }
     }
 
@@ -124,6 +125,7 @@
                 try {
                     System.err.println("Trying remote agent. Try #" + i);
                     testRemoteAgent(vm);
+                    System.err.println("Successfully connected to remote agent");
                     success = true;
                 } catch(Exception ex) {
                     System.err.println("testRemoteAgent failed with exception:");
@@ -136,7 +138,9 @@
                 throw new Exception("testRemoteAgent failed after " + MAX_RETRIES + " tries");
             }
         } finally {
+            System.err.println("Detaching from VM ...");
             vm.detach();
+            System.err.println("Detached");
         }
     }
 
@@ -176,7 +180,10 @@
         mgmtProps.put("com.sun.management.jmxremote.port", port);
         mgmtProps.put("com.sun.management.jmxremote.authenticate", "false");
         mgmtProps.put("com.sun.management.jmxremote.ssl", "false");
+
+        System.err.println("Starting management agent ...");
         vm.startManagementAgent(mgmtProps);
+        System.err.println("Started");
 
         // try to connect - should work
         tryConnect(port, true);
@@ -184,9 +191,12 @@
         // try to start again - should fail
         boolean exception = false;
         try {
+            System.err.println("Starting management agent second time ...");
             vm.startManagementAgent(mgmtProps);
+            System.err.println("Started");
         } catch(AttachOperationFailedException ex) {
             // expected
+            System.err.println("Got expected exception: " + ex.getMessage());
             exception = true;
         }
         if (!exception) {
@@ -204,10 +214,14 @@
 
         boolean succeeded;
         try {
+            System.err.println("Trying to connect to " + jmxUrlStr);
             JMXConnector c = JMXConnectorFactory.connect(url, env);
+            System.err.println("Connected, getting MBeanServerConnection");
             c.getMBeanServerConnection();
+            System.err.println("Success");
             succeeded = true;
         } catch(Exception ex) {
+            ex.printStackTrace(System.err);
             succeeded = false;
         }
         if (succeeded && !shouldSucceed) {
--- a/jdk/test/com/sun/tools/extcheck/TestExtcheckArgs.java	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,92 +0,0 @@
-/*
- * Copyright (c) 2008, 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.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
- * @test
- * @bug 6356642
- * @summary Verify that extcheck exits appropriately when invalid args are given.
- * @run shell TestExtcheckArgs.sh
- * @author Dave Bristor
- */
-
-import java.io.File;
-import com.sun.tools.extcheck.Main;
-
-/*
- * Test extcheck by using Runtime.exec instead of invoking
- * com.sun.tools.extcheck.Main.main, since the latter does its own
- * System.exit under the conditions checked here.
- */
-public class TestExtcheckArgs {
-    public static void realMain(String[] args) throws Throwable {
-        String testJar = System.getenv("TESTJAVA") + File.separator
-            + "lib" + File.separator + "jconsole.jar";
-
-        verify(new String[] {
-               }, Main.INSUFFICIENT);
-        verify(new String[] {
-                   "-verbose"
-               }, Main.MISSING);
-        verify(new String[] {
-                   "-verbose",
-                   "foo"
-               }, Main.DOES_NOT_EXIST);
-        verify(new String[] {
-                   testJar,
-                   "bar"
-               }, Main.EXTRA);
-        verify(new String[] {
-                   "-verbose",
-                   testJar,
-                   "bar"
-               }, Main.EXTRA);
-    }
-
-    static void verify(String[] args, String expected) throws Throwable {
-        try {
-            Main.realMain(args);
-            fail();
-        } catch (Exception ex) {
-            if (ex.getMessage().startsWith(expected)) {
-                pass();
-            } else {
-                fail("Unexpected message: " + ex.getMessage());
-            }
-        }
-    }
-
-    //--------------------- Infrastructure ---------------------------
-    static volatile int passed = 0, failed = 0;
-    static boolean pass() {passed++; return true;}
-    static boolean fail() {failed++; Thread.dumpStack(); return false;}
-    static boolean fail(String msg) {System.out.println(msg); return fail();}
-    static void unexpected(Throwable t) {failed++; t.printStackTrace();}
-    static boolean check(boolean cond) {if (cond) pass(); else fail(); return cond;}
-    static boolean equal(Object x, Object y) {
-        if (x == null ? y == null : x.equals(y)) return pass();
-        else return fail(x + " not equal to " + y);}
-    public static void main(String[] args) throws Throwable {
-        try {realMain(args);} catch (Throwable t) {unexpected(t);}
-        System.out.println("\nPassed = " + passed + " failed = " + failed);
-        if (failed > 0) throw new AssertionError("Some tests failed");}
-}
--- a/jdk/test/com/sun/tools/extcheck/TestExtcheckArgs.sh	Thu Oct 23 11:19:25 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-#! /bin/sh
-
-#
-# Copyright (c) 2008, 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.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-if [ "x$TESTJAVA" = x ]; then
-  TESTJAVA=$1; shift
-  TESTCLASSES=.
-  TESTSRC=.
-fi
-export TESTJAVA
-
-case "`uname`" in Windows*|CYGWIN* ) PS=';';; *) PS=':';; esac
-
-${TESTJAVA}/bin/javac -d ${TESTCLASSES} -classpath ${TESTJAVA}/lib/tools.jar${PS}${TESTCLASSES} ${TESTSRC}/TestExtcheckArgs.java
-rc=$?
-if [ $rc != 0 ]; then
-    echo Compilation failure with exit status $rc
-    exit $rc
-fi
-
-${TESTJAVA}/bin/java ${TESTVMOPTS} -classpath ${TESTJAVA}/lib/tools.jar${PS}${TESTCLASSES} TestExtcheckArgs
-rc=$?
-if [ $rc != 0 ]; then
-    echo Execution failure with exit status $rc
-    exit $rc
-fi
--- a/jdk/test/java/lang/instrument/DaemonThread/TestDaemonThreadLauncher.java	Thu Oct 23 11:19:25 2014 -0700
+++ b/jdk/test/java/lang/instrument/DaemonThread/TestDaemonThreadLauncher.java	Thu Oct 23 13:44:28 2014 -0700
@@ -23,21 +23,14 @@
  */
 
 
-import jdk.testlibrary.JDKToolLauncher;
 import jdk.testlibrary.OutputAnalyzer;
 import jdk.testlibrary.ProcessTools;
 
-import java.io.IOException;
-import java.nio.file.Path;
-
 public class TestDaemonThreadLauncher {
-
-    private static ProcessBuilder processBuilder = new ProcessBuilder();
-
     public static void main(String args[]) throws Exception {
         for(int i=0; i<50; i++) {
             ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-javaagent:DummyAgent.jar", "TestDaemonThread", ".");
-            OutputAnalyzer analyzer = new OutputAnalyzer(pb.start());
+            OutputAnalyzer analyzer = ProcessTools.executeProcess(pb);
             analyzer.shouldNotContain("ASSERTION FAILED");
         }
     }
--- a/jdk/test/java/lang/instrument/PremainClass/NoPremainAgentTest.java	Thu Oct 23 11:19:25 2014 -0700
+++ b/jdk/test/java/lang/instrument/PremainClass/NoPremainAgentTest.java	Thu Oct 23 13:44:28 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2014, 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
@@ -46,7 +46,7 @@
                 Utils.addTestJavaOpts(testArgs.split("\\s+")));
         System.out.println("testjvm.cmd:" + Utils.getCommandLine(pb));
 
-        OutputAnalyzer output = new OutputAnalyzer(pb.start());
+        OutputAnalyzer output = ProcessTools.executeProcess(pb);
         System.out.println("testjvm.stdout:" + output.getStdout());
         System.out.println("testjvm.stderr:" + output.getStderr());
 
--- a/jdk/test/java/lang/instrument/PremainClass/PremainClassTest.java	Thu Oct 23 11:19:25 2014 -0700
+++ b/jdk/test/java/lang/instrument/PremainClass/PremainClassTest.java	Thu Oct 23 13:44:28 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2014, 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
@@ -47,7 +47,7 @@
                 Utils.addTestJavaOpts(testArgs.split("\\s+")));
         System.out.println("testjvm.cmd:" + Utils.getCommandLine(pb));
 
-        OutputAnalyzer output = new OutputAnalyzer(pb.start());
+        OutputAnalyzer output = ProcessTools.executeProcess(pb);
         System.out.println("testjvm.stdout:" + output.getStdout());
         System.out.println("testjvm.stderr:" + output.getStderr());
 
--- a/jdk/test/java/lang/instrument/PremainClass/ZeroArgPremainAgentTest.java	Thu Oct 23 11:19:25 2014 -0700
+++ b/jdk/test/java/lang/instrument/PremainClass/ZeroArgPremainAgentTest.java	Thu Oct 23 13:44:28 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2014, 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
@@ -46,7 +46,7 @@
                 Utils.addTestJavaOpts(testArgs.split("\\s+")));
         System.out.println("testjvm.cmd:" + Utils.getCommandLine(pb));
 
-        OutputAnalyzer output = new OutputAnalyzer(pb.start());
+        OutputAnalyzer output = ProcessTools.executeProcess(pb);
         System.out.println("testjvm.stdout:" + output.getStdout());
         System.out.println("testjvm.stderr:" + output.getStderr());
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/net/ResponseCache/Test2.java	Thu Oct 23 13:44:28 2014 -0700
@@ -0,0 +1,135 @@
+/*
+ * Copyright (c) 2014, 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.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * @test
+ * @bug 8042622
+ * @summary Check for CRL results in IllegalArgumentException "white space not allowed"
+ * @run main/othervm Test2
+ */
+
+import com.sun.net.httpserver.*;
+
+import java.util.*;
+import java.util.concurrent.*;
+import java.io.*;
+import java.net.*;
+import java.security.*;
+import javax.security.auth.callback.*;
+import javax.net.ssl.*;
+
+public class Test2 {
+
+    static volatile boolean failed = false;
+
+    static class Cache extends ResponseCache {
+        public CacheResponse get(URI uri, String method, Map<String,List<String>> headers) {
+            Set<String> keys = headers.keySet();
+            for (String key : keys) {
+                if (key.indexOf(' ') != -1 || key.indexOf('\t') != -1
+                        || key.indexOf(':') != -1)
+                {
+                    failed = true;
+                }
+            }
+            return null;
+        }
+
+        public CacheRequest put(URI uri, URLConnection c) throws IOException {
+            return null;
+        }
+    }
+
+    static int port;
+
+    static String urlstring, redirstring;
+
+    public static void main (String[] args) throws Exception {
+        Handler handler = new Handler();
+        InetSocketAddress addr = new InetSocketAddress (0);
+        HttpServer server = HttpServer.create (addr, 0);
+        port = server.getAddress().getPort();
+        HttpContext ctx = server.createContext ("/test", handler);
+        System.out.println ("Server: " + server.getAddress().getPort());
+        ResponseCache.setDefault(new Cache());
+
+        ExecutorService executor = Executors.newCachedThreadPool();
+        server.setExecutor (executor);
+        server.start ();
+
+        urlstring = "http://127.0.0.1:" + Integer.toString(port)+"/test/foo";
+        redirstring = urlstring + "/redirect/bar";
+
+        URL url = new URL (urlstring);
+        HttpURLConnection urlc = (HttpURLConnection)url.openConnection();
+        urlc.addRequestProperty("X-Foo", "bar");
+        urlc.setInstanceFollowRedirects(true);
+        System.out.println(urlc.getResponseCode());
+        InputStream i = urlc.getInputStream();
+        int count=0;
+        for (int c=i.read(); c!=-1; c=i.read()) {
+            //System.out.write(c);
+            count++;
+        }
+        System.out.println("Read " + count);
+        System.out.println("FINISHED");
+        server.stop(0);
+        executor.shutdownNow();
+        if (failed) {
+            throw new RuntimeException("Test failed");
+        }
+    }
+
+    public static boolean error = false;
+    public static int count = 0;
+
+    static class Handler implements HttpHandler {
+        int invocation = 0;
+        public void handle (HttpExchange t)
+            throws IOException
+        {
+            InputStream is = t.getRequestBody();
+            Headers map = t.getRequestHeaders();
+            Headers rmap = t.getResponseHeaders();
+            invocation ++;
+            if (invocation == 1) {
+                rmap.add("Location", redirstring);
+                while (is.read () != -1) ;
+                is.close();
+                System.out.println ("sending response");
+                t.sendResponseHeaders (301, 0);
+            } else {
+                byte[] buf = "Hello world".getBytes();
+                t.sendResponseHeaders (200, buf.length);
+                OutputStream os = t.getResponseBody();
+                try {
+                        os.write(buf);
+                } catch (IOException e) {
+                        System.out.println ("EX 1 " + e);
+                }
+            }
+            System.out.println ("Closing");
+            t.close();
+        }
+    }
+}
--- a/jdk/test/java/nio/channels/AsynchronousSocketChannel/StressLoopback.java	Thu Oct 23 11:19:25 2014 -0700
+++ b/jdk/test/java/nio/channels/AsynchronousSocketChannel/StressLoopback.java	Thu Oct 23 13:44:28 2014 -0700
@@ -24,6 +24,8 @@
 /* @test
  * @bug 6834246 6842687
  * @summary Stress test connections through the loopback interface
+ * @run main StressLoopback
+ * @run main/othervm -Djdk.net.useFastTcpLoopback StressLoopback
  */
 
 import java.nio.ByteBuffer;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/util/logging/FileHandlerLongLimit.java	Thu Oct 23 13:44:28 2014 -0700
@@ -0,0 +1,504 @@
+/*
+ * Copyright (c) 2014, 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.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.FilePermission;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.lang.reflect.Field;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.security.CodeSource;
+import java.security.Permission;
+import java.security.PermissionCollection;
+import java.security.Permissions;
+import java.security.Policy;
+import java.security.ProtectionDomain;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.List;
+import java.util.Properties;
+import java.util.UUID;
+import java.util.concurrent.Callable;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.logging.FileHandler;
+import java.util.logging.Level;
+import java.util.logging.LogManager;
+import java.util.logging.LogRecord;
+import java.util.logging.LoggingPermission;
+
+/**
+ * @test
+ * @bug 8059767
+ * @summary tests that FileHandler can accept a long limit.
+ * @run main/othervm FileHandlerLongLimit UNSECURE
+ * @run main/othervm FileHandlerLongLimit SECURE
+ * @author danielfuchs
+ */
+public class FileHandlerLongLimit {
+
+    /**
+     * We will test handling of limit and overflow of MeteredStream.written in
+     * two configurations.
+     * UNSECURE: No security manager.
+     * SECURE: With the security manager present - and the required
+     *         permissions granted.
+     */
+    public static enum TestCase {
+        UNSECURE, SECURE;
+        public void run(Properties propertyFile) throws Exception {
+            System.out.println("Running test case: " + name());
+            Configure.setUp(this, propertyFile);
+            test(this.name() + " " + propertyFile.getProperty("test.name"), propertyFile,
+                    Long.parseLong(propertyFile.getProperty(FileHandler.class.getName()+".limit")));
+        }
+    }
+
+
+    private static final String PREFIX =
+            "FileHandler-" + UUID.randomUUID() + ".log";
+    private static final String userDir = System.getProperty("user.dir", ".");
+    private static final boolean userDirWritable = Files.isWritable(Paths.get(userDir));
+    private static final Field limitField;
+    private static final Field meterField;
+    private static final Field writtenField;
+    private static final Field outField;
+
+    private static final List<Properties> properties;
+    static {
+        Properties props1 = new Properties();
+        Properties props2 = new Properties();
+        Properties props3 = new Properties();
+        props1.setProperty("test.name", "with limit=Integer.MAX_VALUE");
+        props1.setProperty(FileHandler.class.getName() + ".pattern", PREFIX);
+        props1.setProperty(FileHandler.class.getName() + ".limit", String.valueOf(Integer.MAX_VALUE));
+        props2.setProperty("test.name", "with limit=Integer.MAX_VALUE*4");
+        props2.setProperty(FileHandler.class.getName() + ".pattern", PREFIX);
+        props2.setProperty(FileHandler.class.getName() + ".limit", String.valueOf(((long)Integer.MAX_VALUE)*4));
+        props3.setProperty("test.name", "with limit=Long.MAX_VALUE - 1024");
+        props3.setProperty(FileHandler.class.getName() + ".pattern", PREFIX);
+        props3.setProperty(FileHandler.class.getName() + ".limit", String.valueOf(Long.MAX_VALUE - 1024));
+        properties = Collections.unmodifiableList(Arrays.asList(
+                    props1,
+                    props2,
+                    props3));
+        try {
+            Class<?> metteredStreamClass = Class.forName(FileHandler.class.getName()+"$MeteredStream");
+            limitField = FileHandler.class.getDeclaredField("limit");
+            limitField.setAccessible(true);
+            meterField = FileHandler.class.getDeclaredField("meter");
+            meterField.setAccessible(true);
+            writtenField = metteredStreamClass.getDeclaredField("written");
+            writtenField.setAccessible(true);
+            outField = metteredStreamClass.getDeclaredField("out");
+            outField.setAccessible(true);
+
+        } catch (NoSuchFieldException | ClassNotFoundException x) {
+            throw new ExceptionInInitializerError(x);
+         }
+    }
+
+    private static class TestOutputStream extends OutputStream {
+        final OutputStream delegate;
+        TestOutputStream(OutputStream delegate) {
+            this.delegate = delegate;
+        }
+        @Override
+        public void write(int b) throws IOException {
+            // do nothing - we only pretend to write something...
+        }
+        @Override
+        public void close() throws IOException {
+            delegate.close();
+        }
+
+        @Override
+        public void flush() throws IOException {
+            delegate.flush();
+        }
+
+    }
+
+    public static void main(String... args) throws Exception {
+
+
+        if (args == null || args.length == 0) {
+            args = new String[] {
+                TestCase.UNSECURE.name(),
+                TestCase.SECURE.name(),
+            };
+        }
+
+        try {
+            for (String testName : args) {
+                for (Properties propertyFile : properties) {
+                    TestCase test = TestCase.valueOf(testName);
+                    test.run(propertyFile);
+                }
+            }
+        } finally {
+            if (userDirWritable) {
+                Configure.doPrivileged(() -> {
+                    // cleanup - delete files that have been created
+                    try {
+                        Files.list(Paths.get(userDir))
+                            .filter((f) -> f.toString().contains(PREFIX))
+                            .forEach((f) -> {
+                                try {
+                                    System.out.println("deleting " + f);
+                                    Files.delete(f);
+                                } catch(Throwable t) {
+                                    System.err.println("Failed to delete " + f + ": " + t);
+                                }
+                            });
+                    } catch(Throwable t) {
+                        System.err.println("Cleanup failed to list files: " + t);
+                        t.printStackTrace();
+                    }
+                });
+            }
+        }
+    }
+
+    static class Configure {
+        static Policy policy = null;
+        static final AtomicBoolean allowAll = new AtomicBoolean(false);
+        static void setUp(TestCase test, Properties propertyFile) {
+            switch (test) {
+                case SECURE:
+                    if (policy == null && System.getSecurityManager() != null) {
+                        throw new IllegalStateException("SecurityManager already set");
+                    } else if (policy == null) {
+                        policy = new SimplePolicy(TestCase.SECURE, allowAll);
+                        Policy.setPolicy(policy);
+                        System.setSecurityManager(new SecurityManager());
+                    }
+                    if (System.getSecurityManager() == null) {
+                        throw new IllegalStateException("No SecurityManager.");
+                    }
+                    if (policy == null) {
+                        throw new IllegalStateException("policy not configured");
+                    }
+                    break;
+                case UNSECURE:
+                    if (System.getSecurityManager() != null) {
+                        throw new IllegalStateException("SecurityManager already set");
+                    }
+                    break;
+                default:
+                    new InternalError("No such testcase: " + test);
+            }
+            doPrivileged(() -> {
+                try {
+                    ByteArrayOutputStream bytes = new ByteArrayOutputStream();
+                    propertyFile.store(bytes, propertyFile.getProperty("test.name"));
+                    ByteArrayInputStream bais = new ByteArrayInputStream(bytes.toByteArray());
+                    LogManager.getLogManager().readConfiguration(bais);
+                } catch (IOException ex) {
+                    throw new RuntimeException(ex);
+                }
+            });
+        }
+        static void doPrivileged(Runnable run) {
+            allowAll.set(true);
+            try {
+                run.run();
+            } finally {
+                allowAll.set(false);
+            }
+        }
+        static <T> T callPrivileged(Callable<T> call) throws Exception {
+            allowAll.set(true);
+            try {
+                return call.call();
+            } finally {
+                allowAll.set(false);
+            }
+        }
+    }
+
+    @FunctionalInterface
+    public static interface FileHandlerSupplier {
+        public FileHandler test() throws Exception;
+    }
+
+    private static void checkException(Class<? extends Exception> type, FileHandlerSupplier test) {
+        Throwable t = null;
+        FileHandler f = null;
+        try {
+            f = test.test();
+        } catch (Throwable x) {
+            t = x;
+        }
+        try {
+            if (type != null && t == null) {
+                throw new RuntimeException("Expected " + type.getName() + " not thrown");
+            } else if (type != null && t != null) {
+                if (type.isInstance(t)) {
+                    System.out.println("Recieved expected exception: " + t);
+                } else {
+                    throw new RuntimeException("Exception type mismatch: "
+                        + type.getName() + " expected, "
+                        + t.getClass().getName() + " received.", t);
+                }
+            } else if (t != null) {
+                throw new RuntimeException("Unexpected exception received: " + t, t);
+            }
+        } finally {
+            if (f != null) {
+                // f should always be null when an exception is expected,
+                // but in case the test doesn't behave as expected we will
+                // want to close f.
+                try { f.close(); } catch (Throwable x) {};
+            }
+        }
+    }
+
+    static final class TestAssertException extends RuntimeException {
+        TestAssertException(String msg) {
+            super(msg);
+        }
+    }
+
+    private static void assertEquals(long expected, long received, String msg) {
+        if (expected != received) {
+            throw new TestAssertException("Unexpected result for " + msg
+                    + ".\n\texpected: " + expected
+                    +  "\n\tactual:   " + received);
+        } else {
+            System.out.println("Got expected " + msg + ": " + received);
+        }
+    }
+
+    private static long getLimit(FileHandler handler) throws Exception {
+        return Configure.callPrivileged((Callable<Long>)() -> {
+            return limitField.getLong(handler);
+        });
+    }
+    private static OutputStream getMeteredOutput(FileHandler handler) throws Exception {
+        return Configure.callPrivileged((Callable<OutputStream>)() -> {
+            final OutputStream metered = OutputStream.class.cast(meterField.get(handler));
+            return metered;
+        });
+    }
+    private static TestOutputStream setTestOutputStream(OutputStream metered) throws Exception {
+        return Configure.callPrivileged((Callable<TestOutputStream>)() -> {
+            outField.set(metered, new TestOutputStream(OutputStream.class.cast(outField.get(metered))));
+            return TestOutputStream.class.cast(outField.get(metered));
+        });
+    }
+    private static long getWritten(OutputStream metered) throws Exception {
+        return Configure.callPrivileged((Callable<Long>)() -> {
+            return writtenField.getLong(metered);
+        });
+    }
+
+    private static long setWritten(OutputStream metered, long newValue) throws Exception {
+        return Configure.callPrivileged((Callable<Long>)() -> {
+            writtenField.setLong(metered, newValue);
+            return writtenField.getLong(metered);
+        });
+    }
+
+    public static FileHandler testFileHandlerLimit(FileHandlerSupplier supplier,
+            long limit) throws Exception {
+        Configure.doPrivileged(() -> {
+            try {
+                Files.deleteIfExists(Paths.get(PREFIX));
+            } catch (IOException x) {
+                throw new RuntimeException(x);
+            }
+        });
+        final FileHandler fh = supplier.test();
+        try {
+            // verify we have the expected limit
+            assertEquals(limit, getLimit(fh), "limit");
+
+            // get the metered output stream
+            OutputStream metered = getMeteredOutput(fh);
+
+            // we don't want to actually write to the file, so let's
+            // redirect the metered to our own TestOutputStream.
+            setTestOutputStream(metered);
+
+            // check that fh.meter.written is 0
+            assertEquals(0, getWritten(metered), "written");
+
+            // now we're going to publish a series of log records
+            String msg = "this is at least 10 chars long";
+            fh.publish(new LogRecord(Level.SEVERE, msg));
+            fh.flush();
+            long w = getWritten(metered);
+            long offset = getWritten(metered);
+            System.out.println("first offset is:  " + offset);
+
+            fh.publish(new LogRecord(Level.SEVERE, msg));
+            fh.flush();
+            offset = getWritten(metered) - w;
+            w = getWritten(metered);
+            System.out.println("second offset is: " + offset);
+
+            fh.publish(new LogRecord(Level.SEVERE, msg));
+            fh.flush();
+            offset = getWritten(metered) - w;
+            w = getWritten(metered);
+            System.out.println("third offset is:  " + offset);
+
+            fh.publish(new LogRecord(Level.SEVERE, msg));
+            fh.flush();
+            offset = getWritten(metered) - w;
+            System.out.println("fourth offset is: " + offset);
+
+            // Now set fh.meter.written to something close to the limit,
+            // so that we can trigger log file rotation.
+            assertEquals(limit-2*offset+10, setWritten(metered, limit-2*offset+10), "written");
+            w = getWritten(metered);
+
+            // publish one more log record. we should still be just beneath
+            // the limit
+            fh.publish(new LogRecord(Level.SEVERE, msg));
+            fh.flush();
+            assertEquals(w+offset, getWritten(metered), "written");
+
+            // check that fh still has the same MeteredStream - indicating
+            // that the file hasn't rotated.
+            if (getMeteredOutput(fh) != metered) {
+                throw new RuntimeException("Log should not have rotated");
+            }
+
+            // Now publish two log record. The spec is a bit vague about when
+            // exactly the log will be rotated - it could happen just after
+            // writing the first log record or just before writing the next
+            // one. We publich two - so we're sure that the log must have
+            // rotated.
+            fh.publish(new LogRecord(Level.SEVERE, msg));
+            fh.flush();
+            fh.publish(new LogRecord(Level.SEVERE, msg));
+            fh.flush();
+
+            // Check that fh.meter is a different instance of MeteredStream.
+            if (getMeteredOutput(fh) == metered) {
+                throw new RuntimeException("Log should have rotated");
+            }
+            // success!
+            return fh;
+        } catch (Error | Exception x) {
+            // if we get an exception we need to close fh.
+            // if we don't get an exception, fh will be closed by the caller.
+            // (and that's why we dont use try-with-resources/finally here).
+            try { fh.close(); } catch(Throwable t) {t.printStackTrace();}
+            throw x;
+        }
+    }
+
+    public static void test(String name, Properties props, long limit) throws Exception {
+        System.out.println("Testing: " + name);
+        Class<? extends Exception> expectedException = null;
+
+        if (userDirWritable || expectedException != null) {
+            // These calls will create files in user.dir.
+            // The file name contain a random UUID (PREFIX) which identifies them
+            // and allow us to remove them cleanly at the end (see finally block
+            // in main()).
+            checkException(expectedException, () -> new FileHandler());
+            checkException(expectedException, () -> {
+                final FileHandler fh = new FileHandler();
+                assertEquals(limit, getLimit(fh), "limit");
+                return fh;
+            });
+            checkException(expectedException, () -> testFileHandlerLimit(
+                    () -> new FileHandler(),
+                    limit));
+            checkException(expectedException, () -> testFileHandlerLimit(
+                    () -> new FileHandler(PREFIX, Long.MAX_VALUE, 1, true),
+                    Long.MAX_VALUE));
+        }
+    }
+
+
+    final static class PermissionsBuilder {
+        final Permissions perms;
+        public PermissionsBuilder() {
+            this(new Permissions());
+        }
+        public PermissionsBuilder(Permissions perms) {
+            this.perms = perms;
+        }
+        public PermissionsBuilder add(Permission p) {
+            perms.add(p);
+            return this;
+        }
+        public PermissionsBuilder addAll(PermissionCollection col) {
+            if (col != null) {
+                for (Enumeration<Permission> e = col.elements(); e.hasMoreElements(); ) {
+                    perms.add(e.nextElement());
+                }
+            }
+            return this;
+        }
+        public Permissions toPermissions() {
+            final PermissionsBuilder builder = new PermissionsBuilder();
+            builder.addAll(perms);
+            return builder.perms;
+        }
+    }
+
+    public static class SimplePolicy extends Policy {
+
+        final Permissions permissions;
+        final Permissions allPermissions;
+        final AtomicBoolean allowAll;
+        public SimplePolicy(TestCase test, AtomicBoolean allowAll) {
+            this.allowAll = allowAll;
+            permissions = new Permissions();
+            permissions.add(new LoggingPermission("control", null));
+            permissions.add(new FilePermission(PREFIX+".lck", "read,write,delete"));
+            permissions.add(new FilePermission(PREFIX, "read,write"));
+
+            // these are used for configuring the test itself...
+            allPermissions = new Permissions();
+            allPermissions.add(new java.security.AllPermission());
+
+        }
+
+        @Override
+        public boolean implies(ProtectionDomain domain, Permission permission) {
+            if (allowAll.get()) return allPermissions.implies(permission);
+            return permissions.implies(permission);
+        }
+
+        @Override
+        public PermissionCollection getPermissions(CodeSource codesource) {
+            return new PermissionsBuilder().addAll(allowAll.get()
+                    ? allPermissions : permissions).toPermissions();
+        }
+
+        @Override
+        public PermissionCollection getPermissions(ProtectionDomain domain) {
+            return new PermissionsBuilder().addAll(allowAll.get()
+                    ? allPermissions : permissions).toPermissions();
+        }
+    }
+
+}
--- a/jdk/test/javax/net/ssl/TLS/CipherTestUtils.java	Thu Oct 23 11:19:25 2014 -0700
+++ b/jdk/test/javax/net/ssl/TLS/CipherTestUtils.java	Thu Oct 23 13:44:28 2014 -0700
@@ -261,20 +261,20 @@
         }
     }
 
-    private static volatile CipherTestUtils instnace = null;
+    private static volatile CipherTestUtils instance = null;
 
     public static CipherTestUtils getInstance() throws IOException,
             FileNotFoundException, KeyStoreException,
             NoSuchAlgorithmException, CertificateException,
             UnrecoverableKeyException, InvalidKeySpecException {
-        if (instnace == null) {
+        if (instance == null) {
             synchronized (CipherTestUtils.class) {
-                if (instnace == null) {
-                    instnace = new CipherTestUtils();
+                if (instance == null) {
+                    instance = new CipherTestUtils();
                 }
             }
         }
-        return instnace;
+        return instance;
     }
 
     public static void setTestedArguments(String testedProtocol,
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/sql/testng/test/rowset/RowSetWarningTests.java	Thu Oct 23 13:44:28 2014 -0700
@@ -0,0 +1,238 @@
+/*
+ * Copyright (c) 2014, 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.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package test.rowset;
+
+import java.sql.SQLException;
+import javax.sql.rowset.RowSetWarning;
+import static org.testng.Assert.*;
+import org.testng.annotations.Test;
+import util.BaseTest;
+
+public class RowSetWarningTests extends BaseTest {
+
+    private final String[] warnings = {"Warning 1", "cause 1", "Warning 2",
+        "Warning 3", "cause 2"};
+
+    /*
+     * Create RowSetWarning and setting all objects to null
+     */
+    @Test
+    public void test() {
+        RowSetWarning e = new RowSetWarning(null, null, errorCode);
+        assertTrue(e.getMessage() == null && e.getSQLState() == null
+                && e.getCause() == null && e.getErrorCode() == errorCode);
+    }
+
+    /*
+     * Create RowSetWarning with no-arg constructor
+     */
+    @Test
+    public void test01() {
+        RowSetWarning ex = new RowSetWarning();
+        assertTrue(ex.getMessage() == null
+                && ex.getSQLState() == null
+                && ex.getCause() == null
+                && ex.getErrorCode() == 0);
+    }
+
+    /*
+     * Create RowSetWarning with message
+     */
+    @Test
+    public void test02() {
+        RowSetWarning ex = new RowSetWarning(reason);
+        assertTrue(ex.getMessage().equals(reason)
+                && ex.getSQLState() == null
+                && ex.getCause() == null
+                && ex.getErrorCode() == 0);
+    }
+
+    /*
+     * Create RowSetWarning with message, and SQLState
+     */
+    @Test
+    public void test03() {
+
+        RowSetWarning ex = new RowSetWarning(reason, state);
+        assertTrue(ex.getMessage().equals(reason)
+                && ex.getSQLState().equals(state)
+                && ex.getCause() == null
+                && ex.getErrorCode() == 0);
+    }
+
+    /*
+     * Create RowSetWarning with message, SQLState, and error code
+     */
+    @Test
+    public void test04() {
+        RowSetWarning ex = new RowSetWarning(reason, state, errorCode);
+        assertTrue(ex.getMessage().equals(reason)
+                && ex.getSQLState().equals(state)
+                && ex.getCause() == null
+                && ex.getErrorCode() == errorCode);
+    }
+
+    /*
+     * Serialize a RowSetWarning and make sure you can read it back properly
+     */
+    @Test
+    public void test05() throws Exception {
+        RowSetWarning e = new RowSetWarning(reason, state, errorCode);
+        e.initCause(t);
+        RowSetWarning ex1 = createSerializedException(e);
+        assertTrue(reason.equals(ex1.getMessage())
+                && ex1.getSQLState().equals(state)
+                && cause.equals(ex1.getCause().toString())
+                && ex1.getErrorCode() == errorCode);
+    }
+
+    /*
+     * Validate that the ordering of the returned Exceptions is correct using
+     * for-each loop
+     */
+    @Test
+    public void test06() {
+        RowSetWarning ex = new RowSetWarning("Exception 1");
+        ex.initCause(t1);
+        RowSetWarning ex1 = new RowSetWarning("Exception 2");
+        RowSetWarning ex2 = new RowSetWarning("Exception 3");
+        ex2.initCause(t2);
+        ex.setNextException(ex1);
+        ex.setNextException(ex2);
+        int num = 0;
+        for (Throwable e : ex) {
+            assertTrue(msgs[num++].equals(e.getMessage()));
+        }
+    }
+
+    /*
+     * Validate that the ordering of the returned Exceptions is correct using
+     * traditional while loop
+     */
+    @Test
+    public void test07() {
+        RowSetWarning ex = new RowSetWarning("Exception 1");
+        ex.initCause(t1);
+        RowSetWarning ex1 = new RowSetWarning("Exception 2");
+        RowSetWarning ex2 = new RowSetWarning("Exception 3");
+        ex2.initCause(t2);
+        ex.setNextException(ex1);
+        ex.setNextException(ex2);
+        int num = 0;
+        SQLException sqe = ex;
+        while (sqe != null) {
+            assertTrue(msgs[num++].equals(sqe.getMessage()));
+            Throwable c = sqe.getCause();
+            while (c != null) {
+                assertTrue(msgs[num++].equals(c.getMessage()));
+                c = c.getCause();
+            }
+            sqe = sqe.getNextException();
+        }
+    }
+
+    /*
+     * Validate that the ordering of the returned RowSetWarning is correct using
+     * for-each loop
+     */
+    @Test
+    public void test08() {
+        RowSetWarning ex = new RowSetWarning("Warning 1");
+        ex.initCause(t1);
+        RowSetWarning ex1 = new RowSetWarning("Warning 2");
+        RowSetWarning ex2 = new RowSetWarning("Warning 3");
+        ex2.initCause(t2);
+        ex.setNextWarning(ex1);
+        ex.setNextWarning(ex2);
+        int num = 0;
+        for (Throwable e : ex) {
+            assertTrue(warnings[num++].equals(e.getMessage()));
+        }
+    }
+
+    /**
+     * Validate that the ordering of the returned RowSetWarning is correct using
+     * traditional while loop
+     */
+    @Test
+    public void test09() {
+        RowSetWarning ex = new RowSetWarning("Warning 1");
+        ex.initCause(t1);
+        RowSetWarning ex1 = new RowSetWarning("Warning 2");
+        RowSetWarning ex2 = new RowSetWarning("Warning 3");
+        ex2.initCause(t2);
+        ex.setNextWarning(ex1);
+        ex.setNextWarning(ex2);
+        int num = 0;
+        RowSetWarning sqe = ex;
+        while (sqe != null) {
+            assertTrue(warnings[num++].equals(sqe.getMessage()));
+            Throwable c = sqe.getCause();
+            while (c != null) {
+                assertTrue(msgs[num++].equals(c.getMessage()));
+                c = c.getCause();
+            }
+            sqe = sqe.getNextWarning();
+        }
+    }
+
+    /*
+     * Serialize a RowSetWarning and make sure you can read it back properly
+     */
+    @Test
+    public void test10() throws Exception {
+        RowSetWarning e = new RowSetWarning(reason, state, errorCode);
+        RowSetWarning ex1 = createSerializedException(e);
+        assertTrue(reason.equals(ex1.getMessage())
+                && ex1.getSQLState().equals(state)
+                && ex1.getCause() == null
+                && ex1.getErrorCode() == errorCode);
+    }
+
+    /*
+     *  Serialize a RowSetWarning and make sure you can read it back properly.
+     * Validate that the ordering of the returned RowSetWarning is correct using
+     * traditional while loop
+     */
+    @Test
+    public void test11() throws Exception {
+        RowSetWarning ex = new RowSetWarning("Warning 1");
+        ex.initCause(t1);
+        RowSetWarning ex1 = new RowSetWarning("Warning 2");
+        RowSetWarning ex2 = new RowSetWarning("Warning 3");
+        ex2.initCause(t2);
+        ex.setNextWarning(ex1);
+        ex.setNextWarning(ex2);
+        int num = 0;
+        RowSetWarning sqe = createSerializedException(ex);
+        while (sqe != null) {
+            assertTrue(warnings[num++].equals(sqe.getMessage()));
+            Throwable c = sqe.getCause();
+            while (c != null) {
+                assertTrue(msgs[num++].equals(c.getMessage()));
+                c = c.getCause();
+            }
+            sqe = sqe.getNextWarning();
+        }
+    }
+}
--- a/jdk/test/lib/testlibrary/OutputAnalyzerReportingTest.java	Thu Oct 23 11:19:25 2014 -0700
+++ b/jdk/test/lib/testlibrary/OutputAnalyzerReportingTest.java	Thu Oct 23 13:44:28 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2014, 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
@@ -21,6 +21,7 @@
  * questions.
  */
 
+package jdk.testlibrary;
 
 /*
  * @test
@@ -28,13 +29,13 @@
  *     such as printing additional diagnostic info
  *     (exit code, stdout, stderr, command line, etc.)
  * @library /testlibrary
+ * @build jdk.testlibrary.*
+ * @run main jdk.testlibrary.OutputAnalyzerReportingTest
  */
 
 import java.io.ByteArrayOutputStream;
 import java.io.PrintStream;
 
-import jdk.testlibrary.OutputAnalyzer;
-
 public class OutputAnalyzerReportingTest {
 
     public static void main(String[] args) throws Exception {
--- a/jdk/test/lib/testlibrary/OutputAnalyzerTest.java	Thu Oct 23 11:19:25 2014 -0700
+++ b/jdk/test/lib/testlibrary/OutputAnalyzerTest.java	Thu Oct 23 13:44:28 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2014, 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
@@ -20,15 +20,16 @@
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
+package jdk.testlibrary;
 
 /*
  * @test
  * @summary Test the OutputAnalyzer utility class
  * @library /testlibrary
+ * @build jdk.testlibrary.*
+ * @run main jdk.testlibrary.OutputAnalyzerTest
  */
 
-import jdk.testlibrary.OutputAnalyzer;
-
 public class OutputAnalyzerTest {
 
     public static void main(String args[]) throws Exception {
--- a/jdk/test/lib/testlibrary/jdk/testlibrary/JcmdBase.java	Thu Oct 23 11:19:25 2014 -0700
+++ b/jdk/test/lib/testlibrary/jdk/testlibrary/JcmdBase.java	Thu Oct 23 13:44:28 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2014, 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
@@ -108,7 +108,7 @@
         }
         processBuilder.command(launcher.getCommand());
         System.out.println(Arrays.toString(processBuilder.command().toArray()).replace(",", ""));
-        OutputAnalyzer output = new OutputAnalyzer(processBuilder.start());
+        OutputAnalyzer output = ProcessTools.executeProcess(processBuilder);
         System.out.println(output.getOutput());
 
         return output;
--- a/jdk/test/lib/testlibrary/jdk/testlibrary/OutputAnalyzer.java	Thu Oct 23 11:19:25 2014 -0700
+++ b/jdk/test/lib/testlibrary/jdk/testlibrary/OutputAnalyzer.java	Thu Oct 23 13:44:28 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2014, 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
@@ -25,9 +25,13 @@
 
 import static jdk.testlibrary.Asserts.*;
 
+import java.io.ByteArrayOutputStream;
+
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.Future;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
@@ -35,34 +39,37 @@
  * Utility class for verifying output and exit value from a {@code Process}.
  */
 public final class OutputAnalyzer {
-
+    private final OutputBuffer output;
     private final String stdout;
     private final String stderr;
     private final int exitValue;
 
     /**
      * Create an OutputAnalyzer, a utility class for verifying output and exit
-     * value from a Process
+     * value from a Process.
+     * <p>
+     * OutputAnalyzer should never be instantiated directly -
+     * use {@linkplain ProcessTools#executeProcess(p)} instead
      *
      * @param process
      *            Process to analyze
      * @throws IOException
      *             If an I/O error occurs.
      */
-    public OutputAnalyzer(Process process) throws IOException {
-        OutputBuffer output = ProcessTools.getOutput(process);
-        exitValue = process.exitValue();
-        this.stdout = output.getStdout();
-        this.stderr = output.getStderr();
+    OutputAnalyzer(Process process) throws IOException {
+        output = new OutputBuffer(process);
+        exitValue = -1;
+        this.stdout = null;
+        this.stderr = null;
     }
 
     /**
-     * Create an OutputAnalyzer, a utility class for verifying output
+     * Create an OutputAnalyzer, a utility class for verifying output.
      *
      * @param buf
      *            String buffer to analyze
      */
-    public OutputAnalyzer(String buf) {
+    OutputAnalyzer(String buf) {
         this(buf, buf);
     }
 
@@ -74,7 +81,8 @@
      * @param stderr
      *            stderr buffer to analyze
      */
-    public OutputAnalyzer(String stdout, String stderr) {
+    OutputAnalyzer(String stdout, String stderr) {
+        this.output = null;
         this.stdout = stdout;
         this.stderr = stderr;
         exitValue = -1;
@@ -90,8 +98,8 @@
      *             If the string was not found
      */
     public void shouldContain(String expectedString) {
-        if (!stdout.contains(expectedString)
-                && !stderr.contains(expectedString)) {
+        if (!getStdout().contains(expectedString)
+                && !getStderr().contains(expectedString)) {
             reportDiagnosticSummary();
             throw new RuntimeException("'" + expectedString
                     + "' missing from stdout/stderr \n");
@@ -107,7 +115,7 @@
      *             If the string was not found
      */
     public void stdoutShouldContain(String expectedString) {
-        if (!stdout.contains(expectedString)) {
+        if (!getStdout().contains(expectedString)) {
             reportDiagnosticSummary();
             throw new RuntimeException("'" + expectedString
                     + "' missing from stdout \n");
@@ -123,7 +131,7 @@
      *             If the string was not found
      */
     public void stderrShouldContain(String expectedString) {
-        if (!stderr.contains(expectedString)) {
+        if (!getStderr().contains(expectedString)) {
             reportDiagnosticSummary();
             throw new RuntimeException("'" + expectedString
                     + "' missing from stderr \n");
@@ -140,12 +148,12 @@
      *             If the string was found
      */
     public void shouldNotContain(String notExpectedString) {
-        if (stdout.contains(notExpectedString)) {
+        if (getStdout().contains(notExpectedString)) {
             reportDiagnosticSummary();
             throw new RuntimeException("'" + notExpectedString
                     + "' found in stdout \n");
         }
-        if (stderr.contains(notExpectedString)) {
+        if (getStderr().contains(notExpectedString)) {
             reportDiagnosticSummary();
             throw new RuntimeException("'" + notExpectedString
                     + "' found in stderr \n");
@@ -162,7 +170,7 @@
      *             If the string was found
      */
     public void stdoutShouldNotContain(String notExpectedString) {
-        if (stdout.contains(notExpectedString)) {
+        if (getStdout().contains(notExpectedString)) {
             reportDiagnosticSummary();
             throw new RuntimeException("'" + notExpectedString
                     + "' found in stdout \n");
@@ -179,7 +187,7 @@
      *             If the string was found
      */
     public void stderrShouldNotContain(String notExpectedString) {
-        if (stderr.contains(notExpectedString)) {
+        if (getStderr().contains(notExpectedString)) {
             reportDiagnosticSummary();
             throw new RuntimeException("'" + notExpectedString
                     + "' found in stderr \n");
@@ -196,9 +204,9 @@
      */
     public void shouldMatch(String pattern) {
         Matcher stdoutMatcher = Pattern.compile(pattern, Pattern.MULTILINE)
-                .matcher(stdout);
+                .matcher(getStdout());
         Matcher stderrMatcher = Pattern.compile(pattern, Pattern.MULTILINE)
-                .matcher(stderr);
+                .matcher(getStderr());
         if (!stdoutMatcher.find() && !stderrMatcher.find()) {
             reportDiagnosticSummary();
             throw new RuntimeException("'" + pattern
@@ -215,7 +223,7 @@
      */
     public void stdoutShouldMatch(String pattern) {
         Matcher matcher = Pattern.compile(pattern, Pattern.MULTILINE).matcher(
-                stdout);
+                getStdout());
         if (!matcher.find()) {
             reportDiagnosticSummary();
             throw new RuntimeException("'" + pattern
@@ -232,7 +240,7 @@
      */
     public void stderrShouldMatch(String pattern) {
         Matcher matcher = Pattern.compile(pattern, Pattern.MULTILINE).matcher(
-                stderr);
+                getStderr());
         if (!matcher.find()) {
             reportDiagnosticSummary();
             throw new RuntimeException("'" + pattern
@@ -250,13 +258,13 @@
      */
     public void shouldNotMatch(String pattern) {
         Matcher matcher = Pattern.compile(pattern, Pattern.MULTILINE).matcher(
-                stdout);
+                getStdout());
         if (matcher.find()) {
             reportDiagnosticSummary();
             throw new RuntimeException("'" + pattern + "' found in stdout: '"
                     + matcher.group() + "' \n");
         }
-        matcher = Pattern.compile(pattern, Pattern.MULTILINE).matcher(stderr);
+        matcher = Pattern.compile(pattern, Pattern.MULTILINE).matcher(getStderr());
         if (matcher.find()) {
             reportDiagnosticSummary();
             throw new RuntimeException("'" + pattern + "' found in stderr: '"
@@ -274,7 +282,7 @@
      */
     public void stdoutShouldNotMatch(String pattern) {
         Matcher matcher = Pattern.compile(pattern, Pattern.MULTILINE).matcher(
-                stdout);
+                getStdout());
         if (matcher.find()) {
             reportDiagnosticSummary();
             throw new RuntimeException("'" + pattern + "' found in stdout \n");
@@ -291,7 +299,7 @@
      */
     public void stderrShouldNotMatch(String pattern) {
         Matcher matcher = Pattern.compile(pattern, Pattern.MULTILINE).matcher(
-                stderr);
+                getStderr());
         if (matcher.find()) {
             reportDiagnosticSummary();
             throw new RuntimeException("'" + pattern + "' found in stderr \n");
@@ -310,9 +318,9 @@
      */
     public String firstMatch(String pattern, int group) {
         Matcher stderrMatcher = Pattern.compile(pattern, Pattern.MULTILINE)
-                .matcher(stderr);
+                .matcher(getStderr());
         Matcher stdoutMatcher = Pattern.compile(pattern, Pattern.MULTILINE)
-                .matcher(stdout);
+                .matcher(getStdout());
         if (stderrMatcher.find()) {
             return stderrMatcher.group(group);
         }
@@ -357,7 +365,7 @@
      * exit code Note: the command line is printed by the ProcessTools
      */
     private void reportDiagnosticSummary() {
-        String msg = " stdout: [" + stdout + "];\n" + " stderr: [" + stderr
+        String msg = " stdout: [" + getStdout() + "];\n" + " stderr: [" + getStderr()
                 + "]\n" + " exitValue = " + getExitValue() + "\n";
 
         System.err.println(msg);
@@ -369,7 +377,7 @@
      * @return Content of the output buffer
      */
     public String getOutput() {
-        return stdout + stderr;
+        return getStdout() + getStderr();
     }
 
     /**
@@ -378,7 +386,7 @@
      * @return Content of the stdout buffer
      */
     public String getStdout() {
-        return stdout;
+        return output == null ? stdout : output.getStdout();
     }
 
     /**
@@ -387,7 +395,7 @@
      * @return Content of the stderr buffer
      */
     public String getStderr() {
-        return stderr;
+        return output == null ? stderr : output.getStderr();
     }
 
     /**
@@ -396,7 +404,7 @@
      * @return Process exit value
      */
     public int getExitValue() {
-        return exitValue;
+        return output == null ? exitValue : output.getExitValue();
     }
 
     /**
@@ -492,5 +500,4 @@
 
         return matchedCount;
     }
-
 }
--- a/jdk/test/lib/testlibrary/jdk/testlibrary/OutputBuffer.java	Thu Oct 23 11:19:25 2014 -0700
+++ b/jdk/test/lib/testlibrary/jdk/testlibrary/OutputBuffer.java	Thu Oct 23 13:44:28 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2014, 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
@@ -23,9 +23,23 @@
 
 package jdk.testlibrary;
 
-public class OutputBuffer {
-    private final String stdout;
-    private final String stderr;
+import java.io.ByteArrayOutputStream;
+import java.util.concurrent.CancellationException;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.Future;
+
+class OutputBuffer {
+    private static class OutputBufferException extends RuntimeException {
+        public OutputBufferException(Throwable cause) {
+            super(cause);
+        }
+    }
+
+    private final Process p;
+    private final Future<Void> outTask;
+    private final Future<Void> errTask;
+    private final ByteArrayOutputStream stderrBuffer = new ByteArrayOutputStream();
+    private final ByteArrayOutputStream stdoutBuffer = new ByteArrayOutputStream();
 
     /**
      * Create an OutputBuffer, a class for storing and managing stdout and
@@ -36,9 +50,15 @@
      * @param stderr
      *            stderr result
      */
-    public OutputBuffer(String stdout, String stderr) {
-        this.stdout = stdout;
-        this.stderr = stderr;
+    OutputBuffer(Process p) {
+        this.p = p;
+        StreamPumper outPumper = new StreamPumper(p.getInputStream(),
+                stdoutBuffer);
+        StreamPumper errPumper = new StreamPumper(p.getErrorStream(),
+                stderrBuffer);
+
+        outTask = outPumper.process();
+        errTask = errPumper.process();
     }
 
     /**
@@ -47,7 +67,15 @@
      * @return stdout result
      */
     public String getStdout() {
-        return stdout;
+        try {
+            outTask.get();
+            return stdoutBuffer.toString();
+        } catch (InterruptedException e) {
+            Thread.currentThread().interrupt();
+            throw new OutputBufferException(e);
+        } catch (ExecutionException | CancellationException e) {
+            throw new OutputBufferException(e);
+        }
     }
 
     /**
@@ -56,6 +84,23 @@
      * @return stderr result
      */
     public String getStderr() {
-        return stderr;
+        try {
+            errTask.get();
+            return stderrBuffer.toString();
+        } catch (InterruptedException e) {
+            Thread.currentThread().interrupt();
+            throw new OutputBufferException(e);
+        } catch (ExecutionException | CancellationException e) {
+            throw new OutputBufferException(e);
+        }
+    }
+
+    public int getExitValue() {
+        try {
+            return p.waitFor();
+        } catch (InterruptedException e) {
+            Thread.currentThread().interrupt();
+            throw new OutputBufferException(e);
+        }
     }
 }
--- a/jdk/test/lib/testlibrary/jdk/testlibrary/ProcessThread.java	Thu Oct 23 11:19:25 2014 -0700
+++ b/jdk/test/lib/testlibrary/jdk/testlibrary/ProcessThread.java	Thu Oct 23 13:44:28 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2014, 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
@@ -154,12 +154,14 @@
 
             // Will block...
             try {
+                this.process.waitFor();
                 output = new OutputAnalyzer(this.process);
             } catch (Throwable t) {
                 String name = Thread.currentThread().getName();
                 System.out.println(String.format("ProcessThread[%s] failed: %s", name, t.toString()));
                 throw t;
             } finally {
+                this.process.destroyForcibly().waitFor();
                 String logMsg = ProcessTools.getProcessLog(processBuilder, output);
                 System.out.println(logMsg);
             }
--- a/jdk/test/lib/testlibrary/jdk/testlibrary/ProcessTools.java	Thu Oct 23 11:19:25 2014 -0700
+++ b/jdk/test/lib/testlibrary/jdk/testlibrary/ProcessTools.java	Thu Oct 23 13:44:28 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2014, 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
@@ -23,7 +23,6 @@
 
 package jdk.testlibrary;
 
-import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.io.PrintStream;
 import java.lang.management.ManagementFactory;
@@ -34,7 +33,6 @@
 import java.util.Collections;
 import java.util.concurrent.CountDownLatch;
 import java.util.Map;
-import java.util.concurrent.ExecutionException;
 import java.util.concurrent.Future;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
@@ -214,55 +212,6 @@
     }
 
     /**
-     * Pumps stdout and stderr from running the process into a String.
-     *
-     * @param processBuilder
-     *            ProcessHandler to run.
-     * @return Output from process.
-     * @throws IOException
-     *             If an I/O error occurs.
-     */
-    public static OutputBuffer getOutput(ProcessBuilder processBuilder)
-            throws IOException {
-        return getOutput(processBuilder.start());
-    }
-
-    /**
-     * Pumps stdout and stderr the running process into a String.
-     *
-     * @param process
-     *            Process to pump.
-     * @return Output from process.
-     * @throws IOException
-     *             If an I/O error occurs.
-     */
-    public static OutputBuffer getOutput(Process process) throws IOException {
-        ByteArrayOutputStream stderrBuffer = new ByteArrayOutputStream();
-        ByteArrayOutputStream stdoutBuffer = new ByteArrayOutputStream();
-        StreamPumper outPumper = new StreamPumper(process.getInputStream(),
-                stdoutBuffer);
-        StreamPumper errPumper = new StreamPumper(process.getErrorStream(),
-                stderrBuffer);
-
-        Future<Void> outTask = outPumper.process();
-        Future<Void> errTask = errPumper.process();
-
-        try {
-            process.waitFor();
-            outTask.get();
-            errTask.get();
-        } catch (InterruptedException e) {
-            Thread.currentThread().interrupt();
-            return null;
-        } catch (ExecutionException e) {
-            throw new IOException(e);
-        }
-
-        return new OutputBuffer(stdoutBuffer.toString(),
-                stderrBuffer.toString());
-    }
-
-    /**
      * Get the process id of the current running Java process
      *
      * @return Process id
@@ -343,34 +292,51 @@
      * The command line will be like:
      * {test.jdk}/bin/java {test.vm.opts} {test.java.opts} cmds
      *
+     * The jvm process will have exited before this method returns.
+     *
      * @param cmds User specifed arguments.
      * @return The output from the process.
      */
-    public static OutputAnalyzer executeTestJvm(String... cmds) throws Throwable {
+    public static OutputAnalyzer executeTestJvm(String... cmds) throws Exception {
         ProcessBuilder pb = createJavaProcessBuilder(Utils.addTestJavaOpts(cmds));
         return executeProcess(pb);
     }
 
     /**
      * Executes a process, waits for it to finish and returns the process output.
+     * The process will have exited before this method returns.
      * @param pb The ProcessBuilder to execute.
-     * @return The output from the process.
+     * @return The {@linkplain OutputAnalyzer} instance wrapping the process.
      */
-    public static OutputAnalyzer executeProcess(ProcessBuilder pb) throws Throwable {
+    public static OutputAnalyzer executeProcess(ProcessBuilder pb) throws Exception {
         OutputAnalyzer output = null;
+        Process p = null;
+        boolean failed = false;
         try {
-            output = new OutputAnalyzer(pb.start());
+            p = pb.start();
+            output = new OutputAnalyzer(p);
+            p.waitFor();
+
             return output;
         } catch (Throwable t) {
+            failed = true;
             System.out.println("executeProcess() failed: " + t);
             throw t;
         } finally {
-            System.out.println(getProcessLog(pb, output));
+            if (p != null) {
+                p.destroyForcibly().waitFor();
+            }
+            if (failed) {
+                System.err.println(getProcessLog(pb, output));
+            }
         }
     }
 
     /**
      * Executes a process, waits for it to finish and returns the process output.
+     *
+     * The process will have exited before this method returns.
+     *
      * @param cmds The command line to execute.
      * @return The output from the process.
      */
@@ -394,6 +360,7 @@
         logMsg.append("exitvalue: " + exitValue + nl);
         logMsg.append("stderr: " + stderr + nl);
         logMsg.append("stdout: " + stdout + nl);
+
         return logMsg.toString();
     }
 
--- a/jdk/test/sun/jvmstat/monitor/MonitoredVm/MonitorVmStartTerminate.java	Thu Oct 23 11:19:25 2014 -0700
+++ b/jdk/test/sun/jvmstat/monitor/MonitoredVm/MonitorVmStartTerminate.java	Thu Oct 23 13:44:28 2014 -0700
@@ -34,7 +34,7 @@
 import java.util.UUID;
 import java.util.concurrent.Semaphore;
 
-import jdk.testlibrary.OutputBuffer;
+import jdk.testlibrary.OutputAnalyzer;
 import jdk.testlibrary.ProcessTools;
 import sun.jvmstat.monitor.MonitorException;
 import sun.jvmstat.monitor.MonitoredHost;
@@ -305,13 +305,13 @@
             Runtime.getRuntime().removeShutdownHook(shutdownHook);
         }
 
-        private void executeJava() throws Exception, IOException {
+        private void executeJava() throws Throwable {
             String className = JavaProcess.class.getName();
             String classPath = System.getProperty("test.classes");
             ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
                 "-Dtest.timeout.factor=" + System.getProperty("test.timeout.factor", "1.0"),
                 "-cp", classPath, className, mainArgsIdentifier);
-            OutputBuffer ob = ProcessTools.getOutput(pb.start());
+            OutputAnalyzer ob = ProcessTools.executeProcess(pb);
             System.out.println("Java Process " + getMainArgsIdentifier() + " stderr:"
                     + ob.getStderr());
             System.err.println("Java Process " + getMainArgsIdentifier() + " stdout:"
--- a/jdk/test/sun/management/jdp/DynamicLauncher.java	Thu Oct 23 11:19:25 2014 -0700
+++ b/jdk/test/sun/management/jdp/DynamicLauncher.java	Thu Oct 23 13:44:28 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2014, 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
@@ -63,7 +63,7 @@
     protected OutputAnalyzer runVM() throws Exception {
         String[] options = this.options();
         ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(options);
-        OutputAnalyzer out = new OutputAnalyzer(pb.start());
+        OutputAnalyzer out = ProcessTools.executeProcess(pb);
         System.out.println(out.getStdout());
         System.err.println(out.getStderr());
         return out;
--- a/jdk/test/sun/management/jmxremote/bootstrap/AbstractFilePermissionTest.java	Thu Oct 23 11:19:25 2014 -0700
+++ b/jdk/test/sun/management/jmxremote/bootstrap/AbstractFilePermissionTest.java	Thu Oct 23 13:44:28 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2014, 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
@@ -176,16 +176,15 @@
                     command.toArray(new String[command.size()]));
 
             System.out.println("test cmdline: " + Arrays.toString(processBuilder.command().toArray()).replace(",", ""));
-            Process p = processBuilder.start();
-            OutputAnalyzer output = new OutputAnalyzer(p);
+            OutputAnalyzer output = ProcessTools.executeProcess(processBuilder);
 
             System.out.println("test output:");
             System.out.println(output.getOutput());
 
-            if ((p.exitValue() == 0)  ||
+            if ((output.getExitValue() == 0)  ||
                 !output.getOutput().contains("Exception thrown by the agent : " +
                         "java.rmi.server.ExportException: Port already in use")) {
-                return p.exitValue();
+                return output.getExitValue();
             }
         }
 
--- a/jdk/test/sun/management/jmxremote/bootstrap/RmiRegistrySslTest.java	Thu Oct 23 11:19:25 2014 -0700
+++ b/jdk/test/sun/management/jmxremote/bootstrap/RmiRegistrySslTest.java	Thu Oct 23 13:44:28 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2014, 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
@@ -188,15 +188,14 @@
 
             ProcessBuilder processBuilder = ProcessTools.createJavaProcessBuilder(command.toArray(new String[command.size()]));
 
-            Process p = processBuilder.start();
-            OutputAnalyzer output = new OutputAnalyzer(p);
+            OutputAnalyzer output = ProcessTools.executeProcess(processBuilder);
 
             System.out.println("test output:");
             System.out.println(output.getOutput());
 
             if (!output.getOutput().contains("Exception thrown by the agent : " +
                     "java.rmi.server.ExportException: Port already in use")) {
-                return p.exitValue();
+                return output.getExitValue();
             }
         }
         throw new Error("Cannot find free port");
--- a/jdk/test/sun/tools/jhat/HatHeapDump1Test.java	Thu Oct 23 11:19:25 2014 -0700
+++ b/jdk/test/sun/tools/jhat/HatHeapDump1Test.java	Thu Oct 23 13:44:28 2014 -0700
@@ -52,7 +52,7 @@
                 "-Xverify:all",
                 "-agentlib:hprof=heap=dump,format=b,file=" + dumpFile.getAbsolutePath(),
                 className);
-        OutputAnalyzer output = new OutputAnalyzer(processBuilder.start());
+        OutputAnalyzer output = ProcessTools.executeProcess(processBuilder);
         System.out.println(output.getOutput());
         output.shouldHaveExitValue(0);
         output.shouldContain("Dumping Java heap ... done");
@@ -79,7 +79,7 @@
         ProcessBuilder processBuilder = new ProcessBuilder();
         processBuilder.command(launcher.getCommand());
         System.out.println(Arrays.toString(processBuilder.command().toArray()).replace(",", ""));
-        OutputAnalyzer output = new OutputAnalyzer(processBuilder.start());
+        OutputAnalyzer output = ProcessTools.executeProcess(processBuilder);
         System.out.println(output.getOutput());
 
         return output;
--- a/jdk/test/sun/tools/jmap/BasicJMapTest.java	Thu Oct 23 11:19:25 2014 -0700
+++ b/jdk/test/sun/tools/jmap/BasicJMapTest.java	Thu Oct 23 13:44:28 2014 -0700
@@ -91,7 +91,7 @@
 
         processBuilder.command(launcher.getCommand());
         System.out.println(Arrays.toString(processBuilder.command().toArray()).replace(",", ""));
-        OutputAnalyzer output = new OutputAnalyzer(processBuilder.start());
+        OutputAnalyzer output = ProcessTools.executeProcess(processBuilder);
         System.out.println(output.getOutput());
 
         return output;
--- a/jdk/test/sun/tools/jps/JpsHelper.java	Thu Oct 23 11:19:25 2014 -0700
+++ b/jdk/test/sun/tools/jps/JpsHelper.java	Thu Oct 23 13:44:28 2014 -0700
@@ -36,6 +36,7 @@
 import jdk.testlibrary.JDKToolLauncher;
 import jdk.testlibrary.OutputAnalyzer;
 import jdk.testlibrary.Utils;
+import jdk.testlibrary.ProcessTools;
 
 /**
  * The helper class for running jps utility and verifying output from it
@@ -160,7 +161,7 @@
 
         ProcessBuilder processBuilder = new ProcessBuilder(launcher.getCommand());
         System.out.println(Arrays.toString(processBuilder.command().toArray()).replace(",", ""));
-        OutputAnalyzer output = new OutputAnalyzer(processBuilder.start());
+        OutputAnalyzer output = ProcessTools.executeProcess(processBuilder);
         System.out.println(output.getOutput());
 
         return output;
--- a/jdk/test/sun/tools/jps/TestJpsClass.java	Thu Oct 23 11:19:25 2014 -0700
+++ b/jdk/test/sun/tools/jps/TestJpsClass.java	Thu Oct 23 13:44:28 2014 -0700
@@ -55,7 +55,7 @@
         cmd.add("monkey");
 
         ProcessBuilder processBuilder = ProcessTools.createJavaProcessBuilder(cmd.toArray(new String[cmd.size()]));
-        OutputAnalyzer output = new OutputAnalyzer(processBuilder.start());
+        OutputAnalyzer output = ProcessTools.executeProcess(processBuilder);
         System.out.println(output.getOutput());
         output.shouldHaveExitValue(0);
     }
--- a/jdk/test/sun/tools/jps/TestJpsJar.java	Thu Oct 23 11:19:25 2014 -0700
+++ b/jdk/test/sun/tools/jps/TestJpsJar.java	Thu Oct 23 13:44:28 2014 -0700
@@ -55,7 +55,7 @@
         cmd.add("monkey");
 
         ProcessBuilder processBuilder = ProcessTools.createJavaProcessBuilder(cmd.toArray(new String[cmd.size()]));
-        OutputAnalyzer output = new OutputAnalyzer(processBuilder.start());
+        OutputAnalyzer output = ProcessTools.executeProcess(processBuilder);
         System.out.println(output.getOutput());
         output.shouldHaveExitValue(0);
     }
--- a/jdk/test/sun/tools/jps/TestJpsJarRelative.java	Thu Oct 23 11:19:25 2014 -0700
+++ b/jdk/test/sun/tools/jps/TestJpsJarRelative.java	Thu Oct 23 13:44:28 2014 -0700
@@ -55,7 +55,7 @@
         cmd.add("monkey");
 
         ProcessBuilder processBuilder = ProcessTools.createJavaProcessBuilder(cmd.toArray(new String[cmd.size()]));
-        OutputAnalyzer output = new OutputAnalyzer(processBuilder.start());
+        OutputAnalyzer output = ProcessTools.executeProcess(processBuilder);
         System.out.println(output.getOutput());
         output.shouldHaveExitValue(0);
     }
--- a/jdk/test/sun/tools/jstack/BasicJStackTest.java	Thu Oct 23 11:19:25 2014 -0700
+++ b/jdk/test/sun/tools/jstack/BasicJStackTest.java	Thu Oct 23 13:44:28 2014 -0700
@@ -66,7 +66,7 @@
 
         processBuilder.command(launcher.getCommand());
         System.out.println(Arrays.toString(processBuilder.command().toArray()).replace(",", ""));
-        OutputAnalyzer output = new OutputAnalyzer(processBuilder.start());
+        OutputAnalyzer output = ProcessTools.executeProcess(processBuilder);
         System.out.println(output.getOutput());
 
         return output;
--- a/jdk/test/sun/tools/jstatd/JstatdTest.java	Thu Oct 23 11:19:25 2014 -0700
+++ b/jdk/test/sun/tools/jstatd/JstatdTest.java	Thu Oct 23 13:44:28 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2014, 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
@@ -33,7 +33,6 @@
 import jdk.testlibrary.JDKToolLauncher;
 import jdk.testlibrary.OutputAnalyzer;
 import jdk.testlibrary.ProcessThread;
-import jdk.testlibrary.TestThread;
 import jdk.testlibrary.Utils;
 import jdk.testlibrary.ProcessTools;
 
@@ -145,8 +144,8 @@
         return output;
     }
 
-    private OutputAnalyzer waitForJstatdRMI(ProcessBuilder pb) throws IOException, InterruptedException {
-        OutputAnalyzer output = new OutputAnalyzer(pb.start());
+    private OutputAnalyzer waitForJstatdRMI(ProcessBuilder pb) throws Exception {
+        OutputAnalyzer output = ProcessTools.executeProcess(pb);
 
         String remoteHost = (serverName != null) ? serverName : "JStatRemoteHost";
         while (output.getExitValue() != 0) {
@@ -155,7 +154,7 @@
             if (out.contains("RMI Registry not available") ||
                 out.contains("RMI Server " + remoteHost + " not available")) {
                 Thread.sleep(100);
-                output = new OutputAnalyzer(pb.start());
+                output = ProcessTools.executeProcess(pb);
             } else {
                 output.shouldHaveExitValue(0);
             }
--- a/jdk/test/sun/tools/jstatd/TestJstatdUsage.java	Thu Oct 23 11:19:25 2014 -0700
+++ b/jdk/test/sun/tools/jstatd/TestJstatdUsage.java	Thu Oct 23 13:44:28 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2014, 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
@@ -23,6 +23,7 @@
 
 import jdk.testlibrary.JDKToolLauncher;
 import jdk.testlibrary.OutputAnalyzer;
+import jdk.testlibrary.ProcessTools;
 
 /*
  * @test
@@ -42,7 +43,7 @@
         JDKToolLauncher launcher = JDKToolLauncher.createUsingTestJDK("jstatd");
         launcher.addToolArg(option);
         ProcessBuilder processBuilder = new ProcessBuilder(launcher.getCommand());
-        OutputAnalyzer output = new OutputAnalyzer(processBuilder.start());
+        OutputAnalyzer output = ProcessTools.executeProcess(processBuilder);
 
         output.shouldContain("usage: jstatd [-nr] [-p port] [-n rminame]");
         output.shouldHaveExitValue(1);
--- a/jdk/test/tools/launcher/VersionCheck.java	Thu Oct 23 11:19:25 2014 -0700
+++ b/jdk/test/tools/launcher/VersionCheck.java	Thu Oct 23 13:44:28 2014 -0700
@@ -61,7 +61,6 @@
     static final String[] BLACKLIST_VERSION = {
         "appletviewer",
         "controlpanel",
-        "extcheck",
         "jar",
         "jarsigner",
         "java-rmi",
--- a/jdk/test/tools/pack200/TestNormal.java	Thu Oct 23 11:19:25 2014 -0700
+++ b/jdk/test/tools/pack200/TestNormal.java	Thu Oct 23 13:44:28 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2014, 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
@@ -42,23 +42,15 @@
     public static void main(String args[]) throws Exception {
         Properties p = System.getProperties();
         String java_home = p.getProperty("test.jdk");
-        File testJar = new File("test.jar");
-        Utils.jar("cvf", testJar.getName(), Utils.TEST_CLS_DIR.getAbsolutePath());
-
-        File folder = new File("testdir");
-        if (folder.exists()) {
-            delete(folder);
-        }
-        folder.mkdir();
+        String testdir = Utils.TEST_CLS_DIR.getAbsolutePath();
 
         try {
-            extractJar(new JarFile(testJar), folder);
-            execJavaCommand(java_home, "jar cnf normalized.jar -C testdir .");
-            execJavaCommand(java_home, "jar cf original.jar -C testdir .");
+            execJavaCommand(java_home, "jar cnf normalized.jar -C " + testdir + " .");
+            execJavaCommand(java_home, "jar cf original.jar -C " + testdir + " .");
             execJavaCommand(java_home, "pack200 -r repacked.jar original.jar");
             compareJars(new JarFile("normalized.jar"), new JarFile("repacked.jar"));
         } finally {
-            String[] cleanupList = {"testdir", "normalized.jar", "original.jar", "repacked.jar"};
+            String[] cleanupList = {"normalized.jar", "original.jar", "repacked.jar"};
             for (String s : cleanupList) {
                 delete(new File(s));
             }
@@ -101,36 +93,6 @@
         }
     }
 
-    public static void extractJar(JarFile jf, File where) throws Exception {
-        for (JarEntry file : Collections.list(jf.entries())) {
-            File out = new File(where, file.getName());
-            if (file.isDirectory()) {
-                out.mkdirs();
-                continue;
-            }
-            File parent = out.getParentFile();
-            if (parent != null && !parent.exists()) {
-                parent.mkdirs();
-            }
-            InputStream is = null;
-            OutputStream os = null;
-            try {
-                is = jf.getInputStream(file);
-                os = new FileOutputStream(out);
-                while (is.available() > 0) {
-                    os.write(is.read());
-                }
-            } finally {
-                if (is != null) {
-                    is.close();
-                }
-                if (os != null) {
-                    os.close();
-                }
-            }
-        }
-    }
-
     static void delete(File f) throws IOException {
         if (!f.exists()) {
             return;