• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

OpenRefine / OpenRefine / 25943791158

15 May 2026 10:09PM UTC coverage: 71.213% (+21.1%) from 50.078%
25943791158

Pull #7780

github

web-flow
Merge c12c3af84 into 83464d053
Pull Request #7780: Remove unused parameter from AbstractOperation.createProcess(). Fixes #7527

3468 of 5579 branches covered (62.16%)

Branch coverage included in aggregate %.

4 of 11 new or added lines in 11 files covered. (36.36%)

10029 of 13374 relevant lines covered (74.99%)

3.91 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

17.86
/main/src/com/google/refine/commands/cell/SplitMultiValueCellsCommand.java
1
/*
2

3
Copyright 2010, Google Inc.
4
All rights reserved.
5

6
Redistribution and use in source and binary forms, with or without
7
modification, are permitted provided that the following conditions are
8
met:
9

10
    * Redistributions of source code must retain the above copyright
11
notice, this list of conditions and the following disclaimer.
12
    * Redistributions in binary form must reproduce the above
13
copyright notice, this list of conditions and the following disclaimer
14
in the documentation and/or other materials provided with the
15
distribution.
16
    * Neither the name of Google Inc. nor the names of its
17
contributors may be used to endorse or promote products derived from
18
this software without specific prior written permission.
19

20
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,           
27
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY           
28
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31

32
*/
33

34
package com.google.refine.commands.cell;
35

36
import java.io.IOException;
37

38
import javax.servlet.ServletException;
39
import javax.servlet.http.HttpServletRequest;
40
import javax.servlet.http.HttpServletResponse;
41

42
import com.fasterxml.jackson.core.type.TypeReference;
43

44
import com.google.refine.commands.Command;
45
import com.google.refine.model.AbstractOperation;
46
import com.google.refine.model.Project;
47
import com.google.refine.operations.cell.MultiValuedCellSplitOperation;
48
import com.google.refine.process.Process;
49
import com.google.refine.util.ParsingUtilities;
50

51
public class SplitMultiValueCellsCommand extends Command {
3✔
52

53
    @Override
54
    public void doPost(HttpServletRequest request, HttpServletResponse response)
55
            throws ServletException, IOException {
56
        if (!hasValidCSRFToken(request)) {
4!
57
            respondCSRFError(response);
2✔
58
            return;
1✔
59
        }
60

61
        try {
62
            Project project = getProject(request);
×
63

64
            String columnName = request.getParameter("columnName");
×
65
            String keyColumnName = request.getParameter("keyColumnName");
×
66
            String separator = request.getParameter("separator");
×
67
            String mode = request.getParameter("mode");
×
68
            Boolean regex = Boolean.parseBoolean(request.getParameter("regex"));
×
69

70
            AbstractOperation op;
71

72
            if ("lengths".equals(mode)) {
×
73
                String s = request.getParameter("fieldLengths");
×
74

75
                int[] fieldLengths = ParsingUtilities.mapper.readValue(s, new TypeReference<int[]>() {
×
76
                });
77

78
                op = new MultiValuedCellSplitOperation(columnName,
×
79
                        keyColumnName,
80
                        fieldLengths);
81

82
            } else {
×
83
                op = new MultiValuedCellSplitOperation(columnName,
×
84
                        keyColumnName,
85
                        separator,
86
                        regex);
×
87
            }
88
            op.validate();
×
NEW
89
            Process process = op.createProcess(project);
×
90
            performProcessAndRespond(request, response, project, process);
×
91
        } catch (Exception e) {
×
92
            respondException(response, e);
×
93
        }
×
94
    }
×
95
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc