glyn 02/02/12 07:34:22
Modified: java/src/org/apache/axis/configuration FileProvider.java
Log:
Beef up test for read-only file which was causing a build failure.
Revision Changes Path
1.18 +4 -3
xml-axis/java/src/org/apache/axis/configuration/FileProvider.java
Index: FileProvider.java
===================================================================
RCS file:
/home/cvs/xml-axis/java/src/org/apache/axis/configuration/FileProvider.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- FileProvider.java 12 Feb 2002 14:32:14 -0000 1.17
+++ FileProvider.java 12 Feb 2002 15:34:22 -0000 1.18
@@ -118,13 +118,14 @@
public FileProvider(String basepath, String filename) {
this.basepath = basepath;
this.filename = filename;
- readOnly = !(new File(basepath, filename)).canWrite();
+ File file = new File(basepath, filename);
+ readOnly = file.canRead() & !file.canWrite();
/*
- * If file is readable but not writeable, log informational message
+ * If file is read-only, log informational message
* as configuration changes will not persist.
*/
- if (readOnly && (new File(basepath, filename)).canRead()) {
+ if (readOnly) {
category.info(JavaUtils.getMessage("readOnlyConfigFile"));
}
}