CPD Ergebnisse

Dieses Dokument enthält die Ergebnisse von PMD's CPD 4.3.

Duplikationen

DateiZeile
org\jdtaus\banking\charsets\spi\DIN66003CharsetProvider.java198
org\jdtaus\banking\charsets\spi\IBM273CharsetProvider.java453
    DIN66003CharsetEncoder( final Charset charset )
    {
        super( charset, 1f, 1f );
        this.onUnmappableCharacter( CodingErrorAction.REPLACE );
    }

    protected CoderResult encodeLoop( final CharBuffer in, final ByteBuffer buf )
    {
        if ( in.hasArray() && buf.hasArray() )
        {
            return encodeLoopArray( in, buf );
        }

        while ( in.hasRemaining() )
        {
            in.mark();

            final int len;
            if ( in.remaining() < this.charBuf.length )
            {
                len = in.remaining();
                in.get( this.charBuf, 0, in.remaining() );
            }
            else
            {
                in.get( this.charBuf, 0, this.charBuf.length );
                len = this.charBuf.length;
            }

            for ( int i = 0; i < len; i++ )
            {
                if ( !buf.hasRemaining() )
                {
                    in.reset();
                    in.position( in.position() + i );
                    return CoderResult.OVERFLOW;
                }

                if ( !DIN66003Charset.isCharacterSupported( this.charBuf[i] ) )
DateiZeile
org\jdtaus\banking\charsets\spi\DIN66003CharsetProvider.java280
org\jdtaus\banking\charsets\spi\IBM273CharsetProvider.java535
    DIN66003CharsetDecoder( final Charset charset )
    {
        super( charset, 1f, 1f );
        this.onUnmappableCharacter( CodingErrorAction.REPLACE );
    }

    protected CoderResult decodeLoop( final ByteBuffer in, final CharBuffer buf )
    {
        if ( in.hasArray() && buf.hasArray() )
        {
            return decodeLoopArray( in, buf );
        }

        while ( in.hasRemaining() )
        {
            in.mark();

            final int len;
            if ( in.remaining() < this.byteBuf.length )
            {
                len = in.remaining();
                in.get( this.byteBuf, 0, in.remaining() );
            }
            else
            {
                in.get( this.byteBuf, 0, this.byteBuf.length );
                len = this.byteBuf.length;
            }

            for ( int i = 0; i < len; i++ )
            {
                if ( !buf.hasRemaining() )
                {
                    in.reset();
                    in.position( in.position() + i );
                    return CoderResult.OVERFLOW;
                }