[rfc] [icedtea-web] make PAthsAndFilles to follow seted paths

Jiri Vanek jvanek at redhat.com
Wed Apr 1 16:41:25 UTC 2015

> There is one thing I just noticed:
>       public static Map<String, Setting<String>> getDefaults() {
>           SecurityManager sm = System.getSecurityManager();
>           if (sm != null) {
> +            sm.checkRead(USER_DEPLOYMENT_FILE.getDefaultFullPath());
>               sm.checkRead(USER_DEPLOYMENT_FILE.getFullPath());
>           }
> Are you sure this is correct to check both default filepath and possibly non-default filepath? What happens when default doesn't exist, or when non-default doesn't exist? To me it should just check whichever actually is being used, not both.

Yes I'm aware of this bit strange thing.
Maybe only sm.checkRead(USER_DEPLOYMENT_FILE.getFullPath()) schould be checked?

I did not tested that, but accoding tojavadoc (and code) not existing file is ok, as it  do nothing with file itself or its existence, but with  RuntimePermission("readFileDescriptor").


More information about the distro-pkg-dev mailing list