Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 1D548200C8E for ; Thu, 8 Jun 2017 19:38:08 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 1BE7E160BE5; Thu, 8 Jun 2017 17:38:08 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id E5249160BD5 for ; Thu, 8 Jun 2017 19:38:06 +0200 (CEST) Received: (qmail 85274 invoked by uid 500); 8 Jun 2017 17:37:58 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 81797 invoked by uid 99); 8 Jun 2017 17:37:51 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Jun 2017 17:37:51 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 6C552F49D6; Thu, 8 Jun 2017 17:37:51 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: britter@apache.org To: commits@commons.apache.org Date: Thu, 08 Jun 2017 17:38:05 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [16/40] commons-cli git commit: Fix ASF licence; add NON-NLS markers archived-at: Thu, 08 Jun 2017 17:38:08 -0000 Fix ASF licence; add NON-NLS markers git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/cli/branches/avalon-implementation@529021 13f79535-47bb-0310-9956-ffa450edef68 Project: http://git-wip-us.apache.org/repos/asf/commons-cli/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-cli/commit/b0192c58 Tree: http://git-wip-us.apache.org/repos/asf/commons-cli/tree/b0192c58 Diff: http://git-wip-us.apache.org/repos/asf/commons-cli/diff/b0192c58 Branch: refs/heads/avalon-implementation Commit: b0192c58a2aa1a96c6b7a5123c67be87ae36abf0 Parents: 28c8051 Author: Sebastian Bazley Authored: Sun Apr 15 17:22:41 2007 +0000 Committer: Sebastian Bazley Committed: Sun Apr 15 17:22:41 2007 +0000 ---------------------------------------------------------------------- .../cli/avalon/AbstractParserControl.java | 28 +++++----- .../apache/commons/cli/avalon/CLArgsParser.java | 55 ++++++++++---------- .../org/apache/commons/cli/avalon/CLOption.java | 29 ++++++----- .../commons/cli/avalon/CLOptionDescriptor.java | 35 ++++++------- .../org/apache/commons/cli/avalon/CLUtil.java | 39 +++++++------- .../commons/cli/avalon/ParserControl.java | 25 ++++----- .../org/apache/commons/cli/avalon/Token.java | 26 ++++----- 7 files changed, 121 insertions(+), 116 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/commons-cli/blob/b0192c58/src/java/org/apache/commons/cli/avalon/AbstractParserControl.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/commons/cli/avalon/AbstractParserControl.java b/src/java/org/apache/commons/cli/avalon/AbstractParserControl.java index f486df0..08cd939 100644 --- a/src/java/org/apache/commons/cli/avalon/AbstractParserControl.java +++ b/src/java/org/apache/commons/cli/avalon/AbstractParserControl.java @@ -1,26 +1,28 @@ -/* - * Copyright 2002-2005 The Apache Software Foundation - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - * implied. - * + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. + * */ + package org.apache.commons.cli.avalon; //Renamed from org.apache.avalon.excalibur.cli /** * Class to inherit from so when in future when new controls are added - * clients will no have to implement them. - * @version $Revision: 1.2 $ + * clients will not have to implement them. + * * @see ParserControl */ public abstract class AbstractParserControl http://git-wip-us.apache.org/repos/asf/commons-cli/blob/b0192c58/src/java/org/apache/commons/cli/avalon/CLArgsParser.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/commons/cli/avalon/CLArgsParser.java b/src/java/org/apache/commons/cli/avalon/CLArgsParser.java index 19bd5c6..7eb7e2f 100644 --- a/src/java/org/apache/commons/cli/avalon/CLArgsParser.java +++ b/src/java/org/apache/commons/cli/avalon/CLArgsParser.java @@ -1,19 +1,21 @@ -/* - * Copyright 2002-2005 The Apache Software Foundation - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - * implied. - * + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. + * */ + package org.apache.commons.cli.avalon; //Renamed from org.apache.avalon.excalibur.cli @@ -32,7 +34,6 @@ import java.util.Vector; * Note that CLArgs uses a backing hashtable for the options index and so duplicate * arguments are only returned by getArguments(). * - * @version $Revision: 1.2 $ $Date: 2005/03/18 15:26:55 $ * @see ParserControl * @see CLOption * @see CLOptionDescriptor @@ -330,7 +331,7 @@ public final class CLArgsParser if( Character.isLetter( (char)id ) ) { - sb.append( '-' ); + sb.append( '-' ); // $NON-NLS-1$ sb.append( (char)id ); hasCharOption = true; } @@ -340,9 +341,9 @@ public final class CLArgsParser { if( hasCharOption ) { - sb.append( '/' ); + sb.append( '/' ); // $NON-NLS-1$ } - sb.append( "--" ); + sb.append( "--" ); // $NON-NLS-1$ sb.append( longOption ); } @@ -478,7 +479,7 @@ public final class CLArgsParser { if( 1 == m_option.getArgumentCount() ) { - m_option.addArgument( "" ); + m_option.addArgument( "" ); // $NON-NLS-1$ m_options.addElement( m_option ); } else @@ -501,11 +502,11 @@ public final class CLArgsParser { if( m_isLong ) { - return "--" + descriptor.getName(); + return "--" + descriptor.getName(); // $NON-NLS-1$ } else { - return "-" + (char)descriptor.getId(); + return "-" + (char)descriptor.getId(); // $NON-NLS-1$ } } @@ -625,7 +626,7 @@ public final class CLArgsParser m_ch = getChar(); final CLOptionDescriptor descriptor = getDescriptorFor( m_ch ); m_isLong = false; - parseOption( descriptor, "-" + m_ch ); + parseOption( descriptor, "-" + m_ch ); // $NON-NLS-1$ if( STATE_NORMAL == m_state ) { @@ -638,7 +639,7 @@ public final class CLArgsParser { if( STATE_REQUIRE_ARG == m_state ) { - if( '=' == m_ch || 0 == m_ch ) + if( '=' == m_ch || 0 == m_ch ) // $NON-NLS-1$ { getChar(); } @@ -651,7 +652,7 @@ public final class CLArgsParser } else if( STATE_OPTIONAL_ARG == m_state ) { - if( '-' == m_ch || 0 == m_ch ) + if( '-' == m_ch || 0 == m_ch ) // $NON-NLS-1$ { getChar(); //consume stray character addOption( m_option ); @@ -659,7 +660,7 @@ public final class CLArgsParser return; } - if( '=' == m_ch ) + if( '=' == m_ch ) // $NON-NLS-1$ { getChar(); } @@ -700,9 +701,9 @@ public final class CLArgsParser m_option.addArgument( token.getValue() ); } // Are we about to start a new option? - if (0 == m_ch && '-' == peekAtChar()){ + if (0 == m_ch && '-' == peekAtChar()){ // $NON-NLS-1$ // Yes, so the second argument is missing - m_option.addArgument( "" ); + m_option.addArgument( "" ); // $NON-NLS-1$ m_options.addElement( m_option ); m_state = STATE_NORMAL; } @@ -736,7 +737,7 @@ public final class CLArgsParser private final void parseNormal() throws ParseException { - if( '-' != m_ch ) + if( '-' != m_ch ) // $NON-NLS-1$ { //Parse the arguments that are not options final String argument = nextToken( NULL_SEPARATORS ).getValue(); @@ -756,7 +757,7 @@ public final class CLArgsParser m_ch = peekAtChar(); //if it is a short option then parse it else ... - if( '-' != m_ch ) + if( '-' != m_ch ) // $NON-NLS-1$ { parseShortOption(); } @@ -777,7 +778,7 @@ public final class CLArgsParser final String optionName = nextToken( ARG_SEPARATORS ).getValue(); final CLOptionDescriptor descriptor = getDescriptorFor( optionName ); m_isLong = true; - parseOption( descriptor, "--" + optionName ); + parseOption( descriptor, "--" + optionName ); // $NON-NLS-1$ } } } http://git-wip-us.apache.org/repos/asf/commons-cli/blob/b0192c58/src/java/org/apache/commons/cli/avalon/CLOption.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/commons/cli/avalon/CLOption.java b/src/java/org/apache/commons/cli/avalon/CLOption.java index 5d163c2..d2fdd83 100644 --- a/src/java/org/apache/commons/cli/avalon/CLOption.java +++ b/src/java/org/apache/commons/cli/avalon/CLOption.java @@ -1,19 +1,21 @@ -/* - * Copyright 2002-2005 The Apache Software Foundation - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - * implied. - * + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. + * */ + package org.apache.commons.cli.avalon; // Renamed from org.apache.avalon.excalibur.cli @@ -22,7 +24,6 @@ import java.util.Arrays; /** * Basic class describing an instance of option. * - * @version $Revision: 1.2 $ $Date: 2005/03/18 15:26:55 $ */ public final class CLOption { @@ -162,11 +163,11 @@ public final class CLOption if( null != m_arguments ) { - sb.append( ", " ); + sb.append( ", " ); // $NON-NLS-1$ sb.append( Arrays.asList( m_arguments ) ); } - sb.append( " ]" ); + sb.append( " ]" ); // $NON-NLS-1$ return sb.toString(); } http://git-wip-us.apache.org/repos/asf/commons-cli/blob/b0192c58/src/java/org/apache/commons/cli/avalon/CLOptionDescriptor.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/commons/cli/avalon/CLOptionDescriptor.java b/src/java/org/apache/commons/cli/avalon/CLOptionDescriptor.java index eb5d9a8..4b85663 100644 --- a/src/java/org/apache/commons/cli/avalon/CLOptionDescriptor.java +++ b/src/java/org/apache/commons/cli/avalon/CLOptionDescriptor.java @@ -1,19 +1,21 @@ -/* - * Copyright 2002-2005 The Apache Software Foundation - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - * implied. - * + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. + * */ + package org.apache.commons.cli.avalon; //Renamed from org.apache.avalon.excalibur.cli @@ -22,7 +24,6 @@ package org.apache.commons.cli.avalon; * Typically, one creates a static array of CLOptionDescriptors, * and passes it to {@link CLArgsParser#CLArgsParser(String[], CLOptionDescriptor[])}. * - * @version $Revision: 1.2 $ $Date: 2005/03/18 15:26:55 $ * @see CLArgsParser * @see CLUtil */ @@ -212,15 +213,13 @@ public final class CLOptionDescriptor final StringBuffer sb = new StringBuffer(); sb.append( "[OptionDescriptor " ); sb.append( m_name ); - sb.append( "[OptionDescriptor " ); - sb.append( m_name ); - sb.append( ", " ); + sb.append( ", " ); // $NON-NLS-1$ sb.append( m_id ); - sb.append( ", " ); + sb.append( ", " ); // $NON-NLS-1$ sb.append( m_flags ); - sb.append( ", " ); + sb.append( ", " ); // $NON-NLS-1$ sb.append( m_description ); - sb.append( " ]" ); + sb.append( " ]" ); // $NON-NLS-1$ return sb.toString(); } } http://git-wip-us.apache.org/repos/asf/commons-cli/blob/b0192c58/src/java/org/apache/commons/cli/avalon/CLUtil.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/commons/cli/avalon/CLUtil.java b/src/java/org/apache/commons/cli/avalon/CLUtil.java index f3b2c44..1efd8d2 100644 --- a/src/java/org/apache/commons/cli/avalon/CLUtil.java +++ b/src/java/org/apache/commons/cli/avalon/CLUtil.java @@ -1,26 +1,27 @@ -/* - * Copyright 2002-2005 The Apache Software Foundation - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - * implied. - * + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. + * */ + package org.apache.commons.cli.avalon; //Renamed from org.apache.avalon.excalibur.cli /** * CLUtil offers basic utility operations for use both internal and external to package. * - * @version $Revision: 1.2 $ $Date: 2005/03/18 15:26:55 $ * @see CLOptionDescriptor */ public final class CLUtil @@ -36,7 +37,7 @@ public final class CLUtil */ public static final StringBuffer describeOptions( final CLOptionDescriptor[] options ) { - final String lSep = System.getProperty( "line.separator" ); + final String lSep = System.getProperty( "line.separator" ); // $NON-NLS-1$ final StringBuffer sb = new StringBuffer(); for( int i = 0; i < options.length; i++ ) @@ -57,11 +58,11 @@ public final class CLUtil argumentRequired = true; } - sb.append( '\t' ); + sb.append( '\t' ); // $NON-NLS-1$ if( Character.isLetter( ch ) ) { - sb.append( "-" ); + sb.append( "-" ); // $NON-NLS-1$ sb.append( ch ); needComma = true; } @@ -70,10 +71,10 @@ public final class CLUtil { if( needComma ) { - sb.append( ", " ); + sb.append( ", " ); // $NON-NLS-1$ } - sb.append( "--" ); + sb.append( "--" ); // $NON-NLS-1$ sb.append( name ); } @@ -95,12 +96,12 @@ public final class CLUtil description.substring( 0, MAX_DESCRIPTION_COLUMN_LENGTH ); description = description.substring( MAX_DESCRIPTION_COLUMN_LENGTH ); - sb.append( "\t\t" ); + sb.append( "\t\t" ); // $NON-NLS-1$ sb.append( descriptionPart ); sb.append( lSep ); } - sb.append( "\t\t" ); + sb.append( "\t\t" ); // $NON-NLS-1$ sb.append( description ); sb.append( lSep ); } http://git-wip-us.apache.org/repos/asf/commons-cli/blob/b0192c58/src/java/org/apache/commons/cli/avalon/ParserControl.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/commons/cli/avalon/ParserControl.java b/src/java/org/apache/commons/cli/avalon/ParserControl.java index 958ea7a..9d7cf36 100644 --- a/src/java/org/apache/commons/cli/avalon/ParserControl.java +++ b/src/java/org/apache/commons/cli/avalon/ParserControl.java @@ -1,26 +1,27 @@ -/* - * Copyright 2002-2005 The Apache Software Foundation - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - * implied. - * + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. + * */ + package org.apache.commons.cli.avalon; //Renamed from org.apache.avalon.excalibur.cli /** * ParserControl is used to control particular behaviour of the parser. * - * @version $Revision: 1.2 $ $Date: 2005/03/18 15:26:55 $ * @see AbstractParserControl */ public interface ParserControl http://git-wip-us.apache.org/repos/asf/commons-cli/blob/b0192c58/src/java/org/apache/commons/cli/avalon/Token.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/commons/cli/avalon/Token.java b/src/java/org/apache/commons/cli/avalon/Token.java index 466c176..8fd4703 100644 --- a/src/java/org/apache/commons/cli/avalon/Token.java +++ b/src/java/org/apache/commons/cli/avalon/Token.java @@ -1,27 +1,27 @@ -/* - * Copyright 2002-2005 The Apache Software Foundation - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - * implied. - * + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. + * */ + package org.apache.commons.cli.avalon; //Renamed from org.apache.avalon.excalibur.cli /** * Token handles tokenizing the CLI arguments * - * @version $Revision: 1.2 $ $Date: 2005/03/18 15:26:55 $ - * @since 4.0 */ class Token {