[rfc] [icedtea-web] make PAthsAndFilles to follow seted paths
Jie Kang
jkang at redhat.com
Wed Apr 1 16:46:08 UTC 2015
----- Original Message -----
>
> >
> > 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").
Okay, +1. I guess we can look into this more for Part 2/3/4.
>
> J.
>
>
>
--
Jie Kang
OpenJDK Team - Software Engineering Intern
More information about the distro-pkg-dev
mailing list