You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by su...@apache.org on 2019/11/22 16:12:44 UTC

[groovy] branch GROOVY_3_0_X updated: Fix the failing build: add missing class deleted by accident

This is an automated email from the ASF dual-hosted git repository.

sunlan pushed a commit to branch GROOVY_3_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git


The following commit(s) were added to refs/heads/GROOVY_3_0_X by this push:
     new f9c3981  Fix the failing build: add missing class deleted by accident
f9c3981 is described below

commit f9c398177a8374e55745a3298f373e0c29e955d0
Author: Daniel Sun <su...@apache.org>
AuthorDate: Sat Nov 23 00:12:24 2019 +0800

    Fix the failing build: add missing class deleted by accident
---
 .../src/main/groovy/groovy/util/CliBuilder.groovy  |  1 -
 .../main/groovy/groovy/util/OptionAccessor.groovy  | 38 ++++++++++++++++++++++
 2 files changed, 38 insertions(+), 1 deletion(-)

diff --git a/subprojects/groovy-cli-commons/src/main/groovy/groovy/util/CliBuilder.groovy b/subprojects/groovy-cli-commons/src/main/groovy/groovy/util/CliBuilder.groovy
index 4d729a7..c50fca2 100644
--- a/subprojects/groovy-cli-commons/src/main/groovy/groovy/util/CliBuilder.groovy
+++ b/subprojects/groovy-cli-commons/src/main/groovy/groovy/util/CliBuilder.groovy
@@ -18,7 +18,6 @@
  */
 package groovy.util
 
-import groovy.cli.commons.OptionAccessor
 import org.apache.commons.cli.CommandLineParser
 import org.apache.commons.cli.HelpFormatter
 
diff --git a/subprojects/groovy-cli-commons/src/main/groovy/groovy/util/OptionAccessor.groovy b/subprojects/groovy-cli-commons/src/main/groovy/groovy/util/OptionAccessor.groovy
new file mode 100644
index 0000000..935cf10
--- /dev/null
+++ b/subprojects/groovy-cli-commons/src/main/groovy/groovy/util/OptionAccessor.groovy
@@ -0,0 +1,38 @@
+/*
+ *  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.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package groovy.util
+
+/**
+ * @deprecated use {@code groovy.cli.picocli.OptionAccessor} or {@link groovy.cli.commons.OptionAccessor}
+ */
+@Deprecated
+class OptionAccessor {
+    @Delegate
+    groovy.cli.commons.OptionAccessor delegate
+
+    // explicit delegate since groovyObject methods ignored by @Delegate
+    def getProperty(String name) {
+        delegate.getProperty(name)
+    }
+
+    // explicit delegate since groovyObject methods ignored by @Delegate
+    def invokeMethod(String name, Object args) {
+        delegate.invokeMethod(name, args)
+    }
+}