私信发送成功
检测到您已登录开源中国,是否 一键登录码云
Watch Star Fork

ThinkGem / JeeSiteJavaApache-2.0

get rid of some warnings,
huguangju 提交于   master
commit 0f39da4fafb49dbee05b44097ae8e41b525d5a37
1 parent ed9f686f1d
@@ -12,4 +12,5 @@
/indexes/*
/target/*
/src/main/webapp/WEB-INF/classes/*
-/src/main/webapp/userfiles/*
\ No newline at end of file
+/src/main/webapp/userfiles/*
+/target/
<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE xml>
<project name="jeesite" default="welcome">
<!-- properties from files -->
 
@@ -5,6 +5,8 @@
*/
package com.thinkgem.jeesite.common.web;
 
+import java.util.List;
+
import javax.servlet.ServletConfig;
import javax.servlet.http.HttpServletRequest;
 
@@ -34,15 +36,18 @@ public class CKFinderConfig extends Configuration {
boolean isView = SecurityUtils.getSubject().isPermitted("cms:ckfinder:view");
boolean isUpload = SecurityUtils.getSubject().isPermitted("cms:ckfinder:upload");
boolean isEdit = SecurityUtils.getSubject().isPermitted("cms:ckfinder:edit");
- AccessControlLevel alc = this.getAccessConrolLevels().get(0);
- alc.setFolderView(isView);
- alc.setFolderCreate(isEdit);
- alc.setFolderRename(isEdit);
- alc.setFolderDelete(isEdit);
- alc.setFileView(isView);
- alc.setFileUpload(isUpload);
- alc.setFileRename(isEdit);
- alc.setFileDelete(isEdit);
+ List<AccessControlLevel> accessControlLevels = this.getAccessConrolLevels();
+ if(accessControlLevels.size() > 0){
+ AccessControlLevel alc = this.getAccessConrolLevels().get(0);
+ alc.setFolderView(isView);
+ alc.setFolderCreate(isEdit);
+ alc.setFolderRename(isEdit);
+ alc.setFolderDelete(isEdit);
+ alc.setFileView(isView);
+ alc.setFileUpload(isUpload);
+ alc.setFileRename(isEdit);
+ alc.setFileDelete(isEdit);
+ }
// for (AccessControlLevel a : this.getAccessConrolLevels()){
// System.out.println(a.getRole()+", "+a.getResourceType()+", "+a.getFolder()
// +", "+a.isFolderView()+", "+a.isFolderCreate()+", "+a.isFolderRename()+", "+a.isFolderDelete()
@@ -5,12 +5,11 @@
*/
package com.thinkgem.jeesite.generate;
 
-import java.io.Writer;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileOutputStream;
-import java.io.FileWriter;
import java.io.OutputStreamWriter;
+import java.io.Writer;
import java.util.Map;
 
import org.apache.commons.lang3.StringUtils;
@@ -131,6 +131,7 @@ public class LoginController extends BaseController{
}
 
 
+ @SuppressWarnings("resource")
@RequestMapping("${adminPath}/download")
public String download(@RequestParam String filePath,HttpServletResponse response) {
File file = new File(filePath);
<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE xml>
<ehcache updateCheck="false" name="hibernateCache">
 
<diskStore path="java.io.tmpdir/jeesite/ehcache/hibernate" />
<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE xml>
<ehcache updateCheck="false" name="hibernateCache">
<!--
<cacheManagerPeerProviderFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE xml>
<ehcache updateCheck="false" name="defaultCache">
 
<diskStore path="java.io.tmpdir/jeesite/ehcache/default" />
<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE xml>
<ehcache updateCheck="false" name="defaultCache">
<!--
<cacheManagerPeerProviderFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE xml>
<decorators defaultdir="/WEB-INF/views">
 
<!-- 默认装饰页面, 在需要装饰的页面增加<meta name="decorator" content="default"/> -->

登录 后才可以发表评论