Skip to content

Commit

Permalink
fix: 如果一个ioc bean声明了factory,那么type的声明就没有意义啦
Browse files Browse the repository at this point in the history
Signed-off-by: wendal chen <wendal1985@gmail.com>
  • Loading branch information
wendal committed Aug 19, 2016
1 parent 722a2e0 commit a591197
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/org/nutz/ioc/impl/NutIoc.java
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ public <T> T get(Class<T> type, String name, IocContext context) throws IocExcep
}

// 修正对象类型
if (null == iobj.getType())
if (null == iobj.getType() && Strings.isBlank(iobj.getFactory()))
if (null == type)
throw new IocException(name, "NULL TYPE object '%s'", name);
else
Expand Down

0 comments on commit a591197

Please sign in to comment.