jdk/src/share/classes/java/awt/HeadlessException.java
changeset 25162 c388078278d4
parent 5506 202f599c92aa
equal deleted inserted replaced
25161:c85a08c0b9d9 25162:c388078278d4
     1 /*
     1 /*
     2  * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
    36 public class HeadlessException extends UnsupportedOperationException {
    36 public class HeadlessException extends UnsupportedOperationException {
    37     /*
    37     /*
    38      * JDK 1.4 serialVersionUID
    38      * JDK 1.4 serialVersionUID
    39      */
    39      */
    40     private static final long serialVersionUID = 167183644944358563L;
    40     private static final long serialVersionUID = 167183644944358563L;
       
    41 
       
    42     /**
       
    43      * Constructs new {@code HeadlessException}
       
    44      */
    41     public HeadlessException() {}
    45     public HeadlessException() {}
       
    46 
       
    47     /**
       
    48      * Create a new instance with the specified detailed error message.
       
    49      *
       
    50      * @param  msg the error message
       
    51      */
    42     public HeadlessException(String msg) {
    52     public HeadlessException(String msg) {
    43         super(msg);
    53         super(msg);
    44     }
    54     }
       
    55 
       
    56     /**
       
    57      * {@inheritDoc}
       
    58      */
    45     public String getMessage() {
    59     public String getMessage() {
    46         String superMessage = super.getMessage();
    60         String superMessage = super.getMessage();
    47         String headlessMessage = GraphicsEnvironment.getHeadlessMessage();
    61         String headlessMessage = GraphicsEnvironment.getHeadlessMessage();
    48 
    62 
    49         if (superMessage == null) {
    63         if (superMessage == null) {