ctf.core: making some classes final
authorWassim <wassim.nasrallah.36@gmail.com>
Fri, 27 May 2016 00:30:16 +0000 (20:30 -0400)
committerMatthew Khouzam <matthew.khouzam@ericsson.com>
Wed, 1 Jun 2016 00:13:21 +0000 (20:13 -0400)
This patch is to make some classes final in ctf.core component.
It should be final to improve readability and since you should never
extend it. It also allows the jvm to inline methods and improve performance.

Change-Id: I6e9bef701898716978c6e7b4b20254eabc8cd6c8
Signed-off-by: Wassim <wassim.nasrallah.36@gmail.com>
Reviewed-on: https://git.eclipse.org/r/73771
Reviewed-by: Hudson CI
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Tested-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Reviewed-by: Genevieve Bastien <gbastien+lttng@versatic.net>
Tested-by: Genevieve Bastien <gbastien+lttng@versatic.net>
ctf/org.eclipse.tracecompass.ctf.core/src/org/eclipse/tracecompass/ctf/core/event/types/EnumDeclaration.java
ctf/org.eclipse.tracecompass.ctf.core/src/org/eclipse/tracecompass/ctf/core/event/types/StringDeclaration.java
ctf/org.eclipse.tracecompass.ctf.core/src/org/eclipse/tracecompass/internal/ctf/core/SafeMappedByteBuffer.java

index 30155e142f356d37b53c5e5bbc6dea1e2eb76491..5fe01bbfb01b670de563839735b6196cc2123354 100644 (file)
@@ -44,7 +44,7 @@ public final class EnumDeclaration extends Declaration implements ISimpleDatatyp
      *
      * @since 1.1
      */
-    public static class Pair {
+    public static final class Pair {
         private final long fFirst;
         private final long fSecond;
 
index 4e6afd0bbab2ca25901389ed7024e4366a9f59ed..f94b9083dfb445d22db378fa91fae28c867585ef 100644 (file)
@@ -30,7 +30,7 @@ import org.eclipse.tracecompass.ctf.core.event.scope.IDefinitionScope;
  * @author Simon Marchi
  */
 @NonNullByDefault
-public class StringDeclaration extends Declaration {
+public final class StringDeclaration extends Declaration {
 
     private static final StringDeclaration STRING_DEC_UTF8 = new StringDeclaration(Encoding.UTF8);
     private static final StringDeclaration STRING_DEC_ASCII = new StringDeclaration(Encoding.ASCII);
index 7f25796d883d104aa46e2bd3a2d523b0d0c11e1d..5b14099e6ba65d7b6f902adf893975c0c1ba1710 100644 (file)
@@ -24,7 +24,7 @@ import java.nio.channels.FileChannel;
  *
  * http://bugs.java.com/view_bug.do?bug_id=4715154
  */
-public class SafeMappedByteBuffer {
+public final class SafeMappedByteBuffer {
 
     private static final boolean IS_WIN32 = System.getProperty("os.name").startsWith("Windows");  //$NON-NLS-1$//$NON-NLS-2$
 
This page took 0.026485 seconds and 5 git commands to generate.