You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Chris Westin (JIRA)" <ji...@apache.org> on 2015/04/09 00:01:12 UTC

[jira] [Updated] (DRILL-2624) org.apache.drill.common.StackTrace prints garbage for line numbers

     [ https://issues.apache.org/jira/browse/DRILL-2624?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris Westin updated DRILL-2624:
--------------------------------
    Priority: Minor  (was: Major)

> org.apache.drill.common.StackTrace prints garbage for line numbers
> ------------------------------------------------------------------
>
>                 Key: DRILL-2624
>                 URL: https://issues.apache.org/jira/browse/DRILL-2624
>             Project: Apache Drill
>          Issue Type: Bug
>    Affects Versions: 0.8.0
>            Reporter: Daniel Barclay (Drill)
>            Assignee: Chris Westin
>            Priority: Minor
>
> org.apache.drill.common.StackTrace's write(...) method prints irrelevant characters instead of line numbers, for example:
> org.apache.drill.common.StackTrace.<init>:$
> org.apache.drill.exec.server.Drillbit.run:ᅢᄉ
> org.apache.drill.jdbc.DrillConnectionImpl.<init>:[
> org.apache.drill.jdbc.DrillJdbc41Factory$DrillJdbc41Connection.<init>:^
> org.apache.drill.jdbc.DrillJdbc41Factory.newDrillConnection:9
> org.apache.drill.jdbc.DrillJdbc41Factory.newDrillConnection:^A
> org.apache.drill.jdbc.DrillFactory.newConnection:6
> net.hydromatic.avatica.UnregisteredDriver.connect:~
> java.sql.DriverManager.getConnection:￈ᄏ
> java.sql.DriverManager.getConnection:ᅡᄏ
> ...
> The problem is that somebody passed a line number to Writer.write(int c)--which takes an integer _representing a character_, *not* an integer to represent as a string of characters.  (Writer's write(...) methods are not like PrintWriter's and PrintStream's print(...) methods.)
> Additionally, a meta-problem is that apparently it was never verified that the code actually worked.  We need to execute the code and verify that it works *at least once* before checking it in.
> A second meta-problem is that there no unit test for the code.  We should have unit tests for most code--especially code that is isolated and easy to test as this class seems to be.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)