forked from getsentry/sentry-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNoOpSerializer.java
More file actions
44 lines (34 loc) · 1.11 KB
/
NoOpSerializer.java
File metadata and controls
44 lines (34 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package io.sentry;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.Reader;
import java.io.Writer;
import java.util.Map;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/** No-op implementation of ISerializer */
final class NoOpSerializer implements ISerializer {
private static final NoOpSerializer instance = new NoOpSerializer();
public static NoOpSerializer getInstance() {
return instance;
}
private NoOpSerializer() {}
@Override
public <T> @Nullable T deserialize(@NotNull Reader reader, @NotNull Class<T> clazz) {
return null;
}
@Override
public @Nullable SentryEnvelope deserializeEnvelope(@NotNull InputStream inputStream) {
return null;
}
@Override
public <T> void serialize(@NotNull T entity, @NotNull Writer writer) throws IOException {}
@Override
public void serialize(@NotNull SentryEnvelope envelope, @NotNull OutputStream outputStream)
throws Exception {}
@Override
public @NotNull String serialize(@NotNull Map<String, Object> data) throws Exception {
return "";
}
}