mcardle 2005/08/24 15:48:36 CEST
Modified files:
core/src/java/org/jahia/utils/properties
PropertiesManager.java
Log:
properties files now support Tab in addition to white spaces
Revision Changes Path
1.4 +7 -1
jahia/core/src/java/org/jahia/utils/properties/PropertiesManager.java
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/jahia/core/src/java/org/jahia/utils/properties/PropertiesManager.java.diff?r1=1.3&r2=1.4&f=h
Index: PropertiesManager.java
===================================================================
RCS file:
/home/cvs/repository/jahia/core/src/java/org/jahia/utils/properties/PropertiesManager.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- PropertiesManager.java 22 Jun 2005 12:43:17 -0000 1.3
+++ PropertiesManager.java 24 Aug 2005 13:48:36 -0000 1.4
@@ -1,4 +1,4 @@
-// $Id: PropertiesManager.java,v 1.3 2005/06/22 12:43:17 cmailleux Exp $
+// $Id: PropertiesManager.java,v 1.4 2005/08/24 13:48:36 mcardle Exp $
//
// ____.
// __/\ ______| |__/\. _______
@@ -30,6 +30,7 @@
import java.util.Enumeration;
import java.util.Properties;
import java.util.Vector;
+import java.util.regex.PatternSyntaxException;
import org.jahia.utils.JahiaConsole;
import org.jahia.utils.JahiaTools;
@@ -236,6 +237,7 @@
while((lineReaded = buffered.readLine()) != null)
{
try {
+ lineReaded = lineReaded.replaceAll("\\t"," ");
//now supports Tab characters in lines
if(!lineReaded.trim().equals("") &&
!lineReaded.trim().substring(0,1).equals("#"))
{
boolean propertyFound = false;
@@ -271,6 +273,10 @@
bufferVector.add( lineReaded.trim() );
}
} catch (IndexOutOfBoundsException ioobe) {
+ } catch (PatternSyntaxException ex1) {
+ ex1.printStackTrace();
+ } catch (IllegalArgumentException ex2) {
+ ex2.printStackTrace();
}
}