class Embulk::DataError

def initialize(*arguments)

when +DataError.new+ is called with an unexpected argument.
raises an unexpected Error: org.jruby.exceptions.ArgumentError
However, +DataError.new+ now accepts any argument undesirably. It

to call an appropriate superclass constructor for each.
allows DataError.new() and DataError.new(String)
calls the superclass constructor with +super+ (without parenthesis). It
receives only a variable-length argument list (*arguments), and
To keep compatibility from caller's viewpoint, +DataError.initialize+

no longer accepted in JRuby 9.3+.
multiple +super+ calls in it. Switching the superclass constructor is
On the other hand, JRuby 9.3+ does not allow +initialize+ to contain

then, +DataError+ can have only a single +initialize+ method.
+message+. It was because Ruby does not allow method overloading, and
or super(String) (ConfigException(String)) based on
It switched over to call super() (ConfigException()),
It was DataError.initialize(message=nil) before v0.10.38.

as of JRuby 9.3.
(rest parameters) since \Embulk v0.10.38. It is to satisfy restrictions
+DataError.initialize+ receives only a variable-length argument list

==== History

- https://github.com/jruby/jruby/issues/7221
- https://github.com/jruby/jruby/wiki/CallingJavaFromJRuby#subclassing-a-java-class
See also:

a full Java class as of JRuby 9.3, which introduced some restrictions.
been like this since \Embulk v0.10.38 because a subclass of a Java class is
It raises Error: org.jruby.exceptions.Argument otherwise. It has
accepts only DataError.new() and DataError.new(String).
The signature of +DataError.new+ accepts any argument. But in fact, it

Returns the new +DataError+ object.

DataError.new(string)
DataError.new()
:call-seq:
def initialize(*arguments)
  super
end