Permalink
Browse files

get rid of some warnings,

  • Loading branch information...
1 parent ed9f686 commit 0f39da4fafb49dbee05b44097ae8e41b525d5a37 @huguangju huguangju committed Sep 23, 2014
View
@@ -12,4 +12,5 @@
/indexes/*
/target/*
/src/main/webapp/WEB-INF/classes/*
-/src/main/webapp/userfiles/*
+/src/main/webapp/userfiles/*
+/target/
View
@@ -1,4 +1,5 @@
<?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 @@ protected Configuration createConfigurationInstance() {
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 static boolean isValidateCodeLogin(String useruame, boolean isFail, boole
}
+ @SuppressWarnings("resource")
@RequestMapping("${adminPath}/download")
public String download(@RequestParam String filePath,HttpServletResponse response) {
File file = new File(filePath);
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE xml>
<ehcache updateCheck="false" name="hibernateCache">
<diskStore path="java.io.tmpdir/jeesite/ehcache/hibernate" />
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE xml>
<ehcache updateCheck="false" name="hibernateCache">
<!--
<cacheManagerPeerProviderFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE xml>
<ehcache updateCheck="false" name="defaultCache">
<diskStore path="java.io.tmpdir/jeesite/ehcache/default" />
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE xml>
<ehcache updateCheck="false" name="defaultCache">
<!--
<cacheManagerPeerProviderFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE xml>
<decorators defaultdir="/WEB-INF/views">
<!-- 默认装饰页面, 在需要装饰的页面增加<meta name="decorator" content="default"/> -->

0 comments on commit 0f39da4

Please sign in to comment.