You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by GitBox <gi...@apache.org> on 2022/11/11 09:20:32 UTC

[GitHub] [cassandra] smiklosovic opened a new pull request, #2000: CASSANDRA-17878 4.0 simplified patch

smiklosovic opened a new pull request, #2000:
URL: https://github.com/apache/cassandra/pull/2000

   Thanks for sending a pull request! Here are some tips if you're new here:
    
    * Ensure you have added or run the [appropriate tests](https://cassandra.apache.org/_/development/testing.html) for your PR.
    * Be sure to keep the PR description updated to reflect all changes.
    * Write your PR title to summarize what this PR proposes.
    * If possible, provide a concise example to reproduce the issue for a faster review.
    * Read our [contributor guidelines](https://cassandra.apache.org/_/development/index.html)
    * If you're making a documentation change, see our [guide to documentation contribution](https://cassandra.apache.org/_/development/documentation.html)
    
   Commit messages should follow the following format:
   
   ```
   <One sentence description, usually Jira title or CHANGES.txt summary>
   
   <Optional lengthier description (context on patch)>
   
   patch by <Authors>; reviewed by <Reviewers> for CASSANDRA-#####
   
   Co-authored-by: Name1 <email1>
   Co-authored-by: Name2 <email2>
   
   ```
   
   The [Cassandra Jira](https://issues.apache.org/jira/projects/CASSANDRA/issues/)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


[GitHub] [cassandra] smiklosovic commented on a diff in pull request #2000: CASSANDRA-17878 4.0 simplified patch

Posted by GitBox <gi...@apache.org>.
smiklosovic commented on code in PR #2000:
URL: https://github.com/apache/cassandra/pull/2000#discussion_r1020154753


##########
src/java/org/apache/cassandra/cql3/statements/PropertyDefinitions.java:
##########
@@ -84,17 +85,29 @@ public Boolean hasProperty(String name)
         return properties.containsKey(name);
     }
 
-    public String getString(String key, String defaultValue) throws SyntaxException
+    public static boolean parseBoolean(String key, String value) throws SyntaxException
     {
-        String value = getSimple(key);
-        return value != null ? value : defaultValue;
+        if (null == value)
+            throw new IllegalArgumentException("value argument can't be null");

Review Comment:
   Probably, but this goes just to 4.0 and 4.1, this preserves what was there as closely as possible, not important here. We may fix it in trunk if you are up to.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


[GitHub] [cassandra] smiklosovic closed pull request #2000: CASSANDRA-17878 4.0 simplified patch

Posted by GitBox <gi...@apache.org>.
smiklosovic closed pull request #2000: CASSANDRA-17878 4.0 simplified patch
URL: https://github.com/apache/cassandra/pull/2000


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


[GitHub] [cassandra] Claudenw commented on a diff in pull request #2000: CASSANDRA-17878 4.0 simplified patch

Posted by GitBox <gi...@apache.org>.
Claudenw commented on code in PR #2000:
URL: https://github.com/apache/cassandra/pull/2000#discussion_r1020130652


##########
src/java/org/apache/cassandra/cql3/statements/PropertyDefinitions.java:
##########
@@ -84,17 +85,29 @@ public Boolean hasProperty(String name)
         return properties.containsKey(name);
     }
 
-    public String getString(String key, String defaultValue) throws SyntaxException
+    public static boolean parseBoolean(String key, String value) throws SyntaxException
     {
-        String value = getSimple(key);
-        return value != null ? value : defaultValue;
+        if (null == value)
+            throw new IllegalArgumentException("value argument can't be null");

Review Comment:
   Shouldn't the key name be referenced in the exception.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org