リビジョン | 2621 (tree) |
---|---|
日時 | 2023-12-13 23:46:33 |
作者 | t_nakayama1971 |
(メッセージはありません)
@@ -76,7 +76,9 @@ | ||
76 | 76 | * is <code>null</code> |
77 | 77 | */ |
78 | 78 | public ChainBase(final Command<K, V, C> command) { |
79 | - addCommand(command); | |
79 | + if (command != null) { | |
80 | + this.commands.add(command); | |
81 | + } | |
80 | 82 | } |
81 | 83 | |
82 | 84 | /** |
@@ -92,7 +94,9 @@ | ||
92 | 94 | public ChainBase(final Command<K, V, C>... cmds) { |
93 | 95 | if (cmds != null) { |
94 | 96 | for (final Command<K, V, C> command : cmds) { |
95 | - addCommand(command); | |
97 | + if (command != null) { | |
98 | + this.commands.add(command); | |
99 | + } | |
96 | 100 | } |
97 | 101 | } |
98 | 102 | } |
@@ -110,7 +114,9 @@ | ||
110 | 114 | public ChainBase(final Collection<Command<K, V, C>> cmds) { |
111 | 115 | if (cmds != null) { |
112 | 116 | for (final Command<K, V, C> command : cmds) { |
113 | - addCommand(command); | |
117 | + if (command != null) { | |
118 | + this.commands.add(command); | |
119 | + } | |
114 | 120 | } |
115 | 121 | } |
116 | 122 | } |