K
KDawg44
Hi,
I am getting an error when I compile my app that i hoping someone can
shed some light on. I am working with OpenChord and am getting a
Serialized object. I am trying to cast that to a RegistrationInfo
Object in my program. I did this by:
try {
return
(RegistrationInfo)chord.retrieve(retrieveKey);
} catch (ServiceException e) {
throw new RuntimeException(e);
}
When I go to compile, I first get this:
Note: PresenceServer.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
(PresenceServer.java is the class the above code is in).
So I compile with the -Xlint option and I get this:
PresenceServer.java:102: warning: [unchecked] unchecked cast
found : java.util.Set<java.io.Serializable>
required: ClientPackage.RegistrationInfo
return
(RegistrationInfo)chord.retrieve(retrieveKey);
^
1 warning
What am I doing wrong?
Thanks for any suggestions.
I am getting an error when I compile my app that i hoping someone can
shed some light on. I am working with OpenChord and am getting a
Serialized object. I am trying to cast that to a RegistrationInfo
Object in my program. I did this by:
try {
return
(RegistrationInfo)chord.retrieve(retrieveKey);
} catch (ServiceException e) {
throw new RuntimeException(e);
}
When I go to compile, I first get this:
Note: PresenceServer.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
(PresenceServer.java is the class the above code is in).
So I compile with the -Xlint option and I get this:
PresenceServer.java:102: warning: [unchecked] unchecked cast
found : java.util.Set<java.io.Serializable>
required: ClientPackage.RegistrationInfo
return
(RegistrationInfo)chord.retrieve(retrieveKey);
^
1 warning
What am I doing wrong?
Thanks for any suggestions.