activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From martyntay...@apache.org
Subject activemq-artemis git commit: ARTEMIS-986 fix int overflow
Date Sun, 26 Feb 2017 20:23:50 GMT
Repository: activemq-artemis
Updated Branches:
  refs/heads/1.x 19b3ad9da -> 84acb2f50


ARTEMIS-986 fix int overflow

(cherry picked from commit 4e92b63de735a74e9156c53ef50ac72b205d59ad)


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/84acb2f5
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/84acb2f5
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/84acb2f5

Branch: refs/heads/1.x
Commit: 84acb2f50ca9b4b8a1aa8a705a4d703dac2c0db5
Parents: 19b3ad9
Author: Justin Bertram <jbertram@apache.org>
Authored: Fri Feb 24 13:42:21 2017 -0600
Committer: Martyn Taylor <mtaylor@redhat.com>
Committed: Sun Feb 26 20:23:26 2017 +0000

----------------------------------------------------------------------
 .../artemis/jdbc/store/drivers/derby/DerbySQLProvider.java       | 2 +-
 .../artemis/jdbc/store/drivers/mysql/MySQLSQLProvider.java       | 4 ++--
 .../artemis/jdbc/store/drivers/postgres/PostgresSQLProvider.java | 4 ++--
 .../artemis/jdbc/store/file/JDBCSequentialFileFactoryDriver.java | 2 +-
 .../activemq/artemis/jdbc/store/sql/GenericSQLProvider.java      | 4 ++--
 .../org/apache/activemq/artemis/jdbc/store/sql/SQLProvider.java  | 2 +-
 6 files changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/84acb2f5/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/drivers/derby/DerbySQLProvider.java
----------------------------------------------------------------------
diff --git a/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/drivers/derby/DerbySQLProvider.java
b/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/drivers/derby/DerbySQLProvider.java
index 7e0ce58..8f279d1 100644
--- a/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/drivers/derby/DerbySQLProvider.java
+++ b/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/drivers/derby/DerbySQLProvider.java
@@ -35,7 +35,7 @@ public class DerbySQLProvider extends GenericSQLProvider {
    }
 
    @Override
-   public int getMaxBlobSize() {
+   public long getMaxBlobSize() {
       return MAX_BLOB_SIZE;
    }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/84acb2f5/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/drivers/mysql/MySQLSQLProvider.java
----------------------------------------------------------------------
diff --git a/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/drivers/mysql/MySQLSQLProvider.java
b/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/drivers/mysql/MySQLSQLProvider.java
index a538ebd..6e01c45 100644
--- a/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/drivers/mysql/MySQLSQLProvider.java
+++ b/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/drivers/mysql/MySQLSQLProvider.java
@@ -21,7 +21,7 @@ import org.apache.activemq.artemis.jdbc.store.sql.SQLProvider;
 
 public class MySQLSQLProvider extends GenericSQLProvider {
 
-   private static final int MAX_BLOB_SIZE = 4 * 1024 * 1024 * 1024; // 4GB
+   private static final long MAX_BLOB_SIZE = 4 * 1024 * 1024 * 1024; // 4GB
 
    private final String createFileTableSQL;
 
@@ -46,7 +46,7 @@ public class MySQLSQLProvider extends GenericSQLProvider {
    }
 
    @Override
-   public int getMaxBlobSize() {
+   public long getMaxBlobSize() {
       return MAX_BLOB_SIZE;
    }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/84acb2f5/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/drivers/postgres/PostgresSQLProvider.java
----------------------------------------------------------------------
diff --git a/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/drivers/postgres/PostgresSQLProvider.java
b/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/drivers/postgres/PostgresSQLProvider.java
index 1baccae..6deaf64 100644
--- a/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/drivers/postgres/PostgresSQLProvider.java
+++ b/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/drivers/postgres/PostgresSQLProvider.java
@@ -22,7 +22,7 @@ import org.apache.activemq.artemis.jdbc.store.sql.SQLProvider;
 public class PostgresSQLProvider extends GenericSQLProvider {
 
    // BYTEA Size used in Journal
-   private static final int MAX_BLOB_SIZE = 1024 * 1024 * 1024; // 1GB
+   private static final long MAX_BLOB_SIZE = 1024 * 1024 * 1024; // 1GB
 
    private final String createFileTableSQL;
 
@@ -50,7 +50,7 @@ public class PostgresSQLProvider extends GenericSQLProvider {
    }
 
    @Override
-   public int getMaxBlobSize() {
+   public long getMaxBlobSize() {
       return MAX_BLOB_SIZE;
    }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/84acb2f5/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/file/JDBCSequentialFileFactoryDriver.java
----------------------------------------------------------------------
diff --git a/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/file/JDBCSequentialFileFactoryDriver.java
b/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/file/JDBCSequentialFileFactoryDriver.java
index b773cd9..90be5ff 100644
--- a/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/file/JDBCSequentialFileFactoryDriver.java
+++ b/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/file/JDBCSequentialFileFactoryDriver.java
@@ -342,7 +342,7 @@ public class JDBCSequentialFileFactoryDriver extends AbstractJDBCDriver
{
       }
    }
 
-   public int getMaxSize() {
+   public long getMaxSize() {
       return sqlProvider.getMaxBlobSize();
    }
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/84acb2f5/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/sql/GenericSQLProvider.java
----------------------------------------------------------------------
diff --git a/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/sql/GenericSQLProvider.java
b/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/sql/GenericSQLProvider.java
index 1d9b829..3b452cd 100644
--- a/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/sql/GenericSQLProvider.java
+++ b/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/sql/GenericSQLProvider.java
@@ -19,7 +19,7 @@ package org.apache.activemq.artemis.jdbc.store.sql;
 public class GenericSQLProvider implements SQLProvider {
 
    // Default to lowest (MYSQL = 64k)
-   private static final int MAX_BLOB_SIZE = 64512;
+   private static final long MAX_BLOB_SIZE = 64512;
 
    protected final String tableName;
 
@@ -101,7 +101,7 @@ public class GenericSQLProvider implements SQLProvider {
    }
 
    @Override
-   public int getMaxBlobSize() {
+   public long getMaxBlobSize() {
       return MAX_BLOB_SIZE;
    }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/84acb2f5/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/sql/SQLProvider.java
----------------------------------------------------------------------
diff --git a/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/sql/SQLProvider.java
b/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/sql/SQLProvider.java
index 21561ff..8d82883 100644
--- a/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/sql/SQLProvider.java
+++ b/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/sql/SQLProvider.java
@@ -18,7 +18,7 @@ package org.apache.activemq.artemis.jdbc.store.sql;
 
 public interface SQLProvider {
 
-   int getMaxBlobSize();
+   long getMaxBlobSize();
 
    String[] getCreateJournalTableSQL();
 


Mime
View raw message