common: Add NonNull external annotation to File.getName
authorMarc-Andre Laperle <marc-andre.laperle@ericsson.com>
Tue, 9 Feb 2016 07:09:55 +0000 (08:09 +0100)
committerMarc-Andre Laperle <marc-andre.laperle@ericsson.com>
Tue, 9 Feb 2016 16:41:49 +0000 (11:41 -0500)
Because it can't be null.

Change-Id: I81e9797e7e753a3cd04b8a580ec324f199569f71
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/66172
Reviewed-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
Tested-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
Reviewed-by: Hudson CI
common/org.eclipse.tracecompass.common.core/annotations/java/io/File.eea [new file with mode: 0644]
ctf/org.eclipse.tracecompass.ctf.core/src/org/eclipse/tracecompass/ctf/core/trace/CTFStreamInput.java

diff --git a/common/org.eclipse.tracecompass.common.core/annotations/java/io/File.eea b/common/org.eclipse.tracecompass.common.core/annotations/java/io/File.eea
new file mode 100644 (file)
index 0000000..1d97bd4
--- /dev/null
@@ -0,0 +1,4 @@
+class java/io/File
+getName
+ ()Ljava/lang/String;
+ ()L1java/lang/String;
index babc8ad04d942ce383ea32a0eb04f91ea5250ff3..673fe6202a55ac848c842423975887ade0615ab4 100644 (file)
@@ -104,11 +104,7 @@ public class CTFStreamInput implements IDefinitionScope {
     public CTFStreamInput(ICTFStream stream, File file) {
         fStream = stream;
         fFile = file;
-        String name = fFile.getName();
-        if (name == null) {
-            throw new IllegalStateException("File cannot have a null name"); //$NON-NLS-1$
-        }
-        fFileName = name;
+        fFileName = fFile.getName();
 
         fIndex = new StreamInputPacketIndex();
         /*
This page took 0.026199 seconds and 5 git commands to generate.