From 8eee26015f63d7441e1626562e5dcd72636acce1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Westk=C3=A4mper?= Date: Thu, 2 Apr 2009 07:41:04 +0000 Subject: [PATCH] --- .../java/com/mysema/query/grammar/Ops.java | 6 ++--- .../mysema/query/grammar/types/Operation.java | 22 +++++-------------- 2 files changed, 9 insertions(+), 19 deletions(-) diff --git a/querydsl-core/src/main/java/com/mysema/query/grammar/Ops.java b/querydsl-core/src/main/java/com/mysema/query/grammar/Ops.java index 355e67896..ffe42c94e 100644 --- a/querydsl-core/src/main/java/com/mysema/query/grammar/Ops.java +++ b/querydsl-core/src/main/java/com/mysema/query/grammar/Ops.java @@ -37,13 +37,13 @@ public interface Ops { public static class Op{ private final List> types; public Op(Class type){ - this.types = unmodifiableList(Collections.>singletonList(type)); + this(Collections.>singletonList(type)); } public Op(Class... types){ - this.types = unmodifiableList(Arrays.>asList(types)); + this(Arrays.>asList(types)); } public Op(List> types){ - this.types = types; + this.types = unmodifiableList(types); } public List> getTypes(){ return types; diff --git a/querydsl-core/src/main/java/com/mysema/query/grammar/types/Operation.java b/querydsl-core/src/main/java/com/mysema/query/grammar/types/Operation.java index 7f6e01511..920914fb7 100644 --- a/querydsl-core/src/main/java/com/mysema/query/grammar/types/Operation.java +++ b/querydsl-core/src/main/java/com/mysema/query/grammar/types/Operation.java @@ -35,8 +35,7 @@ public interface Operation { private final List> args; private final Op op; public OBoolean(Op op, Expr... args){ - this.op = op; - this.args = unmodifiableList(asList(args)); + this(op, asList(args)); } public OBoolean(Op op, List> args){ this.op = op; @@ -50,9 +49,7 @@ public interface Operation { private final List> args; private final Op op; public OComparable(Class type, Op op, Expr... args){ - super(type); - this.op = op; - this.args = unmodifiableList(asList(args)); + this(type, op, asList(args)); } public OComparable(Class type, Op op, List> args){ super(type); @@ -67,9 +64,7 @@ public interface Operation { private final List> args; private final Op op; public ONumber(Class type, Op op, Expr... args){ - super(type); - this.op = op; - this.args = unmodifiableList(asList(args)); + this(type, op, asList(args)); } public ONumber(Class type, Op op, List> args){ super(type); @@ -84,9 +79,7 @@ public interface Operation { private final List> args; private final Op op; public OSimple(Class type, Op op, Expr... args){ - super(type); - this.op = op; - this.args = unmodifiableList(asList(args)); + this(type, op, asList(args)); } public OSimple(Class type, Op op, List> args){ super(type); @@ -101,8 +94,7 @@ public interface Operation { private final List> args; private final Op op; public OString(Op op, Expr... args){ - this.op = op; - this.args = unmodifiableList(asList(args)); + this(op, asList(args)); } public OString(Op op, List> args){ this.op = op; @@ -116,9 +108,7 @@ public interface Operation { private final List> args; private final Op op; public OStringArray(Op op, Expr... args){ - super(null); - this.op = op; - this.args = unmodifiableList(asList(args)); + this(op, asList(args)); } public OStringArray(Op op, List> args){ super(null);