[ 
https://issues.apache.org/jira/browse/BSF-9?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12688745#action_12688745
 ] 

Sebb commented on BSF-9:
------------------------

This has been fixed as follows:

Arrays.asList(new Integer[] { new Integer(ENGINE_SCOPE), new 
Integer(GLOBAL_SCOPE) });

So I think this issue can be marked as resolved and/or closed

> 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-unsubscr...@jakarta.apache.org
For additional commands, e-mail: bsf-dev-h...@jakarta.apache.org

Reply via email to