> On Thu, 6 Sep 2012 01:48:29 AM Lone_Wolf wrote:
>> i'm looking into building latest trunk revision (10124 now) from source on
>> archlinux.
>> When compiling , i get this warning :
>> [javac] warning: [options] bootstrap class path not set in conjunction
with -source 1.5
>> A search indicated this was due to building for an older version then the
>> java version i am running.
>
> Correct. I get that too. A search will also tell you what to do about
it
> if
> you are worried about it. FWIW I do not bother. We could consider
moving
> to
> 1.6, but IMHO that should wait for a major release.
>
>> On my system jdk7 is installed, so i tried to build against java 1.7 .
>
> Ditto. java-1.7.0-openjdk-1.7.0.6-2.3.1.fc17.2.x86_64 to be exact.
>
>> ant -Djava.target.version=1.7 gives this output :
>> Buildfile:
>> /home/panoramix/Documents/WIP/pkgbuilds/freecol-svn/src/freecol-build/build.
xml
>> init:
>> compile:
>> [javac] Compiling 629 source files to
>> /home/panoramix/Documents/WIP/pkgbuilds/freecol-svn/src/freecol-build/build
>> [javac]
>> /home/panoramix/Documents/WIP/pkgbuilds/freecol-svn/src/freecol-build/src/ne
t/sf/freecol/common/model/BuildQueue.java:72: warning: [unchecked]
Possible
>> heap pollution from parameterized vararg type T
>> [javac] public BuildQueue(Colony colony, CompletionAction
>> action,
>> int priority, T... items) {
>> [javac] ^
>> [javac] where T is a type-variable:
>> [javac] T extends BuildableType declared in class BuildQueue
[javac] 1 warning
>
> Here we differ. I have not seen that warning, and I am surprised the
compiler
> dislikes the BuildQueue constructor, it looks reasonable to me. However if
> parameterized varargs are risky there is a simple solution here---
AFAICT
> we
> never use the items argument at any call site, so it can simply be removed.
>
> So, can I interest you in submitting a patch?
>
> Cheers,
> Mike Pope
>
I've searched about this warning and found it's a new one introduced in
java 7.
http://docs.oracle.com/javase/7/docs/technotes/guides/language/non-reifiable-varargs.html
http://www.angelikalanger.com/GenericsFAQ/FAQSections/ProgrammingIdioms.html#FAQ300A
The version i use is 7.u7_2.3.2 , and archlinux uses minimal patching. I
suggest you look into the FC package and check if it may be patched to not
show this warning.
Just removing the <T... items> part gives plenty of build errors, and
removing <items> gives an identifier expected warning .
I know little about java coding (have some experience with javascript, C++
and python) but will look into this further.
LW
Note : I have had trouble with replying without making a new post, hope i
have done it right now.
apologies for any inconvenience.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Freecol-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freecol-developers