aspose file tools*
The moose likes Beginning Java and the fly likes inconvertible types found : int required: java.lang.Short Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "inconvertible types found : int required: java.lang.Short" Watch "inconvertible types found : int required: java.lang.Short" New topic
Author

inconvertible types found : int required: java.lang.Short

Alan Christen
Greenhorn

Joined: Sep 18, 2006
Posts: 16
]Fixed: changed Short to short. Compiled without errors.
Hello,

I was given this source code and asked to compile it: it fails with the error " inconvertible types found : int required: java.lang.Short".

The code does a bitwise shift to convert some hashed (I think) values to integer. The compiler fails when encountering this statement "s >>>= 5;"


The original author of the code swears up and down that it used to compile but cannot help me.

Note that I removed the SQL query from this code snippet due to its size...Any idea what could be the problem?
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18702
    
  40

Alan Christen wrote:
The original author of the code swears up and down that it used to compile but cannot help me.

Note that I removed the SQL query from this code snippet due to its size...Any idea what could be the problem?


What version of Java you are using, versus what version of Java the original author is using? I am guessing that the difference has to do with autoboxing.

Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: inconvertible types found : int required: java.lang.Short