Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client window file submission entries not removed after each file is submitted #18

Open
jiajunmao opened this issue May 20, 2018 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@jiajunmao
Copy link
Member

Describe the bug
Client window file submission entries not removed after each file is submitted

To Reproduce
Steps to reproduce the behavior:

  1. Run the client window class under com.khpc.client
  2. Choose some files
  3. Click submit (configure the environment and start the server first)
  4. See error

Expected behavior
Each entry is removed when that entry is submitted

Code

private void submit() throws UnknownHostException, IOException, InterruptedException {
		// The list that contains all the file path that is going to be submitted
		List<File> fileList = new ArrayList<File>();

		for (int i = 0; i < model.getSize(); i++) {
			fileList.add((File) (model.getElementAt(i)));
		}

		for (File file : fileList) {
			FileSendCoordinator.sendFileOnce(file, servIpAddr);
			model.removeElementAt(0);
		}
		
		model.clear();
	}
@jiajunmao jiajunmao added the bug Something isn't working label May 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants