Closed giusvale-dev closed 1 year ago
public static void main( String[] args ) { try { Database database = new JacksonDatabase(); Group test = database.newGroup("TEST"); Entry entry = database.newEntry("Entry"); entry.setTitle("Entry title"); entry.setPassword("password"); entry.setNotes("Notes"); entry.setProperty("Properties 1", "Secret 1"); entry.setProperty("Properties 1", "Secret 2"); entry.setUsername("username"); entry.setUrl("url"); test.addEntry(entry); database.setName("My first DB"); database.getRootGroup().addGroup(test); try (FileOutputStream outputStream = new FileOutputStream("test.kdbx")) { database.save(new KdbxCreds("123".getBytes()), outputStream); } } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } }
I expected an exception (we can't have 2 properties with the same name) but the result is the property overwritten. This is an expected result?
yes, expected, how would you overwrite a property otherwise?
👌
I expected an exception (we can't have 2 properties with the same name) but the result is the property overwritten. This is an expected result?