Results 1 to 3 of 3
Thread: int cannot be dereferenced
- 11-11-2010, 10:04 PM #1
Member
- Join Date
- Oct 2010
- Posts
- 3
- Rep Power
- 0
int cannot be dereferenced
Hi!
While compiling from jdk1.4 to jdk1.6, I'm getting the following error. Can you please help
[javac] C:\JBOSSCLIENTJDK1.6\Axiom\OMSClient\src\com\mss\o msClient\ClientController.java:951: boolean cannot be dereferenced
Eg:
if (authenitcationObj.getAuthenticated().booleanValue ()) {
_userLoginID = authenitcationObj.getUserId();
}
[javac] C:\JBOSSCLIENTJDK1.6\Axiom\OMSClient\src\com\mss\o msClient\ClientController.java:1088: incomparable types: int and <nulltype>
Eg:
if (orders[i].getShowOnlyAmount() != null) {
orderAmount = orders[i].getShowOnlyAmount().intValue();
}
[javac] C:\JBOSSCLIENTJDK1.6\Axiom\OMSClient\src\com\mss\o msClient\ClientController.java:1089: int cannot be dereferenced
Eg:
if (orders[i].getShowOnlyAmount() != null) {
orderAmount = orders[i].getShowOnlyAmount().intValue();
}
- 11-11-2010, 10:47 PM #2
Senior Member
- Join Date
- Mar 2009
- Posts
- 552
- Rep Power
- 5
I don't think its a JDK thing. Looks like an Integer array got changed to an int array, and a Boolean value got changed to boolean. Switching the types back to Integer[] and Boolean[] should fix all of the problems.
If you can't switch them back, removing the booleanValue() and intValue() calls should fix the 1st and 3rd problems. The second one depends on what getShowOnlyAccount() does. You might be able to get away with removing the if statement altogether, depending on what the getShowOnlyAmount() actually does. If you post the code for that method, I might be able to give you more help for that. However, my suggestion is to switch the types back to Integer[] and Boolean.If the above doesn't make sense to you, ignore it, but remember it - might be useful!
And if you just randomly taught yourself to program, well... you're just like me!
- 11-12-2010, 08:47 AM #3
Moderator
- Join Date
- Apr 2009
- Posts
- 10,481
- Rep Power
- 16
Similar Threads
-
How can I solve "void cannot be dereferenced" error?
By fervent07 in forum New To JavaReplies: 2Last Post: 04-05-2010, 08:54 PM -
Long Cannot Be Dereferenced?
By caps_lock in forum New To JavaReplies: 1Last Post: 01-18-2009, 01:49 AM -
Help!! error message "long cannot be dereferenced"
By soc86 in forum New To JavaReplies: 2Last Post: 11-30-2008, 03:24 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks