Hm no luck for me then. We are using ant and even with -Xlint:-unchecked
ant marks it as an error in the html output - not even as an warning.
It is hard for me to believe (although I am beginning to) that sun has
removed this excellent feature from java (the ability to do collections
in a weakly typed way). Sigh.
- Nicolai
>>On Tue, 08 Nov 2005 14:33:05 +0100, Nicolai Henriksen
>><nicolai@drengene.dk> wrote, quoted or indirectly quoted someone who
[quoted text clipped - 13 lines]
>
> - Oliver
HalcyonWild - 09 Nov 2005 10:57 GMT
> Hm no luck for me then. We are using ant and even with -Xlint:-unchecked
> ant marks it as an error in the html output - not even as an warning.
>
> It is hard for me to believe (although I am beginning to) that sun has
> removed this excellent feature from java (the ability to do collections
> in a weakly typed way). Sigh.
Try Collection c = new Vector<Object>(); or something like that.
AFAIK, you can create a Vector of Strings, or Vector of Integers, with
Generics.
So you can definitely create a Vector of Objects. And continue with it
the old way. Am I right. See if that works, its some kind of a bad
workaround though. I dont know if it is a good thing to do.
I am not sure about syntax. I have never used jdk 1.5 ( and I dont
intend to, unless the bosses decide to shift to 1.5 ).
Nicolai Henriksen - 09 Nov 2005 13:12 GMT
Oh yes. That might let me continue the coding style although still
polluting the code a little. But definitely worth a try. Thanks.
- Nicolai
> Try Collection c = new Vector<Object>(); or something like that.
> AFAIK, you can create a Vector of Strings, or Vector of Integers, with
[quoted text clipped - 5 lines]
> I am not sure about syntax. I have never used jdk 1.5 ( and I dont
> intend to, unless the bosses decide to shift to 1.5 ).
Oliver Wong - 09 Nov 2005 15:40 GMT
> Hm no luck for me then. We are using ant and even with -Xlint:-unchecked
> ant marks it as an error in the html output - not even as an warning.
>
> It is hard for me to believe (although I am beginning to) that sun has
> removed this excellent feature from java (the ability to do collections in
> a weakly typed way). Sigh.
I wouldn't say they removed this "feature"; rather, they're just
discouraging it (which is why it's reported as a warning and not an error).
- Oliver
Monique Y. Mudama - 09 Nov 2005 18:25 GMT
> Hm no luck for me then. We are using ant and even with
> -Xlint:-unchecked ant marks it as an error in the html output - not
[quoted text clipped - 3 lines]
> has removed this excellent feature from java (the ability to do
> collections in a weakly typed way). Sigh.
It sounds more like you have a project policy or build system that
disallows warnings, and *that* is the problem?

Signature
monique
Ask smart questions, get good answers:
http://www.catb.org/~esr/faqs/smart-questions.html
Nicolai Henriksen - 10 Nov 2005 09:04 GMT
He he. Well I do not mind the warnings that much. The thing is that ant
flags them as errors making it impossible to see with a quick glance
whether the nightly build failed or not.
- Nicolai
> It sounds more like you have a project policy or build system that
> disallows warnings, and *that* is the problem?
Oliver Wong - 10 Nov 2005 15:42 GMT
> He he. Well I do not mind the warnings that much. The thing is that ant
> flags them as errors making it impossible to see with a quick glance
> whether the nightly build failed or not.
So use a better tool than Ant?
I haven't used Ant myself, but I hear it's a good product. Are you sure
there aren't some sort of configuration setting or something that you can't
edit so that Ant treats warnings as warnings instead of as errors?
- Oliver
Nicolai Henriksen - 11 Nov 2005 08:11 GMT
He he. Well otherwise we are very satisfied with Ant. It even does our
C++ build very efficiently and on multiple platforms one of which is
embedded cross-compile - all with exactly one build system across.
But even so. They actually have a bug in their bug-tracking system
stating this exact problem. Due to the very general nature of the way
ant handles "tools" everything on stderr is treated as an error as far
as I know.
But I think we will go for some king of post-processing of the output -
we are running the output through XSLT anyway so it might be safe to
filter out the "Note:" lines.
So configuration? Well yes. Just configuration of the kind have a .java
or .xsl extension :-)
- Nicolai
> So use a better tool than Ant?
>
[quoted text clipped - 3 lines]
>
> - Oliver