You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2014/08/05 22:21:05 UTC

[1/2] git commit: Update the pom versions for 3.8.4 SNAPSHOT

Repository: activemq-cpp
Updated Branches:
  refs/heads/3.8.x 278c202f1 -> 64173c3fc
  refs/heads/trunk 2e9e0c6ae -> 9c2706139


Update the pom versions for 3.8.4 SNAPSHOT

Project: http://git-wip-us.apache.org/repos/asf/activemq-cpp/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-cpp/commit/64173c3f
Tree: http://git-wip-us.apache.org/repos/asf/activemq-cpp/tree/64173c3f
Diff: http://git-wip-us.apache.org/repos/asf/activemq-cpp/diff/64173c3f

Branch: refs/heads/3.8.x
Commit: 64173c3fc6dde1249bac1ae52fff2cd3aeddebf2
Parents: 278c202
Author: Timothy Bish <ta...@gmail.com>
Authored: Tue Aug 5 16:03:00 2014 -0400
Committer: Timothy Bish <ta...@gmail.com>
Committed: Tue Aug 5 16:03:00 2014 -0400

----------------------------------------------------------------------
 activemq-cpp-openwire-generator/pom.xml | 2 +-
 activemq-cpp/pom.xml                    | 2 +-
 maven-cpptools-plugin/pom.xml           | 2 +-
 pom.xml                                 | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-cpp/blob/64173c3f/activemq-cpp-openwire-generator/pom.xml
----------------------------------------------------------------------
diff --git a/activemq-cpp-openwire-generator/pom.xml b/activemq-cpp-openwire-generator/pom.xml
index 3c8a776..3f05269 100644
--- a/activemq-cpp-openwire-generator/pom.xml
+++ b/activemq-cpp-openwire-generator/pom.xml
@@ -23,7 +23,7 @@
   <parent>
     <groupId>org.apache.activemq-cpp</groupId>
     <artifactId>activemq-cpp-pom</artifactId>
-    <version>3.8.3-SNAPSHOT</version>
+    <version>3.8.4-SNAPSHOT</version>
   </parent>
 
   <artifactId>activemq-cpp-openwire-generator</artifactId>

http://git-wip-us.apache.org/repos/asf/activemq-cpp/blob/64173c3f/activemq-cpp/pom.xml
----------------------------------------------------------------------
diff --git a/activemq-cpp/pom.xml b/activemq-cpp/pom.xml
index 182dfd4..76f4893 100644
--- a/activemq-cpp/pom.xml
+++ b/activemq-cpp/pom.xml
@@ -24,7 +24,7 @@
   <parent>
     <groupId>org.apache.activemq-cpp</groupId>
     <artifactId>activemq-cpp-pom</artifactId>
-    <version>3.8.3-SNAPSHOT</version>
+    <version>3.8.4-SNAPSHOT</version>
   </parent>
 
   <artifactId>activemq-cpp-library</artifactId>

http://git-wip-us.apache.org/repos/asf/activemq-cpp/blob/64173c3f/maven-cpptools-plugin/pom.xml
----------------------------------------------------------------------
diff --git a/maven-cpptools-plugin/pom.xml b/maven-cpptools-plugin/pom.xml
index 2d7cbbe..fe6ff5f 100644
--- a/maven-cpptools-plugin/pom.xml
+++ b/maven-cpptools-plugin/pom.xml
@@ -24,7 +24,7 @@
   <parent>
     <groupId>org.apache.activemq-cpp</groupId>
     <artifactId>activemq-cpp-pom</artifactId>
-    <version>3.8.3-SNAPSHOT</version>
+    <version>3.8.4-SNAPSHOT</version>
   </parent>
 
   <artifactId>maven-cpptools-plugin</artifactId>

http://git-wip-us.apache.org/repos/asf/activemq-cpp/blob/64173c3f/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index a486cb6..fec756c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -27,7 +27,7 @@
 
   <groupId>org.apache.activemq-cpp</groupId>
   <artifactId>activemq-cpp-pom</artifactId>
-  <version>3.8.3-SNAPSHOT</version>
+  <version>3.8.4-SNAPSHOT</version>
   <packaging>pom</packaging>
   <name>ActiveMQ-CPP Project</name>
   <inceptionYear>2007</inceptionYear>


[2/2] git commit: https://issues.apache.org/jira/browse/AMQCPP-548

Posted by ta...@apache.org.
https://issues.apache.org/jira/browse/AMQCPP-548

Project: http://git-wip-us.apache.org/repos/asf/activemq-cpp/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-cpp/commit/9c270613
Tree: http://git-wip-us.apache.org/repos/asf/activemq-cpp/tree/9c270613
Diff: http://git-wip-us.apache.org/repos/asf/activemq-cpp/diff/9c270613

Branch: refs/heads/trunk
Commit: 9c2706139fbff7c3e73160cf90fb85b51481a28c
Parents: 2e9e0c6
Author: Timothy Bish <ta...@gmail.com>
Authored: Tue Aug 5 16:20:56 2014 -0400
Committer: Timothy Bish <ta...@gmail.com>
Committed: Tue Aug 5 16:20:56 2014 -0400

----------------------------------------------------------------------
 activemq-cpp/src/main/decaf/lang/Integer.cpp    | 37 +++++---------------
 .../src/main/decaf/util/concurrent/Mutex.cpp    | 10 ++++--
 2 files changed, 17 insertions(+), 30 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-cpp/blob/9c270613/activemq-cpp/src/main/decaf/lang/Integer.cpp
----------------------------------------------------------------------
diff --git a/activemq-cpp/src/main/decaf/lang/Integer.cpp b/activemq-cpp/src/main/decaf/lang/Integer.cpp
index 04d011d..68ce6a5 100644
--- a/activemq-cpp/src/main/decaf/lang/Integer.cpp
+++ b/activemq-cpp/src/main/decaf/lang/Integer.cpp
@@ -22,6 +22,7 @@
 #include <decaf/lang/Integer.h>
 #include <decaf/lang/Character.h>
 #include <sstream>
+#include <vector>
 
 using namespace decaf;
 using namespace decaf::lang;
@@ -142,7 +143,7 @@ std::string Integer::toString(int value, int radix) {
     // Save length and allocate a new buffer for the string, add one
     // more for the null character.
     int length = count;
-    char* buffer = new char[length + 1];
+    std::vector<char> buffer(length);
 
     do {
         int ch = 0 - (j % radix);
@@ -158,12 +159,7 @@ std::string Integer::toString(int value, int radix) {
         buffer[0] = '-';
     }
 
-    // Ensure there's a null
-    buffer[length] = 0;
-    std::string result(&buffer[0]);
-    delete[] buffer;
-
-    return result;
+    return std::string(&buffer[0], length);
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -183,19 +179,14 @@ std::string Integer::toBinaryString(int value) {
     // Save length and allocate a new buffer for the string, add one
     // more for the null character.
     int length = count;
-    char* buffer = new char[length + 1];
+    std::vector<char> buffer(length);
 
     do {
         buffer[--count] = (char) ((value & 1) + '0');
         value >>= 1;
     } while (count > 0);
 
-    // Ensure there's a null
-    buffer[length] = 0;
-    std::string result(&buffer[0]);
-    delete[] buffer;
-
-    return result;
+    return std::string(&buffer[0], length);
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -215,19 +206,14 @@ std::string Integer::toOctalString(int value) {
     // Save length and allocate a new buffer for the string, add one
     // more for the null character.
     int length = count;
-    char* buffer = new char[length + 1];
+    std::vector<char> buffer(length);
 
     do {
         buffer[--count] = (char) ((uvalue & 7) + '0');
         uvalue >>= 3;
     } while (count > 0);
 
-    // Ensure there's a null
-    buffer[length] = 0;
-    std::string result(&buffer[0]);
-    delete[] buffer;
-
-    return result;
+    return std::string(&buffer[0], length);
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -247,7 +233,7 @@ std::string Integer::toHexString(int value) {
     // Save length and allocate a new buffer for the string, add one
     // more for the null character.
     int length = count;
-    char* buffer = new char[length + 1];
+    std::vector<char> buffer(length);
 
     do {
         int t = value & 15;
@@ -260,12 +246,7 @@ std::string Integer::toHexString(int value) {
         value >>= 4;
     } while (count > 0);
 
-    // Ensure there's a null
-    buffer[length] = 0;
-    std::string result(&buffer[0]);
-    delete[] buffer;
-
-    return result;
+    return std::string(&buffer[0], length);
 }
 
 ////////////////////////////////////////////////////////////////////////////////

http://git-wip-us.apache.org/repos/asf/activemq-cpp/blob/9c270613/activemq-cpp/src/main/decaf/util/concurrent/Mutex.cpp
----------------------------------------------------------------------
diff --git a/activemq-cpp/src/main/decaf/util/concurrent/Mutex.cpp b/activemq-cpp/src/main/decaf/util/concurrent/Mutex.cpp
index 284cae7..3d74383 100644
--- a/activemq-cpp/src/main/decaf/util/concurrent/Mutex.cpp
+++ b/activemq-cpp/src/main/decaf/util/concurrent/Mutex.cpp
@@ -45,12 +45,18 @@ namespace concurrent {
     public:
 
         MutexProperties() : monitor(NULL), name() {
-            this->name = DEFAULT_NAME_PREFIX + Integer::toString( ++id );
+            std::string idStr = Integer::toString(++id);
+            this->name.reserve(DEFAULT_NAME_PREFIX.length() + idStr.length());
+            this->name.append(DEFAULT_NAME_PREFIX);
+            this->name.append(idStr);
         }
 
         MutexProperties(const std::string& name) : monitor(NULL), name(name) {
             if (this->name.empty()) {
-                this->name = DEFAULT_NAME_PREFIX + Integer::toString(++id);
+                std::string idStr = Integer::toString(++id);
+                this->name.reserve(DEFAULT_NAME_PREFIX.length() + idStr.length());
+                this->name.append(DEFAULT_NAME_PREFIX);
+                this->name.append(idStr);
             }
         }