[1/2] git commit: WW-4345 Reverts the commit 8aa4fe860693d29e5ef94026bf2a7532ed74b9ea
Repository: struts Updated Branches: refs/heads/develop f49b084fb -> e01109697 WW-4345 Reverts the commit 8aa4fe860693d29e5ef94026bf2a7532ed74b9ea Project: http://git-wip-us.apache.org/repos/asf/struts/repo Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/63fa04e8 Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/63fa04e8 Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/63fa04e8 Branch: refs/heads/develop Commit: 63fa04e8146ec02fc256fa35a93454482254dcef Parents: f49b084 Author: Lukasz Lenart Authored: Tue Sep 16 08:51:16 2014 +0200 Committer: Lukasz Lenart Committed: Tue Sep 16 08:51:16 2014 +0200 -- .../apache/struts2/dispatcher/Dispatcher.java | 21 ++-- 1 file changed, 2 insertions(+), 19 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts/blob/63fa04e8/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java -- diff --git a/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java b/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java index 436490e..c18d055 100644 --- a/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java +++ b/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java @@ -79,8 +79,6 @@ public class Dispatcher { */ private static final Logger LOG = LoggerFactory.getLogger(Dispatcher.class); -public static final String MULTIPART_FORM_DATA = "multipart/form-data"; - /** * Provide a thread local instance. */ @@ -630,7 +628,7 @@ public class Dispatcher { Map requestMap = new RequestMap(request); // parameters map wrapping the http parameters. ActionMapping parameters are now handled and applied separately -Map params = prepareParametersMap(request); +Map params = new HashMap(request.getParameterMap()); // session map wrapping the http session Map session = new SessionMap(request); @@ -647,21 +645,6 @@ public class Dispatcher { } /** - * Copies or creates new map to hold request parameters, - * there is a special treatment when uploading a file see WW-4345 - */ -protected Map prepareParametersMap(HttpServletRequest request) { -Map params; -String contentType = request.getContentType(); -if (contentType != null && contentType.contains(MULTIPART_FORM_DATA)) { - params = new HashMap(); - } else { - params = new HashMap(request.getParameterMap()); - } -return params; -} - -/** * @deprecated use version without ServletContext param */ @Deprecated @@ -849,7 +832,7 @@ public class Dispatcher { } String content_type = request.getContentType(); -if (content_type != null && content_type.contains(MULTIPART_FORM_DATA)) { +if (content_type != null && content_type.contains("multipart/form-data")) { MultiPartRequest mpr = getMultiPartRequest(); LocaleProvider provider = getContainer().getInstance(LocaleProvider.class); request = new MultiPartRequestWrapper(mpr, request, getSaveDir(), provider);
[2/2] git commit: WW-4347 Adds support for JDK8 lambdas
WW-4347 Adds support for JDK8 lambdas Project: http://git-wip-us.apache.org/repos/asf/struts/repo Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/e0110969 Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/e0110969 Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/e0110969 Branch: refs/heads/develop Commit: e01109697f877890b4538d6d540463341fbcbac5 Parents: 63fa04e Author: Lukasz Lenart Authored: Tue Sep 16 09:37:37 2014 +0200 Committer: Lukasz Lenart Committed: Tue Sep 16 09:37:37 2014 +0200 -- pom.xml | 6 +-- xwork-core/pom.xml | 4 +- .../xwork2/util/finder/ClassFinder.java | 42 +++- 3 files changed, 38 insertions(+), 14 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts/blob/e0110969/pom.xml -- diff --git a/pom.xml b/pom.xml index 9a20885..a3fbae5 100644 --- a/pom.xml +++ b/pom.xml @@ -86,7 +86,7 @@ ${project.version} 3.0.5.RELEASE 3.0.6 -3.3 +5.0.2 2.0.6 @@ -564,12 +564,12 @@ ${ognl.version} -asm +org.ow2.asm asm ${asm.version} -asm +org.ow2.asm asm-commons ${asm.version} http://git-wip-us.apache.org/repos/asf/struts/blob/e0110969/xwork-core/pom.xml -- diff --git a/xwork-core/pom.xml b/xwork-core/pom.xml index d8fdc46..86bb0c1 100644 --- a/xwork-core/pom.xml +++ b/xwork-core/pom.xml @@ -126,11 +126,11 @@ ognl -asm +org.ow2.asm asm -asm +org.ow2.asm asm-commons http://git-wip-us.apache.org/repos/asf/struts/blob/e0110969/xwork-core/src/main/java/com/opensymphony/xwork2/util/finder/ClassFinder.java -- diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/util/finder/ClassFinder.java b/xwork-core/src/main/java/com/opensymphony/xwork2/util/finder/ClassFinder.java index 986d89f..f337eb9 100644 --- a/xwork-core/src/main/java/com/opensymphony/xwork2/util/finder/ClassFinder.java +++ b/xwork-core/src/main/java/com/opensymphony/xwork2/util/finder/ClassFinder.java @@ -26,7 +26,8 @@ import org.objectweb.asm.AnnotationVisitor; import org.objectweb.asm.ClassReader; import org.objectweb.asm.FieldVisitor; import org.objectweb.asm.MethodVisitor; -import org.objectweb.asm.commons.EmptyVisitor; +import org.objectweb.asm.ClassVisitor; +import org.objectweb.asm.Opcodes; import java.io.File; import java.io.IOException; @@ -714,7 +715,7 @@ public class ClassFinder { InputStream in = resource.openStream(); try { ClassReader classReader = new ClassReader(in); -classReader.accept(new InfoBuildingVisitor(), ClassReader.SKIP_DEBUG); +classReader.accept(new InfoBuildingClassVisitor(), ClassReader.SKIP_DEBUG); } finally { in.close(); } @@ -727,13 +728,15 @@ public class ClassFinder { } -public class InfoBuildingVisitor extends EmptyVisitor { +public class InfoBuildingClassVisitor extends ClassVisitor { private Info info; -public InfoBuildingVisitor() { +public InfoBuildingClassVisitor() { +super(Opcodes.ASM5); } -public InfoBuildingVisitor(Info info) { +public InfoBuildingClassVisitor(Info info) { +this(); this.info = info; } @@ -785,7 +788,7 @@ public class ClassFinder { AnnotationInfo annotationInfo = new AnnotationInfo(desc); info.getAnnotations().add(annotationInfo); getAnnotationInfos(annotationInfo.getName()).add(info); -return new InfoBuildingVisitor(annotationInfo); +return null; } @Override @@ -793,7 +796,7 @@ public class ClassFinder { ClassInfo classInfo = ((ClassInfo) info); FieldInfo fieldInfo = new FieldInfo(classInfo, name, desc); classInfo.getFields().add(fieldInfo); -return new InfoBuildingVisitor(fieldInfo); +return null; } @Override @@ -801,7 +804,28 @@ public class ClassFinder { ClassInfo classInfo = ((ClassInfo) info); MethodInfo methodInfo = new MethodInfo(classInfo, name, desc); classInfo.getMethods().add(methodInfo); -
[1/2] git commit: WW-4365 Solves problem with matching option id to headerKey
Repository: struts Updated Branches: refs/heads/develop e01109697 -> d2b22b913 WW-4365 Solves problem with matching option id to headerKey Project: http://git-wip-us.apache.org/repos/asf/struts/repo Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/3447eefd Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/3447eefd Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/3447eefd Branch: refs/heads/develop Commit: 3447eefdac3972d77fb3343ea31c9d61754da285 Parents: e011096 Author: Lukasz Lenart Authored: Tue Sep 16 21:23:37 2014 +0200 Committer: Lukasz Lenart Committed: Tue Sep 16 21:23:37 2014 +0200 -- .../resources/org/apache/struts2/static/optiontransferselect.js| 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/struts/blob/3447eefd/core/src/main/resources/org/apache/struts2/static/optiontransferselect.js -- diff --git a/core/src/main/resources/org/apache/struts2/static/optiontransferselect.js b/core/src/main/resources/org/apache/struts2/static/optiontransferselect.js index 74e27d6..c4024a3 100644 --- a/core/src/main/resources/org/apache/struts2/static/optiontransferselect.js +++ b/core/src/main/resources/org/apache/struts2/static/optiontransferselect.js @@ -44,7 +44,7 @@ function compile(ptn) { if (ptn == '' || !window.RegExp) { return function(val) { return val == ptn; } } else { -var reg = new RegExp(ptn); +var reg = new RegExp("\\b" + ptn); return function (val) { if (val == '') { // ignore empty option added by template return true;
[2/2] git commit: Solves minor style problems
Solves minor style problems Project: http://git-wip-us.apache.org/repos/asf/struts/repo Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/d2b22b91 Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/d2b22b91 Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/d2b22b91 Branch: refs/heads/develop Commit: d2b22b9132cb8d34cd9ad66e5e168cf9f262bfcd Parents: 3447eef Author: Lukasz Lenart Authored: Tue Sep 16 21:25:26 2014 +0200 Committer: Lukasz Lenart Committed: Tue Sep 16 21:25:26 2014 +0200 -- .../org/apache/struts2/static/optiontransferselect.js | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts/blob/d2b22b91/core/src/main/resources/org/apache/struts2/static/optiontransferselect.js -- diff --git a/core/src/main/resources/org/apache/struts2/static/optiontransferselect.js b/core/src/main/resources/org/apache/struts2/static/optiontransferselect.js index c4024a3..85a2e28 100644 --- a/core/src/main/resources/org/apache/struts2/static/optiontransferselect.js +++ b/core/src/main/resources/org/apache/struts2/static/optiontransferselect.js @@ -56,8 +56,8 @@ function compile(ptn) { } function moveOptions(objSourceElement, objTargetElement, toSort, chooseFunc) { -var aryTempSourceOptions = new Array(); -var aryTempTargetOptions = new Array(); +var aryTempSourceOptions = []; +var aryTempTargetOptions = []; var x = 0; //looping through source element to find selected options @@ -70,7 +70,7 @@ function moveOptions(objSourceElement, objTargetElement, toSort, chooseFunc) { } else { //storing options that stay to recreate select element -var objTempValues = new Object(); +var objTempValues = {}; objTempValues.text = objSourceElement.options[i].text; objTempValues.value = objSourceElement.options[i].value; aryTempSourceOptions[x] = objTempValues; @@ -80,7 +80,7 @@ function moveOptions(objSourceElement, objTargetElement, toSort, chooseFunc) { //sorting and refilling target list for (var i = 0; i < objTargetElement.length; i++) { -var objTempValues = new Object(); +var objTempValues = {}; objTempValues.text = objTargetElement.options[i].text; objTempValues.value = objTargetElement.options[i].value; aryTempTargetOptions[i] = objTempValues; @@ -178,7 +178,7 @@ function moveOptionDown(objTargetElement, type, ptn) { function swapOptions(objTargetElement, first, second) { var opt = objTargetElement.options; var temp = new Option(opt[first].text, opt[first].value, opt[first].defaultSelected, opt[first].selected); - var temp2= new Option(opt[second].text, opt[second].value, opt[second].defaultSelected, opt[second].selected); + var temp2 = new Option(opt[second].text, opt[second].value, opt[second].defaultSelected, opt[second].selected); opt[first] = temp2; opt[second] = temp; }