}
}
@Override
public Object get(Value value, Class clazz, CoderContext context) {
DefaultIssue newIssue = new DefaultIssue();
newIssue.withKey(value.getString());
if (value.isNull(true)) {
newIssue.onProject();
} else {
int type = value.getInt();
String moduleKey = value.getString();
String relativePath = value.getString();
if (type == 0) {
InputDir dir = inputPathCache.getDir(moduleKey, relativePath);
newIssue.onDir(dir);
} else {
InputFile f = inputPathCache.getFile(moduleKey, relativePath);
newIssue.onFile(f);
if (!value.isNull(true)) {
newIssue.atLine(value.getInt());
}
}
}
newIssue.message(value.getString());
newIssue.effortToFix(value.isNull(true) ? null : value.getDouble());
String repo = value.getString();
String rule = value.getString();
newIssue.ruleKey(RuleKey.of(repo, rule));
newIssue.overrideSeverity(value.isNull(true) ? null : Severity.values()[value.getInt()]);
return newIssue;
}