< prev index next >

application/tests/org.openjdk.jmc.rjmx.test/src/test/java/org/openjdk/jmc/rjmx/test/PackageExampleTest.java

Print this page

        

@@ -72,16 +72,16 @@
          *
          * @throws ConnectionException
          */
         @Test
         public void testPackageExampleVerbatim() throws Exception {
-                IConnectionDescriptor descriptor = new ConnectionDescriptorBuilder().hostName("localhost").port(0).build(); //$NON-NLS-1$
+                IConnectionDescriptor descriptor = new ConnectionDescriptorBuilder().hostName("localhost").port(0).build();
                 IServerHandle serverHandle = IServerHandle.create(descriptor);
-                IConnectionHandle handle = serverHandle.connect("Usage description"); //$NON-NLS-1$
+                IConnectionHandle handle = serverHandle.connect("Usage description");
                 try {
                         ISubscriptionService service = handle.getServiceOrThrow(ISubscriptionService.class);
-                        MRI attribute = new MRI(Type.ATTRIBUTE, "java.lang:type=Threading", "ThreadCount"); //$NON-NLS-1$ //$NON-NLS-2$
+                        MRI attribute = new MRI(Type.ATTRIBUTE, "java.lang:type=Threading", "ThreadCount");
                         service.addMRIValueListener(attribute, new IMRIValueListener() {
                                 @Override
                                 public void valueChanged(MRIValueEvent event) {
                                         System.out.println(event.getValue());
                                 }

@@ -96,16 +96,16 @@
         }
 
         @Test
         public void testPackageExampleFunctionality() throws Exception {
                 ConnectionDescriptorBuilder builder = new ConnectionDescriptorBuilder();
-                IConnectionDescriptor descriptor = builder.hostName("localhost").port(0).build(); //$NON-NLS-1$
-                IConnectionHandle handle = IServerHandle.create(descriptor).connect("Usage description"); //$NON-NLS-1$
+                IConnectionDescriptor descriptor = builder.hostName("localhost").port(0).build();
+                IConnectionHandle handle = IServerHandle.create(descriptor).connect("Usage description");
                 try {
                         ISubscriptionService service = handle.getServiceOrThrow(ISubscriptionService.class);
                         gotEvent = false;
-                        MRI attribute = new MRI(Type.ATTRIBUTE, "java.lang:type=Threading", "ThreadCount"); //$NON-NLS-1$ //$NON-NLS-2$
+                        MRI attribute = new MRI(Type.ATTRIBUTE, "java.lang:type=Threading", "ThreadCount");
                         service.addMRIValueListener(attribute, new IMRIValueListener() {
                                 @Override
                                 public void valueChanged(MRIValueEvent event) {
                                         synchronized (PackageExampleTest.this) {
                                                 gotEvent = true;

@@ -119,21 +119,21 @@
                                 this.wait(4000);
                         }
                 } finally {
                         IOToolkit.closeSilently(handle);
                 }
-                assertTrue("Never got any event!", gotEvent); //$NON-NLS-1$
+                assertTrue("Never got any event!", gotEvent);
         }
 
         @Test
         public void testUseServerModel() throws Exception {
                 IServerModel model = RJMXPlugin.getDefault().getService(IServerModel.class);
                 for (IServer server : model.elements()) {
                         IServerDescriptor descriptor = server.getServerHandle().getServerDescriptor();
                         if (descriptor.getJvmInfo() != null
                                         && Integer.valueOf(Environment.getThisPID()).equals(descriptor.getJvmInfo().getPid())) {
-                                IConnectionHandle handle = server.getServerHandle().connect("Usage description"); //$NON-NLS-1$
+                                IConnectionHandle handle = server.getServerHandle().connect("Usage description");
                                 try {
                                         handle.getServiceOrThrow(IMBeanHelperService.class).getMBeanNames().size();
                                         return;
                                 } finally {
                                         IOToolkit.closeSilently(handle);
< prev index next >