[GitHub] flink pull request #2328: [hotfix] Fix TypeExtractor.

2016-08-03 Thread chermenin
Github user chermenin closed the pull request at:

https://github.com/apache/flink/pull/2328


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] flink pull request #2328: [hotfix] Fix TypeExtractor.

2016-08-03 Thread chermenin
GitHub user chermenin opened a pull request:

https://github.com/apache/flink/pull/2328

[hotfix] Fix TypeExtractor.

When function is a method reference to an instance method of an arbitrary 
object of a particular type it hasn't any parameters and getting of input type 
throws exception.

For example this code

```
environment.fromElements(1, 2, 3, 4, 5).map(Object::toString).print();
```

throws exception: 

```
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: -1
at 
org.apache.flink.api.java.typeutils.TypeExtractor.getUnaryOperatorReturnType(TypeExtractor.java:350)
at 
org.apache.flink.api.java.typeutils.TypeExtractor.getUnaryOperatorReturnType(TypeExtractor.java:304)
at 
org.apache.flink.api.java.typeutils.TypeExtractor.getMapReturnTypes(TypeExtractor.java:119)
at org.apache.flink.api.java.DataSet.map(DataSet.java:215)
at ru.chermenin.flink.task.TestTask.main(TestTask.java:14)
```

but this is executed normally:

```
environment.fromElements(1, 2, 3, 4, 5).map(i -> i.toString()).print();
```

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/chermenin/flink master

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/flink/pull/2328.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #2328


commit e5ca7a91e954043d8c217810b2004825ce68ee5e
Author: Alex Chermenin 
Date:   2016-08-03T07:34:21Z

[hotfix] Fix TypeExtractor.

When function is a method reference to an instance method of an arbitrary 
object of a particular type it hasn't any parameters and getting of input type 
throws exception.




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---