Bug#875340: FTBFS with Java 9: getPeer()

Chris West debian at fau.xxx
Sun Sep 10 19:07:12 UTC 2017


Source: bsh
Version: 2.0b4
Severity: normal
User: debian-java at lists.debian.org
Usertags: default-java9

This package fails to build with default-jdk pointing to openjdk-9-jdk.
Please fix it, so that we can start the transition to Java 9.
The wiki has some common problems and their solutions:
https://wiki.debian.org/Java/Java9Pitfalls

getPeer() has been removed. The use here looks horrible, and exactly why
getPeer() was removed:

/* 
    Here's the really disguisting hack.
    We have to get to the peer because TextComponent will refuse to
    let us set us set a caret position greater than the text length.
    Great.  What a piece of crap.
*/
public void setCaretPosition( int pos ) {
    ((java.awt.peer.TextComponentPeer)getPeer()).setCaretPosition( 
        pos + countNLs() );
}

Upstream is super dead, and the fork of upstream is super dead too.

Build log:

    [javac] /build/bsh-2.0b4/src/bsh/util/AWTConsole.java:223: error: cannot find symbol
    [javac]         ((java.awt.peer.TextComponentPeer)getPeer()).setCaretPosition( 
    [javac]                                           ^
    [javac]   symbol:   method getPeer()
    [javac]   location: class AWTConsole



Cheers,
Chris.



More information about the pkg-java-maintainers mailing list