Return-Path: Delivered-To: apmail-jakarta-bsf-dev-archive@www.apache.org Received: (qmail 51942 invoked from network); 1 Nov 2007 19:46:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 1 Nov 2007 19:46:21 -0000 Received: (qmail 22273 invoked by uid 500); 1 Nov 2007 19:46:08 -0000 Delivered-To: apmail-jakarta-bsf-dev-archive@jakarta.apache.org Received: (qmail 22183 invoked by uid 500); 1 Nov 2007 19:46:08 -0000 Mailing-List: contact bsf-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Bean Scripting Framework developers" Reply-To: "Bean Scripting Framework developers" Delivered-To: mailing list bsf-dev@jakarta.apache.org Received: (qmail 22168 invoked by uid 99); 1 Nov 2007 19:46:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Nov 2007 12:46:08 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Nov 2007 19:46:11 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id C3CB671420E for ; Thu, 1 Nov 2007 12:45:50 -0700 (PDT) Message-ID: <26154139.1193946350798.JavaMail.jira@brutus> Date: Thu, 1 Nov 2007 12:45:50 -0700 (PDT) From: "Rony G. Flatscher (JIRA)" To: bsf-dev@jakarta.apache.org Subject: [jira] Created: (BSF-9) SimpleScriptContext.java cannot be compiled with Java 1.4 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org SimpleScriptContext.java cannot be compiled with Java 1.4 --------------------------------------------------------- Key: BSF-9 URL: https://issues.apache.org/jira/browse/BSF-9 Project: BSF Issue Type: Bug Affects Versions: BSF-3.0 Environment: Java 1.4 Reporter: Rony G. Flatscher Assignee: Sanka Samaranayake While attempting to create the BSF3.0 beta2 distribution from ant elder's sources with Java 1.4, the building stops with an error stating: ------------- cut here ---------- F:\download\Apache\bsf\bsf3\bsf-3.0-beta2-src\bsf-api\src\main\java\javax\script\SimpleScriptContext.java:46: cannot resolve symbol symbol : method valueOf (int) location: class java.lang.Integer private static final List SCOPES = Arrays.asList(new Integer[] { Integer.valueOf(ENGINE_SCOPE), Integer.valueOf(GLOBAL_SCOPE) }); ^ F:\download\Apache\bsf\bsf3\bsf-3.0-beta2-src\bsf-api\src\main\java\javax\script\SimpleScriptContext.java:46: cannot resolve symbol symbol : method valueOf (int) location: class java.lang.Integer private static final List SCOPES = Arrays.asList(new Integer[] { Integer.valueOf(ENGINE_SCOPE), Integer.valueOf(GLOBAL_SCOPE) }); ^ 2 errors ------------- cut here ---------- Indeed, "Integer.valueOf(int)" got introduced with Java 1.5. As BSF3 should be deployable with Java 1.4, this would need to be fixed. Here is a unified diff which corrects the problem: ------------- cut here ---------- --- bkp\SimpleScriptContext.java 2007-11-01 16:48:10.000000000 +0100 +++ SimpleScriptContext.java 2007-11-01 20:35:07.906250000 +0100 @@ -43,7 +43,7 @@ private Writer errorWriter; - private static final List SCOPES = Arrays.asList(new Integer[] { Integer.valueOf(ENGINE_SCOPE), Integer.valueOf(GLOBAL_SCOPE) }); + private static final List SCOPES = Arrays.asList(new Integer[] { Integer.valueOf(""+ENGINE_SCOPE), Integer.valueOf(""+GLOBAL_SCOPE) }); public SimpleScriptContext() { reader = new InputStreamReader(System.in); ------------- cut here ---------- Regards, ---rony -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: bsf-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: bsf-dev-help@jakarta.apache.org