Bernd Fondermann ha scritto:
I've seen this error on a MacBook and a Windows machine.

The Mac has

java version "1.5.0_13"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_13-b05-241)
Java HotSpot(TM) Client VM (build 1.5.0_13-121, mixed mode, sharing)

running. The Intellij IDEA 8.0M1 JVM on the same machine does not see any problems with it, either.

Anyway, it doesn't hurt to have the cast, doesn't it?

No, I was just curious to understand my mistakes :-) .. and I hope I'll remember this the next time I'll want to clean up warnings.. :-/

BTW I see that if we require java5 that reflection can simply be removed in favor of a direct invoke.

Stefano

  Bernd


Stefano Bagnara wrote:
Hi Bernd,

what javac are you using?

Postage requires Java 5:
http://markmail.org/message/5souuokvg3uq33di

It succesfully built here and on hudson, both with ant and m2, using jdk 5...

Stefano

[EMAIL PROTECTED] ha scritto:
Author: berndf
Date: Sat Sep 20 12:24:44 2008
New Revision: 697415

URL: http://svn.apache.org/viewvc?rev=697415&view=rev
Log:
partly undo changes from commit 684436. my javac is frowning upon missing casts

Modified:
james/postage/trunk/src/main/java/org/apache/james/postage/jmx/JVMResourceSampler.java

Modified: james/postage/trunk/src/main/java/org/apache/james/postage/jmx/JVMResourceSampler.java URL: http://svn.apache.org/viewvc/james/postage/trunk/src/main/java/org/apache/james/postage/jmx/JVMResourceSampler.java?rev=697415&r1=697414&r2=697415&view=diff ============================================================================== --- james/postage/trunk/src/main/java/org/apache/james/postage/jmx/JVMResourceSampler.java (original) +++ james/postage/trunk/src/main/java/org/apache/james/postage/jmx/JVMResourceSampler.java Sat Sep 20 12:24:44 2008
@@ -83,7 +83,7 @@
public void connectRemoteJamesJMXServer() throws SamplingException { if(jvmResourceSampleWorker == null) throw new SamplingException("JSE specific features not present. (compile the project with JSE 5)");
         try {
- m_connectMethod.invoke(jvmResourceSampleWorker, VOID_ARGUMENT_LIST); + m_connectMethod.invoke(jvmResourceSampleWorker, (Object[])VOID_ARGUMENT_LIST);
         } catch (Exception e) {
throw new SamplingException("could not establish connection to remote James JMX. is James really configured for JMX and running under JSE5 or later?");
         }
@@ -92,7 +92,7 @@
     public void doSample() throws SamplingException {
if(jvmResourceSampleWorker == null) throw new SamplingException("JSE specific features not present. (compile the project with JSE 5)");
         try {
- m_doSampleMethod.invoke(jvmResourceSampleWorker, VOID_ARGUMENT_LIST); + m_doSampleMethod.invoke(jvmResourceSampleWorker, (Object[])VOID_ARGUMENT_LIST);
         } catch (Exception e) {
             throw new SamplingException(e);
         }


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to