Commits

Anonymous committed 944526f
  • Participants
  • Parent commits aef1c1f

Comments (0)

Files changed (4)

File src/java/com/opensymphony/xwork2/conversion/impl/XWorkConverter.java

         Map<String, Object> mapping = oldValues;
 
         if (FileManager.isReloadingConfigs()) {
-            if (FileManager.fileNeedsReloading(buildConverterFilename(clazz))) {
+            if (FileManager.fileNeedsReloading(buildConverterFilename(clazz), clazz)) {
                 mapping = buildConverterMapping(clazz);
             }
         }

File src/java/com/opensymphony/xwork2/util/FileManager.java

         return reloadingConfigs;
     }
 
+    public static boolean fileNeedsReloading(String fileName, Class clazz) {
+        URL fileUrl = ClassLoaderUtil.getResource(fileName, clazz);
+        return fileUrl != null && fileNeedsReloading(fileUrl.toString());
+    }
+      
     public static boolean fileNeedsReloading(String fileName) {
         Revision revision = files.get(fileName);
 

File src/java/com/opensymphony/xwork2/validator/AnnotationActionValidatorManager.java

     private List<ValidatorConfig> loadFile(String fileName, Class clazz, boolean checkFile) {
         List<ValidatorConfig> retList = Collections.emptyList();
 
-        if ((checkFile && FileManager.fileNeedsReloading(fileName)) || !validatorFileCache.containsKey(fileName)) {
+        if ((checkFile && FileManager.fileNeedsReloading(fileName, clazz)) || !validatorFileCache.containsKey(fileName)) {
             InputStream is = null;
 
             try {

File src/java/com/opensymphony/xwork2/validator/DefaultActionValidatorManager.java

 
     private List<ValidatorConfig> loadFile(String fileName, Class clazz, boolean checkFile) {
         List<ValidatorConfig> retList = Collections.emptyList();
-        if ((checkFile && FileManager.fileNeedsReloading(fileName)) || !validatorFileCache.containsKey(fileName)) {
+        if ((checkFile && FileManager.fileNeedsReloading(fileName, clazz)) || !validatorFileCache.containsKey(fileName)) {
             InputStream is = null;
 
             try {