#fixed code
                                @RequestMapping(value = "/{id}", method = RequestMethod.GET)
    public RouteDTO detailRoute(@PathVariable String id, @PathVariable String env) {
        Route route = routeService.findRoute(id);
        if (route == null) {
            // TODO throw exception
        }
        RouteDTO routeDTO = convertRoutetoRouteDTO(route, id);
        return routeDTO;
    }
#vulnerable code 
                                @RequestMapping(value = "/{id}", method = RequestMethod.GET)
    public RouteDTO detailRoute(@PathVariable String id, @PathVariable String env) {
        Route route = routeService.findRoute(id);
        if (route == null) {
            // TODO throw exception
        }
        RouteDTO routeDTO = new RouteDTO();
        routeDTO.setDynamic(route.isDynamic());
        routeDTO.setConditions(new String[]{route.getRule()});
        routeDTO.setEnabled(route.isEnabled());
        routeDTO.setForce(route.isForce());
        routeDTO.setGroup(route.getGroup());
        routeDTO.setPriority(route.getPriority());
        routeDTO.setRuntime(route.isRuntime());
        routeDTO.setService(route.getService());
        routeDTO.setId(route.getHash());
        return routeDTO;
    } 
                            #location 8 
                            #vulnerability type NULL_DEREFERENCE