From c7c158883060b5421595c4561b517f519888231b Mon Sep 17 00:00:00 2001 From: Sam Blackshear Date: Mon, 2 May 2016 17:24:23 -0700 Subject: [PATCH] getting rid of string parameter on privacy annotations Reviewed By: jeremydubreil Differential Revision: D3249465 fb-gh-sync-id: 88bff20 fbshipit-source-id: 88bff20 --- .../com/facebook/infer/annotation/PrivacySink.java | 1 - .../com/facebook/infer/annotation/PrivacySource.java | 1 - infer/tests/codetoanalyze/java/infer/TaintExample.java | 10 +++++----- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/infer/annotations/com/facebook/infer/annotation/PrivacySink.java b/infer/annotations/com/facebook/infer/annotation/PrivacySink.java index 7ce20f027..2be3ffcf9 100644 --- a/infer/annotations/com/facebook/infer/annotation/PrivacySink.java +++ b/infer/annotations/com/facebook/infer/annotation/PrivacySink.java @@ -20,5 +20,4 @@ import java.lang.annotation.Target; ) public @interface PrivacySink { - String[] value(); } diff --git a/infer/annotations/com/facebook/infer/annotation/PrivacySource.java b/infer/annotations/com/facebook/infer/annotation/PrivacySource.java index 16f15c3bc..57b7fe507 100644 --- a/infer/annotations/com/facebook/infer/annotation/PrivacySource.java +++ b/infer/annotations/com/facebook/infer/annotation/PrivacySource.java @@ -22,5 +22,4 @@ import java.lang.annotation.Target; }) public @interface PrivacySource { - String[] value(); } diff --git a/infer/tests/codetoanalyze/java/infer/TaintExample.java b/infer/tests/codetoanalyze/java/infer/TaintExample.java index ee9cd069b..55017efee 100644 --- a/infer/tests/codetoanalyze/java/infer/TaintExample.java +++ b/infer/tests/codetoanalyze/java/infer/TaintExample.java @@ -172,7 +172,7 @@ public class TaintExample { values.put(key, value); } - @PrivacySource("") + @PrivacySource public String privacySource() { return "source"; } @@ -181,10 +181,10 @@ public class TaintExample { InferTaint.inferSensitiveSinkUndefined(privacySource()); // should report } - public void instancePrivacySink(@PrivacySink("") String s1, String s2) { + public void instancePrivacySink(@PrivacySink String s1, String s2) { } - public static void staticPrivacySink(@PrivacySink("") String s1, String s2) { + public static void staticPrivacySink(@PrivacySink String s1, String s2) { } public void testPrivacySinkAnnot1() { @@ -207,9 +207,9 @@ public class TaintExample { staticPrivacySink("", source); // should not report } - @PrivacySource("") String mPrivacySource; + @PrivacySource String mPrivacySource; - @PrivacySource("") String sPrivacySource; + @PrivacySource String sPrivacySource; public void testPrivacySourceInstanceFieldAnnot() { String source = mPrivacySource;