mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
Ticket #269: Fix NPE in connection record re: dates.
This commit is contained in:
@@ -72,18 +72,20 @@ public class MySQLConnectionRecord implements ConnectionRecord {
|
|||||||
*/
|
*/
|
||||||
public MySQLConnectionRecord(Date startDate, Date endDate,
|
public MySQLConnectionRecord(Date startDate, Date endDate,
|
||||||
String username) {
|
String username) {
|
||||||
this.startDate = new Date(startDate.getTime());
|
if (startDate != null) this.startDate = new Date(startDate.getTime());
|
||||||
this.endDate = new Date(endDate.getTime());
|
if (endDate != null) this.endDate = new Date(endDate.getTime());
|
||||||
this.username = username;
|
this.username = username;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Date getStartDate() {
|
public Date getStartDate() {
|
||||||
|
if (startDate == null) return null;
|
||||||
return new Date(startDate.getTime());
|
return new Date(startDate.getTime());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Date getEndDate() {
|
public Date getEndDate() {
|
||||||
|
if (endDate == null) return null;
|
||||||
return new Date(endDate.getTime());
|
return new Date(endDate.getTime());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user