Github user alasdairhodge commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/115#discussion_r16181078
  
    --- Diff: 
usage/launcher/src/main/java/brooklyn/launcher/BrooklynLauncher.java ---
    @@ -485,6 +498,37 @@ public BrooklynLauncher start() {
             return this;
         }
     
    +    private void checkFileReadable(String file) {
    +        File f = new File(Os.tidyPath(file));
    +        if (!f.exists()) {
    +            throw new FatalRuntimeException("File "+file+" does not 
exist");
    +        }
    +        if (!f.isFile()) {
    +            throw new FatalRuntimeException(file+" is not a file");
    +        }
    +        if (!f.canRead()) {
    +            throw new FatalRuntimeException(file+" is not readable");
    +        }
    +    }
    +    
    +    private void checkFilePermissionsX00(String file) {
    +        File f = new File(Os.tidyPath(file));
    +        if (f.exists() && f.isFile() && f.canRead()) {
    +            try {
    +                Maybe<String> permission = FileUtil.getFilePermissions(f);
    +                if (permission.isAbsent()) {
    +                    LOG.debug("Could not determine permissions of global 
brooklyn properties file; assuming ok: "+f);
    --- End diff --
    
    Not necessarily the global properties file. Strictly speaking, not 
necessarily a properties file at all (based on the name of the method) but 
that's being picky.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to