jorabin / KeePassJava2

Java API for KeePass Password Databases - Read/Write 2.x (File versions 3 and 4), Read 1.x
Apache License 2.0
250 stars 71 forks source link

Added Entry::setExpires #17

Closed AugustNagro closed 6 years ago

jorabin commented 6 years ago

Hi @AugustNagro - thanks very much for the pull request.

Noting that the interface doesn't currently allow the setting of a specific expiry time, and I agree that this would be a useful addition.

However, I'm not clear that overloading setExpires() in this way is the best way of doing it. I'm also not clear that passing a null value - in order to have the side effect of making expires false is right.

I'd prefer if a setter setExpiryTime() was added - mirroring getExpiryTime() - Illegal Argument Exception to be thrown if the Date is null.

Also would prefer if pull requests were made to branch develop ...

... thanks again for your contribution and sorry to be so picky :(

AugustNagro commented 6 years ago

Sounds good; I'll close this pull request and make a new one on develop.

I'll add setters for the remaining standard fields as well: Date getLastAccessTime(); Date getCreationTime(); Date getLastModificationTime();