From kcardineaud@users.nuiton.org Mon Jul 25 10:42:29 2011
From: kcardineaud@users.nuiton.org
To: scmwebeditor-commits@list.nuiton.org
Subject: [Scmwebeditor-commits] r186 - in trunk/src/main:
	java/org/nuiton/scmwebeditor	java/org/nuiton/scmwebeditor/actions
 resources/i18n
Date: Mon, 25 Jul 2011 10:42:29 +0200
Message-ID: <20110725084229.C3C3D157E0@nuiton.codelutin.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============7729036940175896774=="

--===============7729036940175896774==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable

Author: kcardineaud
Date: 2011-07-25 10:42:29 +0200 (Mon, 25 Jul 2011)
New Revision: 186

Url: http://nuiton.org/repositories/revision/scmwebeditor/186

Log:
Fix an issue with Exception when reading scm.properties file

Modified:
   trunk/src/main/java/org/nuiton/scmwebeditor/ScmWebEditorBaseAction.java
   trunk/src/main/java/org/nuiton/scmwebeditor/actions/ScmWebEditorMainAction=
.java
   trunk/src/main/resources/i18n/scmwebeditor_fr_FR.properties

Modified: trunk/src/main/java/org/nuiton/scmwebeditor/ScmWebEditorBaseAction.=
java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/src/main/java/org/nuiton/scmwebeditor/ScmWebEditorBaseAction.java	2=
011-07-25 08:02:49 UTC (rev 185)
+++ trunk/src/main/java/org/nuiton/scmwebeditor/ScmWebEditorBaseAction.java	2=
011-07-25 08:42:29 UTC (rev 186)
@@ -302,7 +302,7 @@
      * @param file le fichier contenant les propri=C3=A9t=C3=A9s
      * @return un objet Properties contenant les propri=C3=A9t=C3=A9s du fic=
hier
      */
-    public static Properties loadProperties(String file) throws IOException,=
 FileNotFoundException{
+    public static Properties loadProperties(String file) throws IOException {
        Properties properties =3D new Properties();
=20
        FileInputStream input =3D new FileInputStream(file);

Modified: trunk/src/main/java/org/nuiton/scmwebeditor/actions/ScmWebEditorMai=
nAction.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/src/main/java/org/nuiton/scmwebeditor/actions/ScmWebEditorMainActio=
n.java	2011-07-25 08:02:49 UTC (rev 185)
+++ trunk/src/main/java/org/nuiton/scmwebeditor/actions/ScmWebEditorMainActio=
n.java	2011-07-25 08:42:29 UTC (rev 186)
@@ -1,6 +1,7 @@
 package org.nuiton.scmwebeditor.actions;
=20
 import java.io.ByteArrayOutputStream;
+import java.io.IOException;
 import java.util.Properties;
=20
=20
@@ -272,22 +273,23 @@
=20
         Properties properties=3Dnull;
         String[] editableFiles=3Dnull;
-        try{
-           // chargement des propri=C3=A9t=C3=A9s
-            properties =3D loadProperties("src/main/resources/scm.properties=
");
-           if(log.isDebugEnabled()) {
-               log.debug("editableFiles: "+ properties.getProperty("editable=
Files", "text"));
-           }
-           editableFiles=3Dproperties.getProperty("editableFiles").split(","=
);
-        }
-        catch(Exception e){
-           if(log.isErrorEnabled()) {
-               log.error("Can't read properties file", e );
-               editableFiles =3D new String[1];
-               editableFiles[0] =3D "text";=20
-              =20
-           }
-        }
+       =20
+         =20
+            try {
+                properties =3D loadProperties("src/main/resources/scm.proper=
ties");
+               =20
+                if(log.isDebugEnabled()) {
+                    log.debug("editableFiles: "+ properties.getProperty("edi=
tableFiles", "text"));
+                }
+                editableFiles=3Dproperties.getProperty("editableFiles", "tex=
t").split(",");
+               =20
+            } catch (IOException e) {
+                if(log.isErrorEnabled()) {
+                    log.error("Can't read properties file", e );
+                }
+                    editableFiles =3D new String[1];
+                    editableFiles[0] =3D "text";=20
+            }
=20
        =20
         boolean editable =3Dfalse;

Modified: trunk/src/main/resources/i18n/scmwebeditor_fr_FR.properties
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/src/main/resources/i18n/scmwebeditor_fr_FR.properties	2011-07-25 08=
:02:49 UTC (rev 185)
+++ trunk/src/main/resources/i18n/scmwebeditor_fr_FR.properties	2011-07-25 08=
:42:29 UTC (rev 186)
@@ -30,7 +30,7 @@
 scm.reset=3DReinitialiser
 scm.resetTitle=3DRetour a la derniere revision du fichier
 scm.saveAndContinue=3DSauvegarder et continuer
-scm.saveAndContinueTitle=3DEnregister les modifications sur le depot et cont=
iner d''editer le fichier
+scm.saveAndContinueTitle=3DEnregister les modifications sur le depot et cont=
inuer d''editer le fichier
 scm.saveAndQuit=3DSauvegarder et quitter
 scm.saveAndQuitTitle=3DSauvegarder le fichier sur le depot et retourner =C3=
=A0 la page precedente.
 scm.text=3DTexte


--===============7729036940175896774==--


