code: public static Object resolveUnderlyingObject(Object obj) {
      while(obj instanceof Decorator) {
        obj = ((Decorator)obj).getDecoratedObject();
      }
      return obj;
    }
docs: Resolves the truly underlying object in a possible chain of {@link org.apache.gobblin.util.Decorator}.
  
  @param obj object to resolve.
  @return the true non-decorator underlying object.