getting rid of string parameter on privacy annotations

Reviewed By: jeremydubreil

Differential Revision: D3249465

fb-gh-sync-id: 88bff20
fbshipit-source-id: 88bff20
master
Sam Blackshear 9 years ago committed by Facebook Github Bot 3
parent f3fe199a25
commit c7c1588830

@ -20,5 +20,4 @@ import java.lang.annotation.Target;
) )
public @interface PrivacySink { public @interface PrivacySink {
String[] value();
} }

@ -22,5 +22,4 @@ import java.lang.annotation.Target;
}) })
public @interface PrivacySource { public @interface PrivacySource {
String[] value();
} }

@ -172,7 +172,7 @@ public class TaintExample {
values.put(key, value); values.put(key, value);
} }
@PrivacySource("") @PrivacySource
public String privacySource() { public String privacySource() {
return "source"; return "source";
} }
@ -181,10 +181,10 @@ public class TaintExample {
InferTaint.inferSensitiveSinkUndefined(privacySource()); // should report 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() { public void testPrivacySinkAnnot1() {
@ -207,9 +207,9 @@ public class TaintExample {
staticPrivacySink("", source); // should not report staticPrivacySink("", source); // should not report
} }
@PrivacySource("") String mPrivacySource; @PrivacySource String mPrivacySource;
@PrivacySource("") String sPrivacySource; @PrivacySource String sPrivacySource;
public void testPrivacySourceInstanceFieldAnnot() { public void testPrivacySourceInstanceFieldAnnot() {
String source = mPrivacySource; String source = mPrivacySource;

Loading…
Cancel
Save