shiro-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lhazlew...@apache.org
Subject svn commit: r1479215 - /shiro/trunk/core/src/main/java/org/apache/shiro/realm/text/PropertiesRealm.java
Date Sat, 04 May 2013 22:59:04 GMT
Author: lhazlewood
Date: Sat May  4 22:59:04 2013
New Revision: 1479215

URL: http://svn.apache.org/r1479215
Log:
SHIRO-394: applied fix per Jira issue

Modified:
    shiro/trunk/core/src/main/java/org/apache/shiro/realm/text/PropertiesRealm.java

Modified: shiro/trunk/core/src/main/java/org/apache/shiro/realm/text/PropertiesRealm.java
URL: http://svn.apache.org/viewvc/shiro/trunk/core/src/main/java/org/apache/shiro/realm/text/PropertiesRealm.java?rev=1479215&r1=1479214&r2=1479215&view=diff
==============================================================================
--- shiro/trunk/core/src/main/java/org/apache/shiro/realm/text/PropertiesRealm.java (original)
+++ shiro/trunk/core/src/main/java/org/apache/shiro/realm/text/PropertiesRealm.java Sat May
 4 22:59:04 2013
@@ -265,7 +265,9 @@ public class PropertiesRealm extends Tex
     }
 
     private boolean isFileModified() {
-        File propertyFile = new File(this.resourcePath);
+        //SHIRO-394: strip file prefix before constructing the File instance:
+        String fileNameWithoutPrefix = this.resourcePath.substring(this.resourcePath.indexOf(":")
+ 1);
+        File propertyFile = new File(fileNameWithoutPrefix);
         long currentLastModified = propertyFile.lastModified();
         if (currentLastModified > this.fileLastModified) {
             this.fileLastModified = currentLastModified;



Mime
View raw message