[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [p2-dev] help with a compile warning
|
If you are still using jsr14 for the p2 project then you cannot use the annotation. I find this particular warning a little strange. I tried to reproduce it with a simple java project and I cannot seem to enable the compiler errors/warnings to get it to show up in the IDE. Is this warning really valid?
Tom
Ian Bull ---09/06/2012 11:51:02 PM---Hi everyone, I've been trying to remove all our compile warnings (we have 4 left), and one has me stumped.
![]()
| ![]()
Ian Bull <irbull@xxxxxxxxxxxxxxxxx> |
![]()
| ![]()
P2 developer discussions <p2-dev@xxxxxxxxxxx>, |
![]()
| ![]()
09/06/2012 11:51 PM |
![]()
| ![]()
[p2-dev] help with a compile warning |
Hi everyone,
I've been trying to remove all our compile warnings (we have 4 left), and one has me stumped.
1. WARNING in /src/org/eclipse/equinox/internal/p2/updatesite/artifact/UpdateSiteArtifactRepositoryFactory.java
(at line 76)
new URL(location.toASCIIString());
The allocated object is never used
In this case we create a URL object in a try / catch block to make sure that the URL is properly formed. We can argue if that's the best approach, but that's what we're doing. The problem is, we never actually use the Object, and this makes our headless build sad :-(. I added a:
@SuppressWarnings("unused")
To the method, and this fixes the problem in the IDE but not the build.
Does anybody have any ideas what we can do? Does the headless build pay attention to the annotations? Can we configure this somewhere else? Should we rework the code?
cheers,
Ian
--
R. Ian Bull | EclipseSource Victoria | +1 250 477 7484
http://eclipsesource.com | http://twitter.com/eclipsesource_______________________________________________
p2-dev mailing list
p2-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/p2-dev

