Skip to content

Commit

Permalink
[FLINK-3430] Remove "no POJO" warning in TypeAnalyzer
Browse files Browse the repository at this point in the history
This closes apache#1655
  • Loading branch information
aljoscha authored and StephanEwen committed Feb 17, 2016
1 parent a4e8fcb commit cee135a
Showing 1 changed file with 0 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,6 @@ private[flink] trait TypeAnalyzer[C <: Context] { this: MacroContextHolder[C]
val immutableFields = tpe.members filter { _.isTerm } map { _.asTerm } filter { _.isVal }
if (immutableFields.nonEmpty) {
// We don't support POJOs with immutable fields
c.warning(
c.enclosingPosition,
s"Type $tpe is no POJO, has immutable fields: ${immutableFields.mkString(", ")}.")
return GenericClassDescriptor(id, tpe)
}

Expand All @@ -180,8 +177,6 @@ private[flink] trait TypeAnalyzer[C <: Context] { this: MacroContextHolder[C]
}

if (invalidFields.nonEmpty) {
c.warning(c.enclosingPosition, s"Type $tpe is no POJO because it has non-public fields '" +
s"${invalidFields.mkString(", ")}' that don't have public getters/setters.")
return GenericClassDescriptor(id, tpe)
}

Expand All @@ -194,9 +189,6 @@ private[flink] trait TypeAnalyzer[C <: Context] { this: MacroContextHolder[C]

if (!hasZeroCtor) {
// We don't support POJOs without zero-paramter ctor
c.warning(
c.enclosingPosition,
s"Class $tpe is no POJO, has no zero-parameters constructor.")
return GenericClassDescriptor(id, tpe)
}

Expand Down

0 comments on commit cee135a

Please sign in to comment.