This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static void updateAuthoritiesFile(File file, UserSession userSession,ArrayList<GrantedAuthority> author) { | |
| // UserServiceFacade userFacade = (UserServiceFacade) ControllerUtility | |
| // .getBean("userServiceFacade"); | |
| SecurityContext context = SecurityContextHolder.getContext(); | |
| Authentication auth = context.getAuthentication(); | |
| UserDetails userDetails = (UserDetails) auth.getPrincipal(); | |
| ArrayList<GrantedAuthority> authorities = null; | |
| if(CommonUtility.isNullOrEmpty(author)){ | |
| authorities = new ArrayList<GrantedAuthority>( | |
| userDetails.getAuthorities()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;; nchapon's solution to Nth Element | |
| ;; https://4clojure.com/problem/21 | |
| #(get (vec %) %2) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static URL getJarURLFromURLEntry(URL url, String entry) throws IllegalArgumentException { | |
| URL jarUrl; | |
| String file = url.getFile(); | |
| if ( ! entry.startsWith( "/" ) ) entry = "/" + entry; | |
| file = file.substring( 0, file.length() - entry.length() ); | |
| if ( file.endsWith( "!" ) ) file = file.substring( 0, file.length() - 1 ); | |
| try { | |
| String protocol = url.getProtocol(); | |
| if ( "jar".equals( protocol ) |
NewerOlder