Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8710E17FBB for ; Thu, 19 Mar 2015 15:24:50 +0000 (UTC) Received: (qmail 57384 invoked by uid 500); 19 Mar 2015 15:23:51 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 57305 invoked by uid 500); 19 Mar 2015 15:23:51 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 57202 invoked by uid 99); 19 Mar 2015 15:23:51 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Mar 2015 15:23:51 +0000 Date: Thu, 19 Mar 2015 15:23:51 +0000 (UTC) From: "Henri Biestro (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (JEXL-145) Incorrect test case in SandboxTest MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/JEXL-145?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Henri Biestro resolved JEXL-145. -------------------------------- Resolution: Fixed > Incorrect test case in SandboxTest > ---------------------------------- > > Key: JEXL-145 > URL: https://issues.apache.org/jira/browse/JEXL-145 > Project: Commons JEXL > Issue Type: Bug > Affects Versions: 2.1.1 > Environment: JDK 1.7.0_45 > Reporter: Ian Connor > Fix For: 3.0 > > > Whilst debugging blacklisting of static functions using the Sandbox class and unable to get it to work I checked the testcase SandboxTest. I subsequently found that the test of System.exit() in testRestrict() passes not because System.currentTimeMillis() is whitelisted but because of a signature mismatch i.e System.exit() requires an int parameter. Changing the expression to System.exit(1) causes the test to end prematruely due to exit() being called. > The white listing fails in SandboxUberspectImpl.getMethod() because obj is a Class and getClass().getName() returns "java.lang.Class" which doesn't match "java.lang.System" as specified in SandboxTest.testRestrict(). -- This message was sent by Atlassian JIRA (v6.3.4#6332)