jdk/test/tools/pack200/NoBeans.java
author jlaskey
Fri, 23 Aug 2013 09:56:25 -0300
changeset 19631 5a165897932b
parent 15684 e5b41bd22ec9
permissions -rw-r--r--
8020946: TokenType#toString returned null Reviewed-by: hannesw, lagergren Contributed-by: james.laskey@oracle.com
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
15684
e5b41bd22ec9 8004931: add/removePropertyChangeListener should not exist in subset Profiles of Java SE
alanb
parents:
diff changeset
     1
/*
e5b41bd22ec9 8004931: add/removePropertyChangeListener should not exist in subset Profiles of Java SE
alanb
parents:
diff changeset
     2
 * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
e5b41bd22ec9 8004931: add/removePropertyChangeListener should not exist in subset Profiles of Java SE
alanb
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
e5b41bd22ec9 8004931: add/removePropertyChangeListener should not exist in subset Profiles of Java SE
alanb
parents:
diff changeset
     4
 *
e5b41bd22ec9 8004931: add/removePropertyChangeListener should not exist in subset Profiles of Java SE
alanb
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
e5b41bd22ec9 8004931: add/removePropertyChangeListener should not exist in subset Profiles of Java SE
alanb
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
e5b41bd22ec9 8004931: add/removePropertyChangeListener should not exist in subset Profiles of Java SE
alanb
parents:
diff changeset
     7
 * published by the Free Software Foundation.
e5b41bd22ec9 8004931: add/removePropertyChangeListener should not exist in subset Profiles of Java SE
alanb
parents:
diff changeset
     8
 *
e5b41bd22ec9 8004931: add/removePropertyChangeListener should not exist in subset Profiles of Java SE
alanb
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
e5b41bd22ec9 8004931: add/removePropertyChangeListener should not exist in subset Profiles of Java SE
alanb
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
e5b41bd22ec9 8004931: add/removePropertyChangeListener should not exist in subset Profiles of Java SE
alanb
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
e5b41bd22ec9 8004931: add/removePropertyChangeListener should not exist in subset Profiles of Java SE
alanb
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
e5b41bd22ec9 8004931: add/removePropertyChangeListener should not exist in subset Profiles of Java SE
alanb
parents:
diff changeset
    13
 * accompanied this code).
e5b41bd22ec9 8004931: add/removePropertyChangeListener should not exist in subset Profiles of Java SE
alanb
parents:
diff changeset
    14
 *
e5b41bd22ec9 8004931: add/removePropertyChangeListener should not exist in subset Profiles of Java SE
alanb
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
e5b41bd22ec9 8004931: add/removePropertyChangeListener should not exist in subset Profiles of Java SE
alanb
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
e5b41bd22ec9 8004931: add/removePropertyChangeListener should not exist in subset Profiles of Java SE
alanb
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
e5b41bd22ec9 8004931: add/removePropertyChangeListener should not exist in subset Profiles of Java SE
alanb
parents:
diff changeset
    18
 *
e5b41bd22ec9 8004931: add/removePropertyChangeListener should not exist in subset Profiles of Java SE
alanb
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
e5b41bd22ec9 8004931: add/removePropertyChangeListener should not exist in subset Profiles of Java SE
alanb
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
e5b41bd22ec9 8004931: add/removePropertyChangeListener should not exist in subset Profiles of Java SE
alanb
parents:
diff changeset
    21
 * questions.
e5b41bd22ec9 8004931: add/removePropertyChangeListener should not exist in subset Profiles of Java SE
alanb
parents:
diff changeset
    22
 */
e5b41bd22ec9 8004931: add/removePropertyChangeListener should not exist in subset Profiles of Java SE
alanb
parents:
diff changeset
    23
e5b41bd22ec9 8004931: add/removePropertyChangeListener should not exist in subset Profiles of Java SE
alanb
parents:
diff changeset
    24
/* @test
e5b41bd22ec9 8004931: add/removePropertyChangeListener should not exist in subset Profiles of Java SE
alanb
parents:
diff changeset
    25
 * @bug 8004931
e5b41bd22ec9 8004931: add/removePropertyChangeListener should not exist in subset Profiles of Java SE
alanb
parents:
diff changeset
    26
 * @compile NoBeans.java
e5b41bd22ec9 8004931: add/removePropertyChangeListener should not exist in subset Profiles of Java SE
alanb
parents:
diff changeset
    27
 * @summary A compile-only test to ensure that implementations of Packer
e5b41bd22ec9 8004931: add/removePropertyChangeListener should not exist in subset Profiles of Java SE
alanb
parents:
diff changeset
    28
 *   and Unpacker can be compiled without implementating the
e5b41bd22ec9 8004931: add/removePropertyChangeListener should not exist in subset Profiles of Java SE
alanb
parents:
diff changeset
    29
 *   addPropertyChangeListener and removePropertyChangeListener methods.
e5b41bd22ec9 8004931: add/removePropertyChangeListener should not exist in subset Profiles of Java SE
alanb
parents:
diff changeset
    30
 */
e5b41bd22ec9 8004931: add/removePropertyChangeListener should not exist in subset Profiles of Java SE
alanb
parents:
diff changeset
    31
e5b41bd22ec9 8004931: add/removePropertyChangeListener should not exist in subset Profiles of Java SE
alanb
parents:
diff changeset
    32
import java.io.*;
e5b41bd22ec9 8004931: add/removePropertyChangeListener should not exist in subset Profiles of Java SE
alanb
parents:
diff changeset
    33
import java.util.*;
e5b41bd22ec9 8004931: add/removePropertyChangeListener should not exist in subset Profiles of Java SE
alanb
parents:
diff changeset
    34
import java.util.jar.*;
e5b41bd22ec9 8004931: add/removePropertyChangeListener should not exist in subset Profiles of Java SE
alanb
parents:
diff changeset
    35
e5b41bd22ec9 8004931: add/removePropertyChangeListener should not exist in subset Profiles of Java SE
alanb
parents:
diff changeset
    36
public class NoBeans {
e5b41bd22ec9 8004931: add/removePropertyChangeListener should not exist in subset Profiles of Java SE
alanb
parents:
diff changeset
    37
e5b41bd22ec9 8004931: add/removePropertyChangeListener should not exist in subset Profiles of Java SE
alanb
parents:
diff changeset
    38
    static class MyPacker implements Pack200.Packer {
e5b41bd22ec9 8004931: add/removePropertyChangeListener should not exist in subset Profiles of Java SE
alanb
parents:
diff changeset
    39
        public SortedMap<String,String> properties() { return null; }
e5b41bd22ec9 8004931: add/removePropertyChangeListener should not exist in subset Profiles of Java SE
alanb
parents:
diff changeset
    40
        public void pack(JarFile in, OutputStream out) { }
e5b41bd22ec9 8004931: add/removePropertyChangeListener should not exist in subset Profiles of Java SE
alanb
parents:
diff changeset
    41
        public void pack(JarInputStream in, OutputStream out) { }
e5b41bd22ec9 8004931: add/removePropertyChangeListener should not exist in subset Profiles of Java SE
alanb
parents:
diff changeset
    42
    }
e5b41bd22ec9 8004931: add/removePropertyChangeListener should not exist in subset Profiles of Java SE
alanb
parents:
diff changeset
    43
e5b41bd22ec9 8004931: add/removePropertyChangeListener should not exist in subset Profiles of Java SE
alanb
parents:
diff changeset
    44
    static class MyUnpacker implements Pack200.Unpacker {
e5b41bd22ec9 8004931: add/removePropertyChangeListener should not exist in subset Profiles of Java SE
alanb
parents:
diff changeset
    45
        public SortedMap<String,String> properties() { return null; }
e5b41bd22ec9 8004931: add/removePropertyChangeListener should not exist in subset Profiles of Java SE
alanb
parents:
diff changeset
    46
        public void unpack(InputStream in, JarOutputStream out) { }
e5b41bd22ec9 8004931: add/removePropertyChangeListener should not exist in subset Profiles of Java SE
alanb
parents:
diff changeset
    47
        public void unpack(File in, JarOutputStream out) { }
e5b41bd22ec9 8004931: add/removePropertyChangeListener should not exist in subset Profiles of Java SE
alanb
parents:
diff changeset
    48
    }
e5b41bd22ec9 8004931: add/removePropertyChangeListener should not exist in subset Profiles of Java SE
alanb
parents:
diff changeset
    49
}