You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@shiro.apache.org by lh...@apache.org on 2013/05/05 00:59:04 UTC

svn commit: r1479215 - /shiro/trunk/core/src/main/java/org/apache/shiro/realm/text/PropertiesRealm.java

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;