Annotate StringBuilder.toString()
authorAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Fri, 30 Oct 2015 23:39:37 +0000 (19:39 -0400)
committerAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Mon, 23 Nov 2015 21:14:34 +0000 (16:14 -0500)
Always returns a new String, so is effectively @NonNull.

Again, this applies to this class only and not all Object#toString()
implementations!

Change-Id: I748fd7cc6cc627266733632b9e251f87569369db
Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Reviewed-on: https://git.eclipse.org/r/59425
Reviewed-by: Hudson CI
Reviewed-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Tested-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
common/org.eclipse.tracecompass.common.core/annotations/java/lang/StringBuilder.eea [new file with mode: 0644]
ctf/org.eclipse.tracecompass.ctf.core/src/org/eclipse/tracecompass/ctf/core/event/types/EnumDeclaration.java

diff --git a/common/org.eclipse.tracecompass.common.core/annotations/java/lang/StringBuilder.eea b/common/org.eclipse.tracecompass.common.core/annotations/java/lang/StringBuilder.eea
new file mode 100644 (file)
index 0000000..7b45488
--- /dev/null
@@ -0,0 +1,4 @@
+class java/lang/StringBuilder
+toString
+ ()Ljava/lang/String;
+ ()L1java/lang/String;
index 763ca6ae8f51b5f69a5c746d1ee09eb86a8531bd..f79961e077d722b8766b54161568809a617a110c 100644 (file)
@@ -337,9 +337,6 @@ public final class EnumDeclaration extends Declaration implements ISimpleDatatyp
         sb.append("type:").append(fContainerType.toString()); //$NON-NLS-1$
         sb.append(']');
         String string = sb.toString();
-        if (string == null) {
-            throw new IllegalStateException();
-        }
         return string;
     }
 
This page took 0.027522 seconds and 5 git commands to generate.