Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 1 addition & 10 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,5 @@ public class PreviewObject {
private Boolean mimeTypeIcon;
private String mimeType;
private String view;
private String filename;
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@

import java.io.IOException;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;

/**
* PreviewList Parser
*/
Expand Down Expand Up @@ -59,13 +61,20 @@ public PreviewObject read(JsonReader in) throws IOException {
return preview;
}

@SuppressFBWarnings(value = "SF_SWITCH_NO_DEFAULT",
justification = "default case is not found correctly")
private PreviewObject readObject(JsonReader in) throws IOException {
String tag;
PreviewObject preview = new PreviewObject();

do {
tag = in.nextName();

try {
tag = in.nextName();
} catch (IllegalStateException e) {
in.skipValue();
tag = "";
}

switch (tag) {
case "source":
preview.setSource(in.nextString());
Expand All @@ -91,6 +100,9 @@ private PreviewObject readObject(JsonReader in) throws IOException {
preview.setView(in.nextString());
break;

case "filename":
preview.setFilename(in.nextString());

default:
// do nothing
break;
Expand Down