kaiwinter/dummyjdbc

DummyJdbcDriver#addTableResource overwrites any existing entries

msid256 opened this issue · 3 comments

To who is reading this,

I have found an issue with the addTableResource-Method in DummyJdbcDriver:

public static void addTableResource(String tablename, File csvFile) {
	Map<String, File> databaseMap = Collections.synchronizedMap(new HashMap<String, File>());
	databaseMap.put(tablename, csvFile);
	tableResources.put(DEFAULT_DATABASE, databaseMap);
}

This code will always create a new HashMap for any tablename passed and will always overwrite any previously added table/file combination.

I have created a branch with a solution including some unit tests for it, but I need the right to push the brunch to this repository.

If you would grant me this access, I could go on and push this branch into this repo and start a pull request.

Thanks & best regards,

Massimiliano

Hi Massimiliano,

thanks for pointing this out. Could you create a pull request like described here: https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request

I can then merge the changes from your fork into this repository. You don't need write access to this repository then.

Regards
Kai

Hi Kai,

thanks for the link. Didn't know that you can also collaborate with forks.

All the best

Massimiliano

Fixed by #10