Commits

Ning Sun  committed af0349d

Fixed a initialization bug in test, remove non-used maven repository in pom

  • Participants
  • Parent commits cd76f70
  • Branches 0.5-dev

Comments (0)

Files changed (3)

 	<groupId>com.classicning</groupId>
 	<artifactId>yan</artifactId>
 	<packaging>war</packaging>
-	<version>0.5</version>
+	<version>0.5-SNAPSHOT</version>
 	<name>Yan</name>
 	<url>http://bitbucket.com/sunng/yan</url>
 	<inceptionYear>2009</inceptionYear>
 	</licenses>
 
 	<repositories>
-		<repository>
+		<!--repository>
 			<id>jboss-repos</id>
 			<url>http://repository.jboss.com/maven2</url>
-		</repository>
+		</repository-->
 		<repository>
 			<id>memcached</id>
 			<url>http://developer.jasig.org/repo/content/groups/m2-legacy</url>

File src/main/java/info/sunng/yan/providers/tiled/TiledResources.java

             = new HashMap<String, List<String>>();
 
     public static List<String> getNames(String config){
-    	if(!resources.containsKey(config)){
-    		config = GlobalConfiguration.get("yan.multitile.default");
+        String configInUse = config;
+    	if(!resources.containsKey(configInUse)){
+    		configInUse = GlobalConfiguration.get("yan.multitile.default");
     	}
     	
-        if(!names.containsKey(config)){
+        if(!names.containsKey(configInUse)){
             List<String> tileNames = new ArrayList<String>();
-            tileNames.addAll(resources.get(config).keySet());
-            names.put(config, tileNames);
+            tileNames.addAll(resources.get(configInUse).keySet());
+            names.put(configInUse, tileNames);
         }
         
-        return names.get(config);
+        return names.get(configInUse);
     }
 
 //    private static void init() throws IOException{

File src/test/java/info/sunng/yan/provider/tiled/MultiTileTicketGeneratorTest.java

 import info.sunng.yan.captcha.spi.CaptchaInfo;
 import info.sunng.yan.model.CaptchaData;
 import info.sunng.yan.model.Ticket;
+import info.sunng.yan.providers.tiled.TiledResources;
 import org.junit.After;
 import org.junit.AfterClass;
 import org.junit.Before;
 
     @BeforeClass
     public static void setUpClass() throws Exception {
+        TiledResources.init();
     }
 
     @AfterClass