jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/ExcludeJmodSectionPlugin.java
changeset 42330 bd999576b78d
parent 41561 0c6942d13f2e
equal deleted inserted replaced
42329:c964d4aca91a 42330:bd999576b78d
    53 
    53 
    54     @Override
    54     @Override
    55     public void configure(Map<String, String> config) {
    55     public void configure(Map<String, String> config) {
    56         String arg = config.get(NAME);
    56         String arg = config.get(NAME);
    57         if (arg.isEmpty()) {
    57         if (arg.isEmpty()) {
    58             throw new PluginException("Section name must be specified");
    58             throw new IllegalArgumentException("Section name must be specified");
    59         }
    59         }
    60 
    60 
    61         switch (arg) {
    61         switch (arg) {
    62             case MAN_PAGES:
    62             case MAN_PAGES:
    63                 filters.add(Type.MAN_PAGE);
    63                 filters.add(Type.MAN_PAGE);
    64                 break;
    64                 break;
    65             case INCLUDE_HEADER_FILES:
    65             case INCLUDE_HEADER_FILES:
    66                 filters.add(Type.HEADER_FILE);
    66                 filters.add(Type.HEADER_FILE);
    67                 break;
    67                 break;
    68             default:
    68             default:
    69                 throw new PluginException("Invalid section name: " + arg);
    69                 throw new IllegalArgumentException("Invalid section name: " + arg);
    70         }
    70         }
    71     }
    71     }
    72 
    72 
    73     @Override
    73     @Override
    74     public ResourcePool transform(ResourcePool in, ResourcePoolBuilder out) {
    74     public ResourcePool transform(ResourcePool in, ResourcePoolBuilder out) {