Skip to main content



      Home
Home » Newcomers » Newcomers » implicit cast
implicit cast [message #132268] Thu, 26 January 2006 19:22 Go to next message
Eclipse UserFriend
Originally posted by: wojtek.a.com

Is there any way to find where an implicit cast is being done.

Such as from int to long?
Re: implicit cast [message #132347 is a reply to message #132268] Thu, 26 January 2006 22:35 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: weconsul.ptd.net

Wojtek wrote:
> Is there any way to find where an implicit cast is being done.
>
> Such as from int to long?

Sorry but in what context are you speaking of?

Only with jdk 1.5 you will see warnings that autoboxing is being used..

--

Thanks in Advance...
IchBin, Pocono Lake, Pa, USA
http://weconsultants.servebeer.com/JHackerAppManager
____________________________________________________________ ______________

'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)
Re: implicit cast [message #132432 is a reply to message #132268] Fri, 27 January 2006 03:46 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: daniel.megert.eclipse.org

Wojtek wrote:

> Is there any way to find where an implicit cast is being done.
>
> Such as from int to long?

No, this is currently not possible.

Dani
Re: implicit cast [message #133265 is a reply to message #132347] Mon, 30 January 2006 10:04 Go to previous message
Eclipse UserFriend
Originally posted by: wojtek.a.com

IchBin wrote:
> Wojtek wrote:
>
>> Is there any way to find where an implicit cast is being done.
>>
>> Such as from int to long?
>
>
> Sorry but in what context are you speaking of?

I have a variable of type int:

int a;

A method takes a long:

public void someMethod(long b)
{
}

If I call the method:
someMethod(a);

Then the Java compiler does an implicit cast from int (a) to long (b). I
need to find these implicit casts. The requirements in the project
changed mid-stream, and where we were using int's to store keys, we must
now store long's. It is easy enough to change the method signatures, but
this does not show where some long forgotten variable stores it as an int.

Did the eyeball thing, but with over 700 classes.....

> Only with jdk 1.5 you will see warnings that autoboxing is being used..

Sigh.

I guess I need to bite the bullet and change over to 1.5. We are at 1.4.

Thanks
Previous Topic:need help: eclipse doesnt run in Fedora Core 4
Next Topic:eclipse startup error
Goto Forum:
  


Current Time: Sun Jun 01 15:25:04 EDT 2025

Powered by FUDForum. Page generated in 0.48555 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top