[
https://issues.apache.org/jira/browse/FLINK-2437?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14647856#comment-14647856
]
ASF GitHub Bot commented on FLINK-2437:
---------------------------------------
GitHub user ggevay opened a pull request:
https://github.com/apache/flink/pull/960
[FLINK-2437] Fix default constructor detection in TypeExtractor.analyzePojo
- handle the case of a non-public default constructor
- added a missing "return null"
- removed some duplicating of the word "class" when printing class
names, because class.toString also prepends it to the class name
- fixed a typo in the documentation describing POJOs
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/ggevay/flink analyzePojoFix
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/flink/pull/960.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 #960
----
commit 7131c04ddc7ebce0b69bca1464c8312105ff9d92
Author: Gabor Gevay <[email protected]>
Date: 2015-07-30T15:38:43Z
[FLINK-2437] Fix default constructor detection in TypeExtractor.analyzePojo
- handle the case of a non-public default constructor
- added a missing "return null"
- removed some duplicating of the word "class" when printing class
names, because class.toString also prepends it to the class name
- fixed a typo in the documentation describing POJOs
----
> TypeExtractor.analyzePojo has some problems around the default constructor
> detection
> ------------------------------------------------------------------------------------
>
> Key: FLINK-2437
> URL: https://issues.apache.org/jira/browse/FLINK-2437
> Project: Flink
> Issue Type: Bug
> Components: Type Serialization System
> Reporter: Gabor Gevay
> Assignee: Gabor Gevay
> Priority: Minor
>
> If a class does have a default constructor, but the user forgot to make it
> public, then TypeExtractor.analyzePojo still thinks everything is OK, so it
> creates a PojoTypeInfo. Then PojoSerializer.createInstance blows up.
> Furthermore, a "return null" seems to be missing from the then case of the if
> after catching the NoSuchMethodException which would also cause a headache
> for PojoSerializer.
> An additional minor issue is that the word "class" is printed twice in
> several places, because class.toString also prepends it to the class name.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)