forked from errai/errai
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed ERRAI-794: @mapsto parameter order no longer affects back refer…
…ence resolution
- Loading branch information
Showing
16 changed files
with
603 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
97 changes: 97 additions & 0 deletions
97
errai-bus/src/test/java/org/jboss/errai/bus/client/tests/support/Outer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
package org.jboss.errai.bus.client.tests.support; | ||
|
||
import java.util.List; | ||
|
||
import org.jboss.errai.common.client.api.annotations.MapsTo; | ||
import org.jboss.errai.common.client.api.annotations.Portable; | ||
|
||
@Portable | ||
public class Outer { | ||
private final Nested key; | ||
private final List<Nested> keys; | ||
|
||
public Outer(@MapsTo("keys") List<Nested> _keys, @MapsTo("key") Nested _key) { | ||
this.key = _key; | ||
this.keys = _keys; | ||
} | ||
|
||
@Portable | ||
public static class Nested { | ||
private final String value; | ||
|
||
public Nested(@MapsTo("value") String value) { | ||
this.value = value; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "Nested [value=" + value + "]"; | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
final int prime = 31; | ||
int result = 1; | ||
result = prime * result + ((value == null) ? 0 : value.hashCode()); | ||
return result; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object obj) { | ||
if (this == obj) | ||
return true; | ||
if (obj == null) | ||
return false; | ||
if (getClass() != obj.getClass()) | ||
return false; | ||
Nested other = (Nested) obj; | ||
if (value == null) { | ||
if (other.value != null) | ||
return false; | ||
} | ||
else if (!value.equals(other.value)) | ||
return false; | ||
return true; | ||
} | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "Outer [key=" + key + ", keys=" + keys + "]"; | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
final int prime = 31; | ||
int result = 1; | ||
result = prime * result + ((key == null) ? 0 : key.hashCode()); | ||
result = prime * result + ((keys == null) ? 0 : keys.hashCode()); | ||
return result; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object obj) { | ||
if (this == obj) | ||
return true; | ||
if (obj == null) | ||
return false; | ||
if (getClass() != obj.getClass()) | ||
return false; | ||
Outer other = (Outer) obj; | ||
if (key == null) { | ||
if (other.key != null) | ||
return false; | ||
} | ||
else if (!key.equals(other.key)) | ||
return false; | ||
if (keys == null) { | ||
if (other.keys != null) | ||
return false; | ||
} | ||
else if (!keys.equals(other.keys)) | ||
return false; | ||
return true; | ||
} | ||
|
||
|
||
} |
97 changes: 97 additions & 0 deletions
97
errai-bus/src/test/java/org/jboss/errai/bus/client/tests/support/Outer2.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
package org.jboss.errai.bus.client.tests.support; | ||
|
||
import java.util.List; | ||
|
||
import org.jboss.errai.common.client.api.annotations.MapsTo; | ||
import org.jboss.errai.common.client.api.annotations.Portable; | ||
|
||
@Portable | ||
public class Outer2 { | ||
private final Nested key; | ||
private final List<Nested> keys; | ||
|
||
public Outer2(@MapsTo("key") Nested key, @MapsTo("keys") List<Nested> keys) { | ||
this.key = key; | ||
this.keys = keys; | ||
} | ||
|
||
@Portable | ||
public static class Nested { | ||
private final String value; | ||
|
||
public Nested(@MapsTo("value") String value) { | ||
this.value = value; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "Nested [value=" + value + "]"; | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
final int prime = 31; | ||
int result = 1; | ||
result = prime * result + ((value == null) ? 0 : value.hashCode()); | ||
return result; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object obj) { | ||
if (this == obj) | ||
return true; | ||
if (obj == null) | ||
return false; | ||
if (getClass() != obj.getClass()) | ||
return false; | ||
Nested other = (Nested) obj; | ||
if (value == null) { | ||
if (other.value != null) | ||
return false; | ||
} | ||
else if (!value.equals(other.value)) | ||
return false; | ||
return true; | ||
} | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "Outer [key=" + key + ", keys=" + keys + "]"; | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
final int prime = 31; | ||
int result = 1; | ||
result = prime * result + ((key == null) ? 0 : key.hashCode()); | ||
result = prime * result + ((keys == null) ? 0 : keys.hashCode()); | ||
return result; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object obj) { | ||
if (this == obj) | ||
return true; | ||
if (obj == null) | ||
return false; | ||
if (getClass() != obj.getClass()) | ||
return false; | ||
Outer2 other = (Outer2) obj; | ||
if (key == null) { | ||
if (other.key != null) | ||
return false; | ||
} | ||
else if (!key.equals(other.key)) | ||
return false; | ||
if (keys == null) { | ||
if (other.keys != null) | ||
return false; | ||
} | ||
else if (!keys.equals(other.keys)) | ||
return false; | ||
return true; | ||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.