Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 341409 - Use java.util.Random in GWT runtime
Summary: Use java.util.Random in GWT runtime
Status: CLOSED FIXED
Alias: None
Product: EMF
Classification: Modeling
Component: Core (show other bugs)
Version: 2.7.0   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 enhancement (vote)
Target Milestone: M7   Edit
Assignee: Kenn Hussey CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-30 14:18 EDT by Kenn Hussey CLA
Modified: 2011-05-10 11:57 EDT (History)
1 user (show)

See Also:
Kenn.Hussey: indigo+


Attachments
proposed patch (1.89 KB, patch)
2011-03-30 14:23 EDT, Kenn Hussey CLA
no flags Details | Diff
updated patch (4.41 KB, patch)
2011-03-31 13:36 EDT, Kenn Hussey CLA
Kenn.Hussey: review?
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kenn Hussey CLA 2011-03-30 14:18:26 EDT
It seems (see, e.g., http://code.google.com/p/google-web-toolkit/source/detail?r=7414) that GWT now provides a replacement for java.util.Random which can be used instead of com.google.gwt.user.client.Random.
Comment 1 Kenn Hussey CLA 2011-03-30 14:23:22 EDT
Created attachment 192218 [details]
proposed patch

Here is a patch which makes the suggested change. Ed, please review.
Comment 2 Ed Merks CLA 2011-03-30 16:32:31 EDT
Could we make it look just like the code that uses SecureRandom in the regular runtime?
Comment 3 Kenn Hussey CLA 2011-03-30 16:39:33 EDT
(In reply to comment #2)
> Could we make it look just like the code that uses SecureRandom in the regular
> runtime?

Hmm, I'll take a look.
Comment 4 Kenn Hussey CLA 2011-03-30 17:07:24 EDT
(In reply to comment #3)
> (In reply to comment #2)
> > Could we make it look just like the code that uses SecureRandom in the regular
> > runtime?
> 
> Hmm, I'll take a look.

Unfortunately, it looks as though they have not implemented that class. :(
Comment 5 Ed Merks CLA 2011-03-30 17:14:13 EDT
I know but if you change it like this in the core runtime, 

   Random random = new SecureRandom();

the rest of the logic still compiles, so we'd reduce the differences between the two versions if we matched the rest of the original logic...
Comment 6 Kenn Hussey CLA 2011-03-31 13:36:39 EDT
Created attachment 192306 [details]
updated patch

OK, here's an updated patch which makes the source for both runtimes more similar.
Comment 7 Ed Merks CLA 2011-04-04 11:53:15 EDT
Looks good.  You'll change the Javadoc for the standard runtime too?
Comment 8 Kenn Hussey CLA 2011-04-04 12:23:24 EDT
(In reply to comment #7)
> Looks good.  You'll change the Javadoc for the standard runtime too?

No, I made the Javadoc for the GWT runtime the same as the standard one...

The changes have been committed to CVS.
Comment 9 Ed Merks CLA 2011-05-10 11:57:58 EDT
The changes are available in EMF 2.7 M7 or an earlier build.