git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@476578 13f79535-47bb-0310-9956-ffa450edef68master
| @@ -45,8 +45,11 @@ public abstract class DefaultRmicAdapter implements RmicAdapter { | |||||
| public static final String RMI_SKEL_SUFFIX = "_Skel"; | public static final String RMI_SKEL_SUFFIX = "_Skel"; | ||||
| /** suffix denoting a tie file */ | /** suffix denoting a tie file */ | ||||
| public static final String RMI_TIE_SUFFIX = "_Tie"; | public static final String RMI_TIE_SUFFIX = "_Tie"; | ||||
| /** arg for compat */ | |||||
| public static final String STUB_COMPAT = "-vcompat"; | public static final String STUB_COMPAT = "-vcompat"; | ||||
| /** arg for 1.1 */ | |||||
| public static final String STUB_1_1 = "-v1.1"; | public static final String STUB_1_1 = "-v1.1"; | ||||
| /** arg for 1.2 */ | |||||
| public static final String STUB_1_2 = "-v1.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 | //for java1.5+, we generate compatible stubs, that is, unless | ||||
| //the caller asked for IDL or IIOP support. | //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; | stubOption = STUB_COMPAT; | ||||
| } | } | ||||
| if (stubOption != null) { | if (stubOption != null) { | ||||
| @@ -43,7 +43,7 @@ public class KaffeRmic extends DefaultRmicAdapter { | |||||
| */ | */ | ||||
| public static final String COMPILER_NAME = "kaffe"; | public static final String COMPILER_NAME = "kaffe"; | ||||
| /** {@inheritDoc} */ | |||||
| public boolean execute() throws BuildException { | public boolean execute() throws BuildException { | ||||
| getRmic().log("Using Kaffe rmic", Project.MSG_VERBOSE); | getRmic().log("Using Kaffe rmic", Project.MSG_VERBOSE); | ||||
| Commandline cmd = setupRmicCommand(); | Commandline cmd = setupRmicCommand(); | ||||
| @@ -96,6 +96,7 @@ public class KaffeRmic extends DefaultRmicAdapter { | |||||
| try { | try { | ||||
| return Class.forName(RMIC_CLASSNAMES[i]); | return Class.forName(RMIC_CLASSNAMES[i]); | ||||
| } catch (ClassNotFoundException cnfe) { | } catch (ClassNotFoundException cnfe) { | ||||
| // Ignore | |||||
| } | } | ||||
| } | } | ||||
| return null; | return null; | ||||
| @@ -45,9 +45,9 @@ public interface RmicAdapter { | |||||
| void setRmic(Rmic attributes); | 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 | * @throws BuildException on error | ||||
| */ | */ | ||||
| boolean execute() throws BuildException; | boolean execute() throws BuildException; | ||||
| @@ -20,7 +20,6 @@ package org.apache.tools.ant.taskdefs.rmic; | |||||
| import org.apache.tools.ant.BuildException; | import org.apache.tools.ant.BuildException; | ||||
| import org.apache.tools.ant.Task; | import org.apache.tools.ant.Task; | ||||
| import org.apache.tools.ant.taskdefs.Rmic; | |||||
| import org.apache.tools.ant.util.ClasspathUtils; | import org.apache.tools.ant.util.ClasspathUtils; | ||||
| import java.util.Locale; | import java.util.Locale; | ||||
| @@ -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; | package org.apache.tools.ant.taskdefs.rmic; | ||||
| import org.apache.tools.ant.types.Commandline; | import org.apache.tools.ant.types.Commandline; | ||||
| @@ -16,6 +33,7 @@ public class XNewRmic extends ForkingSunRmic { | |||||
| */ | */ | ||||
| public static final String COMPILER_NAME = "xnew"; | public static final String COMPILER_NAME = "xnew"; | ||||
| /** No-arg constructor. */ | |||||
| public XNewRmic() { | public XNewRmic() { | ||||
| } | } | ||||
| @@ -24,7 +42,7 @@ public class XNewRmic extends ForkingSunRmic { | |||||
| * @return a command line that hands off to thw | * @return a command line that hands off to thw | ||||
| */ | */ | ||||
| protected Commandline setupRmicCommand() { | protected Commandline setupRmicCommand() { | ||||
| String options[] = new String[] { | |||||
| String[] options = new String[] { | |||||
| "-Xnew" | "-Xnew" | ||||
| }; | }; | ||||
| Commandline commandline = super.setupRmicCommand(options); | Commandline commandline = super.setupRmicCommand(options); | ||||