> In the BayesianAnalysis mailet the instantiation of 
> JDBCBayesianAnalyzer is as follows:
> 
>     private JDBCBayesianAnalyzer analyzer = new 
> JDBCBayesianAnalyzer() {
>         protected void delegatedLog(String logString) {
>             log("BayesianAnalysis: " + logString);
>         }
>     };
> 
> May it be that a jdk change has changed the behaviour of 
> this.getClass() in this case? If true, it frightens me a 
> little bit. What is your jdk? 
> Mine is 1.4.2_07.
> 
> Anyway, your fix makes it safer, so let's keep it.
> 
> Vincenzo

I don't know how/when it happened: now the this.getClass call the getClass
of the innerclass and it find BayesianAnalysis$2 instead of
JDBCBayesianAnalyzer.

I'm using 1.4.2_07 too. I've tested with 1.5 and I keep getting the same
result.

Can you try running this code?

public class Test {

        public Class test() {
                return(this.getClass());
        }
        
        public static void main(String[] args) {
                Test t = new Test() {
                        
                };
                
                System.out.println(t.test().equals(Test.class));
                
        }
}

It returns false in all my tests.


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

Reply via email to