From d419f4bbc74f34075d40b5393ce82029271d6753 Mon Sep 17 00:00:00 2001 From: David Huynh Date: Tue, 29 Nov 2011 19:55:08 +0000 Subject: [PATCH] For reinterpret function, swapped encoder and decoder arguments if decoder is specified, as discussed here: http://groups.google.com/group/google-refine/msg/629dbf11b073e129 git-svn-id: http://google-refine.googlecode.com/svn/trunk@2392 7d457c2a-affb-35e4-300a-418c747d4874 --- .../google/refine/expr/functions/strings/Reinterpret.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/main/src/com/google/refine/expr/functions/strings/Reinterpret.java b/main/src/com/google/refine/expr/functions/strings/Reinterpret.java index d7a95f539..a62b16c28 100644 --- a/main/src/com/google/refine/expr/functions/strings/Reinterpret.java +++ b/main/src/com/google/refine/expr/functions/strings/Reinterpret.java @@ -58,14 +58,13 @@ public class Reinterpret implements Function { String decoder; String encoder; + encoder = (String) o2; if (args.length == 2) { Project project = (Project) bindings.get("project"); ProjectMetadata metadata = ProjectManager.singleton.getProjectMetadata(project.id); decoder = metadata.getEncoding(); // can return "" for broken projects - encoder = (String) o2; } else { - decoder = (String) o2; - encoder = (String) args[2]; + decoder = (String) args[2]; } return reinterpret(str, decoder, encoder); }