asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amo...@apache.org
Subject asterixdb git commit: [NO ISSUE][RT] Prevent setting AMutableString value to null
Date Tue, 24 Oct 2017 02:32:45 GMT
Repository: asterixdb
Updated Branches:
  refs/heads/master 0e5990369 -> 0a5d7466c


[NO ISSUE][RT] Prevent setting AMutableString value to null

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
- An instance of AMutableString can't hold null value.

Change-Id: I8e7b19b190120e64ec78b41f26ef54fce9660e27
Reviewed-on: https://asterix-gerrit.ics.uci.edu/2090
Sonar-Qube: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Contrib: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Michael Blow <mblow@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/asterixdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/asterixdb/commit/0a5d7466
Tree: http://git-wip-us.apache.org/repos/asf/asterixdb/tree/0a5d7466
Diff: http://git-wip-us.apache.org/repos/asf/asterixdb/diff/0a5d7466

Branch: refs/heads/master
Commit: 0a5d7466c699a2bfb52b6820ef02cb71aed45bc4
Parents: 0e59903
Author: Abdullah Alamoudi <bamousaa@gmail.com>
Authored: Sun Oct 22 11:56:41 2017 -0700
Committer: abdullah alamoudi <bamousaa@gmail.com>
Committed: Mon Oct 23 19:31:53 2017 -0700

----------------------------------------------------------------------
 .../main/java/org/apache/asterix/om/base/AMutableString.java    | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/asterixdb/blob/0a5d7466/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AMutableString.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AMutableString.java
b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AMutableString.java
index 33217cd..b2a4a5e 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AMutableString.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AMutableString.java
@@ -20,11 +20,16 @@ package org.apache.asterix.om.base;
 
 public class AMutableString extends AString {
 
+    private static final long serialVersionUID = 1L;
+
     public AMutableString(String value) {
         super(value);
     }
 
     public void setValue(String value) {
+        if (value == null) {
+            throw new NullPointerException();
+        }
         this.value = value;
     }
 }


Mime
View raw message