Source:
<code>public static Events downloadEventFeed() { if (StringUtils.isBlank(calendar_name)) { logger.warn("Login aborted no calendar name defined"); return null; } Credential credential = getCredential(); com.google.api.services.calendar.Calendar client = new com.google.api.services.calendar.Calendar.Builder( HTTP_TRANSPORT, JSON_FACTORY, credential).setApplicationName("openHAB").build(); String calendarID = null; if (!calendar_name.equals("primary")) { CalendarList calfeed = null; try { calfeed = client.calendarList().list().execute(); } catch (com.google.api.client.auth.oauth2.TokenResponseException ae) { logger.error("authentication failed: {}", ae.getMessage()); } catch (IOException e1) { logger.error("authentication I/O exception: {}", e1.getMessage()); } if (calfeed != null && calfeed.getItems() != null) { for (CalendarListEntry entry : calfeed.getItems()) { if (entry.getSummary().equals(calendar_name)) { calendarID = entry.getId(); logger.debug("Got calendar CalendarID: {}", calendar_name, calendarID); } } } if (calendarID == null) { <START> logger.error("Calendar not found", calendar_name); <END> return null; } } else { calendarID = calendar_name; } DateTime start = new DateTime(new Date()); DateTime end = new DateTime(start.getValue() + (2 * refreshInterval)); logger.debug("Downloading calendar feed for time interval: to ", start, end); Events feed = null; try { com.google.api.services.calendar.Calendar.Events.List l = client.events().list(calendarID) .setSingleEvents(true).setTimeMin(start).setTimeMax(end); if (StringUtils.isNotBlank(filter)) { l = l.setQ(filter); } feed = l.execute(); } catch (IOException e1) { logger.error("Event fetch failed: {}", e1.getMessage()); } try { if (feed != null) { checkIfFullCalendarFeed(feed.getItems()); } return feed; } catch (Exception e) { logger.error("downloading CalenarEventFeed throws exception: {}", e.getMessage()); } return null; }</code><technical_language>reduce warn</technical_language>

Target:
private static Events downloadEventFeed() { if (StringUtils.isBlank(calendar_name)) { logger.warn("Login aborted no calendar name defined"); return null; } CalendarListEntry calendarID = GCalGoogleOAuth.getCalendarId(calendar_name); if (calendarID == null) { return null; } DateTime start = new DateTime(new Date(), TimeZone.getTimeZone(calendarID.getTimeZone())); DateTime end = new DateTime(new Date(start.getValue() + (2 * refreshInterval)), TimeZone.getTimeZone(calendarID.getTimeZone())); logger.debug("Downloading calendar feed for time interval: to ", start, end); Events feed = null; try { Credential credential = GCalGoogleOAuth.getCredential(false); Calendar client = new Calendar.Builder(HTTP_TRANSPORT, JSON_FACTORY, credential) .setApplicationName("openHAB").build(); Calendar.Events.List l = client.events().list(calendarID.getId()).setSingleEvents(true).setTimeMin(start) .setTimeMax(end); if (StringUtils.isNotBlank(filter)) { l = l.setQ(filter); } feed = l.execute(); } catch (IOException e1) { logger.error("Event fetch failed: {}", e1.getMessage()); } try { if (feed != null) { checkIfFullCalendarFeed(feed.getItems()); } return feed; } catch (Exception e) { logger.error("downloading CalendarEventFeed throws exception: {}", e.getMessage()); } return null; }