You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pig.apache.org by ga...@apache.org on 2009/10/14 02:10:12 UTC
svn commit: r824980 - in /hadoop/pig/trunk: CHANGES.txt
src/org/apache/pig/impl/util/JarManager.java
Author: gates
Date: Wed Oct 14 00:10:12 2009
New Revision: 824980
URL: http://svn.apache.org/viewvc?rev=824980&view=rev
Log:
PIG-968: Fix findContainingJar to work properly when there is a + in the jar path.
Modified:
hadoop/pig/trunk/CHANGES.txt
hadoop/pig/trunk/src/org/apache/pig/impl/util/JarManager.java
Modified: hadoop/pig/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/pig/trunk/CHANGES.txt?rev=824980&r1=824979&r2=824980&view=diff
==============================================================================
--- hadoop/pig/trunk/CHANGES.txt (original)
+++ hadoop/pig/trunk/CHANGES.txt Wed Oct 14 00:10:12 2009
@@ -46,6 +46,9 @@
BUG FIXES
+PIG-968: Fix findContainingJar to work properly when there is a + in the jar
+ path (tlipcon via gates).
+
PIG-738: Regexp passed from pigscript fails in UDF (pradeepkth)
PIG-942: Maps are not implicitly casted (pradeepkth)
Modified: hadoop/pig/trunk/src/org/apache/pig/impl/util/JarManager.java
URL: http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/impl/util/JarManager.java?rev=824980&r1=824979&r2=824980&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/impl/util/JarManager.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/impl/util/JarManager.java Wed Oct 14 00:10:12 2009
@@ -269,6 +269,13 @@
if (toReturn.startsWith("file:")) {
toReturn = toReturn.substring("file:".length());
}
+ // URLDecoder is a misnamed class, since it actually decodes
+ // x-www-form-urlencoded MIME type rather than actual
+ // URL encoding (which the file path has). Therefore it would
+ // decode +s to ' 's which is incorrect (spaces are actually
+ // either unencoded or encoded as "%20"). Replace +s first, so
+ // that they are kept sacred during the decoding process.
+ toReturn = toReturn.replaceAll("\\+", "%2B");
toReturn = URLDecoder.decode(toReturn, "UTF-8");
return toReturn.replaceAll("!.*$", "");
}