Problems compiling Log4jME

David Vrabel dv207@hermes.cam.ac.uk
Wed Sep 26 07:55:00 GMT 2001


Hi,
I encountered two bugs trying to compile Log4jME ( http://qos.ch/ ) with GCJ
3.0.
1. If an abstract class (AppenderSkeleton) implements an interface
(Appender) abstract methods not explictly declared (in AppenderSkeleton)
are not synthesized (as abstract methods).
eg. (not tested)
A.java:
interface A {
 public void f();
}
B.java
public abtract class B {
 public void g() {
 f();
 }
}
Won't compile as f() can't be found. But if B.java is
public abstract class B {
 public void g() {
 f();
 }
 public abstract void f();
}
it works fine.
2. This one's a bit freaky. Priority.java will cause gcj to eat all
memory and die.
Removing the code
 ...
 switch(val) {
 case ALL_INT: return ALL;
 case DEBUG_INT: return DEBUG;
 case INFO_INT: return INFO;
 case WARN_INT: return WARN;
 case ERROR_INT: return ERROR;
 case FATAL_INT: return FATAL;
 case OFF_INT: return OFF;
 default: return defaultPriority;
 }
 ...
and replacing it with
 if( val == ALL_INT ) return ALL;
 ... etc.
Results in the file compiling fine.
Sorry about the lack of test case. But I'm leaving this job to go back to
university on Friday and I haven't got time to put together a test case.
David Vrabel


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /