Rename doAs with exception in tryAs
authorMathieu Baudier <mbaudier@argeo.org>
Sat, 21 Jan 2017 17:18:18 +0000 (18:18 +0100)
committerMathieu Baudier <mbaudier@argeo.org>
Sat, 21 Jan 2017 17:18:18 +0000 (18:18 +0100)
org.argeo.cms.ui/src/org/argeo/cms/fs/CmsFsBrowser.java
org.argeo.cms/src/org/argeo/cms/auth/CurrentUser.java

index bf4e9b57086c2166783acddeaf52c8c483d4dc99..dfa1afccae0d61c3bece6083e78b6c4491c9a7b0 100644 (file)
@@ -294,7 +294,7 @@ public class CmsFsBrowser extends Composite {
                                        }
 
                                };
-                               fileSystem = CurrentUser.doAs(pea);
+                               fileSystem = CurrentUser.tryAs(pea);
                        }
                        return fileSystem.getPath(getCurrentHomePath() + "/" + FS_FILES);
                } catch (URISyntaxException | PrivilegedActionException e) {
index 3fef3033d6e04a32215cf4116baefa504577b81e..5b4ab174e59be0d57a2ce986e78d94fc643c7b7f 100644 (file)
@@ -82,7 +82,7 @@ public final class CurrentUser {
        }
 
        /** Executes as the current user */
-       public final static <T> T doAs(PrivilegedExceptionAction<T> action) throws PrivilegedActionException {
+       public final static <T> T tryAs(PrivilegedExceptionAction<T> action) throws PrivilegedActionException {
                return Subject.doAs(currentSubject(), action);
        }