Skip to content

Commit

Permalink
针对对象属性取值加了null值判断,防止出现空指针的异常出现
Browse files Browse the repository at this point in the history
  • Loading branch information
youseries committed Apr 12, 2018
1 parent 10269cc commit a3061b9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ureport2-core/src/main/java/com/bstek/ureport/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ private static List<Cell> fetchCellsByTopParent(Context context,Cell cell,String
}

public static Object getProperty(Object obj,String property){
if(obj==null)return null;
try{
if(obj instanceof Map && property.indexOf(".")==-1){
Map<?,?> map=(Map<?,?>)obj;
Expand Down

0 comments on commit a3061b9

Please sign in to comment.