You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by GitBox <gi...@apache.org> on 2019/02/13 20:38:08 UTC
[GitHub] vlsi commented on issue #1042: Avoid use of new RuntimeException(e)
in tests
vlsi commented on issue #1042: Avoid use of new RuntimeException(e) in tests
URL: https://github.com/apache/calcite/pull/1042#issuecomment-463359370
Just in case, `calcite-core` has plenty of `RuntimeException(Throwable)` uses:
Here's what forbiddenapis reports for `java.lang.RuntimeException#<init>(java.lang.Throwable)`:
```
[ERROR] Forbidden method invocation: java.lang.RuntimeException#<init>(java.lang.Throwable) [RuntimeException]
[ERROR] in org.apache.calcite.runtime.SocketFactoryImpl (SocketFactoryImpl.java:120)
[ERROR] Forbidden method invocation: java.lang.RuntimeException#<init>(java.lang.Throwable) [RuntimeException]
[ERROR] in org.apache.calcite.tools.RelRunners (RelRunners.java:36)
[ERROR] Forbidden method invocation: java.lang.RuntimeException#<init>(java.lang.Throwable) [RuntimeException]
[ERROR] in org.apache.calcite.runtime.SqlFunctions (SqlFunctions.java:2719)
[ERROR] Forbidden method invocation: java.lang.RuntimeException#<init>(java.lang.Throwable) [RuntimeException]
[ERROR] in org.apache.calcite.adapter.enumerable.RexToLixTranslator (RexToLixTranslator.java:110)
[ERROR] Forbidden method invocation: java.lang.RuntimeException#<init>(java.lang.Throwable) [RuntimeException]
[ERROR] in org.apache.calcite.tools.Frameworks (Frameworks.java:159)
[ERROR] Forbidden method invocation: java.lang.RuntimeException#<init>(java.lang.Throwable) [RuntimeException]
[ERROR] in org.apache.calcite.runtime.ResultSetEnumerable$ResultSetEnumerator (ResultSetEnumerable.java:372)
[ERROR] Forbidden method invocation: java.lang.RuntimeException#<init>(java.lang.Throwable) [RuntimeException]
[ERROR] in org.apache.calcite.runtime.ResultSetEnumerable$ResultSetEnumerator (ResultSetEnumerable.java:380)
[ERROR] Forbidden method invocation: java.lang.RuntimeException#<init>(java.lang.Throwable) [RuntimeException]
[ERROR] in org.apache.calcite.jdbc.CalciteConnectionImpl$ContextImpl (CalciteConnectionImpl.java:523)
[ERROR] Forbidden method invocation: java.lang.RuntimeException#<init>(java.lang.Throwable) [RuntimeException]
[ERROR] in org.apache.calcite.jdbc.CalciteConnectionImpl$ContextImpl (CalciteConnectionImpl.java:548)
[ERROR] Forbidden method invocation: java.lang.RuntimeException#<init>(java.lang.Throwable) [RuntimeException]
[ERROR] in org.apache.calcite.adapter.jdbc.JdbcUtils$DialectPool (JdbcUtils.java:97)
[ERROR] Forbidden method invocation: java.lang.RuntimeException#<init>(java.lang.Throwable) [RuntimeException]
[ERROR] in org.apache.calcite.interpreter.TableScanNode (TableScanNode.java:153)
[ERROR] Forbidden method invocation: java.lang.RuntimeException#<init>(java.lang.Throwable) [RuntimeException]
[ERROR] in org.apache.calcite.util.Util (Util.java:469)
[ERROR] Forbidden method invocation: java.lang.RuntimeException#<init>(java.lang.Throwable) [RuntimeException]
[ERROR] in org.apache.calcite.jdbc.CalciteMetaImpl (CalciteMetaImpl.java:174)
[ERROR] Forbidden method invocation: java.lang.RuntimeException#<init>(java.lang.Throwable) [RuntimeException]
[ERROR] in org.apache.calcite.jdbc.CalciteMetaImpl (CalciteMetaImpl.java:214)
[ERROR] Forbidden method invocation: java.lang.RuntimeException#<init>(java.lang.Throwable) [RuntimeException]
[ERROR] in org.apache.calcite.jdbc.CalciteMetaImpl (CalciteMetaImpl.java:349)
[ERROR] Forbidden method invocation: java.lang.RuntimeException#<init>(java.lang.Throwable) [RuntimeException]
[ERROR] in org.apache.calcite.jdbc.CalciteMetaImpl (CalciteMetaImpl.java:571)
[ERROR] Forbidden method invocation: java.lang.RuntimeException#<init>(java.lang.Throwable) [RuntimeException]
[ERROR] in org.apache.calcite.runtime.ResultSetEnumerable (ResultSetEnumerable.java:414)
[ERROR] Forbidden method invocation: java.lang.RuntimeException#<init>(java.lang.Throwable) [RuntimeException]
[ERROR] in org.apache.calcite.runtime.ResultSetEnumerable (ResultSetEnumerable.java:422)
[ERROR] Forbidden method invocation: java.lang.RuntimeException#<init>(java.lang.Throwable) [RuntimeException]
[ERROR] in org.apache.calcite.runtime.ResultSetEnumerable (ResultSetEnumerable.java:435)
[ERROR] Forbidden method invocation: java.lang.RuntimeException#<init>(java.lang.Throwable) [RuntimeException]
[ERROR] in org.apache.calcite.runtime.ResultSetEnumerable (ResultSetEnumerable.java:90)
[ERROR] Forbidden method invocation: java.lang.RuntimeException#<init>(java.lang.Throwable) [RuntimeException]
[ERROR] in org.apache.calcite.runtime.ResultSetEnumerable (ResultSetEnumerable.java:112)
[ERROR] Forbidden method invocation: java.lang.RuntimeException#<init>(java.lang.Throwable) [RuntimeException]
[ERROR] in org.apache.calcite.runtime.ResultSetEnumerable (ResultSetEnumerable.java:83)
[ERROR] Forbidden method invocation: java.lang.RuntimeException#<init>(java.lang.Throwable) [RuntimeException]
[ERROR] in org.apache.calcite.interpreter.AggregateNode$UdaAccumulator (AggregateNode.java:625)
[ERROR] Forbidden method invocation: java.lang.RuntimeException#<init>(java.lang.Throwable) [RuntimeException]
[ERROR] in org.apache.calcite.interpreter.AggregateNode$UdaAccumulator (AggregateNode.java:640)
[ERROR] Forbidden method invocation: java.lang.RuntimeException#<init>(java.lang.Throwable) [RuntimeException]
[ERROR] in org.apache.calcite.interpreter.AggregateNode$UdaAccumulator (AggregateNode.java:653)
[ERROR] Forbidden method invocation: java.lang.RuntimeException#<init>(java.lang.Throwable) [RuntimeException]
[ERROR] in org.apache.calcite.materialize.CachingLatticeStatisticProvider (CachingLatticeStatisticProvider.java:54)
[ERROR] Forbidden method invocation: java.lang.RuntimeException#<init>(java.lang.Throwable) [RuntimeException]
[ERROR] in org.apache.calcite.schema.impl.TableFunctionImpl (TableFunctionImpl.java:161)
[ERROR] Forbidden method invocation: java.lang.RuntimeException#<init>(java.lang.Throwable) [RuntimeException]
[ERROR] in org.apache.calcite.util.Closer (Closer.java:44)
[ERROR] Forbidden method invocation: java.lang.RuntimeException#<init>(java.lang.Throwable) [RuntimeException]
[ERROR] in org.apache.calcite.interpreter.JaninoRexCompiler (JaninoRexCompiler.java:155)
[ERROR] Forbidden method invocation: java.lang.RuntimeException#<init>(java.lang.Throwable) [RuntimeException]
[ERROR] in org.apache.calcite.adapter.jdbc.JdbcUtils$ObjectArrayRowBuilder (JdbcUtils.java:137)
[ERROR] Forbidden method invocation: java.lang.RuntimeException#<init>(java.lang.Throwable) [RuntimeException]
[ERROR] in org.apache.calcite.adapter.jdbc.JdbcUtils$ObjectArrayRowBuilder (JdbcUtils.java:150)
[ERROR] Forbidden method invocation: java.lang.RuntimeException#<init>(java.lang.Throwable) [RuntimeException]
[ERROR] in org.apache.calcite.sql.pretty.SqlPrettyWriter$Bean (SqlPrettyWriter.java:1134)
[ERROR] Forbidden method invocation: java.lang.RuntimeException#<init>(java.lang.Throwable) [RuntimeException]
[ERROR] in org.apache.calcite.sql.pretty.SqlPrettyWriter$Bean (SqlPrettyWriter.java:1144)
[ERROR] Forbidden method invocation: java.lang.RuntimeException#<init>(java.lang.Throwable) [RuntimeException]
[ERROR] in org.apache.calcite.sql.parser.impl.SqlParserImpl (SqlParserImpl.java:24740)
[ERROR] Forbidden method invocation: java.lang.RuntimeException#<init>(java.lang.Throwable) [RuntimeException]
[ERROR] in org.apache.calcite.sql.parser.impl.SqlParserImpl (SqlParserImpl.java:24753)
[ERROR] Forbidden method invocation: java.lang.RuntimeException#<init>(java.lang.Throwable) [RuntimeException]
[ERROR] in org.apache.calcite.rel.metadata.MetadataFactoryImpl (MetadataFactoryImpl.java:68)
[ERROR] Forbidden method invocation: java.lang.RuntimeException#<init>(java.lang.Throwable) [RuntimeException]
[ERROR] in org.apache.calcite.util.ReflectUtil (ReflectUtil.java:261)
[ERROR] Forbidden method invocation: java.lang.RuntimeException#<init>(java.lang.Throwable) [RuntimeException]
[ERROR] in org.apache.calcite.util.ReflectUtil (ReflectUtil.java:267)
[ERROR] Forbidden method invocation: java.lang.RuntimeException#<init>(java.lang.Throwable) [RuntimeException]
[ERROR] in org.apache.calcite.jdbc.CalciteConnectionImpl (CalciteConnectionImpl.java:181)
[ERROR] Forbidden method invocation: java.lang.RuntimeException#<init>(java.lang.Throwable) [RuntimeException]
[ERROR] in org.apache.calcite.jdbc.CalciteConnectionImpl (CalciteConnectionImpl.java:282)
[ERROR] Forbidden method invocation: java.lang.RuntimeException#<init>(java.lang.Throwable) [RuntimeException]
[ERROR] in org.apache.calcite.jdbc.CalciteConnectionImpl (CalciteConnectionImpl.java:305)
[ERROR] Forbidden method invocation: java.lang.RuntimeException#<init>(java.lang.Throwable) [RuntimeException]
[ERROR] in org.apache.calcite.adapter.java.ReflectiveSchema$FieldSelector (ReflectiveSchema.java:411)
[ERROR] Forbidden method invocation: java.lang.RuntimeException#<init>(java.lang.Throwable) [RuntimeException]
[ERROR] in org.apache.calcite.schema.impl.TableMacroImpl (TableMacroImpl.java:91)
[ERROR] Forbidden method invocation: java.lang.RuntimeException#<init>(java.lang.Throwable) [RuntimeException]
[ERROR] in org.apache.calcite.rel.metadata.ChainedRelMetadataProvider$ChainedInvocationHandler (ChainedRelMetadataProvider.java:141)
[ERROR] Forbidden method invocation: java.lang.RuntimeException#<init>(java.lang.Throwable) [RuntimeException]
[ERROR] in org.apache.calcite.jdbc.CalcitePrepare$Dummy (CalcitePrepare.java:182)
[ERROR] Forbidden method invocation: java.lang.RuntimeException#<init>(java.lang.Throwable) [RuntimeException]
[ERROR] in org.apache.calcite.rel.metadata.JaninoRelMetadataProvider (JaninoRelMetadataProvider.java:465)
[ERROR] Forbidden method invocation: java.lang.RuntimeException#<init>(java.lang.Throwable) [RuntimeException]
[ERROR] in org.apache.calcite.rel.metadata.JaninoRelMetadataProvider (JaninoRelMetadataProvider.java:479)
[ERROR] Forbidden method invocation: java.lang.RuntimeException#<init>(java.lang.Throwable) [RuntimeException]
[ERROR] in org.apache.calcite.rel.externalize.RelJsonReader (RelJsonReader.java:263)
[ERROR] Forbidden method invocation: java.lang.RuntimeException#<init>(java.lang.Throwable) [RuntimeException]
[ERROR] in org.apache.calcite.rel.externalize.RelJsonReader (RelJsonReader.java:269)
[ERROR] Forbidden method invocation: java.lang.RuntimeException#<init>(java.lang.Throwable) [RuntimeException]
[ERROR] in org.apache.calcite.runtime.Resources$ExInstWithCause (Resources.java:475)
[ERROR] Forbidden method invocation: java.lang.RuntimeException#<init>(java.lang.Throwable) [RuntimeException]
[ERROR] in org.apache.calcite.runtime.Resources$ExInstWithCause (Resources.java:477)
[ERROR] Forbidden method invocation: java.lang.RuntimeException#<init>(java.lang.Throwable) [RuntimeException]
[ERROR] in org.apache.calcite.runtime.Resources$ExInstWithCause (Resources.java:479)
[ERROR] Forbidden method invocation: java.lang.RuntimeException#<init>(java.lang.Throwable) [RuntimeException]
[ERROR] in org.apache.calcite.runtime.Resources$ExInstWithCause (Resources.java:486)
[ERROR] Forbidden method invocation: java.lang.RuntimeException#<init>(java.lang.Throwable) [RuntimeException]
[ERROR] in org.apache.calcite.interpreter.AggregateNode$UdaAccumulatorFactory (AggregateNode.java:603)
[ERROR] Forbidden method invocation: java.lang.RuntimeException#<init>(java.lang.Throwable) [RuntimeException]
[ERROR] in org.apache.calcite.adapter.java.ReflectiveSchema$MethodTableMacro (ReflectiveSchema.java:356)
[ERROR] Forbidden method invocation: java.lang.RuntimeException#<init>(java.lang.Throwable) [RuntimeException]
[ERROR] in org.apache.calcite.model.ModelHandler (ModelHandler.java:216)
[ERROR] Forbidden method invocation: java.lang.RuntimeException#<init>(java.lang.Throwable) [RuntimeException]
[ERROR] in org.apache.calcite.util.javac.JaninoCompiler$AccountingClassLoader (JaninoCompiler.java:179)
[ERROR] Forbidden method invocation: java.lang.RuntimeException#<init>(java.lang.Throwable) [RuntimeException]
[ERROR] in org.apache.calcite.schema.impl.MaterializedViewTable (MaterializedViewTable.java:62)
[ERROR] Forbidden method invocation: java.lang.RuntimeException#<init>(java.lang.Throwable) [RuntimeException]
[ERROR] in org.apache.calcite.rel.metadata.ReflectiveRelMetadataProvider (ReflectiveRelMetadataProvider.java:189)
[ERROR] Forbidden method invocation: java.lang.RuntimeException#<init>(java.lang.Throwable) [RuntimeException]
[ERROR] in org.apache.calcite.sql.util.ReflectiveSqlOperatorTable (ReflectiveSqlOperatorTable.java:76)
[ERROR] Forbidden method invocation: java.lang.RuntimeException#<init>(java.lang.Throwable) [RuntimeException]
[ERROR] in org.apache.calcite.jdbc.MetadataSchema$1 (MetadataSchema.java:44)
[ERROR] Forbidden method invocation: java.lang.RuntimeException#<init>(java.lang.Throwable) [RuntimeException]
[ERROR] in org.apache.calcite.jdbc.MetadataSchema$2 (MetadataSchema.java:57)
[ERROR] Forbidden method invocation: java.lang.RuntimeException#<init>(java.lang.Throwable) [RuntimeException]
[ERROR] in org.apache.calcite.jdbc.CalciteConnectionImpl$DataContextImpl (CalciteConnectionImpl.java:456)
[ERROR] Scanned 2550 class file(s) for forbidden API invocations (in 2.83s), 63 error(s).
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services