Closed Bug 417706 Opened 16 years ago Closed 15 years ago

java.lang.String now broken

Categories

(Firefox :: General, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: brettz9, Unassigned)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9b3) Gecko/2008020514 Firefox/3.0b3
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9b3) Gecko/2008020514 Firefox/3.0b3

While LiveConnect was already having problems (I reported an earlier bug on try-catch blocks), now "new java.lang.String(str)" will also create an error. This latter error has broken my XQuery extension at https://addons.mozilla.org/en-US/firefox/addon/5515 and I believe it just started in FF3b3 (as my extension was working in FF3b2 )

Reproducible: Always

Steps to Reproduce:
1. Within extension code, add:
   var str = "abc";
   var javastr = new java.lang.String(str);

Actual Results:  
get "Error: invalid new expression result"

Expected Results:  
"javastr" becomes a Java object of a String class.
This bug still occurs in FF3RC1 (it didn't in the earlier betas).
The problem still occurs with FF3.0.1 and the Java SE 6 Update 10 Beta (latest version) from SUN.

Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.16) Gecko/20080703 Mandriva/2.0.0.16-1.1mdv2008.1 

This problem seems specific to String creation as the creation of other Java objects with Liveconnect works well.

// this code works
var str = new java.math.Biginteger("10").toString();

I forgot to mention that FF2 doesn't have this problem.
This bug has now been resolved as of Java 6 update 12, with the
move to the new implementation of LiveConnect. See
https://jdk6.dev.java.net/plugin2/#LIVECONNECT ,
https://jdk6.dev.java.net/plugin2/liveconnect/ ,
http://forums.java.net/jive/thread.jspa?threadID=45933&tstart=0
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Resolution: FIXED → WORKSFORME
You need to log in before you can comment on or make changes to this bug.