diff --git a/src/main/org/apache/tools/ant/taskdefs/MatchingTask.java b/src/main/org/apache/tools/ant/taskdefs/MatchingTask.java index 0b7653fe8..6b525cde5 100644 --- a/src/main/org/apache/tools/ant/taskdefs/MatchingTask.java +++ b/src/main/org/apache/tools/ant/taskdefs/MatchingTask.java @@ -1,7 +1,7 @@ /* * The Apache Software License, Version 1.1 * - * Copyright (c) 2000-2001 The Apache Software Foundation. All rights + * Copyright (c) 2000-2002 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/main/org/apache/tools/ant/taskdefs/Rmic.java b/src/main/org/apache/tools/ant/taskdefs/Rmic.java index f8f590251..197f593e9 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Rmic.java +++ b/src/main/org/apache/tools/ant/taskdefs/Rmic.java @@ -440,9 +440,22 @@ public class Rmic extends MatchingTask { adapter.getMapper().mapFileName(classFileName); for (int i=0; i + *
  • for JRMP it will return *_Stub (and *_Skel if JDK 1.1 is + * used)
  • + * + *
  • for IDL it will return a random name, causing to + * always recompile.
  • + * + *
  • for IIOP it will return _*_Stub for interfaces and _*_Tie + * for non-interfaces (and determine the interface and create + * _*_Stub from that).

    + * */ private class RmicFileNameMapper implements FileNameMapper { @@ -288,7 +300,9 @@ public abstract class DefaultRmicAdapter implements RmicAdapter { return null; } - String base = name.substring(0, name.indexOf(".class")); + // we know that name.endsWith(".class") + String base = name.substring(0, name.length()-6); + String classname = base.replace(File.separatorChar, '.'); if (attributes.getVerify() && !attributes.isValidRmiRemote(classname)) {