< prev index next >

## src/com/sun/javatest/agent/AgentPanel.java

Print this page

    *** 688,698 ****
              }

              public synchronized void addTask(TaskState task) {
                  if (tasks.size() >= maxTasks) {
                      for (int i = 0; i < tasks.size(); i++) {
    !                     String s = (String) getItem(i);
                          // skip over active tasks that will be updated later
                          if (s.startsWith("CONN") || s.startsWith("EXEC"))
                              continue;

                          tasks.removeElementAt(i);
    --- 688,698 ----
              }

              public synchronized void addTask(TaskState task) {
                  if (tasks.size() >= maxTasks) {
                      for (int i = 0; i < tasks.size(); i++) {
    !                     String s = getItem(i);
                          // skip over active tasks that will be updated later
                          if (s.startsWith("CONN") || s.startsWith("EXEC"))
                              continue;

                          tasks.removeElementAt(i);
    *** 704,722 ****
                  super.add("CONN " + task.connection.getName());
              }

              public synchronized TaskState getTask(Connection c) {
                  for (int i = 0; i < tasks.size(); i++) {
    !                 TaskState ts = (TaskState)(tasks.elementAt(i));
                      if (ts.connection == c)
                          return ts;
                  }
                  throw new Error("AgentPanel.HistoryList.getTask: can't find socket");
              }

              public synchronized TaskState getSelectedTask() {
    !             return (TaskState)(tasks.elementAt(super.getSelectedIndex()));
              }

              public synchronized void removeAll() {
                  tasks.setSize(0);
                  if (getItemCount() > 0)
    --- 704,722 ----
                  super.add("CONN " + task.connection.getName());
              }

              public synchronized TaskState getTask(Connection c) {
                  for (int i = 0; i < tasks.size(); i++) {
    !                 TaskState ts = tasks.elementAt(i);
                      if (ts.connection == c)
                          return ts;
                  }
                  throw new Error("AgentPanel.HistoryList.getTask: can't find socket");
              }

              public synchronized TaskState getSelectedTask() {
    !             return tasks.elementAt(super.getSelectedIndex());
              }

              public synchronized void removeAll() {
                  tasks.setSize(0);
                  if (getItemCount() > 0)
    *** 756,766 ****
              private String getKey(String state, String detail) {
                  return (state + " " + detail);
              }

              private int maxTasks = 10;
    !         private Vector tasks = new Vector();
          }

          //-------------------------------------------------------------------

    --- 756,766 ----
              private String getKey(String state, String detail) {
                  return (state + " " + detail);
              }

              private int maxTasks = 10;
    !         private Vector<TaskState> tasks = new Vector<>();
          }

          //-------------------------------------------------------------------

    *** 971,981 ****
                  add(f, fc);
                  return f;
              }

    !         private Vector tasks = new Vector();

              private int[] statusCounts = new int[Status.NUM_STATES];
              private int exceptionsCount;

              private TextField activeField;
    --- 971,981 ----
                  add(f, fc);
                  return f;
              }

    !         private Vector<TaskState> tasks = new Vector<>();

              private int[] statusCounts = new int[Status.NUM_STATES];
              private int exceptionsCount;

              private TextField activeField;

< prev index next >