jdk/test/javax/swing/JTable/6788484/bug6788484.java
author duke
Wed, 05 Jul 2017 17:52:05 +0200
changeset 10620 9df40a1578ef
parent 9666 b373390818b7
child 14856 92a1bcf46888
permissions -rw-r--r--
Merge
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5766
585ea61436f7 6788484: NPE in DefaultTableCellHeaderRenderer.getColumnSortOrder() with null table
alexp
parents:
diff changeset
     1
/*
9666
b373390818b7 6894541: javax/swing/JTable/6788484/bug6788484.java fails w/ compilation errors.
dav
parents: 6374
diff changeset
     2
 * Copyright (c) 2010, 2011 Oracle and/or its affiliates. All rights reserved.
5766
585ea61436f7 6788484: NPE in DefaultTableCellHeaderRenderer.getColumnSortOrder() with null table
alexp
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
585ea61436f7 6788484: NPE in DefaultTableCellHeaderRenderer.getColumnSortOrder() with null table
alexp
parents:
diff changeset
     4
 *
585ea61436f7 6788484: NPE in DefaultTableCellHeaderRenderer.getColumnSortOrder() with null table
alexp
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
585ea61436f7 6788484: NPE in DefaultTableCellHeaderRenderer.getColumnSortOrder() with null table
alexp
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
585ea61436f7 6788484: NPE in DefaultTableCellHeaderRenderer.getColumnSortOrder() with null table
alexp
parents:
diff changeset
     7
 * published by the Free Software Foundation.
585ea61436f7 6788484: NPE in DefaultTableCellHeaderRenderer.getColumnSortOrder() with null table
alexp
parents:
diff changeset
     8
 *
585ea61436f7 6788484: NPE in DefaultTableCellHeaderRenderer.getColumnSortOrder() with null table
alexp
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
585ea61436f7 6788484: NPE in DefaultTableCellHeaderRenderer.getColumnSortOrder() with null table
alexp
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
585ea61436f7 6788484: NPE in DefaultTableCellHeaderRenderer.getColumnSortOrder() with null table
alexp
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
585ea61436f7 6788484: NPE in DefaultTableCellHeaderRenderer.getColumnSortOrder() with null table
alexp
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
585ea61436f7 6788484: NPE in DefaultTableCellHeaderRenderer.getColumnSortOrder() with null table
alexp
parents:
diff changeset
    13
 * accompanied this code).
585ea61436f7 6788484: NPE in DefaultTableCellHeaderRenderer.getColumnSortOrder() with null table
alexp
parents:
diff changeset
    14
 *
585ea61436f7 6788484: NPE in DefaultTableCellHeaderRenderer.getColumnSortOrder() with null table
alexp
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
585ea61436f7 6788484: NPE in DefaultTableCellHeaderRenderer.getColumnSortOrder() with null table
alexp
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
585ea61436f7 6788484: NPE in DefaultTableCellHeaderRenderer.getColumnSortOrder() with null table
alexp
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
585ea61436f7 6788484: NPE in DefaultTableCellHeaderRenderer.getColumnSortOrder() with null table
alexp
parents:
diff changeset
    18
 *
6374
e214162c907e 6982137: Rebranding pass 2 - missed copyright changes
ohair
parents: 5766
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
e214162c907e 6982137: Rebranding pass 2 - missed copyright changes
ohair
parents: 5766
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
e214162c907e 6982137: Rebranding pass 2 - missed copyright changes
ohair
parents: 5766
diff changeset
    21
 * questions.
5766
585ea61436f7 6788484: NPE in DefaultTableCellHeaderRenderer.getColumnSortOrder() with null table
alexp
parents:
diff changeset
    22
 */
585ea61436f7 6788484: NPE in DefaultTableCellHeaderRenderer.getColumnSortOrder() with null table
alexp
parents:
diff changeset
    23
585ea61436f7 6788484: NPE in DefaultTableCellHeaderRenderer.getColumnSortOrder() with null table
alexp
parents:
diff changeset
    24
/* @test
585ea61436f7 6788484: NPE in DefaultTableCellHeaderRenderer.getColumnSortOrder() with null table
alexp
parents:
diff changeset
    25
   @bug 6788484
585ea61436f7 6788484: NPE in DefaultTableCellHeaderRenderer.getColumnSortOrder() with null table
alexp
parents:
diff changeset
    26
   @summary NPE in DefaultTableCellHeaderRenderer.getColumnSortOrder() with null table
9666
b373390818b7 6894541: javax/swing/JTable/6788484/bug6788484.java fails w/ compilation errors.
dav
parents: 6374
diff changeset
    27
   @compile -XDignore.symbol.file=true bug6788484.java
5766
585ea61436f7 6788484: NPE in DefaultTableCellHeaderRenderer.getColumnSortOrder() with null table
alexp
parents:
diff changeset
    28
   @author Alexander Potochkin
585ea61436f7 6788484: NPE in DefaultTableCellHeaderRenderer.getColumnSortOrder() with null table
alexp
parents:
diff changeset
    29
   @run main bug6788484
585ea61436f7 6788484: NPE in DefaultTableCellHeaderRenderer.getColumnSortOrder() with null table
alexp
parents:
diff changeset
    30
*/
9666
b373390818b7 6894541: javax/swing/JTable/6788484/bug6788484.java fails w/ compilation errors.
dav
parents: 6374
diff changeset
    31
b373390818b7 6894541: javax/swing/JTable/6788484/bug6788484.java fails w/ compilation errors.
dav
parents: 6374
diff changeset
    32
/*
b373390818b7 6894541: javax/swing/JTable/6788484/bug6788484.java fails w/ compilation errors.
dav
parents: 6374
diff changeset
    33
 * Compile with -XDignore.symbol.file=true option as a workaround for
b373390818b7 6894541: javax/swing/JTable/6788484/bug6788484.java fails w/ compilation errors.
dav
parents: 6374
diff changeset
    34
 * specific behaviour described in 6380059 which restricts proprietary
b373390818b7 6894541: javax/swing/JTable/6788484/bug6788484.java fails w/ compilation errors.
dav
parents: 6374
diff changeset
    35
 * package loading
b373390818b7 6894541: javax/swing/JTable/6788484/bug6788484.java fails w/ compilation errors.
dav
parents: 6374
diff changeset
    36
 */
b373390818b7 6894541: javax/swing/JTable/6788484/bug6788484.java fails w/ compilation errors.
dav
parents: 6374
diff changeset
    37
5766
585ea61436f7 6788484: NPE in DefaultTableCellHeaderRenderer.getColumnSortOrder() with null table
alexp
parents:
diff changeset
    38
import sun.swing.table.DefaultTableCellHeaderRenderer;
585ea61436f7 6788484: NPE in DefaultTableCellHeaderRenderer.getColumnSortOrder() with null table
alexp
parents:
diff changeset
    39
585ea61436f7 6788484: NPE in DefaultTableCellHeaderRenderer.getColumnSortOrder() with null table
alexp
parents:
diff changeset
    40
import javax.swing.*;
585ea61436f7 6788484: NPE in DefaultTableCellHeaderRenderer.getColumnSortOrder() with null table
alexp
parents:
diff changeset
    41
585ea61436f7 6788484: NPE in DefaultTableCellHeaderRenderer.getColumnSortOrder() with null table
alexp
parents:
diff changeset
    42
public class bug6788484 {
585ea61436f7 6788484: NPE in DefaultTableCellHeaderRenderer.getColumnSortOrder() with null table
alexp
parents:
diff changeset
    43
585ea61436f7 6788484: NPE in DefaultTableCellHeaderRenderer.getColumnSortOrder() with null table
alexp
parents:
diff changeset
    44
    public static void main(String[] args) throws Exception {
585ea61436f7 6788484: NPE in DefaultTableCellHeaderRenderer.getColumnSortOrder() with null table
alexp
parents:
diff changeset
    45
        DefaultTableCellHeaderRenderer.getColumnSortOrder(null, 0);
585ea61436f7 6788484: NPE in DefaultTableCellHeaderRenderer.getColumnSortOrder() with null table
alexp
parents:
diff changeset
    46
    }
585ea61436f7 6788484: NPE in DefaultTableCellHeaderRenderer.getColumnSortOrder() with null table
alexp
parents:
diff changeset
    47
}