[hornetq-commits] JBoss hornetq SVN: r7881 - in trunk: src/main/org/hornetq/core/persistence/impl/journal and 1 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Fri Aug 21 19:03:31 EDT 2009


Author: timfox
Date: 2009-08-21 19:03:30 -0400 (Fri, 21 Aug 2009)
New Revision: 7881

Modified:
   trunk/src/main/org/hornetq/core/client/impl/ClientProducerImpl.java
   trunk/src/main/org/hornetq/core/persistence/impl/journal/BatchingIDGenerator.java
   trunk/tests/src/org/hornetq/tests/unit/core/deployers/impl/FileDeploymentManagerTest.java
Log:
use non deprecated API

Modified: trunk/src/main/org/hornetq/core/client/impl/ClientProducerImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/client/impl/ClientProducerImpl.java	2009-08-21 22:02:21 UTC (rev 7880)
+++ trunk/src/main/org/hornetq/core/client/impl/ClientProducerImpl.java	2009-08-21 23:03:30 UTC (rev 7881)
@@ -296,7 +296,7 @@
                pos += numberOfBytesRead;
             }
             while (pos < minLargeMessageSize);
-            
+                        
             if (lastChunk)
             {
                byte[] buff2 = new byte[pos];

Modified: trunk/src/main/org/hornetq/core/persistence/impl/journal/BatchingIDGenerator.java
===================================================================
--- trunk/src/main/org/hornetq/core/persistence/impl/journal/BatchingIDGenerator.java	2009-08-21 22:02:21 UTC (rev 7880)
+++ trunk/src/main/org/hornetq/core/persistence/impl/journal/BatchingIDGenerator.java	2009-08-21 23:03:30 UTC (rev 7881)
@@ -138,7 +138,7 @@
 
    // Inner classes -------------------------------------------------
 
-   static class IDCounterEncoding implements EncodingSupport
+   private static final class IDCounterEncoding implements EncodingSupport
    {
       long id;
 

Modified: trunk/tests/src/org/hornetq/tests/unit/core/deployers/impl/FileDeploymentManagerTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/unit/core/deployers/impl/FileDeploymentManagerTest.java	2009-08-21 22:02:21 UTC (rev 7880)
+++ trunk/tests/src/org/hornetq/tests/unit/core/deployers/impl/FileDeploymentManagerTest.java	2009-08-21 23:03:30 UTC (rev 7881)
@@ -58,7 +58,7 @@
       fdm.start();
       try
       {        
-         assertEquals(file.toURL(), deployer.deployedUrl);
+         assertEquals(file.toURI().toURL(), deployer.deployedUrl);
          deployer.deployedUrl = null;
          fdm.start();
          assertNull(deployer.deployedUrl);
@@ -92,7 +92,7 @@
       try
       {
          fdm.registerDeployer(deployer);
-         assertEquals(file.toURL(), deployer.deployedUrl);
+         assertEquals(file.toURI().toURL(), deployer.deployedUrl);
          deployer.deployedUrl = null;
          fdm.start();
          assertNull(deployer.deployedUrl);
@@ -129,13 +129,13 @@
       FakeDeployer deployer4 = new FakeDeployer(filename3); // Can have multiple deployers on the same file
       try
       {
-         URL url1 = file1.toURL();      
+         URL url1 = file1.toURI().toURL();      
          deployer1.deploy(url1);
 
-         URL url2 = file2.toURL();      
+         URL url2 = file2.toURI().toURL();      
          deployer2.deploy(url2);
 
-         URL url3 = file3.toURL();      
+         URL url3 = file3.toURI().toURL();      
          deployer3.deploy(url3);
          
          deployer4.deploy(url3);
@@ -153,10 +153,10 @@
          assertTrue(fdm.getDeployers().contains(deployer4));
          assertEquals(4, fdm.getDeployed().size());
 
-         assertEquals(file1.toURL(), deployer1.deployedUrl);
-         assertEquals(file2.toURL(), deployer2.deployedUrl);
-         assertEquals(file3.toURL(), deployer3.deployedUrl);
-         assertEquals(file3.toURL(), deployer4.deployedUrl);
+         assertEquals(file1.toURI().toURL(), deployer1.deployedUrl);
+         assertEquals(file2.toURI().toURL(), deployer2.deployedUrl);
+         assertEquals(file3.toURI().toURL(), deployer3.deployedUrl);
+         assertEquals(file3.toURI().toURL(), deployer4.deployedUrl);
          //Registering same again should do nothing
 
          
@@ -223,11 +223,11 @@
       FakeDeployer deployer = new FakeDeployer(filename);
       try
       {
-         URL url = file.toURL();      
+         URL url = file.toURI().toURL();      
          deployer.deploy(url);
          
          fdm.registerDeployer(deployer);
-         assertEquals(file.toURL(), deployer.deployedUrl);
+         assertEquals(file.toURI().toURL(), deployer.deployedUrl);
          //Touch the file
          file.setLastModified(oldLastModified + 1000);
 
@@ -238,7 +238,7 @@
          assertEquals(1, fdm.getDeployers().size());
          assertTrue(fdm.getDeployers().contains(deployer));
          assertEquals(1, fdm.getDeployed().size());
-         assertEquals(file.toURL(), deployer.reDeployedUrl);
+         assertEquals(file.toURI().toURL(), deployer.reDeployedUrl);
          Pair<URL, Deployer> pair = new Pair<URL, Deployer>(url, deployer);
          assertEquals(oldLastModified + 1000, fdm.getDeployed().get(pair).lastModified);
          deployer.reDeployedUrl = null; 
@@ -271,7 +271,7 @@
       FakeDeployer deployer = new FakeDeployer(filename);
       try
       {
-         URL url = file.toURL();      
+         URL url = file.toURI().toURL();      
          deployer.deploy(url);
 
          
@@ -280,14 +280,14 @@
          assertEquals(1, fdm.getDeployers().size());
          assertTrue(fdm.getDeployers().contains(deployer));
          assertEquals(1, fdm.getDeployed().size());
-         assertEquals(file.toURL(), deployer.deployedUrl);
+         assertEquals(file.toURI().toURL(), deployer.deployedUrl);
          deployer.deployedUrl = null;
          file.delete();
          
          //This should cause undeployment
 
          deployer.undeploy(url);
-         assertEquals(file.toURL(), deployer.unDeployedUrl);
+         assertEquals(file.toURI().toURL(), deployer.unDeployedUrl);
          
          fdm.run();
 
@@ -310,7 +310,7 @@
          assertTrue(fdm.getDeployers().contains(deployer));
          assertEquals(1, fdm.getDeployed().size());
 
-         assertEquals(file.toURL(), deployer.deployedUrl);
+         assertEquals(file.toURI().toURL(), deployer.deployedUrl);
       }
       finally
       {



More information about the hornetq-commits mailing list