You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by km...@apache.org on 2008/01/29 22:56:12 UTC
svn commit: r616531 - in
/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/exp/parser:
ASTAnd.java ASTOr.java ASTSubtract.java
Author: kmenard
Date: Tue Jan 29 13:56:09 2008
New Revision: 616531
URL: http://svn.apache.org/viewvc?rev=616531&view=rev
Log:
Generics.
Modified:
cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/exp/parser/ASTAnd.java
cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/exp/parser/ASTOr.java
cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/exp/parser/ASTSubtract.java
Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/exp/parser/ASTAnd.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/exp/parser/ASTAnd.java?rev=616531&r1=616530&r2=616531&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/exp/parser/ASTAnd.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/exp/parser/ASTAnd.java Tue Jan 29 13:56:09 2008
@@ -53,12 +53,12 @@
connectChildren();
}
- public ASTAnd(Collection nodes) {
+ public ASTAnd(Collection<Node> nodes) {
super(ExpressionParserTreeConstants.JJTAND);
int len = nodes.size();
- Iterator it = nodes.iterator();
+ Iterator<Node> it = nodes.iterator();
for (int i = 0; i < len; i++) {
- jjtAddChild((Node) it.next(), i);
+ jjtAddChild(it.next(), i);
}
connectChildren();
Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/exp/parser/ASTOr.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/exp/parser/ASTOr.java?rev=616531&r1=616530&r2=616531&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/exp/parser/ASTOr.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/exp/parser/ASTOr.java Tue Jan 29 13:56:09 2008
@@ -49,12 +49,12 @@
connectChildren();
}
- public ASTOr(Collection nodes) {
+ public ASTOr(Collection<Node> nodes) {
super(ExpressionParserTreeConstants.JJTOR);
int len = nodes.size();
- Iterator it = nodes.iterator();
+ Iterator<Node> it = nodes.iterator();
for (int i = 0; i < len; i++) {
- jjtAddChild((Node) it.next(), i);
+ jjtAddChild(it.next(), i);
}
connectChildren();
}
Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/exp/parser/ASTSubtract.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/exp/parser/ASTSubtract.java?rev=616531&r1=616530&r2=616531&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/exp/parser/ASTSubtract.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/exp/parser/ASTSubtract.java Tue Jan 29 13:56:09 2008
@@ -51,10 +51,10 @@
connectChildren();
}
- public ASTSubtract(Collection nodes) {
+ public ASTSubtract(Collection<Object> nodes) {
super(ExpressionParserTreeConstants.JJTSUBTRACT);
int len = nodes.size();
- Iterator it = nodes.iterator();
+ Iterator<Object> it = nodes.iterator();
for (int i = 0; i < len; i++) {
jjtAddChild(wrapChild(it.next()), i);
}
Re: svn commit: r616531 - in /cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/exp/parser: ASTAnd.java ASTOr.java ASTSubtract.java
Posted by Andrus Adamchik <an...@objectstyle.org>.
IIRC the last case can take non-Node objects (e.g. Integers)... But I
could be wrong.
Andrus
On Jan 30, 2008, at 12:04 AM, Aristedes Maniatis wrote:
>
> On 30/01/2008, at 8:56 AM, kmenard@apache.org wrote:
>
>> + public ASTAnd(Collection<Node> nodes) {
>>
>> + public ASTOr(Collection<Node> nodes) {
>>
>> + public ASTSubtract(Collection<Object> nodes) {
>
> I haven't studied the code, but is that right? Should they be more
> consistently all Object or all Node?
>
> Ari
>
>
> -------------------------->
> Aristedes Maniatis
> phone +61 2 9660 9700
> PGP fingerprint 08 57 20 4B 80 69 59 E2 A9 BF 2D 48 C2 20 0C C8
>
>
>
Re: svn commit: r616531 - in
/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/
apache/cayenne/exp/parser: ASTAnd.java ASTOr.java ASTSubtract.java
Posted by Kevin Menard <km...@servprise.com>.
Well, the types were tool generated. The one thing I did miss is using
wildcards on these types though. I've been manually inspecting each one and
applying wildcards to public methods on public classes. I'll fix that.
--
Kevin
On 1/29/08 5:04 PM, "Aristedes Maniatis" <ar...@maniatis.org> wrote:
>
> On 30/01/2008, at 8:56 AM, kmenard@apache.org wrote:
>
>> + public ASTAnd(Collection<Node> nodes) {
>>
>> + public ASTOr(Collection<Node> nodes) {
>>
>> + public ASTSubtract(Collection<Object> nodes) {
>
> I haven't studied the code, but is that right? Should they be more
> consistently all Object or all Node?
>
> Ari
>
>
> -------------------------->
> Aristedes Maniatis
> phone +61 2 9660 9700
> PGP fingerprint 08 57 20 4B 80 69 59 E2 A9 BF 2D 48 C2 20 0C C8
>
>
Re: svn commit: r616531 - in /cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/exp/parser: ASTAnd.java ASTOr.java ASTSubtract.java
Posted by Aristedes Maniatis <ar...@maniatis.org>.
On 30/01/2008, at 8:56 AM, kmenard@apache.org wrote:
> + public ASTAnd(Collection<Node> nodes) {
>
> + public ASTOr(Collection<Node> nodes) {
>
> + public ASTSubtract(Collection<Object> nodes) {
I haven't studied the code, but is that right? Should they be more
consistently all Object or all Node?
Ari
-------------------------->
Aristedes Maniatis
phone +61 2 9660 9700
PGP fingerprint 08 57 20 4B 80 69 59 E2 A9 BF 2D 48 C2 20 0C C8