/** * is the authentication available? * @return true if authFile is available */ public static boolean hasAuthentication() { File authFile=PropertiesImpl.getPropertyFile("github"); boolean result=authFile.canRead(); if (first && !result) { first=false; LOGGER.log(Level.WARNING, String.format("To use the github System you might want to create the file %s with an entry oauth=<token>\nThe token can be obtained from https://github.com/settings/tokens",authFile.getAbsolutePath())); } return result; } }
/** * get the Properties for the given propertyKind * @param propertyKind */ public PropertiesImpl(String propertyKind) { File propertyFile = getPropertyFile(propertyKind); try { properties = new Properties(); properties.load(new FileInputStream(propertyFile)); } catch (Exception e) { LOGGER.log(Level.WARNING, "error " + e.getMessage() + " for propertyFile " + propertyFile.getAbsolutePath()); } } }