Yes I can also make it follow the builder pattern strictly.

On 02/06/2013 02:47 PM, James Taylor wrote:
>
> In src/main/java/com/salesforce/phoenix/expression/LiteralExpression.java:
>
> > @@ -110,7 +112,7 @@ public static LiteralExpression newConstant(Object value, PDataType type) throws
> >              }
> >              return new LiteralExpression(value, type, b);
> >          } catch (IllegalDataException e) {
> > -            throw new SQLException(e);
> > +            throw SQLExceptionInfo.getNewInfoObject(SQLExceptionCodeEnum.ILLEGAL_DATA).genWrappedException(e);
>
> How about we follow the builder pattern here. So genWrappedException 
> -> build and SQLException has an inner Builder class, so 
> SQLExceptionInfo.getNewInfoObject -> new SQLException.Builder(). So 
> the line would look like this:
> new 
> SQLExceptionInfo.Builder(e).setCode(SQLExceptionCodeEnum.ILLEGAL_DATA).build();
>
> —
> Reply to this email directly or view it on GitHub 
> <https://github.com/forcedotcom/phoenix/pull/35/files#r2918849>.
>