From 3234666728bd28761938c55da901be03994a8662 Mon Sep 17 00:00:00 2001 From: Peter Reilly Date: Sat, 18 Nov 2006 18:10:35 +0000 Subject: [PATCH] checkstyle git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@476578 13f79535-47bb-0310-9956-ffa450edef68 --- .../ant/taskdefs/rmic/DefaultRmicAdapter.java | 9 ++++++--- .../tools/ant/taskdefs/rmic/KaffeRmic.java | 3 ++- .../tools/ant/taskdefs/rmic/RmicAdapter.java | 4 ++-- .../ant/taskdefs/rmic/RmicAdapterFactory.java | 1 - .../tools/ant/taskdefs/rmic/XNewRmic.java | 20 ++++++++++++++++++- 5 files changed, 29 insertions(+), 8 deletions(-) diff --git a/src/main/org/apache/tools/ant/taskdefs/rmic/DefaultRmicAdapter.java b/src/main/org/apache/tools/ant/taskdefs/rmic/DefaultRmicAdapter.java index 1a7fd083f..c7583e43d 100644 --- a/src/main/org/apache/tools/ant/taskdefs/rmic/DefaultRmicAdapter.java +++ b/src/main/org/apache/tools/ant/taskdefs/rmic/DefaultRmicAdapter.java @@ -45,8 +45,11 @@ public abstract class DefaultRmicAdapter implements RmicAdapter { public static final String RMI_SKEL_SUFFIX = "_Skel"; /** suffix denoting a tie file */ public static final String RMI_TIE_SUFFIX = "_Tie"; + /** arg for compat */ public static final String STUB_COMPAT = "-vcompat"; + /** arg for 1.1 */ public static final String STUB_1_1 = "-v1.1"; + /** arg for 1.2 */ public static final String STUB_1_2 = "-v1.2"; /** @@ -209,9 +212,9 @@ public abstract class DefaultRmicAdapter implements RmicAdapter { } //for java1.5+, we generate compatible stubs, that is, unless //the caller asked for IDL or IIOP support. - if (stubOption == null && - !attributes.getIiop() && - !attributes.getIdl()) { + if (stubOption == null + && !attributes.getIiop() + && !attributes.getIdl()) { stubOption = STUB_COMPAT; } if (stubOption != null) { diff --git a/src/main/org/apache/tools/ant/taskdefs/rmic/KaffeRmic.java b/src/main/org/apache/tools/ant/taskdefs/rmic/KaffeRmic.java index b1999df54..2108a68b9 100644 --- a/src/main/org/apache/tools/ant/taskdefs/rmic/KaffeRmic.java +++ b/src/main/org/apache/tools/ant/taskdefs/rmic/KaffeRmic.java @@ -43,7 +43,7 @@ public class KaffeRmic extends DefaultRmicAdapter { */ public static final String COMPILER_NAME = "kaffe"; - + /** {@inheritDoc} */ public boolean execute() throws BuildException { getRmic().log("Using Kaffe rmic", Project.MSG_VERBOSE); Commandline cmd = setupRmicCommand(); @@ -96,6 +96,7 @@ public class KaffeRmic extends DefaultRmicAdapter { try { return Class.forName(RMIC_CLASSNAMES[i]); } catch (ClassNotFoundException cnfe) { + // Ignore } } return null; diff --git a/src/main/org/apache/tools/ant/taskdefs/rmic/RmicAdapter.java b/src/main/org/apache/tools/ant/taskdefs/rmic/RmicAdapter.java index 133234c86..8493d4eaa 100644 --- a/src/main/org/apache/tools/ant/taskdefs/rmic/RmicAdapter.java +++ b/src/main/org/apache/tools/ant/taskdefs/rmic/RmicAdapter.java @@ -45,9 +45,9 @@ public interface RmicAdapter { void setRmic(Rmic attributes); /** - * Executes the task. + * Call the rmic compiler. * - * @return has the compilation been successful + * @return true if has the compilation been successful * @throws BuildException on error */ boolean execute() throws BuildException; diff --git a/src/main/org/apache/tools/ant/taskdefs/rmic/RmicAdapterFactory.java b/src/main/org/apache/tools/ant/taskdefs/rmic/RmicAdapterFactory.java index 75b05de00..ee61309f7 100644 --- a/src/main/org/apache/tools/ant/taskdefs/rmic/RmicAdapterFactory.java +++ b/src/main/org/apache/tools/ant/taskdefs/rmic/RmicAdapterFactory.java @@ -20,7 +20,6 @@ package org.apache.tools.ant.taskdefs.rmic; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.Task; -import org.apache.tools.ant.taskdefs.Rmic; import org.apache.tools.ant.util.ClasspathUtils; import java.util.Locale; diff --git a/src/main/org/apache/tools/ant/taskdefs/rmic/XNewRmic.java b/src/main/org/apache/tools/ant/taskdefs/rmic/XNewRmic.java index 6f535aaf9..38bd822d6 100644 --- a/src/main/org/apache/tools/ant/taskdefs/rmic/XNewRmic.java +++ b/src/main/org/apache/tools/ant/taskdefs/rmic/XNewRmic.java @@ -1,3 +1,20 @@ +/* + * 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 org.apache.tools.ant.taskdefs.rmic; import org.apache.tools.ant.types.Commandline; @@ -16,6 +33,7 @@ public class XNewRmic extends ForkingSunRmic { */ public static final String COMPILER_NAME = "xnew"; + /** No-arg constructor. */ public XNewRmic() { } @@ -24,7 +42,7 @@ public class XNewRmic extends ForkingSunRmic { * @return a command line that hands off to thw */ protected Commandline setupRmicCommand() { - String options[] = new String[] { + String[] options = new String[] { "-Xnew" }; Commandline commandline = super.setupRmicCommand(options);