Ignore:
Timestamp:
2016-05-14T14:41:18+02:00 (8 years ago)
Author:
Don-vip
Message:

see #11924 - Java 9 - fixes more deprecation warnings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gnu/getopt/LongOpt.java

    r5279 r10209  
    55/*
    66/* This program is free software; you can redistribute it and/or modify
    7 /* it under the terms of the GNU Library General Public License as published 
     7/* it under the terms of the GNU Library General Public License as published
    88/* by  the Free Software Foundation; either version 2 of the License or
    99/* (at your option) any later version.
     
    1515/*
    1616/* You should have received a copy of the GNU Library General Public License
    17 /* along with this program; see the file COPYING.LIB.  If not, write to 
    18 /* the Free Software Foundation Inc., 59 Temple Place - Suite 330, 
     17/* along with this program; see the file COPYING.LIB.  If not, write to
     18/* the Free Software Foundation Inc., 59 Temple Place - Suite 330,
    1919/* Boston, MA  02111-1307 USA
    2020/**************************************************************************/
     
    2222package gnu.getopt;
    2323
    24 import java.util.Locale;
    25 import java.util.ResourceBundle;
    2624import java.text.MessageFormat;
    2725
     
    3432  * session.  Refer to the getopt documentation for details on the
    3533  * format of long options.
    36   * 
     34  *
    3735  * @version 1.0.5
    3836  * @author Aaron M. Renn (arenn@urbanophile.com)
     
    5553public static final int NO_ARGUMENT = 0;
    5654
    57 /** 
     55/**
    5856  * Constant value used for the "has_arg" constructor argument.  This
    5957  * value indicates that the option takes an argument that is required.
     
    116114  * @param flag If non-null, this is a location to store the value of "val" when this option is encountered, otherwise "val" is treated as the equivalent short option character.
    117115  * @param val The value to return for this long option, or the equivalent single letter option to emulate if flag is null.
    118   * 
     116  *
    119117  * @exception IllegalArgumentException If the has_arg param is not one of NO_ARGUMENT, REQUIRED_ARGUMENT or OPTIONAL_ARGUMENT.
    120118  */
    121119public
    122 LongOpt(String name, int has_arg, 
     120LongOpt(String name, int has_arg,
    123121        StringBuffer flag, int val) throws IllegalArgumentException
    124122{
    125123  // Validate has_arg
    126   if ((has_arg != NO_ARGUMENT) && (has_arg != REQUIRED_ARGUMENT) 
     124  if ((has_arg != NO_ARGUMENT) && (has_arg != REQUIRED_ARGUMENT)
    127125     && (has_arg != OPTIONAL_ARGUMENT))
    128126    {
    129       Object[] msgArgs = { new Integer(has_arg).toString() };
     127      Object[] msgArgs = { Integer.toString(has_arg) };
    130128      throw new IllegalArgumentException(MessageFormat.format(
    131129                    _messages.getString("getopt.invalidValue"), msgArgs));
Note: See TracChangeset for help on using the changeset viewer.