From do-not-reply at jboss.org Mon Jan 23 07:00:30 2012 Content-Type: multipart/mixed; boundary="===============4194430054565165292==" MIME-Version: 1.0 From: do-not-reply at jboss.org To: hornetq-commits at lists.jboss.org Subject: [hornetq-commits] JBoss hornetq SVN: r12042 - trunk/hornetq-journal/src/main/java/org/hornetq/core/journal/impl. Date: Mon, 23 Jan 2012 07:00:30 -0500 Message-ID: <201201231200.q0NC0UBB031280@svn01.web.mwc.hst.phx2.redhat.com> --===============4194430054565165292== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: borges Date: 2012-01-23 07:00:29 -0500 (Mon, 23 Jan 2012) New Revision: 12042 Modified: trunk/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/Import= Journal.java Log: Check mkdirs return value (fixing findbugs warning) Modified: trunk/hornetq-journal/src/main/java/org/hornetq/core/journal/impl= /ImportJournal.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/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/Impor= tJournal.java 2012-01-23 12:00:14 UTC (rev 12041) +++ trunk/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/Impor= tJournal.java 2012-01-23 12:00:29 UTC (rev 12042) @@ -28,15 +28,22 @@ import org.hornetq.utils.Base64; = /** - * Use this class to import the journal data from a listed file. You can u= se it as a main class or through its native method {@link ImportJournal#imp= ortJournal(String, String, String, int, int, String)} - * = - * If you use the main method, use it as - * = - * Example: java -cp hornetq-core.jar org.hornetq.core.journal.impl.Export= Journal /journalDir hornetq-data hq 2 10485760 /tmp/export.dat + * Use this class to import the journal data from a listed file. You can u= se it as a main class or + * through its native method + * {@link ImportJournal#importJournal(String, String, String, int, int, St= ring)} + *

+ * If you use the main method, use its arguments as: * + *

+ * JournalDirectory JournalPrefix FileExtension MinFiles FileSize FileOutp=
ut
+ * 
+ *

+ * Example: + * + *

+ * java -cp hornetq-core.jar org.hornetq.core.journal.impl.ExportJournal /=
journalDir hornetq-data hq 2 10485760 /tmp/export.dat
+ * 
* @author Clebert Suconic<= /a> - * - * */ public class ImportJournal { @@ -103,7 +110,11 @@ = File journalDir =3D new File(directory); = - journalDir.mkdirs(); + if (!journalDir.exists()) + { + if (!journalDir.mkdirs()) + System.err.println("Could not create directory " + directory); + } = NIOSequentialFileFactory nio =3D new NIOSequentialFileFactory(direct= ory, null); = --===============4194430054565165292==--