teratail header banner
teratail header banner
質問するログイン新規登録

回答編集履歴

1

判定の間違え

2015/09/11 02:47

投稿

anonymouskawa
anonymouskawa

スコア856

answer CHANGED
@@ -46,7 +46,7 @@
46
46
  try {
47
47
  Class<Test> clazz = Test.class;
48
48
 
49
- if (clazz.getInterfaces() != null || clazz.getInterfaces().length > 0) {
49
+ if (clazz.getInterfaces() != null && clazz.getInterfaces().length > 0) {
50
50
  for (Class<?> inf : clazz.getInterfaces()) {
51
51
  Method[] mets = inf.getDeclaredMethods();
52
52
  for (Method met : mets) {