Return-Path: X-Original-To: apmail-struts-commits-archive@minotaur.apache.org Delivered-To: apmail-struts-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 68BC417DDA for ; Tue, 23 Jun 2015 10:50:30 +0000 (UTC) Received: (qmail 28392 invoked by uid 500); 23 Jun 2015 10:46:13 -0000 Delivered-To: apmail-struts-commits-archive@struts.apache.org Received: (qmail 19836 invoked by uid 500); 23 Jun 2015 10:46:05 -0000 Mailing-List: contact commits-help@struts.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@struts.apache.org Delivered-To: mailing list commits@struts.apache.org Received: (qmail 6791 invoked by uid 99); 23 Jun 2015 10:12:04 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Jun 2015 10:12:04 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id DEE22E3616; Tue, 23 Jun 2015 10:12:03 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: lukaszlenart@apache.org To: commits@struts.apache.org Date: Tue, 23 Jun 2015 10:12:03 -0000 Message-Id: <4806f5ac6ce44647af18ed5796c3f98b@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [1/2] struts git commit: WW-4518 Drops another deprecated APIs Repository: struts Updated Branches: refs/heads/master a4abb3474 -> c50605a94 http://git-wip-us.apache.org/repos/asf/struts/blob/c50605a9/core/src/test/java/com/opensymphony/xwork2/util/URLUtilTest.java ---------------------------------------------------------------------- diff --git a/core/src/test/java/com/opensymphony/xwork2/util/URLUtilTest.java b/core/src/test/java/com/opensymphony/xwork2/util/URLUtilTest.java deleted file mode 100644 index e0c0096..0000000 --- a/core/src/test/java/com/opensymphony/xwork2/util/URLUtilTest.java +++ /dev/null @@ -1,177 +0,0 @@ -package com.opensymphony.xwork2.util; - -import com.opensymphony.xwork2.FileManager; -import com.opensymphony.xwork2.util.fs.DefaultFileManager; -import junit.framework.TestCase; - -import java.io.IOException; -import java.net.*; - -public class URLUtilTest extends TestCase { - - private FileManager fileManager; - - public void testSimpleFile() throws MalformedURLException { - URL url = new URL("file:c:/somefile.txt"); - URL outputURL = fileManager.normalizeToFileProtocol(url); - - assertNull(outputURL); - } - - public void testJarFile() throws MalformedURLException { - URL url = new URL("jar:file:/c:/somefile.jar!/"); - URL outputURL = fileManager.normalizeToFileProtocol(url); - - assertNotNull(outputURL); - assertEquals("file:/c:/somefile.jar", outputURL.toExternalForm()); - - url = new URL("jar:file:/c:/somefile.jar!/somestuf/bla/bla"); - outputURL = fileManager.normalizeToFileProtocol(url); - assertEquals("file:/c:/somefile.jar", outputURL.toExternalForm()); - - url = new URL("jar:file:c:/somefile.jar!/somestuf/bla/bla"); - outputURL = fileManager.normalizeToFileProtocol(url); - assertEquals("file:c:/somefile.jar", outputURL.toExternalForm()); - } - - public void testJarFileWithJarWordInsidePath() throws MalformedURLException { - URL url = new URL("jar:file:/c:/workspace/projar/somefile.jar!/"); - URL outputURL = fileManager.normalizeToFileProtocol(url); - - assertNotNull(outputURL); - assertEquals("file:/c:/workspace/projar/somefile.jar", outputURL.toExternalForm()); - - url = new URL("jar:file:/c:/workspace/projar/somefile.jar!/somestuf/bla/bla"); - outputURL = fileManager.normalizeToFileProtocol(url); - assertEquals("file:/c:/workspace/projar/somefile.jar", outputURL.toExternalForm()); - - url = new URL("jar:file:c:/workspace/projar/somefile.jar!/somestuf/bla/bla"); - outputURL = fileManager.normalizeToFileProtocol(url); - assertEquals("file:c:/workspace/projar/somefile.jar", outputURL.toExternalForm()); - } - - public void testZipFile() throws MalformedURLException { - URL url = new URL("zip:/c:/somefile.zip!/"); - URL outputURL = fileManager.normalizeToFileProtocol(url); - - assertNotNull(outputURL); - assertEquals("file:/c:/somefile.zip", outputURL.toExternalForm()); - - url = new URL("zip:/c:/somefile.zip!/somestuf/bla/bla"); - outputURL = fileManager.normalizeToFileProtocol(url); - assertEquals("file:/c:/somefile.zip", outputURL.toExternalForm()); - - url = new URL("zip:c:/somefile.zip!/somestuf/bla/bla"); - outputURL = fileManager.normalizeToFileProtocol(url); - assertEquals("file:c:/somefile.zip", outputURL.toExternalForm()); - } - - public void testWSJarFile() throws MalformedURLException { - URL url = new URL("wsjar:file:/c:/somefile.jar!/"); - URL outputURL = fileManager.normalizeToFileProtocol(url); - - assertNotNull(outputURL); - assertEquals("file:/c:/somefile.jar", outputURL.toExternalForm()); - - url = new URL("wsjar:file:/c:/somefile.jar!/somestuf/bla/bla"); - outputURL = fileManager.normalizeToFileProtocol(url); - assertEquals("file:/c:/somefile.jar", outputURL.toExternalForm()); - - url = new URL("wsjar:file:c:/somefile.jar!/somestuf/bla/bla"); - outputURL = fileManager.normalizeToFileProtocol(url); - assertEquals("file:c:/somefile.jar", outputURL.toExternalForm()); - } - - public void testVsFile() throws MalformedURLException { - URL url = new URL("vfsfile:/c:/somefile.jar!/"); - URL outputURL = fileManager.normalizeToFileProtocol(url); - - assertNotNull(outputURL); - assertEquals("file:/c:/somefile.jar", outputURL.toExternalForm()); - - url = new URL("vfsfile:/c:/somefile.jar!/somestuf/bla/bla"); - outputURL = fileManager.normalizeToFileProtocol(url); - assertEquals("file:/c:/somefile.jar", outputURL.toExternalForm()); - - url = new URL("vfsfile:c:/somefile.jar!/somestuf/bla/bla"); - outputURL = fileManager.normalizeToFileProtocol(url); - assertEquals("file:c:/somefile.jar", outputURL.toExternalForm()); - - url = new URL("vfszip:/c:/somefile.war/somelibrary.jar"); - outputURL = fileManager.normalizeToFileProtocol(url); - assertEquals("file:/c:/somefile.war/somelibrary.jar", outputURL.toExternalForm()); - } - - public void testJBossFile() throws MalformedURLException { - URL url = new URL("vfszip:/c:/somefile.jar!/"); - URL outputURL = fileManager.normalizeToFileProtocol(url); - - assertNotNull(outputURL); - assertEquals("file:/c:/somefile.jar", outputURL.toExternalForm()); - - url = new URL("vfszip:/c:/somefile.jar!/somestuf/bla/bla"); - outputURL = fileManager.normalizeToFileProtocol(url); - assertEquals("file:/c:/somefile.jar", outputURL.toExternalForm()); - - url = new URL("vfsmemory:c:/somefile.jar!/somestuf/bla/bla"); - outputURL = fileManager.normalizeToFileProtocol(url); - assertEquals("file:c:/somefile.jar", outputURL.toExternalForm()); - - url = new URL("vfsmemory:/c:/somefile.war/somelibrary.jar"); - outputURL = fileManager.normalizeToFileProtocol(url); - assertEquals("file:/c:/somefile.war/somelibrary.jar", outputURL.toExternalForm()); - } - - protected void setUp() throws Exception { - super.setUp(); - - try { - URL.setURLStreamHandlerFactory(new URLStreamHandlerFactory() { - public URLStreamHandler createURLStreamHandler(String protocol) { - return new URLStreamHandler() { - protected URLConnection openConnection(URL u) throws IOException { - return null; - } - }; - } - }); - } catch (Throwable e) { - //the factory cant be set multiple times..just ignore exception no biggie - } - - this.fileManager = new DefaultFileManager(); - } - - public void testVerifyUrl() { - assertEquals(false, URLUtil.verifyUrl(null)); - assertEquals(false, URLUtil.verifyUrl("")); - assertEquals(false, URLUtil.verifyUrl(" ")); - assertEquals(false, URLUtil.verifyUrl("no url")); - assertEquals(false, URLUtil.verifyUrl("http://no url")); - assertEquals(false, URLUtil.verifyUrl("https://no url")); - - assertEquals(true, URLUtil.verifyUrl("http://www.opensymphony.com")); - assertEquals(true, URLUtil.verifyUrl("https://www.opensymphony.com")); - assertEquals(true, URLUtil.verifyUrl("https://www.opensymphony.com:443/login")); - assertEquals(true, URLUtil.verifyUrl("http://localhost:8080/myapp")); - } -/* - - TODO lukaszlenart: move to DefaultFileManagerTest (or separate class) - - public void testIsJarURL() throws Exception { - assertTrue(fileManager.isJarURL(new URL("jar:file:/c:/somelibrary.jar!/com/opensymphony"))); - assertTrue(URLUtil.isJarURL(new URL("zip:/c:/somelibrary.jar!/com/opensymphony"))); - assertTrue(URLUtil.isJarURL(new URL("wsjar:/c:/somelibrary.jar!/com/opensymphony"))); - assertTrue(URLUtil.isJarURL(new URL("vfsfile:/c:/somelibrary.jar!/com/opensymphony"))); - assertTrue(URLUtil.isJarURL(new URL("vfszip:/c:/somelibrary.jar/com/opensymphony"))); - } - - public void testIsJBoss5Url() throws Exception { - assertTrue(URLUtil.isJBossUrl(new URL("vfszip:/c:/somewar.war/somelibrary.jar"))); - assertFalse(URLUtil.isJBossUrl(new URL("vfsfile:/c:/somewar.war/somelibrary.jar"))); - assertFalse(URLUtil.isJBossUrl(new URL("jar:file:/c:/somelibrary.jar"))); - assertTrue(URLUtil.isJBossUrl(new URL("vfsmemory:/c:/somewar.war/somelibrary.jar"))); - } -*/ -} http://git-wip-us.apache.org/repos/asf/struts/blob/c50605a9/core/src/test/java/com/opensymphony/xwork2/util/UrlUtilTest2.java ---------------------------------------------------------------------- diff --git a/core/src/test/java/com/opensymphony/xwork2/util/UrlUtilTest2.java b/core/src/test/java/com/opensymphony/xwork2/util/UrlUtilTest2.java index bfc306b..d753c5c 100644 --- a/core/src/test/java/com/opensymphony/xwork2/util/UrlUtilTest2.java +++ b/core/src/test/java/com/opensymphony/xwork2/util/UrlUtilTest2.java @@ -18,7 +18,7 @@ public class UrlUtilTest2 extends TestCase { public void testOpenWithJarProtocol() throws IOException { FileManager fileManager = new DefaultFileManager(); - URL url = ClassLoaderUtil.getResource("xwork-jar.jar", URLUtil.class); + URL url = ClassLoaderUtil.getResource("xwork-jar.jar", ClassLoaderUtil.class); URL jarUrl = new URL("jar", "", url.toExternalForm() + "!/"); URL outputURL = fileManager.normalizeToFileProtocol(jarUrl); http://git-wip-us.apache.org/repos/asf/struts/blob/c50605a9/core/src/test/java/org/apache/struts2/dispatcher/ActionContextCleanUpTest.java ---------------------------------------------------------------------- diff --git a/core/src/test/java/org/apache/struts2/dispatcher/ActionContextCleanUpTest.java b/core/src/test/java/org/apache/struts2/dispatcher/ActionContextCleanUpTest.java index 95eb204..f4993c5 100644 --- a/core/src/test/java/org/apache/struts2/dispatcher/ActionContextCleanUpTest.java +++ b/core/src/test/java/org/apache/struts2/dispatcher/ActionContextCleanUpTest.java @@ -169,13 +169,13 @@ public class ActionContextCleanUpTest extends TestCase { } @Override - public HttpServletRequest wrapRequest(HttpServletRequest request, ServletContext servletContext) throws IOException { + public HttpServletRequest wrapRequest(HttpServletRequest request) throws IOException { wrapRequest = true; return request; } @Override - public void serviceAction(HttpServletRequest request, HttpServletResponse response, ServletContext context, ActionMapping mapping) throws ServletException { + public void serviceAction(HttpServletRequest request, HttpServletResponse response, ActionMapping mapping) throws ServletException { service = true; } } http://git-wip-us.apache.org/repos/asf/struts/blob/c50605a9/core/src/test/java/org/apache/struts2/dispatcher/DispatcherTest.java ---------------------------------------------------------------------- diff --git a/core/src/test/java/org/apache/struts2/dispatcher/DispatcherTest.java b/core/src/test/java/org/apache/struts2/dispatcher/DispatcherTest.java index dffb09f..778a89d 100644 --- a/core/src/test/java/org/apache/struts2/dispatcher/DispatcherTest.java +++ b/core/src/test/java/org/apache/struts2/dispatcher/DispatcherTest.java @@ -138,12 +138,11 @@ public class DispatcherTest extends StrutsInternalTestCase { public void testPrepareMultipartRequest() throws Exception { MockHttpServletRequest req = new MockHttpServletRequest(); MockHttpServletResponse res = new MockHttpServletResponse(); - ServletContext ctx = new MockServletContext(); req.setContentType("multipart/form-data"); Dispatcher du = initDispatcher(Collections.emptyMap()); du.prepare(req, res); - HttpServletRequest wrapped = du.wrapRequest(req, ctx); + HttpServletRequest wrapped = du.wrapRequest(req); assertTrue(wrapped instanceof MultiPartRequestWrapper); } http://git-wip-us.apache.org/repos/asf/struts/blob/c50605a9/core/src/test/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapperTest.java ---------------------------------------------------------------------- diff --git a/core/src/test/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapperTest.java b/core/src/test/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapperTest.java index 33ff6e9..29bf8ad 100644 --- a/core/src/test/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapperTest.java +++ b/core/src/test/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapperTest.java @@ -631,10 +631,10 @@ public class DefaultActionMapperTest extends StrutsInternalTestCase { public void testDropExtension() throws Exception { DefaultActionMapper mapper = new DefaultActionMapper(); - String name = mapper.dropExtension("foo.action"); + String name = mapper.dropExtension("foo.action", new ActionMapping()); assertTrue("Name not right: "+name, "foo".equals(name)); - name = mapper.dropExtension("foo.action.action"); + name = mapper.dropExtension("foo.action.action", new ActionMapping()); assertTrue("Name not right: "+name, "foo.action".equals(name)); } @@ -642,22 +642,22 @@ public class DefaultActionMapperTest extends StrutsInternalTestCase { public void testDropExtensionWhenBlank() throws Exception { DefaultActionMapper mapper = new DefaultActionMapper(); mapper.setExtensions("action,,"); - String name = mapper.dropExtension("foo.action"); + String name = mapper.dropExtension("foo.action", new ActionMapping()); assertTrue("Name not right: "+name, "foo".equals(name)); - name = mapper.dropExtension("foo"); + name = mapper.dropExtension("foo", new ActionMapping()); assertTrue("Name not right: "+name, "foo".equals(name)); - assertNull(mapper.dropExtension("foo.bar")); - assertNull(mapper.dropExtension("foo.")); + assertNull(mapper.dropExtension("foo.bar", new ActionMapping())); + assertNull(mapper.dropExtension("foo.", new ActionMapping())); } public void testDropExtensionEmbeddedDot() throws Exception { DefaultActionMapper mapper = new DefaultActionMapper(); mapper.setExtensions("action,,"); - String name = mapper.dropExtension("/foo/bar-1.0/baz.action"); + String name = mapper.dropExtension("/foo/bar-1.0/baz.action", new ActionMapping()); assertTrue("Name not right: "+name, "/foo/bar-1.0/baz".equals(name)); - name = mapper.dropExtension("/foo/bar-1.0/baz"); + name = mapper.dropExtension("/foo/bar-1.0/baz", new ActionMapping()); assertTrue("Name not right: "+name, "/foo/bar-1.0/baz".equals(name)); } http://git-wip-us.apache.org/repos/asf/struts/blob/c50605a9/core/src/test/java/org/apache/struts2/interceptor/ServletConfigInterceptorTest.java ---------------------------------------------------------------------- diff --git a/core/src/test/java/org/apache/struts2/interceptor/ServletConfigInterceptorTest.java b/core/src/test/java/org/apache/struts2/interceptor/ServletConfigInterceptorTest.java index d32100f..857ed3a 100644 --- a/core/src/test/java/org/apache/struts2/interceptor/ServletConfigInterceptorTest.java +++ b/core/src/test/java/org/apache/struts2/interceptor/ServletConfigInterceptorTest.java @@ -170,7 +170,6 @@ public class ServletConfigInterceptorTest extends StrutsInternalTestCase { assertNotNull(action.getProxy()); PrincipalProxy proxy = action.getProxy(); - assertEquals(proxy.getRequest(), req); assertNull(proxy.getUserPrincipal()); assertTrue(! proxy.isRequestSecure()); assertTrue(! proxy.isUserInRole("no.role")); http://git-wip-us.apache.org/repos/asf/struts/blob/c50605a9/core/src/test/java/org/apache/struts2/views/jsp/AbstractUITagTest.java ---------------------------------------------------------------------- diff --git a/core/src/test/java/org/apache/struts2/views/jsp/AbstractUITagTest.java b/core/src/test/java/org/apache/struts2/views/jsp/AbstractUITagTest.java index 02e1f96..636d433 100644 --- a/core/src/test/java/org/apache/struts2/views/jsp/AbstractUITagTest.java +++ b/core/src/test/java/org/apache/struts2/views/jsp/AbstractUITagTest.java @@ -106,28 +106,6 @@ public abstract class AbstractUITagTest extends AbstractTagTest { } /** - * Simple Helper for setting bean properties. Although BeanUtils from oscore should provide bean property setting - * functionality, it does not work (at least with my JDK 1.5.0_05), failing in jdk's PropertyDescriptor constructor. - * This implementation works safely in any case, and does not add dependency on commons-beanutils for building. - * TODO: Check how we can remove this crap again. - * - * @author Rene Gielen - * @deprecated use BeanUtils#setProperty - */ - public class BeanHelper { - Object bean; - - public BeanHelper(Object bean) { - this.bean = bean; - } - - public void set(String name, Object value) throws IllegalAccessException, InvocationTargetException { - BeanUtils.setProperty(this.bean, name, value); - } - - } - - /** * Initialize a map of {@link PropertyHolder} for generic tag property testing. Will be used when calling {@link * #verifyGenericProperties(org.apache.struts2.views.jsp.ui.AbstractUITag, String, String[])} as properties to * verify.

This implementation defines testdata for all common AbstractUITag properties and may be overridden in http://git-wip-us.apache.org/repos/asf/struts/blob/c50605a9/core/src/test/java/org/apache/struts2/views/xslt/XSLTResultTest.java ---------------------------------------------------------------------- diff --git a/core/src/test/java/org/apache/struts2/views/xslt/XSLTResultTest.java b/core/src/test/java/org/apache/struts2/views/xslt/XSLTResultTest.java index c9fdadd..d1ad400 100644 --- a/core/src/test/java/org/apache/struts2/views/xslt/XSLTResultTest.java +++ b/core/src/test/java/org/apache/struts2/views/xslt/XSLTResultTest.java @@ -55,7 +55,7 @@ public class XSLTResultTest extends StrutsInternalTestCase { public void testNoLocation() throws Exception { try { result.setParse(false); - result.setLocation(null); + result.setStylesheetLocation(null); result.execute(mai); fail("Should have thrown an IllegalArgumentException"); } catch (IllegalArgumentException e) { @@ -66,7 +66,7 @@ public class XSLTResultTest extends StrutsInternalTestCase { public void testNoFileFound() throws Exception { try { result.setParse(false); - result.setLocation("nofile.xsl"); + result.setStylesheetLocation("nofile.xsl"); result.execute(mai); fail("Should have thrown a TransformerException"); } catch (TransformerException e) { @@ -76,7 +76,7 @@ public class XSLTResultTest extends StrutsInternalTestCase { public void testSimpleTransform() throws Exception { result.setParse(false); - result.setLocation("XSLTResultTest.xsl"); + result.setStylesheetLocation("XSLTResultTest.xsl"); result.execute(mai); String out = response.getContentAsString(); @@ -86,7 +86,7 @@ public class XSLTResultTest extends StrutsInternalTestCase { public void testSimpleTransformParse() throws Exception { result.setParse(true); - result.setLocation("${top.myLocation}"); + result.setStylesheetLocation("${top.myLocation}"); result.execute(mai); String out = response.getContentAsString(); @@ -96,7 +96,7 @@ public class XSLTResultTest extends StrutsInternalTestCase { public void testTransform2() throws Exception { result.setParse(false); - result.setLocation("XSLTResultTest2.xsl"); + result.setStylesheetLocation("XSLTResultTest2.xsl"); result.execute(mai); String out = response.getContentAsString(); @@ -107,7 +107,7 @@ public class XSLTResultTest extends StrutsInternalTestCase { public void testTransform3() throws Exception { result.setParse(false); - result.setLocation("XSLTResultTest3.xsl"); + result.setStylesheetLocation("XSLTResultTest3.xsl"); result.execute(mai); String out = response.getContentAsString(); @@ -120,7 +120,7 @@ public class XSLTResultTest extends StrutsInternalTestCase { public void testTransformWithBoolean() throws Exception { result.setParse(false); - result.setLocation("XSLTResultTest5.xsl"); + result.setStylesheetLocation("XSLTResultTest5.xsl"); result.execute(mai); String out = response.getContentAsString(); @@ -143,7 +143,7 @@ public class XSLTResultTest extends StrutsInternalTestCase { }; result.setParse(false); - result.setLocation("XSLTResultTest4.xsl"); + result.setStylesheetLocation("XSLTResultTest4.xsl"); result.execute(mai); String out = response.getContentAsString(); @@ -164,7 +164,7 @@ public class XSLTResultTest extends StrutsInternalTestCase { }; result.setParse(false); - result.setLocation("XSLTResultTest4.badinclude.xsl"); + result.setStylesheetLocation("XSLTResultTest4.badinclude.xsl"); try { result.execute(mai); fail("Should have thrown an exception"); @@ -183,7 +183,7 @@ public class XSLTResultTest extends StrutsInternalTestCase { }; } }; - result.setLocation("XSLTResultTest4.xsl"); + result.setStylesheetLocation("XSLTResultTest4.xsl"); try { result.execute(mai); fail("Should have thrown an exception"); @@ -194,7 +194,7 @@ public class XSLTResultTest extends StrutsInternalTestCase { public void testStatusCode() throws Exception { result.setParse(false); - result.setLocation("XSLTResultTest.xsl"); + result.setStylesheetLocation("XSLTResultTest.xsl"); result.setStatus("302"); result.execute(mai); @@ -207,7 +207,7 @@ public class XSLTResultTest extends StrutsInternalTestCase { public void testEncoding() throws Exception { result.setParse(false); - result.setLocation("XSLTResultTest.xsl"); + result.setStylesheetLocation("XSLTResultTest.xsl"); result.setEncoding("ISO-8859-1"); result.execute(mai); http://git-wip-us.apache.org/repos/asf/struts/blob/c50605a9/core/src/test/resources/com/opensymphony/xwork2/spring/autowireContext.xml ---------------------------------------------------------------------- diff --git a/core/src/test/resources/com/opensymphony/xwork2/spring/autowireContext.xml b/core/src/test/resources/com/opensymphony/xwork2/spring/autowireContext.xml index 059bb4a..8422e8b 100644 --- a/core/src/test/resources/com/opensymphony/xwork2/spring/autowireContext.xml +++ b/core/src/test/resources/com/opensymphony/xwork2/spring/autowireContext.xml @@ -2,5 +2,5 @@ - + http://git-wip-us.apache.org/repos/asf/struts/blob/c50605a9/plugins/portlet/src/main/java/org/apache/struts2/portlet/interceptor/PortletPrincipalProxy.java ---------------------------------------------------------------------- diff --git a/plugins/portlet/src/main/java/org/apache/struts2/portlet/interceptor/PortletPrincipalProxy.java b/plugins/portlet/src/main/java/org/apache/struts2/portlet/interceptor/PortletPrincipalProxy.java index 9a4af90..3fd1a6a 100644 --- a/plugins/portlet/src/main/java/org/apache/struts2/portlet/interceptor/PortletPrincipalProxy.java +++ b/plugins/portlet/src/main/java/org/apache/struts2/portlet/interceptor/PortletPrincipalProxy.java @@ -79,15 +79,4 @@ public class PortletPrincipalProxy implements PrincipalProxy { return request.isSecure(); } - /** - * Gets the request. - * - * @return The request - * @throws UnsupportedOperationException not supported in this implementation. - * @deprecated To obtain the HttpServletRequest in your action, use - * {@link org.apache.struts2.servlet.ServletRequestAware}, since this method will be dropped in future. - */ - public HttpServletRequest getRequest() { - throw new UnsupportedOperationException("Usage of getRequest() method is deprecadet and not supported for this implementation"); - } } http://git-wip-us.apache.org/repos/asf/struts/blob/c50605a9/plugins/testng/src/main/java/org/apache/struts2/TestNGStrutsTestCase.java ---------------------------------------------------------------------- diff --git a/plugins/testng/src/main/java/org/apache/struts2/TestNGStrutsTestCase.java b/plugins/testng/src/main/java/org/apache/struts2/TestNGStrutsTestCase.java deleted file mode 100644 index 3325f70..0000000 --- a/plugins/testng/src/main/java/org/apache/struts2/TestNGStrutsTestCase.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.struts2; - -/** - * Base test class for TestNG unit tests. Provides common Struts variables - * and performs Struts setup and teardown processes - * @deprecated since 2.1.1, use StrutsTestCase instead - */ -public class TestNGStrutsTestCase extends StrutsTestCase { -} -