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
Stefano Bagnara wrote:
Vincenzo,
Please review this fix: I don't understand why/how it was working before !?!
I used your mailet since your commit and they worked but it was no more
working and I have not found what is changed (maybe the jdk?).
Stefano
Author: bago
Date: Wed Aug 31 12:33:11 2005
New Revision: 265559
URL: http://svn.apache.org/viewcvs?rev=265559&view=rev
Log:
Fixed a bug compiling this mailet with latest jdks. The
bayesian mailet does extend this class with its own anonymous
inner class and the this.getClass() was returning the name of
the anonymous class (e.g: ClassName$2).
Modified:
james/server/trunk/src/java/org/apache/james/util/JDBCBayesian
Analyzer.java
[...]
- sqlQueries.init(this.sqlFile,
this.getClass().getName(), conn, getSqlParameters());
+ sqlQueries.init(this.sqlFile,
+ JDBCBayesianAnalyzer.class.getName() , conn, getSqlParameters());
---------------------------------------------------------------------
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]