aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-07-24 14:07:51 -0700
committerAnton Tananaev <anton@traccar.org>2022-07-24 14:07:51 -0700
commiteb39a38711c924ae0ecc7ad29ad69e74a95d92d8 (patch)
tree8543a6201ced0650690b06f0758ad68405efb6c4
parent929240716f09627de9823d411a11fc0cdf6eb49b (diff)
downloadtrackermap-server-eb39a38711c924ae0ecc7ad29ad69e74a95d92d8.tar.gz
trackermap-server-eb39a38711c924ae0ecc7ad29ad69e74a95d92d8.tar.bz2
trackermap-server-eb39a38711c924ae0ecc7ad29ad69e74a95d92d8.zip
Avoid copying array
-rw-r--r--src/main/java/org/traccar/model/Calendar.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/org/traccar/model/Calendar.java b/src/main/java/org/traccar/model/Calendar.java
index 102c0be52..c1f98a957 100644
--- a/src/main/java/org/traccar/model/Calendar.java
+++ b/src/main/java/org/traccar/model/Calendar.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2016 - 2021 Anton Tananaev (anton@traccar.org)
+ * Copyright 2016 - 2022 Anton Tananaev (anton@traccar.org)
* Copyright 2016 Andrey Kunitsyn (andrey@traccar.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -49,13 +49,13 @@ public class Calendar extends ExtendedModel {
private byte[] data;
public byte[] getData() {
- return data.clone();
+ return data;
}
public void setData(byte[] data) throws IOException, ParserException {
CalendarBuilder builder = new CalendarBuilder();
calendar = builder.build(new ByteArrayInputStream(data));
- this.data = data.clone();
+ this.data = data;
}
private net.fortuna.ical4j.model.Calendar calendar;