FindBugs-1.0.0-rc1
結構ディテクタが増えているなぁ。CVS見てると正式版までには、もう少し増えそうだし。まいった。とりあえずメッセージファイルの翻訳版を送っておいた。
今回見つけたバグパターンで面白かったのは、これ。
public class Test {
public static void foo(Object ... data) {
for (int i = 0; i < data.length; i++) {
System.out.println(data[i]);
}
}
public static void bar(int ... data) {
for (int i = 0; i < data.length; i++) {
System.out.println(data[i]);
}
}
public static void main(String args[]) {
foo(1, 2, 3);
bar(1, 2, 3);
foo(new int[] {1, 2, 3});
bar(new int[] {1, 2, 3});
}
}
どんな結果になるかはやってみてのお楽しみ。まぁ可変引数の仕組みを考えれば当然なのだけど。
EJB 3.0 QL
JavaEE 5 Tutorialから引用。
---
There are two types of numeric literals: exact and approximate.
An exact numeric literal is a numeric value without a decimal point, such as 65, -
233, and +12. Using the Java integer syntax, exact numeric literals support numbers
in the range of a Java long.
An approximate numeric literal is a numeric value in scientific notation, such as
57., -85.7, and +2.1. Using the syntax of the Java floating-point literal, approximate
numeric literals support numbers in the range of a Java double.
---
BigDecimalは無いのか。それでサンプルでは給料がdoubleというアバンギャルドな実装になっているのか...
低消費電力Athlon x2
次は、デスクトップもCore duoでCerelon 300A以来のIntelかなんて思っていたんだけど、PentiumMの時と同様マザーが高い。メモリが2GBしか乗らないやつなら、そこそこなんだけど、4GB乗るやつだと3万をこえる。
模様眺めをしていたら低消費電力版Athlon 64x2なんてのが出てきた。65Wでも十分だな。マザーが安かったら、またAMDかも。





