Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Travis build and test fixes #9

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
language: java
jdk:
- openjdk8
# openjdk8 is not available on travis-ci.org yet
- oraclejdk8
- openjdk7
- oraclejdk7

sudo: false
3 changes: 2 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<groupId>org.dynalang</groupId>
<artifactId>dynalink</artifactId>
<name>Dynalink</name>
<version>0.7</version>
<version>0.8-SNAPSHOT</version>
<packaging>jar</packaging>
<description>Dynalink is an invokedynamic-based high-level linking and metaobject protocol library. It enables creation of languages on the JVM that can easily interoperate with plain Java objects and each other.</description>
<url>http://szegedi.github.com/dynalink</url>
Expand Down Expand Up @@ -129,6 +129,7 @@
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>4.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,10 @@ class OverloadedMethod {
varArgMethods = new ArrayList<>(methodHandles.size());
final int argNum = callSiteType.parameterCount();
for(MethodHandle mh: methodHandles) {
mh = mh.asType(mh.type().changeReturnType(commonRetType));
MethodType newType = mh.type().changeReturnType(commonRetType);
if (!mh.type().equals(newType)) {
mh = mh.asType(newType);
}
if(mh.isVarargsCollector()) {
final MethodHandle asFixed = mh.asFixedArity();
if(argNum == asFixed.type().parameterCount()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ public void testGetElemPropMethodOnMap() throws Throwable {
public static class HashMapWithProperty extends HashMap<Object, Object> {
private Object color;

public void setColor(Object color) {
this.color = color;
public Object setColor(Object color) {
return this.color = color;
}

public Object getColor() {
Expand Down Expand Up @@ -127,8 +127,8 @@ public void testSetPropElemOnMap() throws Throwable {
public static class ArrayListWithProperty extends ArrayList<Object> {
private Object color;

public void setColor(Object color) {
this.color = color;
public Object setColor(Object color) {
return this.color = color;
}

public Object getColor() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,21 +104,21 @@ public void testVariableNamePropertySetter() throws Throwable {
public static class T1 {
private Object foo;

public void setFoo(String foo) {
this.foo = foo;
public Object setFoo(String foo) {
return this.foo = foo;
}
}

public static class T2 {
private Object foo;
private Object bar;

public void setFoo(Object foo) {
this.foo = foo;
public Object setFoo(Object foo) {
return this.foo = foo;
}

public void setBar(Object... args) {
this.bar = args[0];
public Object setBar(Object... args) {
return this.bar = args[0];
}

public void setBar(int x) {
Expand Down