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

OpenRefine / OpenRefine / 14085846798

26 Mar 2025 02:29PM UTC coverage: 70.579% (+20.3%) from 50.26%
14085846798

Pull #7227

github

web-flow
Merge 7fb51e94c into 98b23725d
Pull Request #7227: Improve reproducibility of the column reordering operation

3439 of 5565 branches covered (61.8%)

Branch coverage included in aggregate %.

13 of 15 new or added lines in 2 files covered. (86.67%)

9858 of 13275 relevant lines covered (74.26%)

3.42 hits per line

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

0.0
/main/src/com/google/refine/commands/column/ReorderColumnsCommand.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.column;
35

36
import java.util.List;
37

38
import javax.servlet.http.HttpServletRequest;
39

40
import com.fasterxml.jackson.core.type.TypeReference;
41

42
import com.google.refine.browsing.EngineConfig;
43
import com.google.refine.commands.EngineDependentCommand;
44
import com.google.refine.model.AbstractOperation;
45
import com.google.refine.model.Project;
46
import com.google.refine.operations.column.ColumnReorderOperation;
47
import com.google.refine.util.ParsingUtilities;
48

49
public class ReorderColumnsCommand extends EngineDependentCommand {
×
50

51
    @Override
52
    protected AbstractOperation createOperation(Project project,
53
            HttpServletRequest request, EngineConfig engineConfig) throws Exception {
54

55
        String columnNames = request.getParameter("columnNames");
×
NEW
56
        String isPureReorder = request.getParameter("isPureReorder");
×
57
        return new ColumnReorderOperation(
×
58
                ParsingUtilities.mapper.readValue(columnNames, new TypeReference<List<String>>() {
×
NEW
59
                }), "true".equals(isPureReorder));
×
60
    }
61
}
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