flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fhueske <...@git.apache.org>
Subject [GitHub] flink pull request #4668: [FLINK-7617] Remove string format in BitSet to imp...
Date Thu, 14 Sep 2017 12:17:01 GMT
Github user fhueske commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4668#discussion_r138875420
  
    --- Diff: flink-runtime/src/main/java/org/apache/flink/runtime/operators/util/BitSet.java
---
    @@ -56,8 +56,7 @@ public void setMemorySegment(MemorySegment memorySegment, int offset)
{
     	 * @param index - position
     	 */
     	public void set(int index) {
    -		Preconditions.checkArgument(index < bitLength && index >= 0, 
    -			String.format("Input Index[%d] is larger than BitSet available size[%d].", index,
bitLength));
    +		Preconditions.checkArgument(index < bitLength && index >= 0);
    --- End diff --
    
    Can be changed to 
    
    ```
    Preconditions.checkArgument(index < bitLength && index >= 0, 
      "Input Index[%d] is larger than BitSet available size[%d].", index, bitLength);
    ``` 
    to perserve the error message.


---

Mime
View raw message