common: Annotate ByteOrder#getNativeOrder
authorMatthew Khouzam <matthew.khouzam@ericsson.com>
Tue, 1 Dec 2015 16:23:33 +0000 (11:23 -0500)
committerMatthew Khouzam <matthew.khouzam@ericsson.com>
Wed, 2 Dec 2015 21:32:50 +0000 (16:32 -0500)
Change-Id: I6c64addc87111f2974bc0b97a527ebd8fd3f6b1f
Signed-off-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/61683
Reviewed-by: Hudson CI
Reviewed-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
Tested-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
common/org.eclipse.tracecompass.common.core/annotations/java/nio/ByteOrder.eea [new file with mode: 0644]
ctf/org.eclipse.tracecompass.ctf.core/src/org/eclipse/tracecompass/ctf/core/event/types/FloatDeclaration.java
ctf/org.eclipse.tracecompass.ctf.core/src/org/eclipse/tracecompass/ctf/core/event/types/IntegerDeclaration.java

diff --git a/common/org.eclipse.tracecompass.common.core/annotations/java/nio/ByteOrder.eea b/common/org.eclipse.tracecompass.common.core/annotations/java/nio/ByteOrder.eea
new file mode 100644 (file)
index 0000000..bd2a317
--- /dev/null
@@ -0,0 +1,10 @@
+class java/nio/ByteOrder
+BIG_ENDIAN
+ Ljava/nio/ByteOrder;
+ L1java/nio/ByteOrder;
+LITTLE_ENDIAN
+ Ljava/nio/ByteOrder;
+ L1java/nio/ByteOrder;
+nativeOrder
+ ()Ljava/nio/ByteOrder;
+ ()L1java/nio/ByteOrder;
index cd19941b599b2df3fb3156ce6b2abbd12d976684..af56d7672821925b13eae48d74733de1bd8f7b5a 100644 (file)
@@ -59,11 +59,7 @@ public final class FloatDeclaration extends Declaration implements ISimpleDataty
             long alignment) {
         fMantissa = mantissa;
         fExponent = exponent;
-        ByteOrder byteOrder2 = (byteOrder == null) ? ByteOrder.nativeOrder() : byteOrder;
-        if (byteOrder2 == null) {
-            throw new IllegalStateException("ByteOrder cannot be null"); //$NON-NLS-1$
-        }
-        fByteOrder = byteOrder2;
+        fByteOrder = (byteOrder == null) ? ByteOrder.nativeOrder() : byteOrder;
         fAlignement = Math.max(alignment, 1);
 
     }
index eb03d3bfcd2772dc2dfa9c27249149016f0f8842..7760210589fd1e6d1ad25fe32eac6a5e4b7269c6 100644 (file)
@@ -243,9 +243,7 @@ public final class IntegerDeclaration extends Declaration implements ISimpleData
         fLength = len;
         fSigned = signed;
         fBase = base;
-
-        fByteOrder = (byteOrder == null ? checkNotNull(ByteOrder.nativeOrder()) : byteOrder);
-
+        fByteOrder = (byteOrder == null) ? ByteOrder.nativeOrder() : byteOrder;
         fEncoding = encoding;
         fClock = clock;
         fAlignment = Math.max(alignment, 1);
This page took 0.028247 seconds and 5 git commands to generate.