-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
*** CID 160920: Null pointer dereferences (NULL_RETURNS)
/lightblue-rest/crud/src/main/java/com/redhat/lightblue/rest/crud/AbstractCrudResource.java: 108 in com.redhat.lightblue.rest.crud.AbstractCrudResource.getSearchesForEntity(java.lang.String, java.lang.String, java.lang.String)()
102 FindRequest freq=new FindRequest();
103 freq.setEntityVersion(new EntityVersion(RestConfiguration.getSavedSearchCache().savedSearchEntity,
104 RestConfiguration.getSavedSearchCache().savedSearchVersion));
105
106 try {
107 freq.setProjection(projection==null?FieldProjection.ALL:Projection.fromJson(JsonUtils.json(QueryTemplateUtils.buildProjectionsTemplate(projection))));
>>> CID 160920: Null pointer dereferences (NULL_RETURNS)
>>> Dereferencing a pointer that might be null "com.redhat.lightblue.rest.util.QueryTemplateUtils.buildSortsTemplate(sort)" when calling "json".
108 freq.setSort(sort==null?new SortKey(new com.redhat.lightblue.util.Path("name"),false):Sort.fromJson(JsonUtils.json(QueryTemplateUtils.buildSortsTemplate(sort))));
109 } catch (Exception e) {
110 return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(e.toString()).build();
111 }
112 CallStatus st=new FindCommand(freq.getEntityVersion().getEntity(),
113 freq.getEntityVersion().getVersion(),
Metadata
Metadata
Assignees
Labels
No labels