Fix another pile of Javadoc warnings
authorFrancois Chouinard <fchouinard@gmail.com>
Wed, 25 Jul 2012 18:28:34 +0000 (14:28 -0400)
committerFrancois Chouinard <fchouinard@gmail.com>
Wed, 25 Jul 2012 18:28:34 +0000 (14:28 -0400)
Change-Id: I324c129736499c3cc4892898f9a0121e47fb7ac7
Signed-off-by: Francois Chouinard <fchouinard@gmail.com>
45 files changed:
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/AllTmfCoreTests.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/TmfCorePluginTest.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/TmfCoreTestPlugin.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/component/AllTests.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/component/TmfEventProviderTest.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/component/TmfProviderManagerTest.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/ctfadaptor/CtfTmfLightweightContextTest.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/event/AllTests.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/event/TmfEventFieldTest.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/event/TmfEventTest.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/event/TmfEventTypeManagerTest.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/event/TmfEventTypeTest.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/event/TmfSimpleTimestampTest.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/event/TmfTimeRangeTest.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/event/TmfTimestampTest.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/request/AllTests.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/request/TmfCoalescedDataRequestTest.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/request/TmfCoalescedEventRequestTest.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/request/TmfDataRequestTest.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/request/TmfEventRequestTest.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/statesystem/VerifyHistoryFile.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/trace/AllTests.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/trace/TmfCheckpointIndexTest.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/trace/TmfCheckpointTest.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/trace/TmfContextTest.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/trace/TmfExperimentCheckpointIndexTest.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/trace/TmfExperimentTest.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/trace/TmfLocationTest.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/trace/TmfMultiTraceExperimentTest.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/trace/TmfTraceTest.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/uml2sd/AllTests.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/uml2sd/TmfAsyncSequenceDiagramEventTest.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/uml2sd/TmfSyncSequenceDiagramEventTest.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/util/AllTests.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/util/TmfFixedArrayTest.java
org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/component/TmfClientStub.java
org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/component/TmfDataProviderStub.java
org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/component/TmfEventProviderStub.java
org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/component/TmfSyntheticEventProviderStub.java
org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/event/TmfEventTypeStub.java
org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/event/TmfSyntheticEventStub.java
org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/trace/TmfEventParserStub.java
org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/trace/TmfExperimentStub.java
org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/trace/TmfIndexerStub.java
org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/trace/TmfTraceStub.java

index c81571122e32e55f4bb0fe886e1b4370a1872f3a..37086175651287e3d7e0f740195ffa622be72cfb 100644 (file)
@@ -22,6 +22,9 @@ import junit.framework.TestSuite;
  */
 public class AllTmfCoreTests {
 
+       /**
+        * @return the TMF Core test suite
+        */
        public static Test suite() {
                TestSuite suite = new TestSuite(AllTmfCoreTests.class.getName());
                //$JUnit-BEGIN$
index bd6d76e7a7f717d1e53f38552d7bc8225fd95409..180c9132945a8a6704663dc1b1267deb3f30178d 100644 (file)
@@ -1,11 +1,11 @@
 /*******************************************************************************
  * Copyright (c) 2009, 2010 Ericsson
- * 
+ *
  * All rights reserved. This program and the accompanying materials are
  * made available under the terms of the Eclipse Public License v1.0 which
  * accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *   Francois Chouinard - Initial API and implementation
  *******************************************************************************/
@@ -30,7 +30,7 @@ public class TmfCorePluginTest extends TestCase {
 
        // Plug-in instantiation
        static final Activator fPlugin = new Activator();
-       
+
        // ------------------------------------------------------------------------
     // Housekeping
        // ------------------------------------------------------------------------
@@ -56,11 +56,17 @@ public class TmfCorePluginTest extends TestCase {
     // Test cases
        // ------------------------------------------------------------------------
 
-       public void testTmfCorePluginId() throws Exception {
+       /**
+        *
+        */
+       public void testTmfCorePluginId() {
                assertEquals("Plugin ID", "org.eclipse.linuxtools.tmf.core", Activator.PLUGIN_ID);
        }
 
-       public void testGetDefault() throws Exception {
+       /**
+        *
+        */
+       public void testGetDefault() {
                Activator plugin = Activator.getDefault();
                assertEquals("getDefault()", plugin, fPlugin);
        }
index 257dcc684f056b0786c8c5fef34c5a463c571f4f..59490775c87583d2a3acfcd6afce9677c99e698a 100644 (file)
@@ -1,11 +1,11 @@
 /*******************************************************************************
  * Copyright (c) 2009, 2010 Ericsson
- * 
+ *
  * All rights reserved. This program and the accompanying materials are
  * made available under the terms of the Eclipse Public License v1.0 which
  * accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *   Francois Chouinard - Initial API and implementation
  *******************************************************************************/
@@ -29,11 +29,12 @@ public class TmfCoreTestPlugin extends Plugin {
     // ------------------------------------------------------------------------
 
        // The plug-in ID
-       public static final String PLUGIN_ID = "org.eclipse.linuxtools.tmf.tests";
+       @SuppressWarnings("javadoc")
+    public static final String PLUGIN_ID = "org.eclipse.linuxtools.tmf.tests";
 
        // The shared instance
        private static TmfCoreTestPlugin fPlugin;
-       
+
     // ------------------------------------------------------------------------
     // Constructors
     // ------------------------------------------------------------------------
index e14d8da3899595eab478284a823f8605f8a8c282..40eea64bc1684fd851bd917838f15428f5fbde9a 100644 (file)
@@ -3,8 +3,17 @@ package org.eclipse.linuxtools.tmf.core.tests.component;
 import junit.framework.Test;
 import junit.framework.TestSuite;
 
+/**
+ * <b><u>AllTests</u></b>
+ * <p>
+ * Implement me. Please.
+ * <p>
+ */
 public class AllTests {
 
+       /**
+        * @return the TMF Core Component test suite
+        */
        public static Test suite() {
                TestSuite suite = new TestSuite(AllTests.class.getName());
                //$JUnit-BEGIN$
index bc4dd1291c04a8ae77216930975e579848aca76d..273f3d0e2cf39030a2a48bc958ef1a9650622926 100644 (file)
@@ -40,6 +40,9 @@ public class TmfEventProviderTest extends TestCase {
     TmfEventProviderStub fEventProvider;
     TmfSyntheticEventProviderStub fSyntheticEventProvider;
 
+    /**
+     * @param name the test anme
+     */
     public TmfEventProviderTest(String name) {
         super(name);
     }
@@ -62,7 +65,9 @@ public class TmfEventProviderTest extends TestCase {
     // getProviders (more a sanity check than a test)
     // ------------------------------------------------------------------------
 
-    @SuppressWarnings("unchecked")
+    /**
+     *
+     */
     public void testGetProviders() {
 
         // There should be 2 TmfEvent providers: a TmfTraceStub and a
@@ -85,7 +90,9 @@ public class TmfEventProviderTest extends TestCase {
     // getSyntheticEvent
     // ------------------------------------------------------------------------
 
-    @SuppressWarnings("unchecked")
+    /**
+     *
+     */
     public void testGetPlainEvents() {
 
         final int BLOCK_SIZE = 100;
@@ -123,7 +130,9 @@ public class TmfEventProviderTest extends TestCase {
         }
     }
 
-    @SuppressWarnings("unchecked")
+    /**
+     *
+     */
     public void testCancelRequests() {
 
         final int BLOCK_SIZE = 100;
@@ -232,7 +241,6 @@ public class TmfEventProviderTest extends TestCase {
         }
     }
 
-    @SuppressWarnings("unchecked")
     private static void getSyntheticData(final TmfTimeRange range,
             final int nbEvents, final int blockSize) throws InterruptedException {
 
@@ -269,6 +277,9 @@ public class TmfEventProviderTest extends TestCase {
         }
     }
 
+    /**
+     *
+     */
     // The following tests are the same but for the size of the requested blocks
     // with regards to the size of the TmfSyntheticEventProviderStub block
     public void testGetSyntheticEvents_EqualBlockSizes() {
@@ -280,6 +291,9 @@ public class TmfEventProviderTest extends TestCase {
         }
     }
 
+    /**
+     *
+     */
     public void testGetSyntheticEvents_SmallerBlock() {
         TmfTimeRange range = new TmfTimeRange(TmfTimestamp.BIG_BANG, TmfTimestamp.BIG_CRUNCH);
         try {
@@ -289,6 +303,9 @@ public class TmfEventProviderTest extends TestCase {
         }
     }
 
+    /**
+     *
+     */
     public void testGetSyntheticEvents_LargerBlock() {
         TmfTimeRange range = new TmfTimeRange(TmfTimestamp.BIG_BANG, TmfTimestamp.BIG_CRUNCH);
         try {
@@ -298,6 +315,9 @@ public class TmfEventProviderTest extends TestCase {
         }
     }
 
+    /**
+     *
+     */
     public void testGetSyntheticEvents_TimeRange() {
         TmfTimestamp start = new TmfTimestamp(1, (byte) -3, 0);
         TmfTimestamp end = new TmfTimestamp(1000, (byte) -3, 0);
@@ -337,7 +357,9 @@ public class TmfEventProviderTest extends TestCase {
     // getProviders (more a sanity check than a test)
     // ------------------------------------------------------------------------
 
-    @SuppressWarnings("unchecked")
+    /**
+     *
+     */
     public void testGetProviders2() {
 
         // There should be 2 TmfEvent providers: a TmfTraceStub and a
index d78bf5740155da29061e94d717facd7a58a80d80..d38657bc901844ff387902feccbed646f475d413 100644 (file)
@@ -1,11 +1,11 @@
 /*******************************************************************************
  * Copyright (c) 2009, 2010 Ericsson
- * 
+ *
  * All rights reserved. This program and the accompanying materials are
  * made available under the terms of the Eclipse Public License v1.0 which
  * accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *   Francois Chouinard - Initial API and implementation
  *******************************************************************************/
@@ -28,6 +28,9 @@ import org.eclipse.linuxtools.tmf.core.trace.ITmfContext;
 @SuppressWarnings({ "nls" })
 public class TmfProviderManagerTest extends TestCase {
 
+       /**
+        * @param name the test anme
+        */
        public TmfProviderManagerTest(String name) {
                super(name);
        }
@@ -45,8 +48,8 @@ public class TmfProviderManagerTest extends TestCase {
        // ------------------------------------------------------------------------
        // Dummy Providers
        // ------------------------------------------------------------------------
-       
-       public class TestProvider1 extends TmfDataProvider<TmfEvent> {
+
+       private class TestProvider1 extends TmfDataProvider<TmfEvent> {
                public TestProvider1(Class<TmfEvent> type) {
                        super("TestProvider1", type);
                }
@@ -64,7 +67,7 @@ public class TmfProviderManagerTest extends TestCase {
                }
        }
 
-       public class TestProvider2 extends TmfDataProvider<TmfEvent> {
+       private class TestProvider2 extends TmfDataProvider<TmfEvent> {
                public TestProvider2(Class<TmfEvent> type) {
                        super("TestProvider2", type);
                }
@@ -82,13 +85,14 @@ public class TmfProviderManagerTest extends TestCase {
                }
        }
 
-       public class TmfEvent3 extends TmfEvent {
-               public TmfEvent3(TmfEvent3 other) {
+       private class TmfEvent3 extends TmfEvent {
+               @SuppressWarnings("unused")
+        public TmfEvent3(TmfEvent3 other) {
                        super(other);
                }
        }
 
-       public class TestProvider3 extends TmfDataProvider<TmfEvent3> {
+       private class TestProvider3 extends TmfDataProvider<TmfEvent3> {
                public TestProvider3(Class<TmfEvent3> type) {
                        super("TestProvider3", type);
                }
@@ -110,7 +114,9 @@ public class TmfProviderManagerTest extends TestCase {
        // register/dispose
        // ------------------------------------------------------------------------
 
-       @SuppressWarnings("unchecked")
+       /**
+        *
+        */
        public void testRegister_0() {
                TmfDataProvider<TmfEvent>[] providers = (TmfDataProvider<TmfEvent>[]) TmfProviderManager.getProviders(TmfEvent.class);
                assertEquals("getProviders", 0, providers.length);
@@ -119,7 +125,9 @@ public class TmfProviderManagerTest extends TestCase {
                assertEquals("getProviders", 0, providers.length);
        }
 
-       @SuppressWarnings("unchecked")
+       /**
+        *
+        */
        public void testRegister_Unregister_1() {
 
                // Register a single provider
@@ -143,7 +151,9 @@ public class TmfProviderManagerTest extends TestCase {
                assertEquals("getProviders", 0, providers.length);
        }
 
-       @SuppressWarnings("unchecked")
+       /**
+        *
+        */
        public void testRegister_Unregister_2() {
 
                // Register 2 providers, same data type
@@ -196,7 +206,9 @@ public class TmfProviderManagerTest extends TestCase {
                assertEquals("getProviders", 0, providers.length);
        }
 
-       @SuppressWarnings("unchecked")
+       /**
+        *
+        */
        public void testRegister_Unregister_3() {
 
                // Register 3 providers, mixed data types
@@ -291,7 +303,9 @@ public class TmfProviderManagerTest extends TestCase {
                assertEquals("getProviders", 0, providers.length);
        }
 
-       @SuppressWarnings("unchecked")
+       /**
+        *
+        */
        public void testGetProvider() {
 
                // Register 3 providers, mixed data types
index 6dfaa9df182f56e9f89556c135fa09cffa92f3ca..9e346f7ec617d469a15bd7fc6719c4c40e93d044 100644 (file)
@@ -78,13 +78,11 @@ public class CtfTmfLightweightContextTest {
      * Context fuzzer. Use an amount of contexts greater than the size of the
      * iterator cache and have them access the trace in parallel.
      *
-     * @throws TmfTraceException
-     *             Would fail the test
      * @throws InterruptedException
      *             Would fail the test
      */
     @Test
-    public void testTooManyContexts() throws TmfTraceException, InterruptedException {
+    public void testTooManyContexts() throws InterruptedException {
         final int lwcCount = 101;
         double increment = (end - begin) / lwcCount;
         final ArrayList<Long> vals = new ArrayList<Long>();
index ebe265af8c8a4178dd64d42d224c555229fd6246..6e10a924c6ae8c26f36b0e15da36f8562e6dab53 100644 (file)
@@ -1,11 +1,11 @@
 /*******************************************************************************
  * Copyright (c) 2009, 2012 Ericsson
- * 
+ *
  * All rights reserved. This program and the accompanying materials are
  * made available under the terms of the Eclipse Public License v1.0 which
  * accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *   Francois Chouinard - Initial API and implementation
  *   Francois Chouinard - Adjusted for new Event Model
@@ -24,6 +24,9 @@ import org.eclipse.linuxtools.internal.tmf.core.Activator;
 @SuppressWarnings({ "nls" })
 public class AllTests {
 
+    /**
+     * @return the CTF COre Event test suite
+     */
     public static Test suite() {
         final TestSuite suite = new TestSuite("Test suite for " + Activator.PLUGIN_ID + ".event"); //$NON-NLS-1$;
         //$JUnit-BEGIN$
index 9c408e52990acb3ae14c775fce25b33131e81f2e..7d8efc81d0303949c03dc67b8ad8ebfe5132208d 100644 (file)
@@ -1,11 +1,11 @@
 /*******************************************************************************
  * Copyright (c) 2009, 2012 Ericsson
- * 
+ *
  * All rights reserved. This program and the accompanying materials are
  * made available under the terms of the Eclipse Public License v1.0 which
  * accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *   Francois Chouinard - Initial API and implementation
  *   Francois Chouinard - Adjusted for new Event Model
@@ -76,6 +76,9 @@ public class TmfEventFieldTest extends TestCase {
     // Constructors
     // ------------------------------------------------------------------------
 
+    /**
+     *
+     */
     public void testTerminalStructConstructor() {
         assertSame("getName", fFieldName1, fStructTerminalField1.getName());
         assertNull("getValue", fStructTerminalField1.getValue());
@@ -87,6 +90,9 @@ public class TmfEventFieldTest extends TestCase {
         assertNull("getFieldName", fStructTerminalField1.getFieldName(0));
     }
 
+    /**
+     *
+     */
     public void testNonTerminalStructConstructor() {
         assertSame("getName", fStructRootFieldName, fStructRootField.getName());
         assertNull("getValue", fStructRootField.getValue());
@@ -106,6 +112,9 @@ public class TmfEventFieldTest extends TestCase {
         assertNull("getFieldName", fStructRootField.getFieldName(names.length));
     }
 
+    /**
+     *
+     */
     public void testTerminalConstructor() {
         assertSame("getName", fFieldName1, fField1.getName());
         assertSame("getValue", fValue1, fField1.getValue());
@@ -124,6 +133,9 @@ public class TmfEventFieldTest extends TestCase {
         assertNull("getFieldName", fField2.getFieldName(0));
     }
 
+    /**
+     *
+     */
     public void testNonTerminalConstructor() {
         assertSame("getName", fRootFieldName, fRootField.getName());
         assertNull("getValue", fRootField.getValue());
@@ -143,6 +155,9 @@ public class TmfEventFieldTest extends TestCase {
         assertNull("getFieldName", fRootField.getFieldName(names.length));
     }
 
+    /**
+     *
+     */
     public void testConstructorBadArg() {
         try {
             new TmfEventField(null, fValue1, null);
@@ -151,6 +166,9 @@ public class TmfEventFieldTest extends TestCase {
         }
     }
 
+    /**
+     *
+     */
     public void testTerminalCopyConstructor() {
         final TmfEventField copy = new TmfEventField(fField1);
         assertSame("getName", fFieldName1, copy.getName());
@@ -162,6 +180,9 @@ public class TmfEventFieldTest extends TestCase {
         assertNull("getFieldName", copy.getFieldName(0));
     }
 
+    /**
+     *
+     */
     public void testNonTerminalCopyConstructor() {
         assertSame("getName", fRootFieldName, fRootField.getName());
         assertNull("getValue", fRootField.getValue());
@@ -180,6 +201,9 @@ public class TmfEventFieldTest extends TestCase {
         assertNull("getFieldName", fRootField.getFieldName(names.length));
     }
 
+    /**
+     *
+     */
     public void testCopyConstructorBadArg() {
         try {
             new TmfEventField(null);
@@ -208,6 +232,9 @@ public class TmfEventFieldTest extends TestCase {
         }
     }
 
+    /**
+     *
+     */
     public void testSetValue() {
         final TmfEventField field = new TmfEventField(fFieldName1, fValue1, null);
 
@@ -223,7 +250,10 @@ public class TmfEventFieldTest extends TestCase {
     // clone
     // ------------------------------------------------------------------------
 
-    public void testFieldClone() throws Exception {
+    /**
+     *
+     */
+    public void testFieldClone() {
         TmfEventField clone = fField1.clone();
         assertTrue("clone", fField1.clone().equals(fField1));
         assertTrue("clone", clone.clone().equals(clone));
@@ -237,7 +267,10 @@ public class TmfEventFieldTest extends TestCase {
         assertEquals("clone", clone, fRootField);
     }
 
-    public void testStructFieldClone() throws Exception {
+    /**
+     *
+     */
+    public void testStructFieldClone() {
         TmfEventField clone = fStructTerminalField1.clone();
         assertTrue("clone", fStructTerminalField1.clone().equals(fStructTerminalField1));
         assertTrue("clone", clone.clone().equals(clone));
@@ -255,7 +288,10 @@ public class TmfEventFieldTest extends TestCase {
     // hashCode
     // ------------------------------------------------------------------------
 
-    public void testHashCode() throws Exception {
+    /**
+     *
+     */
+    public void testHashCode() {
         TmfEventField copy = new TmfEventField(fField1);
         assertTrue("hashCode", fField1.hashCode() == copy.hashCode());
         assertTrue("hashCode", fField1.hashCode() != fField2.hashCode());
@@ -269,7 +305,10 @@ public class TmfEventFieldTest extends TestCase {
     // equals
     // ------------------------------------------------------------------------
 
-    public void testEqualsReflexivity() throws Exception {
+    /**
+     *
+     */
+    public void testEqualsReflexivity() {
         assertTrue("equals", fField1.equals(fField1));
         assertTrue("equals", fField2.equals(fField2));
 
@@ -283,7 +322,10 @@ public class TmfEventFieldTest extends TestCase {
         assertFalse("equals", fStructTerminalField2.equals(fStructTerminalField1));
     }
 
-    public void testEqualsSymmetry() throws Exception {
+    /**
+     *
+     */
+    public void testEqualsSymmetry() {
         final TmfEventField copy0 = new TmfEventField(fField1);
         assertTrue("equals", fField1.equals(copy0));
         assertTrue("equals", copy0.equals(fField1));
@@ -293,7 +335,10 @@ public class TmfEventFieldTest extends TestCase {
         assertTrue("equals", copy3.equals(fField2));
     }
 
-    public void testEqualsTransivity() throws Exception {
+    /**
+     *
+     */
+    public void testEqualsTransivity() {
         TmfEventField copy1 = new TmfEventField(fField1);
         TmfEventField copy2 = new TmfEventField(copy1);
         assertTrue("equals", fField1.equals(copy1));
@@ -307,7 +352,10 @@ public class TmfEventFieldTest extends TestCase {
         assertTrue("equals", fField2.equals(copy2));
     }
 
-    public void testEquals() throws Exception {
+    /**
+     *
+     */
+    public void testEquals() {
         assertTrue("equals", fStructTerminalField1.equals(fStructTerminalField3));
         assertTrue("equals", fStructTerminalField3.equals(fStructTerminalField1));
 
@@ -315,17 +363,26 @@ public class TmfEventFieldTest extends TestCase {
         assertFalse("equals", fField3.equals(fStructTerminalField1));
     }
 
-    public void testEqualsNull() throws Exception {
+    /**
+     *
+     */
+    public void testEqualsNull() {
         assertFalse("equals", fField1.equals(null));
         assertFalse("equals", fField2.equals(null));
     }
 
-    public void testNonEqualClasses() throws Exception {
+    /**
+     *
+     */
+    public void testNonEqualClasses() {
         assertFalse("equals", fField1.equals(fStructTerminalField1));
         assertFalse("equals", fField1.equals(fValue1));
     }
 
-    public void testNonEqualValues() throws Exception {
+    /**
+     *
+     */
+    public void testNonEqualValues() {
         final TmfEventField copy1 = new TmfEventField(fFieldName1, fValue1);
         TmfEventField copy2 = new TmfEventField(fFieldName1, fValue1);
         assertTrue("equals", copy1.equals(copy2));
@@ -340,7 +397,10 @@ public class TmfEventFieldTest extends TestCase {
         assertFalse("equals", copy2.equals(copy1));
     }
 
-    public void testNonEquals() throws Exception {
+    /**
+     *
+     */
+    public void testNonEquals() {
         assertFalse("equals", fField1.equals(fField2));
         assertFalse("equals", fField2.equals(fField1));
 
@@ -351,6 +411,9 @@ public class TmfEventFieldTest extends TestCase {
     // toString
     // ------------------------------------------------------------------------
 
+    /**
+     *
+     */
     public void testToString() {
         final String expected1 = "TmfEventField [fFieldId=" + fFieldName1 + ", fValue=" + fValue1.toString() + "]";
         TmfEventField field = new TmfEventField(fFieldName1, fValue1, null);
@@ -365,6 +428,9 @@ public class TmfEventFieldTest extends TestCase {
     // makeRoot
     // ------------------------------------------------------------------------
 
+    /**
+     *
+     */
     public void testMakeRoot() {
         ITmfEventField root = TmfEventField.makeRoot(fStructFieldNames);
         String[] names = root.getFieldNames();
index 139f1361c43dfe2aaae8af3e0dd66b31aa55192f..3699a6fa63932789f21bd3e3a2c49e40b28c2b60 100644 (file)
@@ -1,11 +1,11 @@
 /*******************************************************************************
  * Copyright (c) 2009, 2012 Ericsson
- * 
+ *
  * All rights reserved. This program and the accompanying materials are
  * made available under the terms of the Eclipse Public License v1.0 which
  * accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *   Francois Chouinard - Initial API and implementation
  *   Francois Chouinard - Adjusted for new Event Model
@@ -128,6 +128,9 @@ public class TmfEventTest extends TestCase {
     // Constructors
     // ------------------------------------------------------------------------
 
+    /**
+     *
+     */
     public void testDefaultConstructor() {
         final ITmfEvent event = new TmfEvent();
         assertNull("getTrace", event.getTrace());
@@ -139,6 +142,9 @@ public class TmfEventTest extends TestCase {
         assertNull("getReference", event.getReference());
     }
 
+    /**
+     *
+     */
     public void testFullConstructor() {
         assertNull("getTrace", fEvent1.getTrace());
         assertEquals("getRank", 0, fEvent1.getRank());
@@ -157,6 +163,9 @@ public class TmfEventTest extends TestCase {
         assertEquals("getReference", fReference2, fEvent2.getReference());
     }
 
+    /**
+     *
+     */
     public void testNoRankConstructor() {
         final TmfEvent event = new TmfEvent(null, fTimestamp1, fSource, fType, fContent1, fReference1);
         assertNull("getTrace", event.getTrace());
@@ -168,6 +177,9 @@ public class TmfEventTest extends TestCase {
         assertEquals("getReference", fReference1, event.getReference());
     }
 
+    /**
+     *
+     */
     public void testConstructorWithTrace() {
         final ITmfTrace<TmfEvent> trace = openTrace();
         final TmfEvent event = new TmfEvent(trace, 0, fTimestamp1, fSource, fType, fContent1, fReference1);
@@ -181,6 +193,9 @@ public class TmfEventTest extends TestCase {
         trace.dispose();
     }
 
+    /**
+     *
+     */
     public void testTmfEventCopy() {
         final TmfEvent event = new TmfEvent(fEvent1);
         assertNull("getTrace", event.getTrace());
@@ -192,7 +207,10 @@ public class TmfEventTest extends TestCase {
         assertEquals("getReference", fReference1, event.getReference());
     }
 
-    public void testEventCopy2() throws Exception {
+    /**
+     *
+     */
+    public void testEventCopy2() {
         try {
             new TmfEvent(null);
             fail("null copy");
@@ -264,6 +282,9 @@ public class TmfEventTest extends TestCase {
         return trace;
     }
 
+    /**
+     *
+     */
     public void testSetTrace() {
         final ITmfTrace<TmfEvent> trace = setupTrace();
         assertNotNull(trace);
@@ -280,6 +301,9 @@ public class TmfEventTest extends TestCase {
         trace.dispose();
     }
 
+    /**
+     *
+     */
     public void testSetRank() {
         final TestEvent event = new TestEvent(fEvent1);
         assertEquals("setRank", 0, event.getRank());
@@ -294,6 +318,9 @@ public class TmfEventTest extends TestCase {
         assertEquals("setRank", 0, event.getRank());
     }
 
+    /**
+     *
+     */
     public void testSetTimestamp() {
         final TestEvent event = new TestEvent(fEvent1);
         assertEquals("setTimestamp", fTimestamp1, event.getTimestamp());
@@ -308,6 +335,9 @@ public class TmfEventTest extends TestCase {
         assertEquals("setTimestamp", fTimestamp1, event.getTimestamp());
     }
 
+    /**
+     *
+     */
     public void testSetSource() {
         final TestEvent event = new TestEvent(fEvent1);
         assertEquals("setSource", fSource, event.getSource());
@@ -323,6 +353,9 @@ public class TmfEventTest extends TestCase {
         assertEquals("setContent", fSource, event.getSource());
     }
 
+    /**
+     *
+     */
     public void testSetType() {
         final TestEvent event = new TestEvent(fEvent1);
         assertEquals("setType", fType, event.getType());
@@ -341,6 +374,9 @@ public class TmfEventTest extends TestCase {
         assertEquals("setType", fType, event.getType());
     }
 
+    /**
+     *
+     */
     public void testSetContent() {
         final TestEvent event = new TestEvent(fEvent1);
         assertEquals("setContent", fContent1, event.getContent());
@@ -355,6 +391,9 @@ public class TmfEventTest extends TestCase {
         assertEquals("setContent", fContent1, event.getContent());
     }
 
+    /**
+     *
+     */
     public void testSetReference() {
         final TestEvent event = new TestEvent(fEvent1);
         assertEquals("setReference", fReference1, event.getReference());
@@ -373,7 +412,7 @@ public class TmfEventTest extends TestCase {
     // clone
     // ------------------------------------------------------------------------
 
-    public static class MyEvent extends TmfEvent {
+    private static class MyEvent extends TmfEvent {
 
         @Override
         public boolean equals(final Object other) {
@@ -385,7 +424,10 @@ public class TmfEventTest extends TestCase {
         }
     }
 
-    public void testClone1() throws Exception {
+    /**
+     *
+     */
+    public void testClone1() {
         final ITmfEvent clone = fEvent1.clone();
 
         assertTrue("clone", fEvent1.clone().equals(fEvent1));
@@ -395,7 +437,10 @@ public class TmfEventTest extends TestCase {
         assertEquals("clone", clone, fEvent1);
     }
 
-    public void testClone2() throws Exception {
+    /**
+     *
+     */
+    public void testClone2() {
         final TmfEvent event = new MyEvent();
         final TmfEvent clone = event.clone();
 
@@ -410,7 +455,10 @@ public class TmfEventTest extends TestCase {
     // hashCode
     // ------------------------------------------------------------------------
 
-    public void testHashCode() throws Exception {
+    /**
+     *
+     */
+    public void testHashCode() {
         TmfEvent event1 = new TmfEvent();
         TmfEvent event2 = new TmfEvent();
 
@@ -435,7 +483,10 @@ public class TmfEventTest extends TestCase {
     // equals
     // ------------------------------------------------------------------------
 
-    public void testEqualsReflexivity() throws Exception {
+    /**
+     *
+     */
+    public void testEqualsReflexivity() {
         assertTrue("equals", fEvent1.equals(fEvent1));
         assertTrue("equals", fEvent2.equals(fEvent2));
 
@@ -443,7 +494,10 @@ public class TmfEventTest extends TestCase {
         assertFalse("equals", fEvent2.equals(fEvent1));
     }
 
-    public void testEqualsSymmetry() throws Exception {
+    /**
+     *
+     */
+    public void testEqualsSymmetry() {
         final TmfEvent event1 = new TmfEvent(fEvent1);
         final TmfEvent event2 = new TmfEvent(fEvent2);
 
@@ -454,7 +508,10 @@ public class TmfEventTest extends TestCase {
         assertTrue("equals", fEvent2.equals(event2));
     }
 
-    public void testEqualsTransivity() throws Exception {
+    /**
+     *
+     */
+    public void testEqualsTransivity() {
         final TmfEvent event1 = new TmfEvent(fEvent1);
         final TmfEvent event2 = new TmfEvent(fEvent1);
         final TmfEvent event3 = new TmfEvent(fEvent1);
@@ -464,17 +521,26 @@ public class TmfEventTest extends TestCase {
         assertTrue("equals", event1.equals(event3));
     }
 
-    public void testEqualsNull() throws Exception {
+    /**
+     *
+     */
+    public void testEqualsNull() {
         assertFalse("equals", fEvent1.equals(null));
         assertFalse("equals", fEvent2.equals(null));
     }
 
-    public void testNonEqualClasses() throws Exception {
+    /**
+     *
+     */
+    public void testNonEqualClasses() {
         assertFalse("equals", fEvent1.equals(fEvent1.getType()));
         assertFalse("equals", fEvent1.equals(null));
     }
 
-    public void testNonEqualTraces() throws Exception {
+    /**
+     *
+     */
+    public void testNonEqualTraces() {
         final ITmfTrace<TmfEvent> trace1 = openTrace();
         final ITmfTrace<TmfEvent> trace2 = openTrace();
 
@@ -495,7 +561,10 @@ public class TmfEventTest extends TestCase {
         trace2.dispose();
     }
 
-    public void testNonEqualRanks() throws Exception {
+    /**
+     *
+     */
+    public void testNonEqualRanks() {
         final TmfEvent event1 = new TmfEvent(null, 0, fTimestamp1, fSource, fType, fContent1, fReference1);
         TmfEvent event2 = new TmfEvent(null, 0, fTimestamp1, fSource, fType, fContent1, fReference1);
         assertTrue("equals", event1.equals(event2));
@@ -506,7 +575,10 @@ public class TmfEventTest extends TestCase {
         assertFalse("equals", event2.equals(event1));
     }
 
-    public void testNonEqualTimestamps() throws Exception {
+    /**
+     *
+     */
+    public void testNonEqualTimestamps() {
         final TmfEvent event1 = new TmfEvent(null, 0, fTimestamp1, fSource, fType, fContent1, fReference1);
         TmfEvent event2 = new TmfEvent(null, 0, fTimestamp1, fSource, fType, fContent1, fReference1);
         assertTrue("equals", event1.equals(event2));
@@ -521,7 +593,10 @@ public class TmfEventTest extends TestCase {
         assertFalse("equals", event2.equals(event1));
     }
 
-    public void testNonEqualSources() throws Exception {
+    /**
+     *
+     */
+    public void testNonEqualSources() {
         final TmfEvent event1 = new TmfEvent(null, 0, fTimestamp1, fSource, fType, fContent1, fReference1);
         TmfEvent event2 = new TmfEvent(null, 0, fTimestamp1, fSource, fType, fContent1, fReference1);
         assertTrue("equals", event1.equals(event2));
@@ -536,7 +611,10 @@ public class TmfEventTest extends TestCase {
         assertFalse("equals", event2.equals(event1));
     }
 
-    public void testNonEqualTypes() throws Exception {
+    /**
+     *
+     */
+    public void testNonEqualTypes() {
         final TmfEvent event1 = new TmfEvent(null, 0, fTimestamp1, fSource, fType, fContent1, fReference1);
         TmfEvent event2 = new TmfEvent(null, 0, fTimestamp1, fSource, fType,  fContent1, fReference1);
         assertTrue("equals", event1.equals(event2));
@@ -555,7 +633,10 @@ public class TmfEventTest extends TestCase {
         assertFalse("equals", event2.equals(event1));
     }
 
-    public void testNonEqualContents() throws Exception {
+    /**
+     *
+     */
+    public void testNonEqualContents() {
         final TmfEvent event1 = new TmfEvent(null, 0, fTimestamp1, fSource, fType, fContent1, fReference1);
         TmfEvent event2 = new TmfEvent(null, 0, fTimestamp1, fSource, fType, fContent1, fReference1);
         assertTrue("equals", event1.equals(event2));
@@ -570,7 +651,10 @@ public class TmfEventTest extends TestCase {
         assertFalse("equals", event2.equals(event1));
     }
 
-    public void testNonEqualReferences() throws Exception {
+    /**
+     *
+     */
+    public void testNonEqualReferences() {
         final TmfEvent event1 = new TmfEvent(null, 0, fTimestamp1, fSource, fType, fContent1, fReference1);
         TmfEvent event2 = new TmfEvent(null, 0, fTimestamp1, fSource, fType, fContent1, fReference1);
         assertTrue("equals", event1.equals(event2));
@@ -589,6 +673,9 @@ public class TmfEventTest extends TestCase {
     // toString
     // ------------------------------------------------------------------------
 
+    /**
+     *
+     */
     public void testToString() {
         final String expected1 = "TmfEvent [fTimestamp=" + fTimestamp1 + ", fTrace=null, fRank=0, fSource=" + fSource
                 + ", fType=" + fType + ", fContent=" + fContent1 + ", fReference=" + fReference1 + "]";
index 5463178f9200f296c542e6e7b5c95693b63a39cf..b5a8da94c96764f561b55fee322af64e4117257a 100644 (file)
@@ -1,11 +1,11 @@
 /*******************************************************************************
  * Copyright (c) 2012 Ericsson
- * 
+ *
  * All rights reserved. This program and the accompanying materials are
  * made available under the terms of the Eclipse Public License v1.0 which
  * accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *   Francois Chouinard - Initial API and implementation
  *******************************************************************************/
@@ -78,6 +78,9 @@ public class TmfEventTypeManagerTest extends TestCase {
     // Getters
     // ------------------------------------------------------------------------
 
+    /**
+     *
+     */
     public void testGetContexts() {
         fInstance.clear();
         fInstance.add(fContext1, fType0);
@@ -92,6 +95,9 @@ public class TmfEventTypeManagerTest extends TestCase {
         assertEquals("getContexts", fContext2, contexts[1]);
     }
 
+    /**
+     *
+     */
     public void testGetTypes() {
         fInstance.clear();
         fInstance.add(fContext1, fType0);
@@ -101,23 +107,26 @@ public class TmfEventTypeManagerTest extends TestCase {
 
         ITmfEventType[] types = fInstance.getTypes(fContext1);
         assertEquals("getTypes", 2, types.length);
-        if (fType0 == types[0])
+        if (fType0 == types[0]) {
             assertSame("getTypes", fType1, types[1]);
-        else {
+        else {
             assertSame("getTypes", fType0, types[1]);
             assertSame("getTypes", fType1, types[0]);
         }
 
         types = fInstance.getTypes(fContext2);
         assertEquals("getTypes", 2, types.length);
-        if (fType2 == types[0])
+        if (fType2 == types[0]) {
             assertSame("getTypes", fType3, types[1]);
-        else {
+        else {
             assertSame("getTypes", fType2, types[1]);
             assertSame("getTypes", fType3, types[0]);
         }
     }
 
+    /**
+     *
+     */
     public void testGetType() {
         fInstance.clear();
         fInstance.add(fContext1, fType0);
@@ -148,6 +157,9 @@ public class TmfEventTypeManagerTest extends TestCase {
     // Operations
     // ------------------------------------------------------------------------
 
+    /**
+     *
+     */
     public void testClear() {
         fInstance.clear();
         assertEquals("clear", 0, fInstance.getContexts().length);
@@ -156,6 +168,9 @@ public class TmfEventTypeManagerTest extends TestCase {
         assertEquals("clear", "TmfEventTypeManager [fEventTypes={}]", fInstance.toString());
     }
 
+    /**
+     *
+     */
     public void testClearContext() {
         fInstance.clear();
         fInstance.add(fContext1, fType0);
@@ -179,14 +194,17 @@ public class TmfEventTypeManagerTest extends TestCase {
 
         types = fInstance.getTypes(fContext2);
         assertEquals("clear context", 2, types.length);
-        if (fType2 == types[0])
+        if (fType2 == types[0]) {
             assertSame("clear context", fType3, types[1]);
-        else {
+        else {
             assertSame("clear context", fType2, types[1]);
             assertSame("clear context", fType3, types[0]);
         }
     }
 
+    /**
+     *
+     */
     public void testBasicAdd() {
         fInstance.clear();
         fInstance.add(fContext1, fType0);
@@ -206,6 +224,9 @@ public class TmfEventTypeManagerTest extends TestCase {
         assertNotSame("add", fType0, type);
     }
 
+    /**
+     *
+     */
     public void testAdd() {
         fInstance.clear();
         fInstance.add(fContext1, fType0);
@@ -221,18 +242,18 @@ public class TmfEventTypeManagerTest extends TestCase {
 
         ITmfEventType[] types = fInstance.getTypes(fContext1);
         assertEquals("add", 2, types.length);
-        if (fType0 == types[0])
+        if (fType0 == types[0]) {
             assertSame("add", fType1, types[1]);
-        else {
+        else {
             assertSame("add", fType0, types[1]);
             assertSame("add", fType1, types[0]);
         }
 
         types = fInstance.getTypes(fContext2);
         assertEquals("add", 2, types.length);
-        if (fType2 == types[0])
+        if (fType2 == types[0]) {
             assertSame("add", fType3, types[1]);
-        else {
+        else {
             assertSame("add", fType2, types[1]);
             assertSame("add", fType3, types[0]);
         }
@@ -256,6 +277,9 @@ public class TmfEventTypeManagerTest extends TestCase {
     // Object
     // ------------------------------------------------------------------------
 
+    /**
+     *
+     */
     public void testToString() {
         fInstance.clear();
         assertEquals("toString", "TmfEventTypeManager [fEventTypes={}]", fInstance.toString());
index 9eb1b1dfa99321a4260e36b862302da6f97fc311..b705f0cc65868bfff8cf0bb3ebe21fa574b378e9 100644 (file)
@@ -72,6 +72,9 @@ public class TmfEventTypeTest extends TestCase {
     // Constructors
     // ------------------------------------------------------------------------
 
+    /**
+     *
+     */
     public void testDefaultConstructor() {
         final ITmfEventType type = new TmfEventType();
         assertEquals("getContext", ITmfEventType.DEFAULT_CONTEXT_ID, type.getContext());
@@ -81,6 +84,9 @@ public class TmfEventTypeTest extends TestCase {
         assertNull("getFieldName", type.getFieldName(0));
     }
 
+    /**
+     *
+     */
     public void testFullConstructor() {
         final ITmfEventType type0 = new TmfEventType(fContext1, fTypeId1, TmfEventField.makeRoot(fLabels0));
         assertEquals("getContext", fContext1, type0.getContext());
@@ -116,6 +122,9 @@ public class TmfEventTypeTest extends TestCase {
         assertNull("getFieldName", type2.getFieldName(labels2.length));
     }
 
+    /**
+     *
+     */
     public void testConstructorCornerCases() {
         try {
             new TmfEventType(null, fTypeId1, null);
@@ -130,6 +139,9 @@ public class TmfEventTypeTest extends TestCase {
         }
     }
 
+    /**
+     *
+     */
     public void testCopyConstructor() {
         final TmfEventType original = new TmfEventType(fContext1, fTypeId1, TmfEventField.makeRoot(fLabels1));
         final TmfEventType copy = new TmfEventType(original);
@@ -145,6 +157,9 @@ public class TmfEventTypeTest extends TestCase {
         assertNull("getFieldName", copy.getFieldName(labels1.length));
     }
 
+    /**
+     *
+     */
     public void testCopyConstructorCornerCases() {
         try {
             new TmfEventType(null);
@@ -157,20 +172,10 @@ public class TmfEventTypeTest extends TestCase {
     // clone
     // ------------------------------------------------------------------------
 
-    public static class MyEventType extends TmfEventType {
-
-        @Override
-        public boolean equals(final Object other) {
-            return super.equals(other);
-        }
-
-        @Override
-        public MyEventType clone() {
-            return (MyEventType) super.clone();
-        }
-    }
-
-    public void testClone() throws Exception {
+    /**
+     *
+     */
+    public void testClone() {
         final ITmfEventType clone = fType1.clone();
 
         assertTrue("clone", fType1.clone().equals(fType1));
@@ -180,7 +185,10 @@ public class TmfEventTypeTest extends TestCase {
         assertEquals("clone", fType1, clone);
     }
 
-    public void testClone2() throws Exception {
+    /**
+     *
+     */
+    public void testClone2() {
         final ITmfEventType type = new TmfEventType();
         final ITmfEventType clone = type.clone();
 
@@ -195,7 +203,10 @@ public class TmfEventTypeTest extends TestCase {
     // hashCode
     // ------------------------------------------------------------------------
 
-    public void testHashCode() throws Exception {
+    /**
+     *
+     */
+    public void testHashCode() {
         final TmfEventType copy1 = new TmfEventType(fType0);
 
         assertTrue("hashCode", fType0.hashCode() == copy1.hashCode());
@@ -206,7 +217,10 @@ public class TmfEventTypeTest extends TestCase {
     // equals
     // ------------------------------------------------------------------------
 
-    public void testEqualsReflexivity() throws Exception {
+    /**
+     *
+     */
+    public void testEqualsReflexivity() {
         assertTrue("equals", fType0.equals(fType0));
         assertTrue("equals", fType3.equals(fType3));
 
@@ -214,7 +228,10 @@ public class TmfEventTypeTest extends TestCase {
         assertFalse("equals", fType3.equals(fType0));
     }
 
-    public void testEqualsSymmetry() throws Exception {
+    /**
+     *
+     */
+    public void testEqualsSymmetry() {
         final TmfEventType copy0 = new TmfEventType(fType0);
         assertTrue("equals", fType0.equals(copy0));
         assertTrue("equals", copy0.equals(fType0));
@@ -228,7 +245,10 @@ public class TmfEventTypeTest extends TestCase {
         assertTrue("equals", copy2.equals(fType2));
     }
 
-    public void testEqualsTransivity() throws Exception {
+    /**
+     *
+     */
+    public void testEqualsTransivity() {
         TmfEventType copy1 = new TmfEventType(fType1);
         TmfEventType copy2 = new TmfEventType(copy1);
         assertTrue("equals", fType1.equals(copy1));
@@ -248,19 +268,28 @@ public class TmfEventTypeTest extends TestCase {
         assertTrue("equals", fType3.equals(copy2));
     }
 
-    public void testEqualsNull() throws Exception {
+    /**
+     *
+     */
+    public void testEqualsNull() {
         assertFalse("equals", fType0.equals(null));
         assertFalse("equals", fType3.equals(null));
     }
 
-    public void testNonEquals() throws Exception {
+    /**
+     *
+     */
+    public void testNonEquals() {
         assertFalse("equals", fType0.equals(fType1));
         assertFalse("equals", fType1.equals(fType2));
         assertFalse("equals", fType2.equals(fType3));
         assertFalse("equals", fType3.equals(fType0));
     }
 
-    public void testNonEqualsClasses() throws Exception {
+    /**
+     *
+     */
+    public void testNonEqualsClasses() {
         assertFalse("equals", fType1.equals(fLabels1));
     }
 
@@ -268,6 +297,9 @@ public class TmfEventTypeTest extends TestCase {
     // toString
     // ------------------------------------------------------------------------
 
+    /**
+     *
+     */
     public void testToString() {
         final String expected1 = "TmfEventType [fContext=" + ITmfEventType.DEFAULT_CONTEXT_ID +
                 ", fTypeId=" + ITmfEventType.DEFAULT_TYPE_ID + "]";
index bb198b56502cfa0de389a41b12beb97a751eca76..dd87ab0198f5a41d1ce0a0370a72d9d4c845581d 100644 (file)
@@ -1,11 +1,11 @@
 /*******************************************************************************
  * Copyright (c) 2012 Ericsson
- * 
+ *
  * All rights reserved. This program and the accompanying materials are
  * made available under the terms of the Eclipse Public License v1.0 which
  * accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *   Francois Chouinard - Initial API and implementation
  *******************************************************************************/
@@ -57,19 +57,28 @@ public class TmfSimpleTimestampTest extends TestCase {
     // Constructors
     // ------------------------------------------------------------------------
 
-    public void testDefaultConstructor() throws Exception {
+    /**
+     *
+     */
+    public void testDefaultConstructor() {
         assertEquals("getValue", 0, ts0.getValue());
         assertEquals("getscale", 0, ts0.getScale());
         assertEquals("getPrecision", 0, ts0.getPrecision());
     }
 
-    public void testFullConstructor() throws Exception {
+    /**
+     *
+     */
+    public void testFullConstructor() {
         assertEquals("getValue", 12345, ts1.getValue());
         assertEquals("getscale", 0, ts1.getScale());
         assertEquals("getPrecision", 0, ts1.getPrecision());
     }
 
-    public void testCopyConstructor() throws Exception {
+    /**
+     *
+     */
+    public void testCopyConstructor() {
         final ITmfTimestamp copy = new TmfSimpleTimestamp(ts1);
 
         assertEquals("getValue", ts1.getValue(), copy.getValue());
@@ -81,7 +90,10 @@ public class TmfSimpleTimestampTest extends TestCase {
         assertEquals("getPrecision", 0, copy.getPrecision());
     }
 
-    public void testCopyBadTimestamp() throws Exception {
+    /**
+     *
+     */
+    public void testCopyBadTimestamp() {
         final ITmfTimestamp ts0a = new TmfTimestamp(0, 1, 0);
         final ITmfTimestamp ts0b = new TmfTimestamp(0, 0, 1);
 
@@ -108,7 +120,7 @@ public class TmfSimpleTimestampTest extends TestCase {
     // clone
     // ------------------------------------------------------------------------
 
-    public static class MyTimestamp extends TmfSimpleTimestamp {
+    private static class MyTimestamp extends TmfSimpleTimestamp {
 
         @Override
         public boolean equals(final Object other) {
@@ -121,7 +133,10 @@ public class TmfSimpleTimestampTest extends TestCase {
         }
     }
 
-    public void testClone() throws Exception {
+    /**
+     *
+     */
+    public void testClone() {
         final ITmfTimestamp clone = ts0.clone();
 
         assertTrue("clone", ts0.clone().equals(ts0));
@@ -131,7 +146,10 @@ public class TmfSimpleTimestampTest extends TestCase {
         assertEquals("clone", ts0, clone);
     }
 
-    public void testClone2() throws Exception {
+    /**
+     *
+     */
+    public void testClone2() {
         final MyTimestamp timestamp = new MyTimestamp();
         final MyTimestamp clone = timestamp.clone();
 
@@ -146,7 +164,10 @@ public class TmfSimpleTimestampTest extends TestCase {
     // equals
     // ------------------------------------------------------------------------
 
-    public void testEqualsReflexivity() throws Exception {
+    /**
+     *
+     */
+    public void testEqualsReflexivity() {
         assertTrue("equals", ts0.equals(ts0));
         assertTrue("equals", ts1.equals(ts1));
         assertTrue("equals", ts2.equals(ts2));
@@ -161,7 +182,10 @@ public class TmfSimpleTimestampTest extends TestCase {
         assertTrue("equals", !ts2.equals(ts1));
     }
 
-    public void testEqualsSymmetry() throws Exception {
+    /**
+     *
+     */
+    public void testEqualsSymmetry() {
         final ITmfTimestamp ts0copy = new TmfSimpleTimestamp(ts0);
         assertTrue("equals", ts0.equals(ts0copy));
         assertTrue("equals", ts0copy.equals(ts0));
@@ -171,7 +195,10 @@ public class TmfSimpleTimestampTest extends TestCase {
         assertTrue("equals", ts1copy.equals(ts1));
     }
 
-    public void testEqualsTransivity() throws Exception {
+    /**
+     *
+     */
+    public void testEqualsTransivity() {
         final ITmfTimestamp ts0copy1 = new TmfSimpleTimestamp(ts0);
         final ITmfTimestamp ts0copy2 = new TmfSimpleTimestamp(ts0copy1);
         assertTrue("equals", ts0.equals(ts0copy1));
@@ -185,13 +212,19 @@ public class TmfSimpleTimestampTest extends TestCase {
         assertTrue("equals", ts1.equals(ts1copy2));
     }
 
-    public void testEqualsNull() throws Exception {
+    /**
+     *
+     */
+    public void testEqualsNull() {
         assertTrue("equals", !ts0.equals(null));
         assertTrue("equals", !ts1.equals(null));
         assertTrue("equals", !ts2.equals(null));
     }
 
-    public void testEqualsNonTimestamp() throws Exception {
+    /**
+     *
+     */
+    public void testEqualsNonTimestamp() {
         assertFalse("equals", ts0.equals(ts0.toString()));
     }
 
@@ -199,7 +232,10 @@ public class TmfSimpleTimestampTest extends TestCase {
     // toString
     // ------------------------------------------------------------------------
 
-    public void testToString() throws Exception {
+    /**
+     *
+     */
+    public void testToString() {
         assertEquals("toString", "TmfSimpleTimestamp [fValue=0]", ts0.toString());
         assertEquals("toString", "TmfSimpleTimestamp [fValue=12345]", ts1.toString());
         assertEquals("toString", "TmfSimpleTimestamp [fValue=-1234]", ts2.toString());
@@ -209,7 +245,10 @@ public class TmfSimpleTimestampTest extends TestCase {
     // hashCode
     // ------------------------------------------------------------------------
 
-    public void testHashCode() throws Exception {
+    /**
+     *
+     */
+    public void testHashCode() {
         final ITmfTimestamp ts0copy = new TmfTimestamp(ts0);
         final ITmfTimestamp ts1copy = new TmfTimestamp(ts1);
         final ITmfTimestamp ts2copy = new TmfTimestamp(ts2);
@@ -225,7 +264,10 @@ public class TmfSimpleTimestampTest extends TestCase {
     // normalize
     // ------------------------------------------------------------------------
 
-    public void testNormalizeScale0() throws Exception {
+    /**
+     *
+     */
+    public void testNormalizeScale0() {
         ITmfTimestamp ts = ts0.normalize(0, 0);
         assertEquals("getValue", 0, ts.getValue());
         assertEquals("getscale", 0, ts.getScale());
@@ -247,7 +289,10 @@ public class TmfSimpleTimestampTest extends TestCase {
         assertEquals("getPrecision", 0, ts.getPrecision());
     }
 
-    public void testNormalizeScaleNot0() throws Exception {
+    /**
+     *
+     */
+    public void testNormalizeScaleNot0() {
         ITmfTimestamp ts = ts0.normalize(0, 1);
         assertEquals("getValue", 0, ts.getValue());
         assertEquals("getscale", 1, ts.getScale());
@@ -273,24 +318,30 @@ public class TmfSimpleTimestampTest extends TestCase {
     // compareTo
     // ------------------------------------------------------------------------
 
-    public void testBasicCompareTo() throws Exception {
-        final ITmfTimestamp ts1 = new TmfSimpleTimestamp(900);
-        final ITmfTimestamp ts2 = new TmfSimpleTimestamp(1000);
-        final ITmfTimestamp ts3 = new TmfSimpleTimestamp(1100);
+    /**
+     *
+     */
+    public void testBasicCompareTo() {
+        final ITmfTimestamp tstamp1 = new TmfSimpleTimestamp(900);
+        final ITmfTimestamp tstamp2 = new TmfSimpleTimestamp(1000);
+        final ITmfTimestamp tstamp3 = new TmfSimpleTimestamp(1100);
 
-        assertTrue(ts1.compareTo(ts1) == 0);
+        assertTrue(tstamp1.compareTo(tstamp1) == 0);
 
-        assertTrue("CompareTo", ts1.compareTo(ts2) < 0);
-        assertTrue("CompareTo", ts1.compareTo(ts3) < 0);
+        assertTrue("CompareTo", tstamp1.compareTo(tstamp2) < 0);
+        assertTrue("CompareTo", tstamp1.compareTo(tstamp3) < 0);
 
-        assertTrue("CompareTo", ts2.compareTo(ts1) > 0);
-        assertTrue("CompareTo", ts2.compareTo(ts3) < 0);
+        assertTrue("CompareTo", tstamp2.compareTo(tstamp1) > 0);
+        assertTrue("CompareTo", tstamp2.compareTo(tstamp3) < 0);
 
-        assertTrue("CompareTo", ts3.compareTo(ts1) > 0);
-        assertTrue("CompareTo", ts3.compareTo(ts2) > 0);
+        assertTrue("CompareTo", tstamp3.compareTo(tstamp1) > 0);
+        assertTrue("CompareTo", tstamp3.compareTo(tstamp2) > 0);
     }
 
-    public void testCompareTo() throws Exception {
+    /**
+     *
+     */
+    public void testCompareTo() {
         final ITmfTimestamp ts0a = new TmfTimestamp(0, 2, 0);
         final ITmfTimestamp ts1a = new TmfTimestamp(123450, -1);
         final ITmfTimestamp ts2a = new TmfTimestamp(-12340, -1);
@@ -306,32 +357,38 @@ public class TmfSimpleTimestampTest extends TestCase {
     // getDelta
     // ------------------------------------------------------------------------
 
-    public void testDelta() throws Exception {
+    /**
+     *
+     */
+    public void testDelta() {
         // Delta for same scale and precision (delta > 0)
-        TmfTimestamp ts0 = new TmfSimpleTimestamp(10);
-        TmfTimestamp ts1 = new TmfSimpleTimestamp(5);
-        TmfTimestamp exp = new TmfSimpleTimestamp(5);
+        TmfTimestamp tstamp0 = new TmfSimpleTimestamp(10);
+        TmfTimestamp tstamp1 = new TmfSimpleTimestamp(5);
+        TmfTimestamp expectd = new TmfSimpleTimestamp(5);
 
-        ITmfTimestamp delta = ts0.getDelta(ts1);
-        assertEquals("getDelta", 0, delta.compareTo(exp, false));
+        ITmfTimestamp delta = tstamp0.getDelta(tstamp1);
+        assertEquals("getDelta", 0, delta.compareTo(expectd, false));
 
         // Delta for same scale and precision (delta < 0)
-        ts0 = new TmfTimestamp(5);
-        ts1 = new TmfTimestamp(10);
-        exp = new TmfTimestamp(-5);
+        tstamp0 = new TmfTimestamp(5);
+        tstamp1 = new TmfTimestamp(10);
+        expectd = new TmfTimestamp(-5);
 
-        delta = ts0.getDelta(ts1);
-        assertEquals("getDelta", 0, delta.compareTo(exp, false));
+        delta = tstamp0.getDelta(tstamp1);
+        assertEquals("getDelta", 0, delta.compareTo(expectd, false));
     }
 
-    public void testDelta2() throws Exception {
+    /**
+     *
+     */
+    public void testDelta2() {
         // Delta for different scale and same precision (delta > 0)
-        final TmfTimestamp ts0 = new TmfSimpleTimestamp(10);
-        final TmfTimestamp ts1 = new TmfTimestamp(1, 1);
-        final TmfTimestamp exp = new TmfTimestamp(0, 0);
+        final TmfTimestamp tstamp0 = new TmfSimpleTimestamp(10);
+        final TmfTimestamp tstamp1 = new TmfTimestamp(1, 1);
+        final TmfTimestamp expectd = new TmfTimestamp(0, 0);
 
-        final ITmfTimestamp delta = ts0.getDelta(ts1);
-        assertEquals("getDelta", 0, delta.compareTo(exp, false));
+        final ITmfTimestamp delta = tstamp0.getDelta(tstamp1);
+        assertEquals("getDelta", 0, delta.compareTo(expectd, false));
     }
 
 }
index a3e3e390cb196d78ec2a991ffa353b741ffaaea2..875d89b64a0603a6d4a9d066bf430ca59e5cc995 100644 (file)
@@ -1,11 +1,11 @@
 /*******************************************************************************
  * Copyright (c) 2009, 2010, 2012 Ericsson
- * 
+ *
  * All rights reserved. This program and the accompanying materials are
  * made available under the terms of the Eclipse Public License v1.0 which
  * accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *   Francois Chouinard - Initial API and implementation
  *   Francois Chouinard - Adjusted for new Event Model
@@ -29,6 +29,9 @@ public class TmfTimeRangeTest extends TestCase {
     // Housekeeping
     // ------------------------------------------------------------------------
 
+    /**
+     * @param name the test name
+     */
     public TmfTimeRangeTest(final String name) {
         super(name);
     }
@@ -47,7 +50,10 @@ public class TmfTimeRangeTest extends TestCase {
     // Constructors
     // ------------------------------------------------------------------------
 
-    public void testConstructor() throws Exception {
+    /**
+     *
+     */
+    public void testConstructor() {
         final ITmfTimestamp ts1 = new TmfTimestamp(12345);
         final ITmfTimestamp ts2 = new TmfTimestamp(12350);
         final TmfTimeRange range = new TmfTimeRange(ts1, ts2);
@@ -56,7 +62,10 @@ public class TmfTimeRangeTest extends TestCase {
         assertEquals("endTime", ts2, range.getEndTime());
     }
 
-    public void testBadConstructor() throws Exception {
+    /**
+     *
+     */
+    public void testBadConstructor() {
         try {
             new TmfTimeRange(TmfTimestamp.BIG_BANG, null);
             fail("TmfTimeRange: bad end time");
@@ -72,7 +81,10 @@ public class TmfTimeRangeTest extends TestCase {
         }
     }
 
-    public void testOpenRange1() throws Exception {
+    /**
+     *
+     */
+    public void testOpenRange1() {
         final ITmfTimestamp ts2 = new TmfTimestamp(12350);
         final TmfTimeRange range = new TmfTimeRange(TmfTimestamp.BIG_BANG, ts2);
 
@@ -80,7 +92,10 @@ public class TmfTimeRangeTest extends TestCase {
         assertEquals("endTime", ts2, range.getEndTime());
     }
 
-    public void testOpenRange2() throws Exception {
+    /**
+     *
+     */
+    public void testOpenRange2() {
         final ITmfTimestamp ts1 = new TmfTimestamp(12345);
         final TmfTimeRange range = new TmfTimeRange(ts1, TmfTimestamp.BIG_CRUNCH);
 
@@ -88,14 +103,20 @@ public class TmfTimeRangeTest extends TestCase {
         assertEquals("endTime", TmfTimestamp.BIG_CRUNCH, range.getEndTime());
     }
 
-    public void testOpenRange3() throws Exception {
+    /**
+     *
+     */
+    public void testOpenRange3() {
         final TmfTimeRange range = new TmfTimeRange(TmfTimestamp.BIG_BANG, TmfTimestamp.BIG_CRUNCH);
 
         assertEquals("startTime", TmfTimestamp.BIG_BANG, range.getStartTime());
         assertEquals("endTime", TmfTimestamp.BIG_CRUNCH, range.getEndTime());
     }
 
-    public void testCopyConstructor() throws Exception {
+    /**
+     *
+     */
+    public void testCopyConstructor() {
         final ITmfTimestamp ts1 = new TmfTimestamp(12345);
         final ITmfTimestamp ts2 = new TmfTimestamp(12350);
         final TmfTimeRange range0 = new TmfTimeRange(ts1, ts2);
@@ -111,7 +132,10 @@ public class TmfTimeRangeTest extends TestCase {
         assertEquals("endTime", TmfTimestamp.BIG_CRUNCH, range3.getEndTime());
     }
 
-    public void testCopyConstructor2() throws Exception {
+    /**
+     *
+     */
+    public void testCopyConstructor2() {
         try {
             new TmfTimeRange(null);
             fail("TmfTimeRange: null argument");
@@ -124,7 +148,10 @@ public class TmfTimeRangeTest extends TestCase {
     // clone
     // ------------------------------------------------------------------------
 
-    public void testClone() throws Exception {
+    /**
+     * @throws CloneNotSupportedException cloning problem
+     */
+    public void testClone() throws CloneNotSupportedException {
         final ITmfTimestamp ts1 = new TmfTimestamp(12345);
         final ITmfTimestamp ts2 = new TmfTimestamp(12350);
 
@@ -143,7 +170,10 @@ public class TmfTimeRangeTest extends TestCase {
     // hashCode
     // ------------------------------------------------------------------------
 
-    public void testHashCode() throws Exception {
+    /**
+     *
+     */
+    public void testHashCode() {
         final ITmfTimestamp ts1 = new TmfTimestamp(12345);
         final ITmfTimestamp ts2 = new TmfTimestamp(12350);
         final TmfTimeRange range1 = new TmfTimeRange(ts1, ts2);
@@ -161,7 +191,10 @@ public class TmfTimeRangeTest extends TestCase {
     // equals
     // ------------------------------------------------------------------------
 
-    public void testEqualsReflexivity() throws Exception {
+    /**
+     *
+     */
+    public void testEqualsReflexivity() {
         final ITmfTimestamp ts1 = new TmfTimestamp(12345);
         final ITmfTimestamp ts2 = new TmfTimestamp(12350);
         final TmfTimeRange range1 = new TmfTimeRange(ts1, ts2);
@@ -174,7 +207,10 @@ public class TmfTimeRangeTest extends TestCase {
         assertTrue("equals", !range2.equals(range1));
     }
 
-    public void testEqualsSymmetry() throws Exception {
+    /**
+     *
+     */
+    public void testEqualsSymmetry() {
         final ITmfTimestamp ts1 = new TmfTimestamp(12345);
         final ITmfTimestamp ts2 = new TmfTimestamp(12350);
         final TmfTimeRange range1a = new TmfTimeRange(ts1, ts2);
@@ -190,7 +226,10 @@ public class TmfTimeRangeTest extends TestCase {
         assertTrue("equals", range2b.equals(range2a));
     }
 
-    public void testEqualsTransivity() throws Exception {
+    /**
+     *
+     */
+    public void testEqualsTransivity() {
         final ITmfTimestamp ts1 = new TmfTimestamp(12345);
         final ITmfTimestamp ts2 = new TmfTimestamp(12350);
         final TmfTimeRange range1a = new TmfTimeRange(ts1, ts2);
@@ -202,7 +241,10 @@ public class TmfTimeRangeTest extends TestCase {
         assertTrue("equals", range1a.equals(range1c));
     }
 
-    public void testEqualsNull() throws Exception {
+    /**
+     *
+     */
+    public void testEqualsNull() {
         final ITmfTimestamp ts1 = new TmfTimestamp(12345);
         final ITmfTimestamp ts2 = new TmfTimestamp(12350);
         final TmfTimeRange range1 = new TmfTimeRange(ts1, ts2);
@@ -210,7 +252,10 @@ public class TmfTimeRangeTest extends TestCase {
         assertTrue("equals", !range1.equals(null));
     }
 
-    public void testEqualsBadType() throws Exception {
+    /**
+     *
+     */
+    public void testEqualsBadType() {
         final ITmfTimestamp ts1 = new TmfTimestamp(12345);
         final ITmfTimestamp ts2 = new TmfTimestamp(12350);
         final TmfTimeRange range1 = new TmfTimeRange(ts1, ts2);
@@ -218,7 +263,10 @@ public class TmfTimeRangeTest extends TestCase {
         assertTrue("equals", !range1.equals(ts1));
     }
 
-    public void testEqualStartTime() throws Exception {
+    /**
+     *
+     */
+    public void testEqualStartTime() {
         final ITmfTimestamp ts1 = new TmfTimestamp(12345);
         final ITmfTimestamp ts2 = new TmfTimestamp(12350);
         final ITmfTimestamp ts3 = new TmfTimestamp(12355);
@@ -231,7 +279,10 @@ public class TmfTimeRangeTest extends TestCase {
         assertTrue("equals", !range1.equals(range3));
     }
 
-    public void testEqualsEndTime() throws Exception {
+    /**
+     *
+     */
+    public void testEqualsEndTime() {
         final ITmfTimestamp ts1 = new TmfTimestamp(12345);
         final ITmfTimestamp ts2 = new TmfTimestamp(12350);
         final ITmfTimestamp ts3 = new TmfTimestamp(12355);
@@ -248,7 +299,10 @@ public class TmfTimeRangeTest extends TestCase {
     // toString
     // ------------------------------------------------------------------------
 
-    public void testToString() throws Exception {
+    /**
+     *
+     */
+    public void testToString() {
         final ITmfTimestamp ts1 = new TmfTimestamp(12345);
         final ITmfTimestamp ts2 = new TmfTimestamp(12350);
         final TmfTimeRange range = new TmfTimeRange(ts1, ts2);
@@ -261,7 +315,10 @@ public class TmfTimeRangeTest extends TestCase {
     // contains
     // ------------------------------------------------------------------------
 
-    public void testContainsTimestamp() throws Exception {
+    /**
+     *
+     */
+    public void testContainsTimestamp() {
         final ITmfTimestamp ts1 = new TmfTimestamp(12345);
         final ITmfTimestamp ts2 = new TmfTimestamp(12350);
         final TmfTimeRange range = new TmfTimeRange(ts1, ts2);
@@ -276,7 +333,10 @@ public class TmfTimeRangeTest extends TestCase {
         assertTrue("contains (zero)", range.contains(TmfTimestamp.ZERO));
     }
 
-    public void testContainsRange() throws Exception {
+    /**
+     *
+     */
+    public void testContainsRange() {
         final ITmfTimestamp ts1 = new TmfTimestamp(10);
         final ITmfTimestamp ts2 = new TmfTimestamp(20);
         final ITmfTimestamp ts3 = new TmfTimestamp(30);
@@ -329,7 +389,10 @@ public class TmfTimeRangeTest extends TestCase {
     // getIntersection
     // ------------------------------------------------------------------------
 
-    public void testGetIntersection() throws Exception {
+    /**
+     *
+     */
+    public void testGetIntersection() {
 
         final ITmfTimestamp ts1a = new TmfTimestamp(1000);
         final ITmfTimestamp ts1b = new TmfTimestamp(2000);
index 95e1136ee22e7cd8234f4f2f041c21366b0dae5a..73d28a3fa1c1f661495ef5a0bf51a0fdea673e83 100644 (file)
@@ -1,11 +1,11 @@
 /*******************************************************************************
  * Copyright (c) 2009, 2012 Ericsson
- * 
+ *
  * All rights reserved. This program and the accompanying materials are
  * made available under the terms of the Eclipse Public License v1.0 which
  * accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *   Francois Chouinard - Initial API and implementation
  *   Francois Chouinard - Adjusted for new Event Model
@@ -58,31 +58,46 @@ public class TmfTimestampTest extends TestCase {
     // Constructors
     // ------------------------------------------------------------------------
 
-    public void testDefaultConstructor() throws Exception {
+    /**
+     *
+     */
+    public void testDefaultConstructor() {
         assertEquals("getValue", 0, ts0.getValue());
         assertEquals("getscale", 0, ts0.getScale());
         assertEquals("getPrecision", 0, ts0.getPrecision());
     }
 
-    public void testValueConstructor() throws Exception {
+    /**
+     *
+     */
+    public void testValueConstructor() {
         assertEquals("getValue", 12345, ts1.getValue());
         assertEquals("getscale", 0, ts1.getScale());
         assertEquals("getPrecision", 0, ts1.getPrecision());
     }
 
-    public void testValueScaleConstructor() throws Exception {
+    /**
+     *
+     */
+    public void testValueScaleConstructor() {
         assertEquals("getValue", 12345, ts2.getValue());
         assertEquals("getscale", -1, ts2.getScale());
         assertEquals("getPrecision", 0, ts2.getPrecision());
     }
 
-    public void testFullConstructor() throws Exception {
+    /**
+     *
+     */
+    public void testFullConstructor() {
         assertEquals("getValue", 12345, ts3.getValue());
         assertEquals("getscale", 2, ts3.getScale());
         assertEquals("getPrecision", 5, ts3.getPrecision());
     }
 
-    public void testCopyConstructor() throws Exception {
+    /**
+     *
+     */
+    public void testCopyConstructor() {
         final ITmfTimestamp ts = new TmfTimestamp(12345, 2, 5);
         final ITmfTimestamp copy = new TmfTimestamp(ts);
 
@@ -95,7 +110,10 @@ public class TmfTimestampTest extends TestCase {
         assertEquals("getPrecision", 5, copy.getPrecision());
     }
 
-    public void testCopyNullConstructor() throws Exception {
+    /**
+     *
+     */
+    public void testCopyNullConstructor() {
         try {
             new TmfTimestamp(null);
             fail("TmfTimestamp: null argument");
@@ -103,21 +121,30 @@ public class TmfTimestampTest extends TestCase {
         }
     }
 
-    public void testCopyConstructorBigBang() throws Exception {
+    /**
+     *
+     */
+    public void testCopyConstructorBigBang() {
         final ITmfTimestamp ts = new TmfTimestamp(TmfTimestamp.BIG_BANG);
         assertEquals("getValue", TmfTimestamp.BIG_BANG.getValue(), ts.getValue());
         assertEquals("getscale", TmfTimestamp.BIG_BANG.getScale(), ts.getScale());
         assertEquals("getPrecision", TmfTimestamp.BIG_BANG.getPrecision(), ts.getPrecision());
     }
 
-    public void testCopyConstructorBigCrunch() throws Exception {
+    /**
+     *
+     */
+    public void testCopyConstructorBigCrunch() {
         final ITmfTimestamp ts = new TmfTimestamp(TmfTimestamp.BIG_CRUNCH);
         assertEquals("getValue", TmfTimestamp.BIG_CRUNCH.getValue(), ts.getValue());
         assertEquals("getscale", TmfTimestamp.BIG_CRUNCH.getScale(), ts.getScale());
         assertEquals("getPrecision", TmfTimestamp.BIG_CRUNCH.getPrecision(), ts.getPrecision());
     }
 
-    public void testCopyConstructorZero() throws Exception {
+    /**
+     *
+     */
+    public void testCopyConstructorZero() {
         final ITmfTimestamp ts = new TmfTimestamp(TmfTimestamp.ZERO);
         assertEquals("getValue", TmfTimestamp.ZERO.getValue(), ts.getValue());
         assertEquals("getscale", TmfTimestamp.ZERO.getScale(), ts.getScale());
@@ -128,7 +155,7 @@ public class TmfTimestampTest extends TestCase {
     // clone
     // ------------------------------------------------------------------------
 
-    public static class MyTimestamp extends TmfTimestamp {
+    private static class MyTimestamp extends TmfTimestamp {
 
         @Override
         public boolean equals(final Object other) {
@@ -141,7 +168,10 @@ public class TmfTimestampTest extends TestCase {
         }
     }
 
-    public void testClone() throws Exception {
+    /**
+     *
+     */
+    public void testClone() {
         final ITmfTimestamp clone = ts0.clone();
 
         assertTrue("clone", ts0.clone().equals(ts0));
@@ -151,7 +181,10 @@ public class TmfTimestampTest extends TestCase {
         assertEquals("clone", ts0, clone);
     }
 
-    public void testClone2() throws Exception {
+    /**
+     *
+     */
+    public void testClone2() {
         final MyTimestamp timestamp = new MyTimestamp();
         final MyTimestamp clone = timestamp.clone();
 
@@ -166,7 +199,10 @@ public class TmfTimestampTest extends TestCase {
     // hashCode
     // ------------------------------------------------------------------------
 
-    public void testHashCode() throws Exception {
+    /**
+     *
+     */
+    public void testHashCode() {
         final ITmfTimestamp ts0copy = new TmfTimestamp(ts0);
         final ITmfTimestamp ts1copy = new TmfTimestamp(ts1);
         final ITmfTimestamp ts2copy = new TmfTimestamp(ts2);
@@ -182,7 +218,10 @@ public class TmfTimestampTest extends TestCase {
     // equals
     // ------------------------------------------------------------------------
 
-    public void testEqualsReflexivity() throws Exception {
+    /**
+     *
+     */
+    public void testEqualsReflexivity() {
         assertTrue("equals", ts0.equals(ts0));
         assertTrue("equals", ts1.equals(ts1));
 
@@ -190,7 +229,10 @@ public class TmfTimestampTest extends TestCase {
         assertTrue("equals", !ts1.equals(ts0));
     }
 
-    public void testEqualsSymmetry() throws Exception {
+    /**
+     *
+     */
+    public void testEqualsSymmetry() {
         final ITmfTimestamp ts0copy = new TmfTimestamp(ts0);
         assertTrue("equals", ts0.equals(ts0copy));
         assertTrue("equals", ts0copy.equals(ts0));
@@ -204,7 +246,10 @@ public class TmfTimestampTest extends TestCase {
         assertTrue("equals", ts2copy.equals(ts2));
     }
 
-    public void testEqualsTransivity() throws Exception {
+    /**
+     *
+     */
+    public void testEqualsTransivity() {
         final ITmfTimestamp ts0copy1 = new TmfTimestamp(ts0);
         final ITmfTimestamp ts0copy2 = new TmfTimestamp(ts0copy1);
         assertTrue("equals", ts0.equals(ts0copy1));
@@ -224,12 +269,18 @@ public class TmfTimestampTest extends TestCase {
         assertTrue("equals", ts2.equals(ts2copy2));
     }
 
-    public void testEqualsNull() throws Exception {
+    /**
+     *
+     */
+    public void testEqualsNull() {
         assertTrue("equals", !ts0.equals(null));
         assertTrue("equals", !ts1.equals(null));
     }
 
-    public void testEqualsNonTimestamp() throws Exception {
+    /**
+     *
+     */
+    public void testEqualsNonTimestamp() {
         assertFalse("equals", ts0.equals(ts0.toString()));
     }
 
@@ -237,7 +288,10 @@ public class TmfTimestampTest extends TestCase {
     // toString
     // ------------------------------------------------------------------------
 
-    public void testToString() throws Exception {
+    /**
+     *
+     */
+    public void testToString() {
         assertEquals("toString", "TmfTimestamp [fValue=0, fScale=0, fPrecision=0]", ts0.toString());
         assertEquals("toString", "TmfTimestamp [fValue=12345, fScale=0, fPrecision=0]", ts1.toString());
         assertEquals("toString", "TmfTimestamp [fValue=12345, fScale=-1, fPrecision=0]", ts2.toString());
@@ -248,7 +302,10 @@ public class TmfTimestampTest extends TestCase {
     // normalize
     // ------------------------------------------------------------------------
 
-    public void testNormalizeOffset() throws Exception {
+    /**
+     *
+     */
+    public void testNormalizeOffset() {
         ITmfTimestamp ts = ts0.normalize(0, 0);
         assertEquals("getValue", 0, ts.getValue());
         assertEquals("getscale", 0, ts.getScale());
@@ -270,7 +327,10 @@ public class TmfTimestampTest extends TestCase {
         assertEquals("getPrecision", 0, ts.getPrecision());
     }
 
-    public void testNormalizeOffsetLowerLimits() throws Exception {
+    /**
+     *
+     */
+    public void testNormalizeOffsetLowerLimits() {
         final ITmfTimestamp ref = new TmfTimestamp(Long.MIN_VALUE + 5);
 
         ITmfTimestamp ts = ref.normalize(-4, 0);
@@ -289,7 +349,10 @@ public class TmfTimestampTest extends TestCase {
         assertEquals("getPrecision", 0, ts.getPrecision());
     }
 
-    public void testNormalizeOffsetUpperLimits() throws Exception {
+    /**
+     *
+     */
+    public void testNormalizeOffsetUpperLimits() {
         final ITmfTimestamp ref = new TmfTimestamp(Long.MAX_VALUE - 5);
 
         ITmfTimestamp ts = ref.normalize(4, 0);
@@ -308,7 +371,10 @@ public class TmfTimestampTest extends TestCase {
         assertEquals("getPrecision", 0, ts.getPrecision());
     }
 
-    public void testNormalizeScale() throws Exception {
+    /**
+     *
+     */
+    public void testNormalizeScale() {
         ITmfTimestamp ts = ts0.normalize(0, 10);
         assertEquals("getValue", 0, ts.getValue());
         assertEquals("getscale", 10, ts.getScale());
@@ -320,7 +386,10 @@ public class TmfTimestampTest extends TestCase {
         assertEquals("getPrecision", 0, ts.getPrecision());
     }
 
-    public void testNormalizedScaleLimits() throws Exception {
+    /**
+     *
+     */
+    public void testNormalizedScaleLimits() {
         final int MAX_SCALE_DIFF = 19;
 
         // Test below limit
@@ -350,14 +419,20 @@ public class TmfTimestampTest extends TestCase {
         }
     }
 
-    public void testNormalizeOffsetAndScaleTrivial() throws Exception {
+    /**
+     *
+     */
+    public void testNormalizeOffsetAndScaleTrivial() {
         final ITmfTimestamp ts = ts0.normalize(0, 0);
         assertEquals("getValue", 0, ts.getValue());
         assertEquals("getscale", 0, ts.getScale());
         assertEquals("getPrecision", 0, ts.getPrecision());
     }
 
-    public void testNormalizeOffsetAndScale() throws Exception {
+    /**
+     *
+     */
+    public void testNormalizeOffsetAndScale() {
         final int SCALE = 12;
 
         ITmfTimestamp ts = ts0.normalize(0, SCALE);
@@ -381,7 +456,10 @@ public class TmfTimestampTest extends TestCase {
         assertEquals("getPrecision", 0, ts.getPrecision());
     }
 
-    public void testNormalizeOffsetAndScale2() throws Exception {
+    /**
+     *
+     */
+    public void testNormalizeOffsetAndScale2() {
         int SCALE = 2;
         ITmfTimestamp ts = ts1.normalize(0, SCALE);
         assertEquals("getValue", 123, ts.getValue());
@@ -409,7 +487,11 @@ public class TmfTimestampTest extends TestCase {
     // compareTo
     // ------------------------------------------------------------------------
 
-    public void testBasicCompareTo() throws Exception {
+    /**
+     *
+     */
+    @SuppressWarnings("hiding")
+    public void testBasicCompareTo() {
         final ITmfTimestamp ts1 = new TmfTimestamp(900, 0, 50);
         final ITmfTimestamp ts2 = new TmfTimestamp(1000, 0, 50);
         final ITmfTimestamp ts3 = new TmfTimestamp(1100, 0, 50);
@@ -430,7 +512,10 @@ public class TmfTimestampTest extends TestCase {
         assertTrue("CompareTo", ts3.compareTo(ts4) > 0);
     }
 
-    public void testCompareToCornerCases1() throws Exception {
+    /**
+     *
+     */
+    public void testCompareToCornerCases1() {
         final ITmfTimestamp ts0a = new TmfTimestamp(ts0);
         final ITmfTimestamp ts0b = new TmfTimestamp(ts0.getValue(), ts0.getScale() + 1);
         final ITmfTimestamp ts0c = new TmfTimestamp(ts0.getValue() + 1, ts0.getScale());
@@ -443,7 +528,10 @@ public class TmfTimestampTest extends TestCase {
         assertTrue("compareTo", ts0.compareTo(ts0d, false) == -1);
     }
 
-    public void testCompareToCornerCases2() throws Exception {
+    /**
+     *
+     */
+    public void testCompareToCornerCases2() {
         final ITmfTimestamp ts0a = new TmfTimestamp(Long.MAX_VALUE, Integer.MAX_VALUE - 1);
         final ITmfTimestamp ts0b = new TmfTimestamp(0, Integer.MAX_VALUE);
         final ITmfTimestamp ts0c = new TmfTimestamp(Long.MAX_VALUE, Integer.MAX_VALUE);
@@ -458,7 +546,10 @@ public class TmfTimestampTest extends TestCase {
         assertTrue("compareTo", ts0c.compareTo(ts0b, false) == 1);
     }
 
-    public void testCompareToCornerCases3() throws Exception {
+    /**
+     *
+     */
+    public void testCompareToCornerCases3() {
         final ITmfTimestamp ts0a = new TmfTimestamp(Long.MIN_VALUE, Integer.MAX_VALUE - 1);
         final ITmfTimestamp ts0b = new TmfTimestamp(0, Integer.MAX_VALUE);
         final ITmfTimestamp ts0c = new TmfTimestamp(Long.MIN_VALUE, Integer.MAX_VALUE);
@@ -473,12 +564,19 @@ public class TmfTimestampTest extends TestCase {
         assertTrue("compareTo", ts0c.compareTo(ts0b, false) == -1);
     }
 
-    public void testCompareToCornerCases4() throws Exception {
+    /**
+     *
+     */
+    public void testCompareToCornerCases4() {
         assertTrue("compareTo", ts0.compareTo(null, false) == 1);
         assertTrue("compareTo", ts0.compareTo(null, true) == 1);
     }
 
-    public void testCompareToSameScale() throws Exception {
+    /**
+     *
+     */
+    @SuppressWarnings("hiding")
+    public void testCompareToSameScale() {
         final ITmfTimestamp ts1 = new TmfTimestamp(900, 0, 50);
         final ITmfTimestamp ts2 = new TmfTimestamp(1000, 0, 50);
         final ITmfTimestamp ts3 = new TmfTimestamp(1100, 0, 50);
@@ -499,7 +597,11 @@ public class TmfTimestampTest extends TestCase {
         assertTrue("CompareTo", ts3.compareTo(ts4, false) > 0);
     }
 
-    public void testCompareToDifferentScale() throws Exception {
+    /**
+     *
+     */
+    @SuppressWarnings("hiding")
+    public void testCompareToDifferentScale() {
         final ITmfTimestamp ts1 = new TmfTimestamp(9000, -1, 50);
         final ITmfTimestamp ts2 = new TmfTimestamp(1000, 0, 50);
         final ITmfTimestamp ts3 = new TmfTimestamp(110, 1, 50);
@@ -520,7 +622,11 @@ public class TmfTimestampTest extends TestCase {
         assertTrue("CompareTo", ts3.compareTo(ts4, false) > 0);
     }
 
-    public void testCompareToWithinPrecision() throws Exception {
+    /**
+     *
+     */
+    @SuppressWarnings("hiding")
+    public void testCompareToWithinPrecision() {
         final ITmfTimestamp ts1 = new TmfTimestamp(900, 0, 50);
         final ITmfTimestamp ts2 = new TmfTimestamp(1000, 0, 50);
         final ITmfTimestamp ts3 = new TmfTimestamp(1100, 0, 50);
@@ -541,7 +647,11 @@ public class TmfTimestampTest extends TestCase {
         assertTrue("CompareTo", ts3.compareTo(ts4, true) == 0);
     }
 
-    public void testCompareToLargeScale1() throws Exception {
+    /**
+     *
+     */
+    @SuppressWarnings("hiding")
+    public void testCompareToLargeScale1() {
         final ITmfTimestamp ts1 = new TmfTimestamp(-1, 100);
         final ITmfTimestamp ts2 = new TmfTimestamp(-1000, -100);
         final ITmfTimestamp ts3 = new TmfTimestamp(1, 100);
@@ -564,7 +674,10 @@ public class TmfTimestampTest extends TestCase {
         assertTrue("CompareTo", ts4.compareTo(ts3, false) < 0);
     }
 
-    public void testCompareToLargeScale2() throws Exception {
+    /**
+     *
+     */
+    public void testCompareToLargeScale2() {
         final ITmfTimestamp ts0a = new TmfTimestamp(0, Integer.MAX_VALUE);
         final ITmfTimestamp ts0b = new TmfTimestamp(1, Integer.MAX_VALUE);
 
@@ -579,7 +692,11 @@ public class TmfTimestampTest extends TestCase {
     // getDelta
     // ------------------------------------------------------------------------
 
-    public void testDelta() throws Exception {
+    /**
+     *
+     */
+    @SuppressWarnings("hiding")
+    public void testDelta() {
         // Delta for same scale and precision (delta > 0)
         ITmfTimestamp ts0 = new TmfTimestamp(10, 9);
         ITmfTimestamp ts1 = new TmfTimestamp(5, 9);
index ba8879363899eea327bdc81d8cfbdefbaf5899a9..e6d2e3561d6c4faf6539e3ace823ce0c25228232 100644 (file)
@@ -5,9 +5,18 @@ import junit.framework.TestSuite;
 
 import org.eclipse.linuxtools.internal.tmf.core.Activator;
 
+/**
+ * <b><u>AllTests</u></b>
+ * <p>
+ * Implement me. Please.
+ * <p>
+ */
 @SuppressWarnings({ "nls" })
 public class AllTests {
 
+       /**
+        * @return the test suite
+        */
        public static Test suite() {
                TestSuite suite = new TestSuite("Test suite for " + Activator.PLUGIN_ID + ".request"); //$NON-NLS-1$);
                //$JUnit-BEGIN$
index 4d72b8eb5e604816df4435a5451c968f5af96da0..460c8c0d3f3280bca86bf210a94bb57ddcf3af3f 100644 (file)
@@ -23,7 +23,7 @@ import org.eclipse.linuxtools.tmf.tests.stubs.request.TmfDataRequestStub;
 /**
  * Test suite for the TmfCoalescedDataRequest class.
  */
-@SuppressWarnings({ "nls" })
+@SuppressWarnings({"nls","javadoc"})
 public class TmfCoalescedDataRequestTest extends TestCase {
 
        // ------------------------------------------------------------------------
@@ -44,7 +44,10 @@ public class TmfCoalescedDataRequestTest extends TestCase {
        // Housekeeping
        // ------------------------------------------------------------------------
 
-       public TmfCoalescedDataRequestTest(String name) {
+       /**
+        * @param name the test name
+        */
+       public TmfCoalescedDataRequestTest(final String name) {
                super(name);
        }
 
@@ -99,7 +102,7 @@ public class TmfCoalescedDataRequestTest extends TestCase {
        // Constructors
        // ------------------------------------------------------------------------
 
-       public void testTmfCoalescedDataRequest() {
+    public void testTmfCoalescedDataRequest() {
                TmfCoalescedDataRequest<TmfEvent> request = new TmfCoalescedDataRequest<TmfEvent>(TmfEvent.class);
 
         assertEquals("getRequestId", fRequestCount++, request.getRequestId());
@@ -167,7 +170,7 @@ public class TmfCoalescedDataRequestTest extends TestCase {
        // equals
        // ------------------------------------------------------------------------
 
-       public void testEqualsReflexivity() throws Exception {
+       public void testEqualsReflexivity() {
         assertTrue("equals", fRequest1.equals(fRequest1));
         assertTrue("equals", fRequest2.equals(fRequest2));
 
@@ -175,7 +178,7 @@ public class TmfCoalescedDataRequestTest extends TestCase {
         assertFalse("equals", fRequest2.equals(fRequest1));
        }
 
-       public void testEqualsSymmetry() throws Exception {
+       public void testEqualsSymmetry() {
         assertTrue("equals", fRequest1.equals(fRequest1b));
         assertTrue("equals", fRequest1b.equals(fRequest1));
 
@@ -185,13 +188,13 @@ public class TmfCoalescedDataRequestTest extends TestCase {
         assertFalse("equals", fRequest3.equals(fRequest2));
        }
 
-       public void testEqualsTransivity() throws Exception {
+       public void testEqualsTransivity() {
         assertTrue("equals", fRequest1.equals(fRequest1b));
         assertTrue("equals", fRequest1b.equals(fRequest1c));
         assertTrue("equals", fRequest1.equals(fRequest1c));
        }
 
-       public void testEqualsNull() throws Exception {
+       public void testEqualsNull() {
         assertFalse("equals", fRequest1.equals(null));
         assertFalse("equals", fRequest2.equals(null));
        }
@@ -200,7 +203,7 @@ public class TmfCoalescedDataRequestTest extends TestCase {
        // hashCode
        // ------------------------------------------------------------------------
 
-       public void testHashCode() throws Exception {
+       public void testHashCode() {
         assertTrue("hashCode", fRequest1.hashCode() == fRequest1.hashCode());
         assertTrue("hashCode", fRequest2.hashCode() == fRequest2.hashCode());
                assertTrue("hashCode", fRequest1.hashCode() != fRequest2.hashCode());
index cc706fa265dd7dcb5500634c4af2392fab7aaed7..20790229419cb68befa94f024f8bfa98649f8bec 100644 (file)
@@ -45,7 +45,7 @@ import org.eclipse.linuxtools.tmf.tests.stubs.trace.TmfTraceStub;
  * <p>
  * Test suite for the TmfCoalescedEventRequest class.
  */
-@SuppressWarnings({ "nls" })
+@SuppressWarnings({"nls","javadoc"})
 public class TmfCoalescedEventRequestTest extends TestCase {
 
        // ------------------------------------------------------------------------
@@ -69,6 +69,9 @@ public class TmfCoalescedEventRequestTest extends TestCase {
        // Housekeeping
        // ------------------------------------------------------------------------
 
+    /**
+     * @param name the test name
+     */
        public TmfCoalescedEventRequestTest(String name) {
                super(name);
        }
@@ -192,7 +195,7 @@ public class TmfCoalescedEventRequestTest extends TestCase {
        // equals
        // ------------------------------------------------------------------------
 
-       public void testEqualsReflexivity() throws Exception {
+       public void testEqualsReflexivity() {
         assertTrue("equals", fRequest1.equals(fRequest1));
         assertTrue("equals", fRequest2.equals(fRequest2));
 
@@ -200,7 +203,7 @@ public class TmfCoalescedEventRequestTest extends TestCase {
         assertFalse("equals", fRequest2.equals(fRequest1));
        }
 
-       public void testEqualsSymmetry() throws Exception {
+       public void testEqualsSymmetry() {
         assertTrue("equals", fRequest1.equals(fRequest1b));
         assertTrue("equals", fRequest1b.equals(fRequest1));
 
@@ -210,18 +213,18 @@ public class TmfCoalescedEventRequestTest extends TestCase {
         assertFalse("equals", fRequest3.equals(fRequest2));
        }
 
-       public void testEqualsTransivity() throws Exception {
+       public void testEqualsTransivity() {
         assertTrue("equals", fRequest1.equals(fRequest1b));
         assertTrue("equals", fRequest1b.equals(fRequest1c));
         assertTrue("equals", fRequest1.equals(fRequest1c));
        }
 
-       public void testEqualsNull() throws Exception {
+       public void testEqualsNull() {
         assertFalse("equals", fRequest1.equals(null));
         assertFalse("equals", fRequest2.equals(null));
        }
 
-       public void testEqualsSuper() throws Exception {
+       public void testEqualsSuper() {
                TmfCoalescedDataRequest<TmfEvent> dataRequest1 = new TmfCoalescedDataRequest<TmfEvent>(
                                fRequest1.getDataType(), fRequest1.getIndex(), fRequest1.getNbRequested());
                TmfCoalescedDataRequest<TmfEvent> dataRequest2 = new TmfCoalescedDataRequest<TmfEvent>(
@@ -239,7 +242,7 @@ public class TmfCoalescedEventRequestTest extends TestCase {
        // hashCode
        // ------------------------------------------------------------------------
 
-       public void testHashCode() throws Exception {
+       public void testHashCode() {
         assertTrue("hashCode", fRequest1.hashCode() == fRequest1.hashCode());
         assertTrue("hashCode", fRequest2.hashCode() == fRequest2.hashCode());
                assertTrue("hashCode", fRequest1.hashCode() != fRequest2.hashCode());
@@ -265,7 +268,8 @@ public class TmfCoalescedEventRequestTest extends TestCase {
        // isCompatible
        // ------------------------------------------------------------------------
 
-       public void testIsCompatible() {
+       @SuppressWarnings("hiding")
+    public void testIsCompatible() {
                TmfCoalescedEventRequest<TmfEvent> coalescedRequest = new TmfCoalescedEventRequest<TmfEvent>(TmfEvent.class, range1, 100, 200);
                TmfEventRequest<TmfEvent> request1 = new TmfEventRequestStub<TmfEvent>(TmfEvent.class, range1, 100, 200);
                TmfEventRequest<TmfEvent> request2 = new TmfEventRequestStub<TmfEvent>(TmfEvent.class, range2, 100, 200);
@@ -280,6 +284,7 @@ public class TmfCoalescedEventRequestTest extends TestCase {
     // addEvent
     // ------------------------------------------------------------------------
 
+    @SuppressWarnings("hiding")
     public void testAddEvent1() {
         TmfCoalescedEventRequest<TmfEvent> coalescedRequest = new TmfCoalescedEventRequest<TmfEvent>(TmfEvent.class, range1, 0, 2147483647, 200, ExecutionType.FOREGROUND);
         TmfEventRequest<TmfEvent> request1 = new TmfEventRequestStub<TmfEvent>(TmfEvent.class, range1, 0, 2147483647, 200);
@@ -297,6 +302,7 @@ public class TmfCoalescedEventRequestTest extends TestCase {
 
     }
 
+    @SuppressWarnings("hiding")
     public void testAddEvent2() {
         TmfCoalescedEventRequest<TmfEvent> coalescedRequest = new TmfCoalescedEventRequest<TmfEvent>(TmfEvent.class, range1, 1, 2147483647, 200, ExecutionType.FOREGROUND);
         TmfEventRequest<TmfEvent> request1 = new TmfEventRequestStub<TmfEvent>(TmfEvent.class, range1, 1, 2147483647, 200);
@@ -472,7 +478,6 @@ public class TmfCoalescedEventRequestTest extends TestCase {
     }
 
        @TmfSignalHandler
-    @SuppressWarnings("unchecked")
     public void trigger(final TmfTestTriggerSignal signal) {
 
         TmfTimeRange range = new TmfTimeRange(TmfTimestamp.BIG_BANG, TmfTimestamp.BIG_CRUNCH);
@@ -521,7 +526,7 @@ public class TmfCoalescedEventRequestTest extends TestCase {
         providers[0].sendRequest(request3);
     }
 
-    public void runCoalescedRequest(long startIndex) throws Exception {
+    public void runCoalescedRequest(long startIndex) throws InterruptedException {
 
         fTrace = setupTrace(DIRECTORY + File.separator + TEST_STREAM);
 
@@ -561,13 +566,13 @@ public class TmfCoalescedEventRequestTest extends TestCase {
         }
     }
 
-    public void testCoalescedRequest() throws Exception {
+    public void testCoalescedRequest() throws InterruptedException {
         runCoalescedRequest(0);
         runCoalescedRequest(1);
         runCoalescedRequest(5);
     }
 
-       public void testCancelCoalescedRequest() throws Exception {
+       public void testCancelCoalescedRequest() throws InterruptedException {
 
                fTrace = setupTrace(DIRECTORY + File.separator + TEST_STREAM);
 
@@ -607,7 +612,7 @@ public class TmfCoalescedEventRequestTest extends TestCase {
     }
 
     // ------------------------------------------------------------------------
-    // 
+    //
     // ------------------------------------------------------------------------
 
 }
index 8f91d59ed23c4437405a3ec2afd324832a1917ea..05115c5f1f3e8465d295614e7fb2a6ecfd6e4ba4 100644 (file)
@@ -23,7 +23,7 @@ import org.eclipse.linuxtools.tmf.tests.stubs.request.TmfDataRequestStub;
  * <p>
  * Test suite for the TmfDataRequest class.
  */
-@SuppressWarnings("nls")
+@SuppressWarnings({"nls","javadoc"})
 public class TmfDataRequestTest extends TestCase {
 
        // ------------------------------------------------------------------------
@@ -43,6 +43,9 @@ public class TmfDataRequestTest extends TestCase {
        // Housekeeping
        // ------------------------------------------------------------------------
 
+    /**
+     * @param name the test name
+     */
        public TmfDataRequestTest(String name) {
                super(name);
        }
@@ -164,7 +167,7 @@ public class TmfDataRequestTest extends TestCase {
        // equals
        // ------------------------------------------------------------------------
 
-       public void testEqualsReflexivity() throws Exception {
+       public void testEqualsReflexivity() {
         assertTrue("equals", fRequest1.equals(fRequest1));
         assertTrue("equals", fRequest2.equals(fRequest2));
 
@@ -172,7 +175,7 @@ public class TmfDataRequestTest extends TestCase {
         assertFalse("equals", fRequest2.equals(fRequest1));
        }
 
-       public void testEqualsSymmetry() throws Exception {
+       public void testEqualsSymmetry() {
         assertTrue("equals", fRequest1.equals(fRequest1b));
         assertTrue("equals", fRequest1b.equals(fRequest1));
 
@@ -182,13 +185,13 @@ public class TmfDataRequestTest extends TestCase {
         assertFalse("equals", fRequest3.equals(fRequest2));
        }
 
-       public void testEqualsTransivity() throws Exception {
+       public void testEqualsTransivity() {
         assertTrue("equals", fRequest1.equals(fRequest1b));
         assertTrue("equals", fRequest1b.equals(fRequest1c));
         assertTrue("equals", fRequest1.equals(fRequest1c));
        }
 
-       public void testEqualsNull() throws Exception {
+       public void testEqualsNull() {
         assertFalse("equals", fRequest1.equals(null));
         assertFalse("equals", fRequest2.equals(null));
        }
@@ -197,7 +200,7 @@ public class TmfDataRequestTest extends TestCase {
        // hashCode
        // ------------------------------------------------------------------------
 
-       public void testHashCode() throws Exception {
+       public void testHashCode() {
         assertTrue("hashCode", fRequest1.hashCode() == fRequest1.hashCode());
         assertTrue("hashCode", fRequest2.hashCode() == fRequest2.hashCode());
                assertTrue("hashCode", fRequest1.hashCode() != fRequest2.hashCode());
index 2ff23b7f5d5da2b4d89862f2e6397d5eb9b2fa02..f2422a5c859840d2db7f2060febf6eee032da5fd 100644 (file)
@@ -26,7 +26,7 @@ import org.eclipse.linuxtools.tmf.tests.stubs.request.TmfEventRequestStub;
  * <p>
  * Test suite for the TmfEventRequest class.
  */
-@SuppressWarnings("nls")
+@SuppressWarnings({"nls","javadoc"})
 public class TmfEventRequestTest extends TestCase {
 
        // ------------------------------------------------------------------------
@@ -49,7 +49,10 @@ public class TmfEventRequestTest extends TestCase {
        // Housekeeping
        // ------------------------------------------------------------------------
 
-       public TmfEventRequestTest(String name) {
+    /**
+     * @param name the test name
+     */
+    public TmfEventRequestTest(final String name) {
                super(name);
        }
 
@@ -185,7 +188,7 @@ public class TmfEventRequestTest extends TestCase {
        // equals
        // ------------------------------------------------------------------------
 
-       public void testEqualsReflexivity() throws Exception {
+       public void testEqualsReflexivity() {
         assertTrue("equals", fRequest1.equals(fRequest1));
         assertTrue("equals", fRequest2.equals(fRequest2));
 
@@ -193,7 +196,7 @@ public class TmfEventRequestTest extends TestCase {
         assertFalse("equals", fRequest2.equals(fRequest1));
        }
 
-       public void testEqualsSymmetry() throws Exception {
+       public void testEqualsSymmetry() {
         assertTrue("equals", fRequest1.equals(fRequest1b));
         assertTrue("equals", fRequest1b.equals(fRequest1));
 
@@ -203,13 +206,13 @@ public class TmfEventRequestTest extends TestCase {
         assertFalse("equals", fRequest3.equals(fRequest2));
        }
 
-       public void testEqualsTransivity() throws Exception {
+       public void testEqualsTransivity() {
         assertTrue("equals", fRequest1.equals(fRequest1b));
         assertTrue("equals", fRequest1b.equals(fRequest1c));
         assertTrue("equals", fRequest1.equals(fRequest1c));
        }
 
-       public void testEqualsNull() throws Exception {
+       public void testEqualsNull() {
         assertFalse("equals", fRequest1.equals(null));
         assertFalse("equals", fRequest2.equals(null));
        }
@@ -218,7 +221,7 @@ public class TmfEventRequestTest extends TestCase {
        // hashCode
        // ------------------------------------------------------------------------
 
-       public void testHashCode() throws Exception {
+       public void testHashCode() {
         assertTrue("hashCode", fRequest1.hashCode() == fRequest1.hashCode());
         assertTrue("hashCode", fRequest2.hashCode() == fRequest2.hashCode());
                assertTrue("hashCode", fRequest1.hashCode() != fRequest2.hashCode());
index 518dc423f664b5b3dd7bfffff65b56f523cf5a19..74d7c012e0da8245761bebf941eb2815ea223fc3 100644 (file)
@@ -32,7 +32,7 @@ import org.eclipse.linuxtools.tmf.core.statesystem.IStateSystemQuerier;
  * @author alexmont
  *
  */
-@SuppressWarnings("nls")
+@SuppressWarnings({"nls","javadoc"})
 public class VerifyHistoryFile {
 
     // Enter the .ht file name to test here
index cc0f5833701a7e595eb6045c9332f8850261211b..4dfea6c5c1fd899c55aa68c1acd609c07741e66e 100644 (file)
@@ -1,11 +1,11 @@
 /*******************************************************************************
  * Copyright (c) 2009, 2012 Ericsson
- * 
+ *
  * All rights reserved. This program and the accompanying materials are
  * made available under the terms of the Eclipse Public License v1.0 which
  * accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *   Francois Chouinard - Initial API and implementation
  *   Francois Chouinard - Adjusted for new Trace Model
@@ -24,6 +24,9 @@ import org.eclipse.linuxtools.internal.tmf.core.Activator;
 @SuppressWarnings({ "nls" })
 public class AllTests {
 
+       /**
+        * @return the test suite
+        */
        public static Test suite() {
                TestSuite suite = new TestSuite("Test suite for " + Activator.PLUGIN_ID + ".trace"); //$NON-NLS-1$);
                //$JUnit-BEGIN$
index 90dc7e81d74e5f4049058a5edd0dd4f49c793ea7..085496393535baf6c48df2996b832b7e24bf869f 100644 (file)
@@ -37,7 +37,7 @@ import org.eclipse.linuxtools.tmf.tests.stubs.trace.TmfTraceStub;
 /**
  * Test suite for the TmfCheckpointIndexTest class.
  */
-@SuppressWarnings("nls")
+@SuppressWarnings({"nls","javadoc"})
 public class TmfCheckpointIndexTest extends TestCase {
 
     // ------------------------------------------------------------------------
@@ -55,7 +55,10 @@ public class TmfCheckpointIndexTest extends TestCase {
     // Housekeeping
     // ------------------------------------------------------------------------
 
-    public TmfCheckpointIndexTest(final String name) throws Exception {
+    /**
+     * @param name the test name
+     */
+    public TmfCheckpointIndexTest(final String name)  {
         super(name);
     }
 
@@ -144,7 +147,8 @@ public class TmfCheckpointIndexTest extends TestCase {
     // Verify checkpoints
     // ------------------------------------------------------------------------
 
-    public void testTmfTraceIndexing() throws Exception {
+    @SuppressWarnings("null")
+    public void testTmfTraceIndexing() {
         assertEquals("getCacheSize",   BLOCK_SIZE, fTrace.getCacheSize());
         assertEquals("getTraceSize",   NB_EVENTS,  fTrace.getNbEvents());
         assertEquals("getRange-start", 1,          fTrace.getTimeRange().getStartTime().getValue());
@@ -167,7 +171,8 @@ public class TmfCheckpointIndexTest extends TestCase {
         }
     }
 
-    public void testEmptyTmfTraceIndexing() throws Exception {
+    @SuppressWarnings("null")
+    public void testEmptyTmfTraceIndexing() {
         assertEquals("getCacheSize",   ITmfTrace.DEFAULT_TRACE_CACHE_SIZE, fEmptyTrace.getCacheSize());
         assertEquals("getTraceSize",   0,  fEmptyTrace.getNbEvents());
         assertEquals("getRange-start", TmfTimestamp.BIG_CRUNCH, fEmptyTrace.getTimeRange().getStartTime());
index fb0872f01476535eecf73d866e6fd9c9dd4acf53..f851f331c0b9c0c50c2c92fb7b3a5ad006107034 100644 (file)
@@ -1,11 +1,11 @@
 /*******************************************************************************
  * Copyright (c) 2009, 2010, 2012 Ericsson
- * 
+ *
  * All rights reserved. This program and the accompanying materials are
  * made available under the terms of the Eclipse Public License v1.0 which
  * accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *   Francois Chouinard - Initial API and implementation
  *   Francois Chouinard - Adapted for TMF Trace Model 1.0
@@ -24,7 +24,7 @@ import org.eclipse.linuxtools.tmf.core.trace.TmfLocation;
 /**
  * Test suite for the TmfCheckpoint class.
  */
-@SuppressWarnings("nls")
+@SuppressWarnings({"nls","javadoc"})
 public class TmfCheckpointTest extends TestCase {
 
     // ------------------------------------------------------------------------
@@ -83,7 +83,7 @@ public class TmfCheckpointTest extends TestCase {
         assertEquals("TmfCheckpoint", fLocation1,  checkpoint.getLocation());
     }
 
-    public void testTmfLocationCopy2() throws Exception {
+    public void testTmfLocationCopy2() {
         try {
             new TmfCheckpoint(null);
             fail("null copy");
@@ -172,7 +172,7 @@ public class TmfCheckpointTest extends TestCase {
     // hashCode
     // ------------------------------------------------------------------------
 
-    public void testHashCode() throws Exception {
+    public void testHashCode() {
         final TmfCheckpoint checkpoint1 = new TmfCheckpoint(fCheckpoint1);
         final TmfCheckpoint checkpoint2 = new TmfCheckpoint(fCheckpoint2);
 
@@ -183,7 +183,7 @@ public class TmfCheckpointTest extends TestCase {
         assertTrue("hashCode", fCheckpoint2.hashCode() != checkpoint1.hashCode());
     }
 
-    public void testHashCodeNull() throws Exception {
+    public void testHashCodeNull() {
         final TmfCheckpoint checkpoint1 = new TmfCheckpoint(null, new TmfContext(fLocation1));
         final TmfCheckpoint checkpoint2 = new TmfCheckpoint(fTimestamp1, null);
         final TmfCheckpoint checkpoint3 = new TmfCheckpoint(checkpoint1);
@@ -200,7 +200,7 @@ public class TmfCheckpointTest extends TestCase {
     // equals
     // ------------------------------------------------------------------------
 
-    public void testEqualsReflexivity() throws Exception {
+    public void testEqualsReflexivity() {
         assertTrue("equals", fCheckpoint1.equals(fCheckpoint1));
         assertTrue("equals", fCheckpoint2.equals(fCheckpoint2));
 
@@ -208,7 +208,7 @@ public class TmfCheckpointTest extends TestCase {
         assertTrue("equals", !fCheckpoint2.equals(fCheckpoint1));
     }
 
-    public void testEqualsSymmetry() throws Exception {
+    public void testEqualsSymmetry() {
         final TmfCheckpoint checkpoint1 = new TmfCheckpoint(fCheckpoint1);
         final TmfCheckpoint checkpoint2 = new TmfCheckpoint(fCheckpoint2);
 
@@ -219,7 +219,7 @@ public class TmfCheckpointTest extends TestCase {
         assertTrue("equals", fCheckpoint2.equals(checkpoint2));
     }
 
-    public void testEqualsTransivity() throws Exception {
+    public void testEqualsTransivity() {
         final TmfCheckpoint checkpoint1 = new TmfCheckpoint(fCheckpoint1);
         final TmfCheckpoint checkpoint2 = new TmfCheckpoint(checkpoint1);
         final TmfCheckpoint checkpoint3 = new TmfCheckpoint(checkpoint2);
@@ -229,7 +229,7 @@ public class TmfCheckpointTest extends TestCase {
         assertTrue("equals", checkpoint1.equals(checkpoint3));
     }
 
-    public void testNotEqual() throws Exception {
+    public void testNotEqual() {
         // Various checkpoints
         final TmfCheckpoint checkpoint1 = new TmfCheckpoint(fTimestamp1, new TmfContext(fLocation1));
         final TmfCheckpoint checkpoint2 = new TmfCheckpoint(fTimestamp2, new TmfContext(fLocation1));
index bb55409592b9f60157804c1dac2118ff2b6d64b3..c1feb8e3643f6c88637abd420b47624ac428d9a8 100644 (file)
@@ -24,7 +24,7 @@ import org.eclipse.linuxtools.tmf.core.trace.TmfLocation;
 /**
  * Test suite for the TmfContext class.
  */
-@SuppressWarnings("nls")
+@SuppressWarnings({"nls","javadoc"})
 public class TmfContextTest extends TestCase {
 
     // ------------------------------------------------------------------------
@@ -133,7 +133,7 @@ public class TmfContextTest extends TestCase {
     // equals
     // ------------------------------------------------------------------------
 
-    public void testEqualsReflexivity() throws Exception {
+    public void testEqualsReflexivity() {
         assertTrue("equals", fContext1.equals(fContext1));
         assertTrue("equals", fContext2.equals(fContext2));
 
@@ -141,7 +141,7 @@ public class TmfContextTest extends TestCase {
         assertFalse("equals", fContext2.equals(fContext1));
     }
 
-    public void testEqualsSymmetry() throws Exception {
+    public void testEqualsSymmetry() {
         final TmfContext context1 = new TmfContext(fContext1);
         final TmfContext context2 = new TmfContext(fContext2);
 
@@ -152,7 +152,7 @@ public class TmfContextTest extends TestCase {
         assertTrue("equals", fContext2.equals(context2));
     }
 
-    public void testEqualsTransivity() throws Exception {
+    public void testEqualsTransivity() {
         final TmfContext context1 = new TmfContext(fContext1);
         final TmfContext context2 = new TmfContext(context1);
         final TmfContext context3 = new TmfContext(context2);
@@ -162,7 +162,7 @@ public class TmfContextTest extends TestCase {
         assertTrue("equals", context1.equals(context3));
     }
 
-    public void testEqualsNull() throws Exception {
+    public void testEqualsNull() {
         assertFalse("equals", fContext1.equals(null));
         assertFalse("equals", fContext2.equals(null));
     }
@@ -170,7 +170,7 @@ public class TmfContextTest extends TestCase {
     private static class MyContext extends TmfContext {
     }
 
-    public void testNonEquals() throws Exception {
+    public void testNonEquals() {
 
         // Different classes
         final MyContext myContext = new MyContext();
@@ -202,7 +202,7 @@ public class TmfContextTest extends TestCase {
     // hashCode
     // ------------------------------------------------------------------------
 
-    public void testHashCode() throws Exception {
+    public void testHashCode() {
         final TmfContext context1 = new TmfContext(fContext1);
         final TmfContext context2 = new TmfContext(fContext2);
 
index c880feef09ae71af305f5648c90d7a9f720ff226..9053a05e8c2d0cd550a281f3ad3dd701c3a024be 100644 (file)
@@ -41,7 +41,7 @@ import org.eclipse.linuxtools.tmf.tests.stubs.trace.TmfTraceStub;
 /**
  * Test suite for the TmfCheckpointIndexTest class.
  */
-@SuppressWarnings({ "nls" })
+@SuppressWarnings({"nls","javadoc"})
 public class TmfExperimentCheckpointIndexTest extends TestCase {
 
     // ------------------------------------------------------------------------
@@ -62,7 +62,10 @@ public class TmfExperimentCheckpointIndexTest extends TestCase {
     // Housekeeping
     // ------------------------------------------------------------------------
 
-    public TmfExperimentCheckpointIndexTest(final String name) throws Exception {
+    /**
+     * @param name the test name
+     */
+    public TmfExperimentCheckpointIndexTest(final String name) {
         super(name);
     }
 
@@ -112,7 +115,8 @@ public class TmfExperimentCheckpointIndexTest extends TestCase {
     // Verify checkpoints
     // ------------------------------------------------------------------------
 
-    public void testTmfTraceIndexing() throws Exception {
+    @SuppressWarnings("null")
+    public void testTmfTraceIndexing() {
         assertEquals("getCacheSize",   BLOCK_SIZE, fExperiment.getCacheSize());
         assertEquals("getTraceSize",   NB_EVENTS,  fExperiment.getNbEvents());
         assertEquals("getRange-start", 1,          fExperiment.getTimeRange().getStartTime().getValue());
@@ -146,7 +150,8 @@ public class TmfExperimentCheckpointIndexTest extends TestCase {
     // Streaming
     // ------------------------------------------------------------------------
 
-    public void testGrowingIndex() throws Exception {
+    @SuppressWarnings("null")
+    public void testGrowingIndex() {
 
         ITmfTrace<TmfEvent>[] testTraces = new TmfTraceStub[2];
         try {
index 9968c89651505629765361d1234fc7a4e94b571b..448b3e549a03783d4063a93f6caab6844f23f2e2 100644 (file)
@@ -45,7 +45,7 @@ import org.eclipse.linuxtools.tmf.tests.stubs.trace.TmfTraceStub;
 /**
  * Test suite for the TmfExperiment class (single trace).
  */
-@SuppressWarnings({ "nls" })
+@SuppressWarnings({"nls","javadoc"})
 public class TmfExperimentTest extends TestCase {
 
     // ------------------------------------------------------------------------
@@ -94,7 +94,10 @@ public class TmfExperimentTest extends TestCase {
         }
     }
 
-    public TmfExperimentTest(final String name) throws Exception {
+    /**
+     * @param name the test name
+     */
+    public TmfExperimentTest(final String name) {
         super(name);
     }
 
@@ -160,7 +163,7 @@ public class TmfExperimentTest extends TestCase {
     // getTimestamp
     // ------------------------------------------------------------------------
 
-    public void testGetTimestamp() throws Exception {
+    public void testGetTimestamp() {
         assertEquals("getTimestamp", new TmfTimestamp(    1, (byte) -3), fExperiment.getTimestamp(   0));
         assertEquals("getTimestamp", new TmfTimestamp(    2, (byte) -3), fExperiment.getTimestamp(   1));
         assertEquals("getTimestamp", new TmfTimestamp(   11, (byte) -3), fExperiment.getTimestamp(  10));
@@ -176,7 +179,7 @@ public class TmfExperimentTest extends TestCase {
     // Bookmarks file handling
     // ------------------------------------------------------------------------
 
-    public void testBookmarks() throws Exception {
+    public void testBookmarks() {
         assertNull("GetBookmarksFile", fExperiment.getBookmarksFile());
         IFile bookmarks = (IFile) fTestTraces[0].getResource();
         fExperiment.setBookmarksFile(bookmarks);
@@ -187,12 +190,12 @@ public class TmfExperimentTest extends TestCase {
     // seekEvent by location
     // ------------------------------------------------------------------------
 
-    public void testSeekBadLocation() throws Exception {
+    public void testSeekBadLocation() {
         ITmfContext context = fExperiment.seekEvent(new TmfLocation<Long>(0L));
         assertNull("seekEvent", context);
     }
 
-    public void testSeekNoTrace() throws Exception {
+    public void testSeekNoTrace() {
         TmfExperiment<TmfEvent> experiment = new TmfExperiment<TmfEvent>(TmfEvent.class, EXPERIMENT, null);
         ITmfContext context = experiment.seekEvent((TmfExperimentLocation) null);
         assertNull("seekEvent", context);
@@ -203,7 +206,7 @@ public class TmfExperimentTest extends TestCase {
     // seekEvent on ratio
     // ------------------------------------------------------------------------
 
-    public void testSeekEventOnRatio() throws Exception {
+    public void testSeekEventOnRatio() {
 
         // First event
         ITmfContext context = fExperiment.seekEvent(0.0);
@@ -243,7 +246,7 @@ public class TmfExperimentTest extends TestCase {
     }
 
     @SuppressWarnings("rawtypes")
-    public void testGetLocationRatio() throws Exception {
+    public void testGetLocationRatio() {
 
         // First event
         ITmfContext context = fExperiment.seekEvent((ITmfLocation) null);
@@ -268,7 +271,7 @@ public class TmfExperimentTest extends TestCase {
     }
 
 //    @SuppressWarnings("rawtypes")
-//    public void testGetCurrentLocation() throws Exception {
+//    public void testGetCurrentLocation() {
 //        ITmfContext context = fExperiment.seekEvent((ITmfLocation) null);
 //        ITmfLocation location = fExperiment.getCurrentLocation();
 //        assertEquals("getCurrentLocation", location, context.getLocation());
@@ -278,7 +281,7 @@ public class TmfExperimentTest extends TestCase {
     // seekEvent on rank
     // ------------------------------------------------------------------------
 
-    public void testSeekRankOnCacheBoundary() throws Exception {
+    public void testSeekRankOnCacheBoundary() {
 
         long cacheSize = fExperiment.getCacheSize();
 
@@ -307,7 +310,7 @@ public class TmfExperimentTest extends TestCase {
         assertEquals("Context rank", 4 * cacheSize + 1, context.getRank());
     }
 
-    public void testSeekRankNotOnCacheBoundary() throws Exception {
+    public void testSeekRankNotOnCacheBoundary() {
 
         long cacheSize = fExperiment.getCacheSize();
 
@@ -344,7 +347,7 @@ public class TmfExperimentTest extends TestCase {
         assertEquals("Context rank", 4501, context.getRank());
     }
 
-    public void testSeekRankOutOfScope() throws Exception {
+    public void testSeekRankOutOfScope() {
 
         // Position trace at beginning
         ITmfContext context = fExperiment.seekEvent(-1);
@@ -367,7 +370,7 @@ public class TmfExperimentTest extends TestCase {
     // seekEvent on timestamp
     // ------------------------------------------------------------------------
 
-    public void testSeekTimestampOnCacheBoundary() throws Exception {
+    public void testSeekTimestampOnCacheBoundary() {
 
         long cacheSize = fExperiment.getCacheSize();
 
@@ -396,7 +399,7 @@ public class TmfExperimentTest extends TestCase {
         assertEquals("Context rank", 4 * cacheSize + 1, context.getRank());
     }
 
-    public void testSeekTimestampNotOnCacheBoundary() throws Exception {
+    public void testSeekTimestampNotOnCacheBoundary() {
 
         // Position trace at event rank 1 (TS = 2)
         ITmfContext context = fExperiment.seekEvent(new TmfTimestamp(2, SCALE, 0));
@@ -439,7 +442,7 @@ public class TmfExperimentTest extends TestCase {
         assertEquals("Context rank", 4501, context.getRank());
     }
 
-    public void testSeekTimestampOutOfScope() throws Exception {
+    public void testSeekTimestampOutOfScope() {
 
         // Position trace at beginning
         ITmfContext context = fExperiment.seekEvent(new TmfTimestamp(-1, SCALE, 0));
@@ -460,7 +463,7 @@ public class TmfExperimentTest extends TestCase {
     // seekEvent by location (context rank is undefined)
     // ------------------------------------------------------------------------
 
-    public void testSeekLocationOnCacheBoundary() throws Exception {
+    public void testSeekLocationOnCacheBoundary() {
 
         long cacheSize = fExperiment.getCacheSize();
 
@@ -495,7 +498,7 @@ public class TmfExperimentTest extends TestCase {
         assertEquals("Event timestamp", 4 * cacheSize + 2, event.getTimestamp().getValue());
     }
 
-    public void testSeekLocationNotOnCacheBoundary() throws Exception {
+    public void testSeekLocationNotOnCacheBoundary() {
 
         long cacheSize = fExperiment.getCacheSize();
 
@@ -531,7 +534,7 @@ public class TmfExperimentTest extends TestCase {
         assertEquals("Event timestamp", 4502, event.getTimestamp().getValue());
     }
 
-    public void testSeekLocationOutOfScope() throws Exception {
+    public void testSeekLocationOutOfScope() {
 
         // Position trace at beginning
         ITmfContext context = fExperiment.seekEvent((ITmfLocation<?>) null);
@@ -544,7 +547,7 @@ public class TmfExperimentTest extends TestCase {
     // getNext - updates the context
     // ------------------------------------------------------------------------
 
-    private void validateContextRanks(ITmfContext context) {
+    private static void validateContextRanks(ITmfContext context) {
         assertTrue("Experiment context type", context instanceof TmfExperimentContext);
         TmfExperimentContext ctx = (TmfExperimentContext) context;
 
@@ -563,7 +566,7 @@ public class TmfExperimentTest extends TestCase {
         assertEquals("Experiment context rank", expRank, ctx.getRank());
     }
 
-    public void testGetNextAfteSeekingOnTS_1() throws Exception {
+    public void testGetNextAfteSeekingOnTS_1() {
 
         final long INITIAL_TS = 1;
         final int NB_READS = 20;
@@ -589,7 +592,7 @@ public class TmfExperimentTest extends TestCase {
         validateContextRanks(context);
     }
 
-    public void testGetNextAfteSeekingOnTS_2() throws Exception {
+    public void testGetNextAfteSeekingOnTS_2() {
 
         final long INITIAL_TS = 2;
         final int NB_READS = 20;
@@ -615,7 +618,7 @@ public class TmfExperimentTest extends TestCase {
         validateContextRanks(context);
     }
 
-    public void testGetNextAfteSeekingOnTS_3() throws Exception {
+    public void testGetNextAfteSeekingOnTS_3() {
 
         final long INITIAL_TS = 500;
         final int NB_READS = 20;
@@ -641,7 +644,7 @@ public class TmfExperimentTest extends TestCase {
         validateContextRanks(context);
     }
 
-    public void testGetNextAfterSeekingOnRank_1() throws Exception {
+    public void testGetNextAfterSeekingOnRank_1() {
 
         final long INITIAL_RANK = 0L;
         final int NB_READS = 20;
@@ -667,7 +670,7 @@ public class TmfExperimentTest extends TestCase {
         validateContextRanks(context);
     }
 
-    public void testGetNextAfterSeekingOnRank_2() throws Exception {
+    public void testGetNextAfterSeekingOnRank_2() {
 
         final long INITIAL_RANK = 1L;
         final int NB_READS = 20;
@@ -693,7 +696,7 @@ public class TmfExperimentTest extends TestCase {
         validateContextRanks(context);
     }
 
-    public void testGetNextAfterSeekingOnRank_3() throws Exception {
+    public void testGetNextAfterSeekingOnRank_3() {
 
         final long INITIAL_RANK = 500L;
         final int NB_READS = 20;
@@ -719,7 +722,7 @@ public class TmfExperimentTest extends TestCase {
         validateContextRanks(context);
     }
 
-    public void testGetNextAfterSeekingOnLocation_1() throws Exception {
+    public void testGetNextAfterSeekingOnLocation_1() {
 
         final ITmfLocation<?> INITIAL_LOC = null;
         final long INITIAL_TS = 1;
@@ -746,7 +749,7 @@ public class TmfExperimentTest extends TestCase {
         validateContextRanks(context);
     }
 
-    public void testGetNextAfterSeekingOnLocation_2() throws Exception {
+    public void testGetNextAfterSeekingOnLocation_2() {
 
         final ITmfLocation<?> INITIAL_LOC = fExperiment.seekEvent(1L).getLocation();
         final long INITIAL_TS = 2;
@@ -771,7 +774,7 @@ public class TmfExperimentTest extends TestCase {
         validateContextRanks(context);
     }
 
-    public void testGetNextAfterSeekingOnLocation_3() throws Exception {
+    public void testGetNextAfterSeekingOnLocation_3() {
 
         final ITmfLocation<?> INITIAL_LOC = fExperiment.seekEvent(500L).getLocation();
         final long INITIAL_TS = 501;
@@ -796,7 +799,7 @@ public class TmfExperimentTest extends TestCase {
         validateContextRanks(context);
     }
 
-    public void testGetNextLocation() throws Exception {
+    public void testGetNextLocation() {
         ITmfContext context1 = fExperiment.seekEvent(0);
         fExperiment.getNext(context1);
         ITmfLocation<?> location = context1.getLocation().clone();
@@ -806,7 +809,7 @@ public class TmfExperimentTest extends TestCase {
         assertEquals("Event timestamp", event1.getTimestamp().getValue(), event2.getTimestamp().getValue());
     }
 
-    public void testGetNextEndLocation() throws Exception {
+    public void testGetNextEndLocation() {
         ITmfContext context1 = fExperiment.seekEvent(fExperiment.getNbEvents() - 1);
         fExperiment.getNext(context1);
         ITmfLocation<?> location = context1.getLocation().clone();
@@ -814,12 +817,12 @@ public class TmfExperimentTest extends TestCase {
         ITmfEvent event = fExperiment.getNext(context2);
         assertNull("Event", event);
     }
-        
+
     // ------------------------------------------------------------------------
     // processRequest
     // ------------------------------------------------------------------------
 
-    public void testProcessRequestForNbEvents() throws Exception {
+    public void testProcessRequestForNbEvents() throws InterruptedException {
 
         final int blockSize = 100;
         final int nbEvents  = 1000;
@@ -847,7 +850,7 @@ public class TmfExperimentTest extends TestCase {
         }
     }
 
-    public void testProcessRequestForNbEvents2() throws Exception {
+    public void testProcessRequestForNbEvents2() throws InterruptedException {
 
         final int blockSize = 2 * NB_EVENTS;
         final int nbEvents = 1000;
@@ -875,7 +878,7 @@ public class TmfExperimentTest extends TestCase {
         }
     }
 
-    public void testProcessRequestForAllEvents() throws Exception {
+    public void testProcessRequestForAllEvents() throws InterruptedException {
 
         final int nbEvents  = TmfDataRequest.ALL_DATA;
         final int blockSize =  1;
@@ -908,7 +911,7 @@ public class TmfExperimentTest extends TestCase {
     // cancel
     // ------------------------------------------------------------------------
 
-    public void testCancel() throws Exception {
+    public void testCancel() throws InterruptedException {
 
         final int nbEvents  = NB_EVENTS;
         final int blockSize = BLOCK_SIZE;
index ad121e44037ba764cabcf4cff7eea42cc3d6bec4..d869ce6652ddeba85bd8ac31cf4d8cc0b82e241b 100644 (file)
@@ -1,11 +1,11 @@
 /*******************************************************************************
  * Copyright (c) 2009, 2010, 2012 Ericsson
- * 
+ *
  * All rights reserved. This program and the accompanying materials are
  * made available under the terms of the Eclipse Public License v1.0 which
  * accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *   Francois Chouinard - Initial API and implementation
  *******************************************************************************/
@@ -21,7 +21,7 @@ import org.eclipse.linuxtools.tmf.core.trace.TmfLocation;
 /**
  * Test suite for the TmfLocation class.
  */
-@SuppressWarnings("nls")
+@SuppressWarnings({"nls","javadoc"})
 public class TmfLocationTest extends TestCase {
 
     // ------------------------------------------------------------------------
@@ -116,7 +116,7 @@ public class TmfLocationTest extends TestCase {
         }
     }
 
-    public static class MyCloneableClass implements Cloneable, Comparable<MyCloneableClass> {
+    private static class MyCloneableClass implements Cloneable, Comparable<MyCloneableClass> {
         private String fName;
 
         public MyCloneableClass(String name) {
@@ -154,18 +154,23 @@ public class TmfLocationTest extends TestCase {
 
         @Override
         public boolean equals(Object obj) {
-            if (this == obj)
+            if (this == obj) {
                 return true;
-            if (obj == null)
+            }
+            if (obj == null) {
                 return false;
-            if (!(obj instanceof MyCloneableClass))
+            }
+            if (!(obj instanceof MyCloneableClass)) {
                 return false;
+            }
             MyCloneableClass other = (MyCloneableClass) obj;
             if (fName == null) {
-                if (other.fName != null)
+                if (other.fName != null) {
                     return false;
-            } else if (!fName.equals(other.fName))
+                }
+            } else if (!fName.equals(other.fName)) {
                 return false;
+            }
             return true;
         }
     }
@@ -184,7 +189,7 @@ public class TmfLocationTest extends TestCase {
         }
     }
 
-    public static class MyUnCloneableClass implements Comparable<MyUnCloneableClass> {
+    private static class MyUnCloneableClass implements Comparable<MyUnCloneableClass> {
         private String fName;
 
         public MyUnCloneableClass(String name) {
@@ -216,18 +221,23 @@ public class TmfLocationTest extends TestCase {
 
         @Override
         public boolean equals(Object obj) {
-            if (this == obj)
+            if (this == obj) {
                 return true;
-            if (obj == null)
+            }
+            if (obj == null) {
                 return false;
-            if (!(obj instanceof MyUnCloneableClass))
+            }
+            if (!(obj instanceof MyUnCloneableClass)) {
                 return false;
+            }
             MyUnCloneableClass other = (MyUnCloneableClass) obj;
             if (fName == null) {
-                if (other.fName != null)
+                if (other.fName != null) {
                     return false;
-            } else if (!fName.equals(other.fName))
+                }
+            } else if (!fName.equals(other.fName)) {
                 return false;
+            }
             return true;
         }
     }
@@ -246,7 +256,7 @@ public class TmfLocationTest extends TestCase {
     // hashCode
     // ------------------------------------------------------------------------
 
-    public void testHashCode() throws Exception {
+    public void testHashCode() {
         TmfLocation<String> location1 = new TmfLocation<String>((String) null);
         TmfLocation<String> location2 = new TmfLocation<String>(aString);
         TmfLocation<Long> location3 = new TmfLocation<Long>(aLong);
@@ -269,23 +279,23 @@ public class TmfLocationTest extends TestCase {
         }
     }
 
-    public void testEqualsWrongTypes() throws Exception {
+    public void testEqualsWrongTypes() {
         TmfLocation<String> location1 = new TmfLocation<String>(aString);
         TmfLocation2 location2 = new TmfLocation2(aString);
-        
+
         assertFalse("equals", location1.equals(location2));
         assertFalse("equals", location2.equals(location1));
     }
 
-    public void testEqualsWithNulls() throws Exception {
+    public void testEqualsWithNulls() {
         TmfLocation<String> location1 = new TmfLocation<String>(aString);
         TmfLocation<String> location2 = new TmfLocation<String>((String) null);
-        
+
         assertFalse("equals", location1.equals(location2));
         assertFalse("equals", location2.equals(location1));
     }
 
-    public void testEqualsReflexivity() throws Exception {
+    public void testEqualsReflexivity() {
         assertTrue("equals", fLocation2.equals(fLocation2));
         assertTrue("equals", fLocation3.equals(fLocation3));
 
@@ -293,7 +303,7 @@ public class TmfLocationTest extends TestCase {
         assertTrue("equals", !fLocation3.equals(fLocation2));
     }
 
-    public void testEqualsSymmetry() throws Exception {
+    public void testEqualsSymmetry() {
         TmfLocation<String> location2 = new TmfLocation<String>(aString);
         TmfLocation<Long> location3 = new TmfLocation<Long>(aLong);
 
@@ -304,7 +314,7 @@ public class TmfLocationTest extends TestCase {
         assertTrue("equals", fLocation3.equals(location3));
     }
 
-    public void testEqualsTransivity() throws Exception {
+    public void testEqualsTransivity() {
         TmfLocation<String> location1 = new TmfLocation<String>(aString);
         TmfLocation<String> location2 = new TmfLocation<String>(aString);
         TmfLocation<String> location3 = new TmfLocation<String>(aString);
@@ -314,7 +324,7 @@ public class TmfLocationTest extends TestCase {
         assertTrue("equals", location3.equals(location1));
     }
 
-    public void testEqualsNull() throws Exception {
+    public void testEqualsNull() {
         assertTrue("equals", !fLocation2.equals(null));
         assertTrue("equals", !fLocation2.equals(null));
     }
@@ -323,6 +333,7 @@ public class TmfLocationTest extends TestCase {
     // toString
     // ------------------------------------------------------------------------
 
+    @SuppressWarnings("hiding")
     public void testToString() {
         String aString = "some location";
         Long aLong = 12345L;
index 6b4c46e24a8c06a40edb07fb34c0ab579baab440..3ce41a477f75b500568383111185b671c02ebeb9 100644 (file)
@@ -41,7 +41,7 @@ import org.eclipse.linuxtools.tmf.tests.stubs.trace.TmfTraceStub;
 /**
  * Test suite for the TmfExperiment class (multiple traces).
  */
-@SuppressWarnings("nls")
+@SuppressWarnings({"nls","javadoc"})
 public class TmfMultiTraceExperimentTest extends TestCase {
 
     // ------------------------------------------------------------------------
@@ -88,7 +88,10 @@ public class TmfMultiTraceExperimentTest extends TestCase {
         return fTraces;
     }
 
-    public TmfMultiTraceExperimentTest(final String name) throws Exception {
+    /**
+     * @param name the test name
+     */
+    public TmfMultiTraceExperimentTest(final String name) {
         super(name);
     }
 
@@ -125,7 +128,7 @@ public class TmfMultiTraceExperimentTest extends TestCase {
     // seekEvent on rank
     // ------------------------------------------------------------------------
 
-    public void testSeekRankOnCacheBoundary() throws Exception {
+    public void testSeekRankOnCacheBoundary() {
 
         long cacheSize = fExperiment.getCacheSize();
 
@@ -154,7 +157,7 @@ public class TmfMultiTraceExperimentTest extends TestCase {
         assertEquals("Context rank", 4 * cacheSize + 1, context.getRank());
     }
 
-    public void testSeekRankNotOnCacheBoundary() throws Exception {
+    public void testSeekRankNotOnCacheBoundary() {
 
         long cacheSize = fExperiment.getCacheSize();
 
@@ -191,7 +194,7 @@ public class TmfMultiTraceExperimentTest extends TestCase {
         assertEquals("Context rank", 4501, context.getRank());
     }
 
-    public void testSeekRankOutOfScope() throws Exception {
+    public void testSeekRankOutOfScope() {
 
         // Position trace at beginning
         ITmfContext context = fExperiment.seekEvent(-1);
@@ -214,7 +217,7 @@ public class TmfMultiTraceExperimentTest extends TestCase {
     // seekEvent on timestamp
     // ------------------------------------------------------------------------
 
-    public void testSeekTimestampOnCacheBoundary() throws Exception {
+    public void testSeekTimestampOnCacheBoundary() {
 
         long cacheSize = fExperiment.getCacheSize();
 
@@ -243,7 +246,7 @@ public class TmfMultiTraceExperimentTest extends TestCase {
         assertEquals("Context rank", 4 * cacheSize + 1, context.getRank());
     }
 
-    public void testSeekTimestampNotOnCacheBoundary() throws Exception {
+    public void testSeekTimestampNotOnCacheBoundary() {
 
         // Position trace at event rank 1 (TS = 2)
         ITmfContext context = fExperiment.seekEvent(new TmfTimestamp(2, SCALE, 0));
@@ -286,7 +289,7 @@ public class TmfMultiTraceExperimentTest extends TestCase {
         assertEquals("Context rank", 4501, context.getRank());
     }
 
-    public void testSeekTimestampOutOfScope() throws Exception {
+    public void testSeekTimestampOutOfScope() {
 
         // Position trace at beginning
         ITmfContext context = fExperiment.seekEvent(new TmfTimestamp(-1, SCALE, 0));
@@ -307,7 +310,7 @@ public class TmfMultiTraceExperimentTest extends TestCase {
     // seekEvent by location (context rank is undefined)
     // ------------------------------------------------------------------------
 
-    public void testSeekLocationOnCacheBoundary() throws Exception {
+    public void testSeekLocationOnCacheBoundary() {
 
         long cacheSize = fExperiment.getCacheSize();
 
@@ -342,7 +345,7 @@ public class TmfMultiTraceExperimentTest extends TestCase {
         assertEquals("Event timestamp", 4 * cacheSize + 2, event.getTimestamp().getValue());
     }
 
-    public void testSeekLocationNotOnCacheBoundary() throws Exception {
+    public void testSeekLocationNotOnCacheBoundary() {
 
         long cacheSize = fExperiment.getCacheSize();
 
@@ -378,7 +381,7 @@ public class TmfMultiTraceExperimentTest extends TestCase {
         assertEquals("Event timestamp", 4502, event.getTimestamp().getValue());
     }
 
-    public void testSeekLocationOutOfScope() throws Exception {
+    public void testSeekLocationOutOfScope() {
 
         // Position trace at beginning
         ITmfContext context = fExperiment.seekEvent((ITmfLocation<?>) null);
@@ -391,7 +394,7 @@ public class TmfMultiTraceExperimentTest extends TestCase {
     // getNext - updates the context
     // ------------------------------------------------------------------------
 
-    private void validateContextRanks(ITmfContext context) {
+    private static void validateContextRanks(ITmfContext context) {
         assertTrue("Experiment context type", context instanceof TmfExperimentContext);
         TmfExperimentContext ctx = (TmfExperimentContext) context;
 
@@ -410,7 +413,7 @@ public class TmfMultiTraceExperimentTest extends TestCase {
         assertEquals("Experiment context rank", expRank, ctx.getRank());
     }
 
-    public void testGetNextAfteSeekingOnTS_1() throws Exception {
+    public void testGetNextAfteSeekingOnTS_1() {
 
         final long INITIAL_TS = 1;
         final int NB_READS = 20;
@@ -436,7 +439,7 @@ public class TmfMultiTraceExperimentTest extends TestCase {
         validateContextRanks(context);
     }
 
-    public void testGetNextAfteSeekingOnTS_2() throws Exception {
+    public void testGetNextAfteSeekingOnTS_2() {
 
         final long INITIAL_TS = 2;
         final int NB_READS = 20;
@@ -462,7 +465,7 @@ public class TmfMultiTraceExperimentTest extends TestCase {
         validateContextRanks(context);
     }
 
-    public void testGetNextAfteSeekingOnTS_3() throws Exception {
+    public void testGetNextAfteSeekingOnTS_3() {
 
         final long INITIAL_TS = 500;
         final int NB_READS = 20;
@@ -488,7 +491,7 @@ public class TmfMultiTraceExperimentTest extends TestCase {
         validateContextRanks(context);
     }
 
-    public void testGetNextAfterSeekingOnRank_1() throws Exception {
+    public void testGetNextAfterSeekingOnRank_1() {
 
         final long INITIAL_RANK = 0L;
         final int NB_READS = 20;
@@ -514,7 +517,7 @@ public class TmfMultiTraceExperimentTest extends TestCase {
         validateContextRanks(context);
     }
 
-    public void testGetNextAfterSeekingOnRank_2() throws Exception {
+    public void testGetNextAfterSeekingOnRank_2() {
 
         final long INITIAL_RANK = 1L;
         final int NB_READS = 20;
@@ -540,7 +543,7 @@ public class TmfMultiTraceExperimentTest extends TestCase {
         validateContextRanks(context);
     }
 
-    public void testGetNextAfterSeekingOnRank_3() throws Exception {
+    public void testGetNextAfterSeekingOnRank_3() {
 
         final long INITIAL_RANK = 500L;
         final int NB_READS = 20;
@@ -566,7 +569,7 @@ public class TmfMultiTraceExperimentTest extends TestCase {
         validateContextRanks(context);
     }
 
-    public void testGetNextAfterSeekingOnLocation_1() throws Exception {
+    public void testGetNextAfterSeekingOnLocation_1() {
 
         final ITmfLocation<?> INITIAL_LOC = null;
         final long INITIAL_TS = 1;
@@ -593,7 +596,7 @@ public class TmfMultiTraceExperimentTest extends TestCase {
         validateContextRanks(context);
     }
 
-    public void testGetNextAfterSeekingOnLocation_2() throws Exception {
+    public void testGetNextAfterSeekingOnLocation_2() {
 
         final ITmfLocation<?> INITIAL_LOC = fExperiment.seekEvent(1L).getLocation();
         final long INITIAL_TS = 2;
@@ -618,7 +621,7 @@ public class TmfMultiTraceExperimentTest extends TestCase {
         validateContextRanks(context);
     }
 
-    public void testGetNextAfterSeekingOnLocation_3() throws Exception {
+    public void testGetNextAfterSeekingOnLocation_3() {
 
         final ITmfLocation<?> INITIAL_LOC = fExperiment.seekEvent(500L).getLocation();
         final long INITIAL_TS = 501;
@@ -643,7 +646,7 @@ public class TmfMultiTraceExperimentTest extends TestCase {
         validateContextRanks(context);
     }
 
-    public void testGetNextLocation() throws Exception {
+    public void testGetNextLocation() {
         ITmfContext context1 = fExperiment.seekEvent(0);
         fExperiment.getNext(context1);
         ITmfLocation<?> location = context1.getLocation().clone();
@@ -653,7 +656,7 @@ public class TmfMultiTraceExperimentTest extends TestCase {
         assertEquals("Event timestamp", event1.getTimestamp().getValue(), event2.getTimestamp().getValue());
     }
 
-    public void testGetNextEndLocation() throws Exception {
+    public void testGetNextEndLocation() {
         ITmfContext context1 = fExperiment.seekEvent(fExperiment.getNbEvents() - 1);
         fExperiment.getNext(context1);
         ITmfLocation<?> location = context1.getLocation().clone();
@@ -666,7 +669,7 @@ public class TmfMultiTraceExperimentTest extends TestCase {
     // processRequest
     // ------------------------------------------------------------------------
 
-    public void testProcessRequestForNbEvents() throws Exception {
+    public void testProcessRequestForNbEvents() throws InterruptedException {
 
         final int blockSize = 100;
         final int nbEvents  = 1000;
@@ -694,7 +697,7 @@ public class TmfMultiTraceExperimentTest extends TestCase {
         }
     }
 
-    public void testProcessRequestForNbEvents2() throws Exception {
+    public void testProcessRequestForNbEvents2() throws InterruptedException {
 
         final int blockSize = 2 * NB_EVENTS;
         final int nbEvents = 1000;
@@ -722,7 +725,7 @@ public class TmfMultiTraceExperimentTest extends TestCase {
         }
     }
 
-    public void testProcessRequestForAllEvents() throws Exception {
+    public void testProcessRequestForAllEvents() throws InterruptedException {
 
         final int nbEvents  = TmfDataRequest.ALL_DATA;
         final int blockSize =  1;
@@ -755,7 +758,7 @@ public class TmfMultiTraceExperimentTest extends TestCase {
     // cancel
     // ------------------------------------------------------------------------
 
-    public void testCancel() throws Exception {
+    public void testCancel() throws InterruptedException {
 
         final int nbEvents  = NB_EVENTS;
         final int blockSize = BLOCK_SIZE;
@@ -791,7 +794,7 @@ public class TmfMultiTraceExperimentTest extends TestCase {
     // getTimestamp
     // ------------------------------------------------------------------------
 
-    public void testGetTimestamp() throws Exception {
+    public void testGetTimestamp() {
         assertEquals("getTimestamp", new TmfTimestamp(    1, (byte) -3), fExperiment.getTimestamp(    0));
         assertEquals("getTimestamp", new TmfTimestamp(    2, (byte) -3), fExperiment.getTimestamp(    1));
         assertEquals("getTimestamp", new TmfTimestamp(   11, (byte) -3), fExperiment.getTimestamp(   10));
index a0bab9788d86811d62a9e8f46448a2ee0e23ef02..345648c896f89b25e54e4daa4b34f68293d039e9 100644 (file)
@@ -44,7 +44,7 @@ import org.eclipse.linuxtools.tmf.tests.stubs.trace.TmfTraceStub;
 /**
  * Test suite for the TmfTrace class.
  */
-@SuppressWarnings({ "nls" })
+@SuppressWarnings({"nls","javadoc"})
 public class TmfTraceTest extends TestCase {
 
     // ------------------------------------------------------------------------
@@ -63,7 +63,10 @@ public class TmfTraceTest extends TestCase {
     // Housekeeping
     // ------------------------------------------------------------------------
 
-    public TmfTraceTest(final String name) throws Exception {
+    /**
+     * @param name the test name
+     */
+    public TmfTraceTest(final String name) {
         super(name);
     }
 
@@ -106,7 +109,8 @@ public class TmfTraceTest extends TestCase {
     // Constructors
     // ------------------------------------------------------------------------
 
-    public void testStandardConstructor() throws Exception {
+    @SuppressWarnings("null")
+    public void testStandardConstructor() throws TmfTraceException {
         TmfTraceStub trace = null;
         File testfile = null;
         try {
@@ -135,7 +139,8 @@ public class TmfTraceTest extends TestCase {
         assertEquals("getEndTime",     NB_EVENTS, trace.getEndTime().getValue());
     }
 
-    public void testStandardConstructorCacheSize() throws Exception {
+    @SuppressWarnings("null")
+    public void testStandardConstructorCacheSize() throws TmfTraceException {
         TmfTraceStub trace = null;
         File testfile = null;
         try {
@@ -188,7 +193,8 @@ public class TmfTraceTest extends TestCase {
         assertEquals("getEndTime",     NB_EVENTS, trace.getEndTime().getValue());
     }
 
-    public void testFullConstructor() throws Exception {
+    @SuppressWarnings("null")
+    public void testFullConstructor() throws TmfTraceException {
         TmfTraceStub trace = null;
         File testfile = null;
         try {
@@ -217,7 +223,8 @@ public class TmfTraceTest extends TestCase {
         assertEquals("getEndTime",     NB_EVENTS, trace.getEndTime().getValue());
     }
 
-    public void testLiveTraceConstructor() throws Exception {
+    @SuppressWarnings("null")
+    public void testLiveTraceConstructor() throws TmfTraceException {
         TmfTraceStub trace = null;
         File testfile = null;
         final long interval = 100;
@@ -247,8 +254,8 @@ public class TmfTraceTest extends TestCase {
         assertEquals("getEndTime",     NB_EVENTS, trace.getEndTime().getValue());
     }
 
-    @SuppressWarnings({ "unchecked", "rawtypes" })
-    public void testCopyConstructor() throws Exception {
+    @SuppressWarnings({ "unchecked", "rawtypes", "null" })
+    public void testCopyConstructor() throws TmfTraceException {
         TmfTraceStub original = null;
         TmfTraceStub trace = null;
         File testfile = null;
@@ -293,7 +300,7 @@ public class TmfTraceTest extends TestCase {
     // Trace initialization
     // ------------------------------------------------------------------------
 
-    public void testInitializeNullPath() throws Exception {
+    public void testInitializeNullPath() {
 
         // Instantiate an "empty" trace
         final TmfTraceStub trace = new TmfTraceStub();
@@ -307,8 +314,8 @@ public class TmfTraceTest extends TestCase {
             fail("TmfTrace.initialize() - wrong exception thrown");
         }
     }
-        
-    public void testInitializeSimplePath() throws Exception {
+
+    public void testInitializeSimplePath() {
 
         // Instantiate an "empty" trace
         final TmfTraceStub trace = new TmfTraceStub();
@@ -335,7 +342,7 @@ public class TmfTraceTest extends TestCase {
         assertEquals("getEndTime",     Long.MIN_VALUE, trace.getEndTime().getValue());
     }
 
-    public void testInitializeNormalPath() throws Exception {
+    public void testInitializeNormalPath() {
 
         // Instantiate an "empty" trace
         final TmfTraceStub trace = new TmfTraceStub();
@@ -363,7 +370,7 @@ public class TmfTraceTest extends TestCase {
         assertEquals("getEndTime",     Long.MIN_VALUE, trace.getEndTime().getValue());
     }
 
-    public void testInitTrace() throws Exception {
+    public void testInitTrace() throws URISyntaxException, IOException, TmfTraceException, InterruptedException {
 
         // Instantiate an "empty" trace
         final TmfTraceStub trace = new TmfTraceStub();
@@ -414,7 +421,7 @@ public class TmfTraceTest extends TestCase {
     // Set/Get streaming interval
     // ------------------------------------------------------------------------
 
-    public void testSetStreamingInterval() throws Exception {
+    public void testSetStreamingInterval() throws TmfTraceException {
         final TmfTraceStub trace = new TmfTraceStub(fTrace);
 
         long interval = 0;
@@ -423,15 +430,15 @@ public class TmfTraceTest extends TestCase {
         interval = 100;
         trace.setStreamingInterval(interval);
         assertEquals("getStreamingInterval", interval, trace.getStreamingInterval());
-        
+
         interval = -1;
         trace.setStreamingInterval(interval);
         assertEquals("getStreamingInterval", 0, trace.getStreamingInterval());
-        
+
         interval = 0;
         trace.setStreamingInterval(interval);
         assertEquals("getStreamingInterval", interval, trace.getStreamingInterval());
-        
+
         trace.dispose();
     }
 
@@ -439,7 +446,7 @@ public class TmfTraceTest extends TestCase {
     // Set/Get time range
     // ------------------------------------------------------------------------
 
-    public void testSetTimeRange() throws Exception {
+    public void testSetTimeRange() throws TmfTraceException {
         final TmfTraceStub trace = new TmfTraceStub(fTrace);
         trace.indexTrace();
 
@@ -457,7 +464,7 @@ public class TmfTraceTest extends TestCase {
         trace.dispose();
     }
 
-    public void testSetStartTime() throws Exception {
+    public void testSetStartTime() throws TmfTraceException {
         final TmfTraceStub trace = new TmfTraceStub(fTrace);
         trace.indexTrace();
 
@@ -475,7 +482,7 @@ public class TmfTraceTest extends TestCase {
         trace.dispose();
     }
 
-    public void testSetEndTime() throws Exception {
+    public void testSetEndTime() throws TmfTraceException {
         final TmfTraceStub trace = new TmfTraceStub(fTrace);
         trace.indexTrace();
 
@@ -493,7 +500,7 @@ public class TmfTraceTest extends TestCase {
         trace.dispose();
     }
 
-    public void testSetNbEvents() throws Exception {
+    public void testSetNbEvents() throws TmfTraceException {
         final TmfTraceStub trace = new TmfTraceStub(fTrace);
         trace.indexTrace();
 
@@ -518,7 +525,7 @@ public class TmfTraceTest extends TestCase {
     // seekEvent on location (note: does not reliably set the rank)
     // ------------------------------------------------------------------------
 
-    public void testSeekEventOnCacheBoundary() throws Exception {
+    public void testSeekEventOnCacheBoundary() {
 
         // Position trace at event rank 0
         ITmfContext context = fTrace.seekEvent(0);
@@ -564,7 +571,7 @@ public class TmfTraceTest extends TestCase {
         assertEquals("Event rank", ITmfContext.UNKNOWN_RANK, context.getRank());
     }
 
-    public void testSeekEventNotOnCacheBoundary() throws Exception {
+    public void testSeekEventNotOnCacheBoundary() {
 
         // Position trace at event rank 9
         ITmfContext tmpContext = fTrace.seekEvent(new TmfTimestamp(10, SCALE, 0));
@@ -619,7 +626,7 @@ public class TmfTraceTest extends TestCase {
         assertEquals("Event rank", ITmfContext.UNKNOWN_RANK, context.getRank());
     }
 
-    public void testSeekEventOutOfScope() throws Exception {
+    public void testSeekEventOutOfScope() {
 
         // Position trace at beginning
         ITmfContext tmpContext = fTrace.seekEvent(0);
@@ -647,7 +654,7 @@ public class TmfTraceTest extends TestCase {
     // seekEvent on timestamp (note: does not reliably set the rank)
     // ------------------------------------------------------------------------
 
-    public void testSeekEventOnNullTimestamp() throws Exception {
+    public void testSeekEventOnNullTimestamp() {
 
         // Position trace at event rank 0
         ITmfContext context = fTrace.seekEvent((ITmfTimestamp) null);
@@ -658,7 +665,7 @@ public class TmfTraceTest extends TestCase {
         assertEquals("Event rank", 0, context.getRank());
     }
 
-    public void testSeekEventOnTimestampOnCacheBoundary() throws Exception {
+    public void testSeekEventOnTimestampOnCacheBoundary() {
 
         // Position trace at event rank 0
         ITmfContext context = fTrace.seekEvent(new TmfTimestamp(1, SCALE, 0));
@@ -697,7 +704,7 @@ public class TmfTraceTest extends TestCase {
         assertEquals("Event rank", 4001, context.getRank());
     }
 
-    public void testSeekEventOnTimestampNotOnCacheBoundary() throws Exception {
+    public void testSeekEventOnTimestampNotOnCacheBoundary() {
 
         // Position trace at event rank 1
         ITmfContext context = fTrace.seekEvent(new TmfTimestamp(2, SCALE, 0));
@@ -760,7 +767,7 @@ public class TmfTraceTest extends TestCase {
         assertEquals("Event rank", 4501, context.getRank());
     }
 
-    public void testSeekEventOnTimestampOutOfScope() throws Exception {
+    public void testSeekEventOnTimestampOutOfScope() {
 
         // Position trace at beginning
         ITmfContext context = fTrace.seekEvent(new TmfTimestamp(-1, SCALE, 0));
@@ -791,7 +798,7 @@ public class TmfTraceTest extends TestCase {
     // seekEvent on rank
     // ------------------------------------------------------------------------
 
-    public void testSeekEventOnNegativeRank() throws Exception {
+    public void testSeekEventOnNegativeRank() {
 
         // Position trace at event rank 0
         ITmfContext context = fTrace.seekEvent(-1);
@@ -802,7 +809,7 @@ public class TmfTraceTest extends TestCase {
         assertEquals("Event rank", 0, context.getRank());
     }
 
-    public void testSeekOnRankOnCacheBoundary() throws Exception {
+    public void testSeekOnRankOnCacheBoundary() {
 
         // On lower bound, returns the first event (ts = 1)
         ITmfContext context = fTrace.seekEvent(0);
@@ -841,7 +848,7 @@ public class TmfTraceTest extends TestCase {
         assertEquals("Event rank", 4001, context.getRank());
     }
 
-    public void testSeekOnRankNotOnCacheBoundary() throws Exception {
+    public void testSeekOnRankNotOnCacheBoundary() {
 
         // Position trace at event rank 9
         ITmfContext context = fTrace.seekEvent(9);
@@ -892,7 +899,7 @@ public class TmfTraceTest extends TestCase {
         assertEquals("Event rank", 4501, context.getRank());
     }
 
-    public void testSeekEventOnRankOutOfScope() throws Exception {
+    public void testSeekEventOnRankOutOfScope() {
 
         // Position trace at beginning
         ITmfContext context = fTrace.seekEvent(-1);
@@ -923,7 +930,7 @@ public class TmfTraceTest extends TestCase {
     // parseEvent - make sure parseEvent doesn't update the context
     // ------------------------------------------------------------------------
 
-    public void testParseEvent() throws Exception {
+    public void testParseEvent() {
 
         final int NB_READS = 20;
 
@@ -968,7 +975,7 @@ public class TmfTraceTest extends TestCase {
     // getNext - updates the context
     // ------------------------------------------------------------------------
 
-    public void testGetNextAfteSeekingOnTS_1() throws Exception {
+    public void testGetNextAfteSeekingOnTS_1() {
 
         final long INITIAL_TS = 1;
         final int NB_READS = 20;
@@ -990,7 +997,7 @@ public class TmfTraceTest extends TestCase {
         assertEquals("Event rank", INITIAL_TS + NB_READS - 1, context.getRank());
     }
 
-    public void testGetNextAfteSeekingOnTS_2() throws Exception {
+    public void testGetNextAfteSeekingOnTS_2() {
 
         final long INITIAL_TS = 2;
         final int NB_READS = 20;
@@ -1012,7 +1019,7 @@ public class TmfTraceTest extends TestCase {
         assertEquals("Event rank", INITIAL_TS + NB_READS - 1, context.getRank());
     }
 
-    public void testGetNextAfteSeekingOnTS_3() throws Exception {
+    public void testGetNextAfteSeekingOnTS_3() {
 
         final long INITIAL_TS = 500;
         final int NB_READS = 20;
@@ -1034,7 +1041,7 @@ public class TmfTraceTest extends TestCase {
         assertEquals("Event rank", INITIAL_TS + NB_READS - 1, context.getRank());
     }
 
-    public void testGetNextAfterSeekingOnRank_1() throws Exception {
+    public void testGetNextAfterSeekingOnRank_1() {
 
         final long INITIAL_RANK = 0L;
         final int NB_READS = 20;
@@ -1056,7 +1063,7 @@ public class TmfTraceTest extends TestCase {
         assertEquals("Event rank", INITIAL_RANK + NB_READS, context.getRank());
     }
 
-    public void testGetNextAfterSeekingOnRank_2() throws Exception {
+    public void testGetNextAfterSeekingOnRank_2() {
 
         final long INITIAL_RANK = 1L;
         final int NB_READS = 20;
@@ -1078,7 +1085,7 @@ public class TmfTraceTest extends TestCase {
         assertEquals("Event rank", INITIAL_RANK + NB_READS, context.getRank());
     }
 
-    public void testGetNextAfterSeekingOnRank_3() throws Exception {
+    public void testGetNextAfterSeekingOnRank_3() {
 
         final long INITIAL_RANK = 500L;
         final int NB_READS = 20;
@@ -1100,7 +1107,7 @@ public class TmfTraceTest extends TestCase {
         assertEquals("Event rank", INITIAL_RANK + NB_READS, context.getRank());
     }
 
-    public void testGetNextAfterSeekingOnLocation_1() throws Exception {
+    public void testGetNextAfterSeekingOnLocation_1() {
 
         final ITmfLocation<?> INITIAL_LOC = null;
         final long INITIAL_TS = 1;
@@ -1123,7 +1130,7 @@ public class TmfTraceTest extends TestCase {
         assertEquals("Event rank", INITIAL_TS + NB_READS - 1, context.getRank());
     }
 
-    public void testGetNextAfterSeekingOnLocation_2() throws Exception {
+    public void testGetNextAfterSeekingOnLocation_2() {
 
         final ITmfLocation<?> INITIAL_LOC = fTrace.seekEvent(1L).getLocation();
         final long INITIAL_TS = 2;
@@ -1144,7 +1151,7 @@ public class TmfTraceTest extends TestCase {
         assertEquals("Event timestamp", INITIAL_TS + NB_READS, event.getTimestamp().getValue());
     }
 
-    public void testGetNextAfterSeekingOnLocation_3() throws Exception {
+    public void testGetNextAfterSeekingOnLocation_3() {
 
         final ITmfLocation<?> INITIAL_LOC = fTrace.seekEvent(500L).getLocation();
         final long INITIAL_TS = 501;
@@ -1165,7 +1172,7 @@ public class TmfTraceTest extends TestCase {
         assertEquals("Event timestamp", INITIAL_TS + NB_READS, event.getTimestamp().getValue());
     }
 
-    public void testGetNextLocation() throws Exception {
+    public void testGetNextLocation() {
         ITmfContext context1 = fTrace.seekEvent(0);
         fTrace.getNext(context1);
         ITmfLocation<?> location = context1.getLocation().clone();
@@ -1175,7 +1182,7 @@ public class TmfTraceTest extends TestCase {
         assertEquals("Event timestamp", event1.getTimestamp().getValue(), event2.getTimestamp().getValue());
     }
 
-    public void testGetNextEndLocation() throws Exception {
+    public void testGetNextEndLocation() {
         ITmfContext context1 = fTrace.seekEvent(fTrace.getNbEvents() - 1);
         fTrace.getNext(context1);
         ITmfLocation<?> location = context1.getLocation().clone();
@@ -1188,8 +1195,8 @@ public class TmfTraceTest extends TestCase {
     // processRequest
     // ------------------------------------------------------------------------
 
-    @SuppressWarnings("unchecked")
-    public void testProcessEventRequestForAllEvents() throws Exception {
+    @SuppressWarnings("hiding")
+    public void testProcessEventRequestForAllEvents() throws InterruptedException {
         final int BLOCK_SIZE =  1;
         final Vector<TmfEvent> requestedEvents = new Vector<TmfEvent>();
 
@@ -1216,8 +1223,8 @@ public class TmfTraceTest extends TestCase {
         }
     }
 
-    @SuppressWarnings("unchecked")
-    public void testProcessEventRequestForNbEvents() throws Exception {
+    @SuppressWarnings("hiding")
+    public void testProcessEventRequestForNbEvents() throws InterruptedException {
         final int BLOCK_SIZE = 100;
         final int NB_EVENTS  = 1000;
         final Vector<TmfEvent> requestedEvents = new Vector<TmfEvent>();
@@ -1245,8 +1252,8 @@ public class TmfTraceTest extends TestCase {
         }
     }
 
-    @SuppressWarnings("unchecked")
-    public void testProcessEventRequestForSomeEvents() throws Exception {
+    @SuppressWarnings("hiding")
+    public void testProcessEventRequestForSomeEvents() throws InterruptedException {
         final int BLOCK_SIZE =  1;
         final long startTime = 100;
         final int NB_EVENTS  = 1000;
@@ -1275,8 +1282,8 @@ public class TmfTraceTest extends TestCase {
         }
     }
 
-    @SuppressWarnings("unchecked")
-    public void testProcessEventRequestForOtherEvents() throws Exception {
+    @SuppressWarnings("hiding")
+    public void testProcessEventRequestForOtherEvents() throws InterruptedException {
         final int BLOCK_SIZE =  1;
         final int startIndex = 99;
         final long startTime = 100;
@@ -1306,8 +1313,8 @@ public class TmfTraceTest extends TestCase {
         }
     }
 
-    @SuppressWarnings("unchecked")
-    public void testProcessDataRequestForSomeEvents() throws Exception {
+    @SuppressWarnings("hiding")
+    public void testProcessDataRequestForSomeEvents() throws InterruptedException {
         final int startIndex = 100;
         final int NB_EVENTS  = 1000;
         final Vector<TmfEvent> requestedEvents = new Vector<TmfEvent>();
@@ -1338,8 +1345,7 @@ public class TmfTraceTest extends TestCase {
     // cancel
     // ------------------------------------------------------------------------
 
-    @SuppressWarnings("unchecked")
-    public void testCancel() throws Exception {
+    public void testCancel() throws InterruptedException {
         final Vector<TmfEvent> requestedEvents = new Vector<TmfEvent>();
 
         final TmfTimeRange range = new TmfTimeRange(TmfTimestamp.BIG_BANG, TmfTimestamp.BIG_CRUNCH);
@@ -1367,7 +1373,7 @@ public class TmfTraceTest extends TestCase {
     // toString
     // ------------------------------------------------------------------------
 
-    public void testDefaultTmfTraceStub() throws Exception {
+    public void testDefaultTmfTraceStub() {
         assertFalse ("Open trace", fTrace == null);
         assertEquals("getType",  TmfEvent.class, fTrace.getType());
         assertNull  ("getResource", fTrace.getResource());
index d37cc454ef98fe065fd034f1f09263a83ad2b1ed..a2bda98da98ed9e572c0faaa5a8ccd4526f4171e 100644 (file)
@@ -5,9 +5,18 @@ import junit.framework.TestSuite;
 
 import org.eclipse.linuxtools.internal.tmf.core.Activator;
 
+/**
+ * <b><u>AllTests</u></b>
+ * <p>
+ * Implement me. Please.
+ * <p>
+ */
 @SuppressWarnings({ "nls" })
 public class AllTests {
 
+       /**
+        * @return the test suite
+        */
        public static Test suite() {
                TestSuite suite = new TestSuite("Test suite for " + Activator.PLUGIN_ID + ".uml2sd"); //$NON-NLS-1$);
                //$JUnit-BEGIN$
index 4679385239ff4bd17b924607903570b5faab19e1..aef64354301643987dcbf7de089a31d4f9f96f6a 100644 (file)
@@ -21,7 +21,13 @@ import org.eclipse.linuxtools.tmf.core.event.TmfEventType;
 import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.uml2sd.TmfAsyncSequenceDiagramEvent;
 
-@SuppressWarnings("nls")
+/**
+ * <b><u>TmfAsyncSequenceDiagramEventTest</u></b>
+ * <p>
+ * Implement me. Please.
+ * <p>
+ */
+@SuppressWarnings({"nls","javadoc"})
 public class TmfAsyncSequenceDiagramEventTest extends TestCase {
 
     private final String fContext = ITmfEventType.DEFAULT_CONTEXT_ID;
index 2de6f23b719a012506e5d9db9dc4c2c4521f6f83..a7dd5acb5e42c2cd27ec33fd744a702a3cbb85f5 100644 (file)
@@ -21,7 +21,13 @@ import org.eclipse.linuxtools.tmf.core.event.TmfEventType;
 import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.uml2sd.TmfSyncSequenceDiagramEvent;
 
-@SuppressWarnings("nls")
+/**
+ * <b><u>TmfSyncSequenceDiagramEventTest</u></b>
+ * <p>
+ * Implement me. Please.
+ * <p>
+ */
+@SuppressWarnings({"nls","javadoc"})
 public class TmfSyncSequenceDiagramEventTest extends TestCase {
 
     private final String fContext = ITmfEventType.DEFAULT_CONTEXT_ID;
index 1a881308aefc285d32891630d247c7474c06d307..db1bf9dc935cefa16ad5e67ee6ca15f9f31abbbb 100644 (file)
@@ -5,9 +5,18 @@ import junit.framework.TestSuite;
 
 import org.eclipse.linuxtools.internal.tmf.core.Activator;
 
+/**
+ * <b><u>AllTests</u></b>
+ * <p>
+ * Implement me. Please.
+ * <p>
+ */
 @SuppressWarnings({ "nls" })
 public class AllTests {
 
+       /**
+        * @return the test suite
+        */
        public static Test suite() {
                TestSuite suite = new TestSuite("Test suite for " + Activator.PLUGIN_ID + ".util"); //$NON-NLS-1$);
                //$JUnit-BEGIN$
index 7f4d6d4abe70bdcae946b08c7823aa58bca7a7ba..cf58a894524774e073d666187e3de682182119ad 100755 (executable)
@@ -1,11 +1,11 @@
 /*******************************************************************************
  * Copyright (c) 2011 Ericsson
- * 
+ *
  * All rights reserved. This program and the accompanying materials are
  * made available under the terms of the Eclipse Public License v1.0 which
  * accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *   Mathieu Denis (mathieu.denis@polymtl.ca)  - Initial design and implementation
  *******************************************************************************/
@@ -18,48 +18,55 @@ import junit.framework.TestCase;
 
 import org.eclipse.linuxtools.tmf.core.util.TmfFixedArray;
 
+/**
+ * <b><u>TmfFixedArrayTest</u></b>
+ * <p>
+ * Implement me. Please.
+ * <p>
+ */
+@SuppressWarnings({"nls","javadoc"})
 public class TmfFixedArrayTest extends TestCase {
-    
+
     // ------------------------------------------------------------------------
     // Field(s)
     // ------------------------------------------------------------------------
     TmfFixedArray<String> fFixedArray1 = null;
     TmfFixedArray<String> fFixedArray2 = null;
     String fString1, fString2, fString3, fString4, fString5;
-    
+
     // ------------------------------------------------------------------------
     // Housekeeping
     // ------------------------------------------------------------------------
-    
+
     public TmfFixedArrayTest() {
-        fString1 = "First String"; //$NON-NLS-1$
-        fString2 = "Second String"; //$NON-NLS-1$
-        fString3 = "Third String"; //$NON-NLS-1$
-        fString4 = "Fourth String"; //$NON-NLS-1$
-        fString5 = "Fifth String"; //$NON-NLS-1$
+        fString1 = "First String";
+        fString2 = "Second String";
+        fString3 = "Third String";
+        fString4 = "Fourth String";
+        fString5 = "Fifth String";
         fFixedArray1 = new TmfFixedArray<String>(fString1, fString2, fString3);
         fFixedArray2 = new TmfFixedArray<String>(); // Empty array at the beginning
     }
-    
+
     @Override
     protected void setUp() throws Exception {
         super.setUp();
     }
-    
+
     @Override
     protected void tearDown() throws Exception {
         super.tearDown();
     }
-    
+
     // ------------------------------------------------------------------------
     // Get
     // ------------------------------------------------------------------------
-    
-    public void testGet() throws Exception {
-        assertTrue("get", fString1.equals(fFixedArray1.get(0))); //$NON-NLS-1$
-        assertTrue("get", fString2.equals(fFixedArray1.get(1))); //$NON-NLS-1$
-        assertTrue("get", fString3.equals(fFixedArray1.get(2))); //$NON-NLS-1$
-        
+
+    public void testGet() {
+        assertTrue("get", fString1.equals(fFixedArray1.get(0)));
+        assertTrue("get", fString2.equals(fFixedArray1.get(1)));
+        assertTrue("get", fString3.equals(fFixedArray1.get(2)));
+
         try {
             fFixedArray2.get(0);
             fail();
@@ -68,199 +75,196 @@ public class TmfFixedArrayTest extends TestCase {
             // Success
         }
     }
-    
-    public void testGetArray() throws Exception {
+
+    public void testGetArray() {
         String[] stringArray = fFixedArray1.getArray();
-        assertNotNull("getArray", stringArray); //$NON-NLS-1$
-        assertTrue("getArray", fString1.equals(stringArray[0])); //$NON-NLS-1$
-        assertTrue("getArray", fString2.equals(stringArray[1])); //$NON-NLS-1$
-        assertTrue("getArray", fString3.equals(stringArray[2])); //$NON-NLS-1$
+        assertNotNull("getArray", stringArray);
+        assertTrue("getArray", fString1.equals(stringArray[0]));
+        assertTrue("getArray", fString2.equals(stringArray[1]));
+        assertTrue("getArray", fString3.equals(stringArray[2]));
     }
-    
+
     // ------------------------------------------------------------------------
     // Equals
     // ------------------------------------------------------------------------
-    
-    public void testEqualsReflexivity() throws Exception {
-        assertTrue("equals", fFixedArray1.equals(fFixedArray1)); //$NON-NLS-1$
-        assertTrue("equals", fFixedArray2.equals(fFixedArray2)); //$NON-NLS-1$
-        
-        assertTrue("equals", !fFixedArray1.equals(fFixedArray2)); //$NON-NLS-1$
-        assertTrue("equals", !fFixedArray2.equals(fFixedArray1)); //$NON-NLS-1$
+
+    public void testEqualsReflexivity() {
+        assertTrue("equals", fFixedArray1.equals(fFixedArray1));
+        assertTrue("equals", fFixedArray2.equals(fFixedArray2));
+
+        assertTrue("equals", !fFixedArray1.equals(fFixedArray2));
+        assertTrue("equals", !fFixedArray2.equals(fFixedArray1));
     }
-    
-    @SuppressWarnings("unchecked")
-    public void testEqualsSymmetry() throws Exception {
+
+    public void testEqualsSymmetry() {
         TmfFixedArray<String> fixedArray1 = (TmfFixedArray<String>) fFixedArray1.clone();
         TmfFixedArray<String> fixedArray2 = (TmfFixedArray<String>) fFixedArray2.clone();
 
-        assertTrue("equals", fixedArray1.equals(fFixedArray1)); //$NON-NLS-1$
-        assertTrue("equals", fFixedArray1.equals(fixedArray1)); //$NON-NLS-1$
+        assertTrue("equals", fixedArray1.equals(fFixedArray1));
+        assertTrue("equals", fFixedArray1.equals(fixedArray1));
 
-        assertTrue("equals", fixedArray2.equals(fFixedArray2)); //$NON-NLS-1$
-        assertTrue("equals", fFixedArray2.equals(fixedArray2)); //$NON-NLS-1$
+        assertTrue("equals", fixedArray2.equals(fFixedArray2));
+        assertTrue("equals", fFixedArray2.equals(fixedArray2));
     }
-    
-    @SuppressWarnings("unchecked")
-    public void testEqualsTransivity() throws Exception {
+
+    public void testEqualsTransivity() {
         TmfFixedArray<String> fixedArray1 = (TmfFixedArray<String>) fFixedArray1.clone();
         TmfFixedArray<String> fixedArray2 = (TmfFixedArray<String>) fFixedArray1.clone();
         TmfFixedArray<String> fixedArray3 = (TmfFixedArray<String>) fFixedArray1.clone();
 
-        assertTrue("equals", fixedArray1.equals(fixedArray2)); //$NON-NLS-1$
-        assertTrue("equals", fixedArray2.equals(fixedArray3)); //$NON-NLS-1$
-        assertTrue("equals", fixedArray1.equals(fixedArray3)); //$NON-NLS-1$
+        assertTrue("equals", fixedArray1.equals(fixedArray2));
+        assertTrue("equals", fixedArray2.equals(fixedArray3));
+        assertTrue("equals", fixedArray1.equals(fixedArray3));
     }
-    
-    public void testEqualsNull() throws Exception {
-        assertTrue("equals", !fFixedArray1.equals(null)); //$NON-NLS-1$
-        assertTrue("equals", !fFixedArray2.equals(null)); //$NON-NLS-1$
+
+    public void testEqualsNull() {
+        assertTrue("equals", !fFixedArray1.equals(null));
+        assertTrue("equals", !fFixedArray2.equals(null));
     }
-    
+
     // ------------------------------------------------------------------------
     // Append
     // ------------------------------------------------------------------------
 
     public void testAppend() {
-        TmfFixedArray<String> fixedArray         = new TmfFixedArray<String>();
-        
+        TmfFixedArray<String> fixedArray = new TmfFixedArray<String>();
+
         fixedArray = fixedArray.append(fString1, fString2, fString3);
-        assertEquals("append", 3, fixedArray.size()); //$NON-NLS-1$
-        assertTrue("append", fString1.equals(fixedArray.get(0))); //$NON-NLS-1$
-        assertTrue("append", fString2.equals(fixedArray.get(1))); //$NON-NLS-1$
-        assertTrue("append", fString3.equals(fixedArray.get(2))); //$NON-NLS-1$
+        assertEquals("append", 3, fixedArray.size());
+        assertTrue("append", fString1.equals(fixedArray.get(0)));
+        assertTrue("append", fString2.equals(fixedArray.get(1)));
+        assertTrue("append", fString3.equals(fixedArray.get(2)));
 
         fixedArray = fixedArray.append(fString4);
-        assertEquals("append", 4, fixedArray.size()); //$NON-NLS-1$
-        assertTrue("append", fString4.equals(fixedArray.get(3))); //$NON-NLS-1$
+        assertEquals("append", 4, fixedArray.size());
+        assertTrue("append", fString4.equals(fixedArray.get(3)));
     }
-    
-   
+
+
     @SuppressWarnings("unchecked")
-    public void testAppendFixedArray() throws Exception {
+    public void testAppendFixedArray() {
         TmfFixedArray<String> fixedArrayToAppend1 = new TmfFixedArray<String>(fString4);
         TmfFixedArray<String> fixedArrayToAppend2 = new TmfFixedArray<String>(fString5);
         TmfFixedArray<String> fixedArray         = new TmfFixedArray<String>();
-        
+
         fixedArray = fixedArray.append(fFixedArray1, fixedArrayToAppend1);
-        assertEquals("append", 4, fixedArray.size()); //$NON-NLS-1$
-        assertTrue("append", fString1.equals(fixedArray.get(0))); //$NON-NLS-1$
-        assertTrue("append", fString2.equals(fixedArray.get(1))); //$NON-NLS-1$
-        assertTrue("append", fString3.equals(fixedArray.get(2))); //$NON-NLS-1$
-        assertTrue("append", fString4.equals(fixedArray.get(3))); //$NON-NLS-1$
-        
+        assertEquals("append", 4, fixedArray.size());
+        assertTrue("append", fString1.equals(fixedArray.get(0)));
+        assertTrue("append", fString2.equals(fixedArray.get(1)));
+        assertTrue("append", fString3.equals(fixedArray.get(2)));
+        assertTrue("append", fString4.equals(fixedArray.get(3)));
+
         fixedArray = fixedArray.append(fixedArrayToAppend2);
-        assertEquals("append", 5, fixedArray.size()); //$NON-NLS-1$
-        assertTrue("append", fString5.equals(fixedArray.get(4))); //$NON-NLS-1$
+        assertEquals("append", 5, fixedArray.size());
+        assertTrue("append", fString5.equals(fixedArray.get(4)));
     }
-    
+
     // ------------------------------------------------------------------------
     // hashCode
     // ------------------------------------------------------------------------
-    
-    @SuppressWarnings("unchecked")
-    public void testHashCode() throws Exception {
+
+    public void testHashCode() {
         TmfFixedArray<String> fixedArray1 = (TmfFixedArray<String>) fFixedArray1.clone();
         TmfFixedArray<String> fixedArray2 = (TmfFixedArray<String>) fFixedArray2.clone();
 
-        assertTrue("hashCode", fixedArray1.hashCode() == fFixedArray1.hashCode()); //$NON-NLS-1$
-        assertTrue("hashCode", fFixedArray2.hashCode() == fixedArray2.hashCode()); //$NON-NLS-1$
+        assertTrue("hashCode", fixedArray1.hashCode() == fFixedArray1.hashCode());
+        assertTrue("hashCode", fFixedArray2.hashCode() == fixedArray2.hashCode());
 
-        assertTrue("hashCode", fFixedArray1.hashCode() != fixedArray2.hashCode()); //$NON-NLS-1$
-        assertTrue("hashCode", fFixedArray2.hashCode() != fixedArray1.hashCode()); //$NON-NLS-1$
+        assertTrue("hashCode", fFixedArray1.hashCode() != fixedArray2.hashCode());
+        assertTrue("hashCode", fFixedArray2.hashCode() != fixedArray1.hashCode());
     }
-    
+
     // ------------------------------------------------------------------------
     // toArray
     // ------------------------------------------------------------------------
 
     public void testToArray() {
         String[] expected1 = {fString1, fString2, fString3};
-        assertTrue("toArray", Arrays.equals(expected1, fFixedArray1.toArray())); //$NON-NLS-1$
-        
+        assertTrue("toArray", Arrays.equals(expected1, fFixedArray1.toArray()));
+
         String[] expected2 = {};
-        assertTrue("toArray", Arrays.equals(expected2, fFixedArray2.toArray())); //$NON-NLS-1$
+        assertTrue("toArray", Arrays.equals(expected2, fFixedArray2.toArray()));
     }
 
-    public void testToArrayArg() throws Exception {
+    public void testToArrayArg() {
         String[] stringArray = new String[3];
         fFixedArray1.toArray(stringArray);
-        assertTrue("toArrayArg", stringArray[0].equals(fFixedArray1.get(0))); //$NON-NLS-1$
-        assertTrue("toArrayArg", stringArray[1].equals(fFixedArray1.get(1))); //$NON-NLS-1$
-        assertTrue("toArrayArg", stringArray[2].equals(fFixedArray1.get(2))); //$NON-NLS-1$
-        
+        assertTrue("toArrayArg", stringArray[0].equals(fFixedArray1.get(0)));
+        assertTrue("toArrayArg", stringArray[1].equals(fFixedArray1.get(1)));
+        assertTrue("toArrayArg", stringArray[2].equals(fFixedArray1.get(2)));
+
         String[] stringBigArray = new String[10];
         fFixedArray1.toArray(stringBigArray);
-        assertNull("toArrayArg", stringBigArray[3]); //$NON-NLS-1$
-        
+        assertNull("toArrayArg", stringBigArray[3]);
+
         TmfFixedArray<Object> fFixedArrayObject  = new TmfFixedArray<Object>(fString1);
         stringArray = fFixedArrayObject.toArray(new String[0]);
-        assertTrue("toArrayArg", stringArray[0].equals(fString1)); //$NON-NLS-1$
+        assertTrue("toArrayArg", stringArray[0].equals(fString1));
     }
-    
+
     // ------------------------------------------------------------------------
     // Size
     // ------------------------------------------------------------------------
 
     public void testSize() {
-        assertEquals("toArray", 3, fFixedArray1.size()); //$NON-NLS-1$
-        
-        assertEquals("toArray", 0, fFixedArray2.size()); //$NON-NLS-1$
+        assertEquals("toArray", 3, fFixedArray1.size());
+
+        assertEquals("toArray", 0, fFixedArray2.size());
     }
-    
+
     // ------------------------------------------------------------------------
     // SubArray
     // ------------------------------------------------------------------------
 
-    public void testSubArray() throws Exception {
+    public void testSubArray() {
         TmfFixedArray<String> subArray = fFixedArray1.subArray(1);
-        
-        assertEquals("SubArray", 2, subArray.size()); //$NON-NLS-1$
-        assertTrue("SubArray", fString2.equals(subArray.get(0))); //$NON-NLS-1$
-        assertTrue("SubArray", fString3.equals(subArray.get(1))); //$NON-NLS-1$
+
+        assertEquals("SubArray", 2, subArray.size());
+        assertTrue("SubArray", fString2.equals(subArray.get(0)));
+        assertTrue("SubArray", fString3.equals(subArray.get(1)));
     }
-    
+
     public void testSubArray2() {
         TmfFixedArray<String> subArray = fFixedArray1.subArray(1, 2);
-        
-        assertEquals("SubArray", 2, subArray.size()); //$NON-NLS-1$
-        assertTrue("SubArray", fString2.equals(subArray.get(0))); //$NON-NLS-1$
-        assertTrue("SubArray", fString3.equals(subArray.get(1))); //$NON-NLS-1$
+
+        assertEquals("SubArray", 2, subArray.size());
+        assertTrue("SubArray", fString2.equals(subArray.get(0)));
+        assertTrue("SubArray", fString3.equals(subArray.get(1)));
     }
-    
+
     // ------------------------------------------------------------------------
     // Set
     // ------------------------------------------------------------------------
-    
-    public void testSet() throws Exception {
-        String[] newString = {"new FirstString", "new SecondString", "new ThirdString"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-        
+
+    public void testSet() {
+        String[] newString = {"new FirstString", "new SecondString", "new ThirdString"};
+
         fFixedArray1.set(0, newString[0]);
-        assertTrue("getArray", newString[0].equals(newString[0])); //$NON-NLS-1$
-        
+        assertTrue("getArray", newString[0].equals(newString[0]));
+
         fFixedArray1.set(1, newString[1]);
-        assertTrue("getArray", newString[1].equals(newString[1])); //$NON-NLS-1$
-        
+        assertTrue("getArray", newString[1].equals(newString[1]));
+
         fFixedArray1.set(2, newString[2]);
-        assertTrue("getArray", newString[2].equals(newString[2])); //$NON-NLS-1$
-        
+        assertTrue("getArray", newString[2].equals(newString[2]));
+
         try {
-            fFixedArray2.set(0, "newString"); //$NON-NLS-1$
+            fFixedArray2.set(0, "newString");
             fail();
         } catch (Exception e) {
             // Success
         }
     }
-    
+
     // ------------------------------------------------------------------------
     // toString
     // ------------------------------------------------------------------------
 
     public void testToString() {
         String expected1 = Arrays.asList(fString1, fString2, fString3).toString();
-        assertEquals("toString", expected1, fFixedArray1.toString()); //$NON-NLS-1$
+        assertEquals("toString", expected1, fFixedArray1.toString());
 
         String expected2 = Arrays.asList().toString();
-        assertEquals("toString", expected2, fFixedArray2.toString()); //$NON-NLS-1$
+        assertEquals("toString", expected2, fFixedArray2.toString());
     }
 }
index c6b83af8743eb45b4c90700a24e244f9be8fd0e0..518554a3a8feec228d92b55ee9787987bcbebd93 100644 (file)
@@ -22,7 +22,7 @@ import org.eclipse.linuxtools.tmf.tests.stubs.event.TmfSyntheticEventStub;
  * <p>
  * TODO: Implement me. Please.
  */
-@SuppressWarnings({ "nls" })
+@SuppressWarnings({"nls","javadoc"})
 public class TmfClientStub extends TmfComponent {
 
     private TmfDataProvider<TmfSyntheticEventStub>[] fProviders;
@@ -31,7 +31,6 @@ public class TmfClientStub extends TmfComponent {
         super("TmfClientStub");
     }
 
-    @SuppressWarnings("unchecked")
     public void findProvider() {
         fProviders = (TmfDataProvider<TmfSyntheticEventStub>[]) TmfProviderManager.getProviders(TmfSyntheticEventStub.class, TmfSyntheticEventProviderStub.class);
         //             TmfEventRequest<TmfEventStub> request;
index 5592b284330e967cf1bd1f8b0a4339eba8e0f104..2889cca5d2397ed17f6e10a1a0e5ca111aa8c1ba 100644 (file)
@@ -1,11 +1,11 @@
 /*******************************************************************************
  * Copyright (c) 2009, 2010 Ericsson
- * 
+ *
  * All rights reserved. This program and the accompanying materials are
  * made available under the terms of the Eclipse Public License v1.0 which
  * accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *   Francois Chouinard - Initial API and implementation
  *******************************************************************************/
@@ -33,7 +33,7 @@ import org.eclipse.linuxtools.tmf.tests.stubs.trace.TmfTraceStub;
  * <p>
  * TODO: Implement me. Please.
  */
-@SuppressWarnings("nls")
+@SuppressWarnings({"nls","javadoc"})
 public class TmfDataProviderStub extends TmfDataProvider<TmfEvent> {
 
     private static final String DIRECTORY   = "testfiles";
index d90b6ba7f94dcce7e73aecca6f9b3d760551dfe1..f105d4d4239bf7d51d8c60ad93f888bbd97d93fe 100644 (file)
@@ -1,11 +1,11 @@
 /*******************************************************************************
  * Copyright (c) 2009, 2010 Ericsson
- * 
+ *
  * All rights reserved. This program and the accompanying materials are
  * made available under the terms of the Eclipse Public License v1.0 which
  * accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *   Francois Chouinard - Initial API and implementation
  *******************************************************************************/
@@ -33,7 +33,7 @@ import org.eclipse.linuxtools.tmf.tests.stubs.trace.TmfTraceStub;
  * <p>
  * TODO: Implement me. Please.
  */
-@SuppressWarnings("nls")
+@SuppressWarnings({"nls","javadoc"})
 public class TmfEventProviderStub extends TmfEventProvider<TmfEvent> {
 
     private static final String DIRECTORY   = "testfiles";
index 678cb711a2823f6a170a54e0a1c043f259210f0d..b9282e8d73000f8dcbd5b82e78098437cc14a0ff 100644 (file)
@@ -1,11 +1,11 @@
 /*******************************************************************************
  * Copyright (c) 2009, 2010 Ericsson
- * 
+ *
  * All rights reserved. This program and the accompanying materials are
  * made available under the terms of the Eclipse Public License v1.0 which
  * accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *   Francois Chouinard - Initial API and implementation
  *******************************************************************************/
@@ -31,7 +31,7 @@ import org.eclipse.linuxtools.tmf.tests.stubs.event.TmfSyntheticEventStub;
  * <p>
  * TODO: Implement me. Please.
  */
-@SuppressWarnings({ "nls" })
+@SuppressWarnings({"nls","javadoc"})
 public class TmfSyntheticEventProviderStub extends TmfEventProvider<TmfSyntheticEventStub> {
 
     public static final int BLOCK_SIZE = 100;
@@ -41,7 +41,6 @@ public class TmfSyntheticEventProviderStub extends TmfEventProvider<TmfSynthetic
         super("TmfSyntheticEventProviderStub", TmfSyntheticEventStub.class);
     }
 
-    @SuppressWarnings("unchecked")
     @Override
     public ITmfContext armRequest(final ITmfDataRequest<TmfSyntheticEventStub> request) {
 
@@ -62,10 +61,11 @@ public class TmfSyntheticEventProviderStub extends TmfEventProvider<TmfSynthetic
             @Override
             public void handleData(final TmfEvent event) {
                 super.handleData(event);
-                if (event != null)
+                if (event != null) {
                     handleIncomingData(event);
-                else
+                } else {
                     request.done();
+                }
             }
         };
         provider.sendRequest(subRequest);
@@ -87,8 +87,9 @@ public class TmfSyntheticEventProviderStub extends TmfEventProvider<TmfSynthetic
         TmfSyntheticEventStub data = null;
         try {
             data = fDataQueue.poll(TIMEOUT, TimeUnit.MILLISECONDS);
-            if (data == null)
+            if (data == null) {
                 throw new InterruptedException();
+            }
         }
         catch (final InterruptedException e) {
         }
@@ -99,8 +100,9 @@ public class TmfSyntheticEventProviderStub extends TmfEventProvider<TmfSynthetic
         boolean ok = false;
         try {
             ok = fDataQueue.offer(data, TIMEOUT, TimeUnit.MILLISECONDS);
-            if (!ok)
+            if (!ok) {
                 throw new InterruptedException();
+            }
         }
         catch (final InterruptedException e) {
         }
index 340b19b7f366e211d16e690bd9c6d86d7a73307a..a765c4f33de09b2ea9d699dbba4d6a536c45cdc9 100644 (file)
@@ -1,11 +1,11 @@
 /*******************************************************************************
  * Copyright (c) 2009 Ericsson
- * 
+ *
  * All rights reserved. This program and the accompanying materials are made
  * available under the terms of the Eclipse Public License v1.0 which
  * accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors: Francois Chouinard - Initial API and implementation
  *******************************************************************************/
 
@@ -20,7 +20,7 @@ import org.eclipse.linuxtools.tmf.core.event.TmfEventType;
  * <p>
  * TODO: Implement me. Please.
  */
-@SuppressWarnings("nls")
+@SuppressWarnings({"nls","javadoc"})
 public class TmfEventTypeStub extends TmfEventType {
 
     private static final ITmfEventField FIELD_1 = new TmfEventField("Field1", null);
index 818badc0393573ba76185de45d9d5dd3c7524c5f..e996d2e2322475cfac64ac4d79321fe196e687a7 100644 (file)
@@ -1,11 +1,11 @@
 /*******************************************************************************
  * Copyright (c) 2009, 2010 Ericsson
- * 
+ *
  * All rights reserved. This program and the accompanying materials are
  * made available under the terms of the Eclipse Public License v1.0 which
  * accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *   Francois Chouinard - Initial API and implementation
  *******************************************************************************/
@@ -19,6 +19,7 @@ import org.eclipse.linuxtools.tmf.core.event.TmfEvent;
  * <p>
  * TODO: Implement me. Please.
  */
+@SuppressWarnings("javadoc")
 public class TmfSyntheticEventStub extends TmfEvent {
 
 
index 44b51f891373e817d78501654bc8c6d1bacaf1db..fefeee13a3d4c628acaa7268bacb364304f171b9 100644 (file)
@@ -1,11 +1,11 @@
 /*******************************************************************************
  * Copyright (c) 2009 Ericsson
- * 
+ *
  * All rights reserved. This program and the accompanying materials are
  * made available under the terms of the Eclipse Public License v1.0 which
  * accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *   Francois Chouinard - Initial API and implementation
  *******************************************************************************/
@@ -32,7 +32,7 @@ import org.eclipse.linuxtools.tmf.core.trace.TmfLocation;
  * <p>
  * TODO: Implement me. Please.
  */
-@SuppressWarnings("nls")
+@SuppressWarnings({"nls","javadoc"})
 public class TmfEventParserStub implements ITmfEventParser<TmfEvent> {
 
     // ------------------------------------------------------------------------
@@ -68,11 +68,11 @@ public class TmfEventParserStub implements ITmfEventParser<TmfEvent> {
 
     static final String typePrefix = "Type-";
     @Override
-    @SuppressWarnings("unchecked")
     public TmfEvent parseEvent(final ITmfContext context) {
 
-        if (! (fEventStream instanceof TmfTraceStub))
+        if (! (fEventStream instanceof TmfTraceStub)) {
             return null;
+        }
 
         // Highly inefficient...
         final RandomAccessFile stream = ((TmfTraceStub) fEventStream).getStream();
@@ -93,14 +93,17 @@ public class TmfEventParserStub implements ITmfEventParser<TmfEvent> {
                 final Integer reference  = stream.readInt();
                 final int typeIndex  = Integer.parseInt(type.substring(typePrefix.length()));
                 final String[] fields = new String[typeIndex];
-                for (int i = 0; i < typeIndex; i++)
+                for (int i = 0; i < typeIndex; i++) {
                     fields[i] = stream.readUTF();
+                }
 
                 final StringBuffer content = new StringBuffer("[");
-                if (typeIndex > 0)
+                if (typeIndex > 0) {
                     content.append(fields[0]);
-                for (int i = 1; i < typeIndex; i++)
+                }
+                for (int i = 1; i < typeIndex; i++) {
                     content.append(", ").append(fields[i]);
+                }
                 content.append("]");
 
                 final TmfEventField root = new TmfEventField(ITmfEventField.ROOT_FIELD_ID, content.toString());
index b9de89e51940227c5f6889569cc7e2c41b1217ed..34eea408946b40f9432c2d76c7099f665336e1b7 100644 (file)
@@ -23,6 +23,7 @@ import org.eclipse.linuxtools.tmf.core.trace.TmfExperiment;
  * Implement me. Please.
  * <p>
  */
+@SuppressWarnings("javadoc")
 public class TmfExperimentStub<T extends ITmfEvent> extends TmfExperiment<TmfEvent> {
 
     public TmfExperimentStub(String name, ITmfTrace<TmfEvent>[] traces, int blockSize) {
index a2d2659fd269dd37cd9bf7b3588313b29a4c5e99..2acfa55275715d9bbee3447ba1d20241ff672731 100644 (file)
@@ -1,11 +1,11 @@
 /*******************************************************************************
  * Copyright (c) 2012 Ericsson
- * 
+ *
  * All rights reserved. This program and the accompanying materials are
  * made available under the terms of the Eclipse Public License v1.0 which
  * accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  * Francois Chouinard - Initial API and implementation
  *******************************************************************************/
@@ -25,6 +25,7 @@ import org.eclipse.linuxtools.tmf.core.trace.TmfCheckpointIndexer;
  * Implement me. Please.
  * <p>
  */
+@SuppressWarnings("javadoc")
 public class TmfIndexerStub extends TmfCheckpointIndexer<ITmfTrace<ITmfEvent>> {
 
     @SuppressWarnings({ "rawtypes", "unchecked" })
index 595796d88bbebb0403b57063808738cd1f25fcc5..97324ed646d43fbcd3355f1b5fb9dc33fff2942f 100644 (file)
@@ -37,7 +37,7 @@ import org.eclipse.linuxtools.tmf.core.trace.TmfTrace;
  * <p>
  * Dummy test trace. Use in conjunction with TmfEventParserStub.
  */
-@SuppressWarnings("nls")
+@SuppressWarnings({"nls","javadoc"})
 public class TmfTraceStub extends TmfTrace<TmfEvent> implements ITmfEventParser<TmfEvent> {
 
     // ------------------------------------------------------------------------
This page took 0.257272 seconds and 5 git commands to generate.