Uploaded image for project: 'Beam'
  1. Beam
  2. BEAM-10243

Incorrect checkState condition in withFieldValues in Row.java

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: 2.22.0
    • Fix Version/s: 2.24.0
    • Component/s: sdk-java-core
    • Labels:

      Description

       

      In the following code:

      public FieldValueBuilder withFieldValues(Map<String, Object> values) { 
         checkState(values.isEmpty()); 
         return new FieldValueBuilder(schema, null).withFieldValues(values); 
      }  
      

       

      checkState should check `this.values` instead of the passed arguments.

      The issue is that as it is now, we cannot use this function to build a Row from Map.

       

      thanks.

       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ibzib Kyle Weaver
                Reporter:
                pedro.teixeira Pedro Teixeira
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h