Java Code Examples for java.util.Stack#addElement()
The following examples show how to use
java.util.Stack#addElement() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ListTestCode.java From JAADAS with GNU General Public License v3.0 | 6 votes |
public void concreteWriteReadStackNegativeTest() { String tainted = TelephonyManager.getDeviceId(); Stack<String> stack = new Stack<String>(); Stack<String> stack2 = new Stack<String>(); stack.addElement("neutral"); stack2.push(tainted); stack2.add(tainted); String untaintedElement = stack.get(0); String taintedElement = stack2.peek(); taintedElement = stack2.pop(); taintedElement = stack2.get(0); taintedElement.toString(); ConnectionManager cm = new ConnectionManager(); cm.publish(untaintedElement); }
Example 2
Source File: ListTestCode.java From JAADAS with GNU General Public License v3.0 | 5 votes |
public void concreteWriteReadStackGetTest() { String tainted = TelephonyManager.getDeviceId(); Stack<String> stack = new Stack<String>(); stack.addElement("neutral"); stack.push(tainted); String taintedElement2 = stack.get(0); ConnectionManager cm = new ConnectionManager(); cm.publish(taintedElement2); }
Example 3
Source File: ListTestCode.java From JAADAS with GNU General Public License v3.0 | 5 votes |
public void concreteWriteReadStackPeekTest() { String tainted = TelephonyManager.getDeviceId(); Stack<String> stack = new Stack<String>(); stack.addElement("neutral"); stack.push(tainted); String taintedElement = stack.peek(); ConnectionManager cm = new ConnectionManager(); cm.publish(taintedElement); }
Example 4
Source File: ListTestCode.java From JAADAS with GNU General Public License v3.0 | 5 votes |
public void concreteWriteReadStackPopTest() { String tainted = TelephonyManager.getDeviceId(); Stack<String> stack = new Stack<String>(); stack.addElement("neutral"); stack.push(tainted); String taintedElement3 = stack.pop(); ConnectionManager cm = new ConnectionManager(); cm.publish(taintedElement3); }