[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [p2-dev] help with a compile warning
|
A bit overkill, but PDE/Build does support
specifying compiler warning settings for your bundle if you want to suppress
the warning.
In your build.properties, add something like "javacWarnings..=-unusedAllocation"
or tell PDE/Build to use the project settings for compiler
warnings: "javacProjectSettings=true"
http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.pde.doc.user%2Ftasks%2Fpde_compiler_options.htm
http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.jdt.doc.isv%2Fguide%2Fjdt_api_compile.htm
From:
Thomas Watson <tjwatson@xxxxxxxxxx>
To:
P2 developer discussions
<p2-dev@xxxxxxxxxxx>
Date:
09/07/2012 08:59 AM
Subject:
Re: [p2-dev]
help with a compile warning
Sent by:
p2-dev-bounces@xxxxxxxxxxx
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.
From:
| 
Ian Bull <irbull@xxxxxxxxxxxxxxxxx>
|
To:
| 
P2 developer discussions <p2-dev@xxxxxxxxxxx>,
|
Date:
| 
09/06/2012 11:51 PM
|
Subject:
| 
[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
_______________________________________________
p2-dev mailing list
p2-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/p2-dev