Browse Source

Merge branch 'master' into jfinal-java8

James 7 years ago
parent
commit
8734b1c644

+ 5 - 1
src/main/java/com/jfinal/plugin/activerecord/Table.java

@@ -106,7 +106,11 @@ public class Table {
 	}
 	}
 	
 	
 	public Set<Entry<String, Class<?>>> getColumnTypeMapEntrySet() {
 	public Set<Entry<String, Class<?>>> getColumnTypeMapEntrySet() {
-		return columnTypeMap.entrySet();
+		return Collections.unmodifiableSet(columnTypeMap.entrySet());
+	}
+	
+	public Set<String> getColumnNameSet() {
+		return Collections.unmodifiableSet(columnTypeMap.keySet());
 	}
 	}
 }
 }
 
 

+ 3 - 1
src/main/java/com/jfinal/plugin/ehcache/EhCachePlugin.java

@@ -64,8 +64,9 @@ public class EhCachePlugin implements IPlugin {
 	}
 	}
 	
 	
 	private void createCacheManager() {
 	private void createCacheManager() {
-		if (cacheManager != null)
+		if (cacheManager != null) {
 			return ;
 			return ;
+		}
 		
 		
 		if (configurationFileName != null) {
 		if (configurationFileName != null) {
 			cacheManager = CacheManager.create(configurationFileName);
 			cacheManager = CacheManager.create(configurationFileName);
@@ -92,6 +93,7 @@ public class EhCachePlugin implements IPlugin {
 	
 	
 	public boolean stop() {
 	public boolean stop() {
 		cacheManager.shutdown();
 		cacheManager.shutdown();
+		cacheManager = null;
 		return true;
 		return true;
 	}
 	}
 }
 }