From: Matthew Khouzam Date: Wed, 28 Oct 2015 18:48:44 +0000 (-0400) Subject: common: Annotate some methods in String X-Git-Url: http://git.efficios.com/?a=commitdiff_plain;ds=sidebyside;h=65577c0b2fbcb6e831b1310eac54c2867bf828e4;p=deliverable%2Ftracecompass.git common: Annotate some methods in String All variants of: copyValueOf() format() intern() toString()* valueOf() return a non-null value, so can be marked as such. * Do not confound with Object.toString()! That one has no nullness guarantees. Change-Id: Ia739dab7ab294e0c32156bd3b756f4241e97a4a1 Signed-off-by: Matthew Khouzam Reviewed-on: https://git.eclipse.org/r/59163 Reviewed-by: Alexandre Montplaisir Tested-by: Alexandre Montplaisir Reviewed-by: Hudson CI --- diff --git a/common/org.eclipse.tracecompass.common.core/annotations/java/lang/String.eea b/common/org.eclipse.tracecompass.common.core/annotations/java/lang/String.eea new file mode 100644 index 0000000000..328ef38b14 --- /dev/null +++ b/common/org.eclipse.tracecompass.common.core/annotations/java/lang/String.eea @@ -0,0 +1,43 @@ +class java/lang/String +copyValueOf + ([C)Ljava/lang/String; + ([C)L1java/lang/String; +copyValueOf + ([CII)Ljava/lang/String; + ([CII)L1java/lang/String; +format + (Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String; + (Ljava/lang/String;[Ljava/lang/Object;)L1java/lang/String; +format + (Ljava/util/Locale;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String; + (Ljava/util/Locale;Ljava/lang/String;[Ljava/lang/Object;)L1java/lang/String; +intern + ()Ljava/lang/String; + ()L1java/lang/String; +toString + ()Ljava/lang/String; + ()L1java/lang/String; +valueOf + (C)Ljava/lang/String; + (C)L1java/lang/String; +valueOf + (D)Ljava/lang/String; + (D)L1java/lang/String; +valueOf + (F)Ljava/lang/String; + (F)L1java/lang/String; +valueOf + (I)Ljava/lang/String; + (I)L1java/lang/String; +valueOf + (J)Ljava/lang/String; + (J)L1java/lang/String; +valueOf + (Ljava/lang/Object;)Ljava/lang/String; + (Ljava/lang/Object;)L1java/lang/String; +valueOf + (Z)Ljava/lang/String; + (Z)L1java/lang/String; +valueOf + ([C)Ljava/lang/String; + ([C)L1java/lang/String; diff --git a/ctf/org.eclipse.tracecompass.ctf.parser.tests/build.properties b/ctf/org.eclipse.tracecompass.ctf.parser.tests/build.properties index 8b56845983..02aa8e3fb5 100644 --- a/ctf/org.eclipse.tracecompass.ctf.parser.tests/build.properties +++ b/ctf/org.eclipse.tracecompass.ctf.parser.tests/build.properties @@ -17,3 +17,5 @@ bin.includes = META-INF/,\ plugin.properties,\ about.html src.includes = about.html +additional.bundles = org.eclipse.jdt.annotation +jars.extra.classpath = platform:/plugin/org.eclipse.jdt.annotation \ No newline at end of file diff --git a/ctf/org.eclipse.tracecompass.ctf.parser/build.properties b/ctf/org.eclipse.tracecompass.ctf.parser/build.properties index 0526a214fb..b4e72d6635 100644 --- a/ctf/org.eclipse.tracecompass.ctf.parser/build.properties +++ b/ctf/org.eclipse.tracecompass.ctf.parser/build.properties @@ -19,3 +19,5 @@ bin.includes = META-INF/,\ . jars.compile.order = . src.includes = about.html +additional.bundles = org.eclipse.jdt.annotation +jars.extra.classpath = platform:/plugin/org.eclipse.jdt.annotation \ No newline at end of file diff --git a/gdbtrace/org.eclipse.tracecompass.gdbtrace.core.tests/build.properties b/gdbtrace/org.eclipse.tracecompass.gdbtrace.core.tests/build.properties index 978a8de6ba..a3374f63f3 100644 --- a/gdbtrace/org.eclipse.tracecompass.gdbtrace.core.tests/build.properties +++ b/gdbtrace/org.eclipse.tracecompass.gdbtrace.core.tests/build.properties @@ -17,3 +17,5 @@ bin.includes = META-INF/,\ plugin.properties,\ about.html src.includes = about.html +additional.bundles = org.eclipse.jdt.annotation +jars.extra.classpath = platform:/plugin/org.eclipse.jdt.annotation \ No newline at end of file diff --git a/gdbtrace/org.eclipse.tracecompass.gdbtrace.ui.tests/build.properties b/gdbtrace/org.eclipse.tracecompass.gdbtrace.ui.tests/build.properties index 978a8de6ba..a3374f63f3 100644 --- a/gdbtrace/org.eclipse.tracecompass.gdbtrace.ui.tests/build.properties +++ b/gdbtrace/org.eclipse.tracecompass.gdbtrace.ui.tests/build.properties @@ -17,3 +17,5 @@ bin.includes = META-INF/,\ plugin.properties,\ about.html src.includes = about.html +additional.bundles = org.eclipse.jdt.annotation +jars.extra.classpath = platform:/plugin/org.eclipse.jdt.annotation \ No newline at end of file diff --git a/lttng/org.eclipse.tracecompass.lttng2.control.core.tests/build.properties b/lttng/org.eclipse.tracecompass.lttng2.control.core.tests/build.properties index 978a8de6ba..a3374f63f3 100644 --- a/lttng/org.eclipse.tracecompass.lttng2.control.core.tests/build.properties +++ b/lttng/org.eclipse.tracecompass.lttng2.control.core.tests/build.properties @@ -17,3 +17,5 @@ bin.includes = META-INF/,\ plugin.properties,\ about.html src.includes = about.html +additional.bundles = org.eclipse.jdt.annotation +jars.extra.classpath = platform:/plugin/org.eclipse.jdt.annotation \ No newline at end of file diff --git a/lttng/org.eclipse.tracecompass.lttng2.ust.ui.tests/build.properties b/lttng/org.eclipse.tracecompass.lttng2.ust.ui.tests/build.properties index 978a8de6ba..a3374f63f3 100644 --- a/lttng/org.eclipse.tracecompass.lttng2.ust.ui.tests/build.properties +++ b/lttng/org.eclipse.tracecompass.lttng2.ust.ui.tests/build.properties @@ -17,3 +17,5 @@ bin.includes = META-INF/,\ plugin.properties,\ about.html src.includes = about.html +additional.bundles = org.eclipse.jdt.annotation +jars.extra.classpath = platform:/plugin/org.eclipse.jdt.annotation \ No newline at end of file