| @@ -57,13 +57,13 @@ public class PropertyFileInputHandler implements InputHandler { | |||||
| Object o = props.get(request.getPrompt()); | Object o = props.get(request.getPrompt()); | ||||
| if (o == null) { | if (o == null) { | ||||
| throw new BuildException("Unable to find input for \'" | |||||
| + request.getPrompt() + "\'"); | |||||
| throw new BuildException("Unable to find input for '" | |||||
| + request.getPrompt() + "'"); | |||||
| } | } | ||||
| request.setInput(o.toString()); | request.setInput(o.toString()); | ||||
| if (!request.isInputValid()) { | if (!request.isInputValid()) { | ||||
| throw new BuildException("Found invalid input " + o | throw new BuildException("Found invalid input " + o | ||||
| + " for \'" + request.getPrompt() + "\'"); | |||||
| + " for '" + request.getPrompt() + "'"); | |||||
| } | } | ||||
| } | } | ||||
| @@ -217,7 +217,7 @@ public class Chmod extends ExecuteOn { | |||||
| @Override | @Override | ||||
| public void setExecutable(String e) { | public void setExecutable(String e) { | ||||
| throw new BuildException(getTaskType() | throw new BuildException(getTaskType() | ||||
| + " doesn\'t support the executable attribute", getLocation()); | |||||
| + " doesn't support the executable attribute", getLocation()); | |||||
| } | } | ||||
| /** | /** | ||||
| @@ -230,7 +230,7 @@ public class Chmod extends ExecuteOn { | |||||
| @Override | @Override | ||||
| public void setCommand(Commandline cmdl) { | public void setCommand(Commandline cmdl) { | ||||
| throw new BuildException(getTaskType() | throw new BuildException(getTaskType() | ||||
| + " doesn\'t support the command attribute", getLocation()); | |||||
| + " doesn't support the command attribute", getLocation()); | |||||
| } | } | ||||
| /** | /** | ||||
| @@ -242,7 +242,7 @@ public class Chmod extends ExecuteOn { | |||||
| @Override | @Override | ||||
| public void setSkipEmptyFilesets(boolean skip) { | public void setSkipEmptyFilesets(boolean skip) { | ||||
| throw new BuildException(getTaskType() | throw new BuildException(getTaskType() | ||||
| + " doesn\'t support the skipemptyfileset attribute", getLocation()); | |||||
| + " doesn't support the skipemptyfileset attribute", getLocation()); | |||||
| } | } | ||||
| /** | /** | ||||
| @@ -254,7 +254,7 @@ public class Chmod extends ExecuteOn { | |||||
| @Override | @Override | ||||
| public void setAddsourcefile(boolean b) { | public void setAddsourcefile(boolean b) { | ||||
| throw new BuildException(getTaskType() | throw new BuildException(getTaskType() | ||||
| + " doesn\'t support the addsourcefile attribute", getLocation()); | |||||
| + " doesn't support the addsourcefile attribute", getLocation()); | |||||
| } | } | ||||
| /** | /** | ||||
| @@ -64,7 +64,7 @@ public class Exec extends Task { | |||||
| + "the Exec class"); | + "the Exec class"); | ||||
| System.err.println("is considered to be dead code by the Ant " | System.err.println("is considered to be dead code by the Ant " | ||||
| + "developers and is unmaintained."); | + "developers and is unmaintained."); | ||||
| System.err.println("Don\'t use it!"); | |||||
| System.err.println("Don't use it!"); | |||||
| } | } | ||||
| /** | /** | ||||
| @@ -251,7 +251,7 @@ public class ExecuteOn extends ExecTask { | |||||
| */ | */ | ||||
| public Commandline.Marker createSrcfile() { | public Commandline.Marker createSrcfile() { | ||||
| if (srcFilePos != null) { | if (srcFilePos != null) { | ||||
| throw new BuildException(getTaskType() + " doesn\'t support multiple " | |||||
| throw new BuildException(getTaskType() + " doesn't support multiple " | |||||
| + "srcfile elements.", getLocation()); | + "srcfile elements.", getLocation()); | ||||
| } | } | ||||
| srcFilePos = cmdl.createMarker(); | srcFilePos = cmdl.createMarker(); | ||||
| @@ -265,7 +265,7 @@ public class ExecuteOn extends ExecTask { | |||||
| */ | */ | ||||
| public Commandline.Marker createTargetfile() { | public Commandline.Marker createTargetfile() { | ||||
| if (targetFilePos != null) { | if (targetFilePos != null) { | ||||
| throw new BuildException(getTaskType() + " doesn\'t support multiple " | |||||
| throw new BuildException(getTaskType() + " doesn't support multiple " | |||||
| + "targetfile elements.", getLocation()); | + "targetfile elements.", getLocation()); | ||||
| } | } | ||||
| targetFilePos = cmdl.createMarker(); | targetFilePos = cmdl.createMarker(); | ||||
| @@ -2499,7 +2499,7 @@ public class Javadoc extends Task { | |||||
| // Path.list does it for us. | // Path.list does it for us. | ||||
| sp.createPathElement().setLocation(baseDir); | sp.createPathElement().setLocation(baseDir); | ||||
| } else { | } else { | ||||
| log(baseDir + " doesn\'t contain any packages, dropping it.", | |||||
| log(baseDir + " doesn't contain any packages, dropping it.", | |||||
| Project.MSG_VERBOSE); | Project.MSG_VERBOSE); | ||||
| } | } | ||||
| } | } | ||||
| @@ -62,7 +62,7 @@ public class Jikes { | |||||
| + "the Jikes class"); | + "the Jikes class"); | ||||
| System.err.println("is considered to be dead code by the Ant " | System.err.println("is considered to be dead code by the Ant " | ||||
| + "developers and is unmaintained."); | + "developers and is unmaintained."); | ||||
| System.err.println("Don\'t use it!"); | |||||
| System.err.println("Don't use it!"); | |||||
| this.jop = jop; | this.jop = jop; | ||||
| this.command = command; | this.command = command; | ||||
| @@ -100,7 +100,7 @@ public class JikesOutputParser implements ExecuteStreamHandler { | |||||
| + "JikesOutputParser class"); | + "JikesOutputParser class"); | ||||
| System.err.println("is considered to be dead code by the Ant " | System.err.println("is considered to be dead code by the Ant " | ||||
| + "developers and is unmaintained."); | + "developers and is unmaintained."); | ||||
| System.err.println("Don\'t use it!"); | |||||
| System.err.println("Don't use it!"); | |||||
| this.task = task; | this.task = task; | ||||
| this.emacsMode = emacsMode; | this.emacsMode = emacsMode; | ||||
| @@ -74,7 +74,7 @@ public class Patch extends Task { | |||||
| */ | */ | ||||
| public void setPatchfile(File file) { | public void setPatchfile(File file) { | ||||
| if (!file.exists()) { | if (!file.exists()) { | ||||
| throw new BuildException("patchfile " + file + " doesn\'t exist", | |||||
| throw new BuildException("patchfile " + file + " doesn't exist", | |||||
| getLocation()); | getLocation()); | ||||
| } | } | ||||
| cmd.createArgument().setValue("-i"); | cmd.createArgument().setValue("-i"); | ||||
| @@ -61,7 +61,7 @@ public class ResourceCount extends Task implements Condition { | |||||
| public void setRefid(Reference r) { | public void setRefid(Reference r) { | ||||
| Object o = r.getReferencedObject(); | Object o = r.getReferencedObject(); | ||||
| if (!(o instanceof ResourceCollection)) { | if (!(o instanceof ResourceCollection)) { | ||||
| throw new BuildException("%s doesn\'t denote a ResourceCollection", | |||||
| throw new BuildException("%s doesn't denote a ResourceCollection", | |||||
| r.getRefId()); | r.getRefId()); | ||||
| } | } | ||||
| add((ResourceCollection) o); | add((ResourceCollection) o); | ||||
| @@ -55,7 +55,7 @@ public class TaskOutputStream extends OutputStream { | |||||
| + "TaskOutputStream class"); | + "TaskOutputStream class"); | ||||
| System.err.println("is considered to be dead code by the Ant " | System.err.println("is considered to be dead code by the Ant " | ||||
| + "developers and is unmaintained."); | + "developers and is unmaintained."); | ||||
| System.err.println("Don\'t use it!"); | |||||
| System.err.println("Don't use it!"); | |||||
| this.task = task; | this.task = task; | ||||
| this.msgOutputLevel = msgOutputLevel; | this.msgOutputLevel = msgOutputLevel; | ||||
| @@ -316,7 +316,7 @@ public class Os implements Condition { | |||||
| break; | break; | ||||
| default: | default: | ||||
| throw new BuildException( | throw new BuildException( | ||||
| "Don\'t know how to detect os family \"" | |||||
| "Don't know how to detect os family \"" | |||||
| + family + "\""); | + family + "\""); | ||||
| } | } | ||||
| } | } | ||||
| @@ -273,7 +273,7 @@ public class ANTLR extends Task { | |||||
| log("Found " + f.getAbsolutePath(), Project.MSG_DEBUG); | log("Found " + f.getAbsolutePath(), Project.MSG_DEBUG); | ||||
| createClasspath().setLocation(f); | createClasspath().setLocation(f); | ||||
| } else { | } else { | ||||
| log("Couldn\'t find " + resource, Project.MSG_VERBOSE); | |||||
| log("Couldn't find " + resource, Project.MSG_VERBOSE); | |||||
| } | } | ||||
| } | } | ||||
| @@ -122,7 +122,7 @@ public class RenameExtensions extends MatchingTask { | |||||
| log(" from=\"*" + fromExtension + "\"", Project.MSG_INFO); | log(" from=\"*" + fromExtension + "\"", Project.MSG_INFO); | ||||
| log(" to=\"*" + toExtension + "\" />", Project.MSG_INFO); | log(" to=\"*" + toExtension + "\" />", Project.MSG_INFO); | ||||
| log("</move>", Project.MSG_INFO); | log("</move>", Project.MSG_INFO); | ||||
| log("using the same patterns on <fileset> as you\'ve used here", | |||||
| log("using the same patterns on <fileset> as you've used here", | |||||
| Project.MSG_INFO); | Project.MSG_INFO); | ||||
| Move move = new Move(); | Move move = new Move(); | ||||
| @@ -376,7 +376,7 @@ public class JDependTask extends Task { | |||||
| File f = LoaderUtils.getResourceSource(getClass().getClassLoader(), | File f = LoaderUtils.getResourceSource(getClass().getClassLoader(), | ||||
| resource); | resource); | ||||
| if (f == null) { | if (f == null) { | ||||
| log("Couldn\'t find " + resource, Project.MSG_DEBUG); | |||||
| log("Couldn't find " + resource, Project.MSG_DEBUG); | |||||
| } else { | } else { | ||||
| log("Found " + f.getAbsolutePath(), Project.MSG_DEBUG); | log("Found " + f.getAbsolutePath(), Project.MSG_DEBUG); | ||||
| runtimeClasses.createPath().setLocation(f); | runtimeClasses.createPath().setLocation(f); | ||||
| @@ -107,9 +107,9 @@ public final class JspCompilerAdapterFactory { | |||||
| Class<? extends JspCompilerAdapter> c = classloader.findClass(className).asSubclass(JspCompilerAdapter.class); | Class<? extends JspCompilerAdapter> c = classloader.findClass(className).asSubclass(JspCompilerAdapter.class); | ||||
| return c.newInstance(); | return c.newInstance(); | ||||
| } catch (ClassNotFoundException cnfe) { | } catch (ClassNotFoundException cnfe) { | ||||
| throw new BuildException(className + " can\'t be found.", cnfe); | |||||
| throw new BuildException(className + " can't be found.", cnfe); | |||||
| } catch (ClassCastException cce) { | } catch (ClassCastException cce) { | ||||
| throw new BuildException(className + " isn\'t the classname of " | |||||
| throw new BuildException(className + " isn't the classname of " | |||||
| + "a compiler adapter.", cce); | + "a compiler adapter.", cce); | ||||
| } catch (Throwable t) { | } catch (Throwable t) { | ||||
| // for all other possibilities | // for all other possibilities | ||||
| @@ -1838,7 +1838,7 @@ public class JUnitTask extends Task { | |||||
| antRuntimeClasses.createPath().setLocation(f); | antRuntimeClasses.createPath().setLocation(f); | ||||
| return true; | return true; | ||||
| } else { | } else { | ||||
| log("Couldn\'t find " + resource, Project.MSG_DEBUG); | |||||
| log("Couldn't find " + resource, Project.MSG_DEBUG); | |||||
| return false; | return false; | ||||
| } | } | ||||
| } | } | ||||
| @@ -72,7 +72,7 @@ public abstract class AbstractAccessTask extends ExecuteOn { | |||||
| @Override | @Override | ||||
| public void setCommand(Commandline cmdl) { | public void setCommand(Commandline cmdl) { | ||||
| throw new BuildException(getTaskType() | throw new BuildException(getTaskType() | ||||
| + " doesn\'t support the command attribute", | |||||
| + " doesn't support the command attribute", | |||||
| getLocation()); | getLocation()); | ||||
| } | } | ||||
| @@ -84,7 +84,7 @@ public abstract class AbstractAccessTask extends ExecuteOn { | |||||
| */ | */ | ||||
| @Override | @Override | ||||
| public void setSkipEmptyFilesets(boolean skip) { | public void setSkipEmptyFilesets(boolean skip) { | ||||
| throw new BuildException(getTaskType() + " doesn\'t support the " | |||||
| throw new BuildException(getTaskType() + " doesn't support the " | |||||
| + "skipemptyfileset attribute", | + "skipemptyfileset attribute", | ||||
| getLocation()); | getLocation()); | ||||
| } | } | ||||
| @@ -98,7 +98,7 @@ public abstract class AbstractAccessTask extends ExecuteOn { | |||||
| @Override | @Override | ||||
| public void setAddsourcefile(boolean b) { | public void setAddsourcefile(boolean b) { | ||||
| throw new BuildException(getTaskType() | throw new BuildException(getTaskType() | ||||
| + " doesn\'t support the addsourcefile attribute", getLocation()); | |||||
| + " doesn't support the addsourcefile attribute", getLocation()); | |||||
| } | } | ||||
| /** | /** | ||||
| @@ -80,7 +80,7 @@ public class Chgrp extends AbstractAccessTask { | |||||
| @Override | @Override | ||||
| public void setExecutable(String e) { | public void setExecutable(String e) { | ||||
| throw new BuildException(getTaskType() | throw new BuildException(getTaskType() | ||||
| + " doesn\'t support the executable" | |||||
| + " doesn't support the executable" | |||||
| + " attribute", getLocation()); | + " attribute", getLocation()); | ||||
| } | } | ||||
| } | } | ||||
| @@ -80,7 +80,7 @@ public class Chown extends AbstractAccessTask { | |||||
| @Override | @Override | ||||
| public void setExecutable(String e) { | public void setExecutable(String e) { | ||||
| throw new BuildException(getTaskType() | throw new BuildException(getTaskType() | ||||
| + " doesn\'t support the executable" | |||||
| + " doesn't support the executable" | |||||
| + " attribute", getLocation()); | + " attribute", getLocation()); | ||||
| } | } | ||||
| } | } | ||||
| @@ -111,7 +111,7 @@ public class Attrib extends ExecuteOn { | |||||
| @Override | @Override | ||||
| public void setExecutable(String e) { | public void setExecutable(String e) { | ||||
| throw new BuildException(getTaskType() | throw new BuildException(getTaskType() | ||||
| + " doesn\'t support the executable attribute", getLocation()); | |||||
| + " doesn't support the executable attribute", getLocation()); | |||||
| } | } | ||||
| /** | /** | ||||
| @@ -122,7 +122,7 @@ public class Attrib extends ExecuteOn { | |||||
| */ | */ | ||||
| public void setCommand(String e) { | public void setCommand(String e) { | ||||
| throw new BuildException(getTaskType() | throw new BuildException(getTaskType() | ||||
| + " doesn\'t support the command attribute", getLocation()); | |||||
| + " doesn't support the command attribute", getLocation()); | |||||
| } | } | ||||
| /** | /** | ||||
| @@ -134,7 +134,7 @@ public class Attrib extends ExecuteOn { | |||||
| @Override | @Override | ||||
| public void setAddsourcefile(boolean b) { | public void setAddsourcefile(boolean b) { | ||||
| throw new BuildException(getTaskType() | throw new BuildException(getTaskType() | ||||
| + " doesn\'t support the addsourcefile attribute", getLocation()); | |||||
| + " doesn't support the addsourcefile attribute", getLocation()); | |||||
| } | } | ||||
| /** | /** | ||||
| @@ -145,7 +145,7 @@ public class Attrib extends ExecuteOn { | |||||
| */ | */ | ||||
| @Override | @Override | ||||
| public void setSkipEmptyFilesets(boolean skip) { | public void setSkipEmptyFilesets(boolean skip) { | ||||
| throw new BuildException(getTaskType() + " doesn\'t support the " | |||||
| throw new BuildException(getTaskType() + " doesn't support the " | |||||
| + "skipemptyfileset attribute", | + "skipemptyfileset attribute", | ||||
| getLocation()); | getLocation()); | ||||
| } | } | ||||
| @@ -159,7 +159,7 @@ public class Attrib extends ExecuteOn { | |||||
| @Override | @Override | ||||
| public void setParallel(boolean parallel) { | public void setParallel(boolean parallel) { | ||||
| throw new BuildException(getTaskType() | throw new BuildException(getTaskType() | ||||
| + " doesn\'t support the parallel attribute", | |||||
| + " doesn't support the parallel attribute", | |||||
| getLocation()); | getLocation()); | ||||
| } | } | ||||
| @@ -172,7 +172,7 @@ public class Attrib extends ExecuteOn { | |||||
| @Override | @Override | ||||
| public void setMaxParallel(int max) { | public void setMaxParallel(int max) { | ||||
| throw new BuildException(getTaskType() | throw new BuildException(getTaskType() | ||||
| + " doesn\'t support the maxparallel attribute", | |||||
| + " doesn't support the maxparallel attribute", | |||||
| getLocation()); | getLocation()); | ||||
| } | } | ||||
| @@ -436,13 +436,13 @@ public class Commandline implements Cloneable { | |||||
| */ | */ | ||||
| public static String quoteArgument(String argument) { | public static String quoteArgument(String argument) { | ||||
| if (argument.contains("\"")) { | if (argument.contains("\"")) { | ||||
| if (argument.contains("\'")) { | |||||
| throw new BuildException("Can\'t handle single and double" | |||||
| if (argument.contains("'")) { | |||||
| throw new BuildException("Can't handle single and double" | |||||
| + " quotes in same argument"); | + " quotes in same argument"); | ||||
| } | } | ||||
| return '\'' + argument + '\''; | return '\'' + argument + '\''; | ||||
| } | } | ||||
| if (argument.contains("\'") || argument.contains(" ") | |||||
| if (argument.contains("'") || argument.contains(" ") | |||||
| // WIN9x uses a bat file for executing commands | // WIN9x uses a bat file for executing commands | ||||
| || (IS_WIN_9X && argument.contains(";"))) { | || (IS_WIN_9X && argument.contains(";"))) { | ||||
| return '\"' + argument + '\"'; | return '\"' + argument + '\"'; | ||||
| @@ -490,7 +490,7 @@ public class Commandline implements Cloneable { | |||||
| final int inQuote = 1; | final int inQuote = 1; | ||||
| final int inDoubleQuote = 2; | final int inDoubleQuote = 2; | ||||
| int state = normal; | int state = normal; | ||||
| final StringTokenizer tok = new StringTokenizer(toProcess, "\"\' ", true); | |||||
| final StringTokenizer tok = new StringTokenizer(toProcess, "\"' ", true); | |||||
| final ArrayList<String> result = new ArrayList<>(); | final ArrayList<String> result = new ArrayList<>(); | ||||
| final StringBuilder current = new StringBuilder(); | final StringBuilder current = new StringBuilder(); | ||||
| boolean lastTokenHasBeenQuoted = false; | boolean lastTokenHasBeenQuoted = false; | ||||
| @@ -499,7 +499,7 @@ public class Commandline implements Cloneable { | |||||
| String nextTok = tok.nextToken(); | String nextTok = tok.nextToken(); | ||||
| switch (state) { | switch (state) { | ||||
| case inQuote: | case inQuote: | ||||
| if ("\'".equals(nextTok)) { | |||||
| if ("'".equals(nextTok)) { | |||||
| lastTokenHasBeenQuoted = true; | lastTokenHasBeenQuoted = true; | ||||
| state = normal; | state = normal; | ||||
| } else { | } else { | ||||
| @@ -515,7 +515,7 @@ public class Commandline implements Cloneable { | |||||
| } | } | ||||
| break; | break; | ||||
| default: | default: | ||||
| if ("\'".equals(nextTok)) { | |||||
| if ("'".equals(nextTok)) { | |||||
| state = inQuote; | state = inQuote; | ||||
| } else if ("\"".equals(nextTok)) { | } else if ("\"".equals(nextTok)) { | ||||
| state = inDoubleQuote; | state = inDoubleQuote; | ||||
| @@ -648,7 +648,7 @@ public class Commandline implements Cloneable { | |||||
| if (args == null || args.length == 0) { | if (args == null || args.length == 0) { | ||||
| return ""; | return ""; | ||||
| } | } | ||||
| StringBuilder buf = new StringBuilder("Executing \'").append(args[0]).append("\'"); | |||||
| StringBuilder buf = new StringBuilder("Executing '").append(args[0]).append("'"); | |||||
| if (args.length > 1) { | if (args.length > 1) { | ||||
| buf.append(" with "); | buf.append(" with "); | ||||
| buf.append(describeArguments(args, 1)); | buf.append(describeArguments(args, 1)); | ||||
| @@ -686,7 +686,7 @@ public class Commandline implements Cloneable { | |||||
| StringBuilder buf = new StringBuilder(); | StringBuilder buf = new StringBuilder(); | ||||
| buf.append(String.format("argument%s:%n", args.length > offset ? "s" : "")); | buf.append(String.format("argument%s:%n", args.length > offset ? "s" : "")); | ||||
| for (int i = offset; i < args.length; i++) { | for (int i = offset; i < args.length; i++) { | ||||
| buf.append(String.format("\'%s\'%n", args[i])); | |||||
| buf.append(String.format("'%s'%n", args[i])); | |||||
| } | } | ||||
| buf.append(DISCLAIMER); | buf.append(DISCLAIMER); | ||||
| return buf.toString(); | return buf.toString(); | ||||
| @@ -278,7 +278,7 @@ public abstract class DataType extends ProjectComponent implements Cloneable { | |||||
| + " is not a subclass of " | + " is not a subclass of " | ||||
| + displayName(requiredClass), | + displayName(requiredClass), | ||||
| Project.MSG_VERBOSE); | Project.MSG_VERBOSE); | ||||
| throw new BuildException(ref.getRefId() + " doesn\'t denote a " + dataTypeName); | |||||
| throw new BuildException(ref.getRefId() + " doesn't denote a " + dataTypeName); | |||||
| } | } | ||||
| /** | /** | ||||
| @@ -219,7 +219,7 @@ public class TarFileSet extends ArchiveFileSet { | |||||
| configureFileSet(zfs); | configureFileSet(zfs); | ||||
| return zfs; | return zfs; | ||||
| } | } | ||||
| String msg = getRefid().getRefId() + " doesn\'t denote a tarfileset or a fileset"; | |||||
| String msg = getRefid().getRefId() + " doesn't denote a tarfileset or a fileset"; | |||||
| throw new BuildException(msg); | throw new BuildException(msg); | ||||
| } | } | ||||
| @@ -83,7 +83,7 @@ public class ZipFileSet extends ArchiveFileSet { | |||||
| configureFileSet(zfs); | configureFileSet(zfs); | ||||
| return zfs; | return zfs; | ||||
| } | } | ||||
| String msg = getRefid().getRefId() + " doesn\'t denote a zipfileset or a fileset"; | |||||
| String msg = getRefid().getRefId() + " doesn't denote a zipfileset or a fileset"; | |||||
| throw new BuildException(msg); | throw new BuildException(msg); | ||||
| } | } | ||||
| @@ -191,7 +191,7 @@ public class ResourceUtils { | |||||
| Project.MSG_VERBOSE); | Project.MSG_VERBOSE); | ||||
| } | } | ||||
| if (targetnames == null || targetnames.length == 0) { | if (targetnames == null || targetnames.length == 0) { | ||||
| logTo.log(sr + " skipped - don\'t know how to handle it", | |||||
| logTo.log(sr + " skipped - don't know how to handle it", | |||||
| Project.MSG_VERBOSE); | Project.MSG_VERBOSE); | ||||
| continue; | continue; | ||||
| } | } | ||||
| @@ -211,7 +211,7 @@ public class ResourceUtils { | |||||
| result.add(sr); | result.add(sr); | ||||
| final Resource t = r.iterator().next(); | final Resource t = r.iterator().next(); | ||||
| logTo.log(sr.getName() + " added as " + t.getName() | logTo.log(sr.getName() + " added as " + t.getName() | ||||
| + (t.isExists() ? " is outdated." : " doesn\'t exist."), | |||||
| + (t.isExists() ? " is outdated." : " doesn't exist."), | |||||
| Project.MSG_VERBOSE); | Project.MSG_VERBOSE); | ||||
| continue; | continue; | ||||
| } | } | ||||
| @@ -63,11 +63,11 @@ public class ExtraFieldUtils { | |||||
| ZipExtraField ze = (ZipExtraField) c.newInstance(); | ZipExtraField ze = (ZipExtraField) c.newInstance(); | ||||
| implementations.put(ze.getHeaderId(), c); | implementations.put(ze.getHeaderId(), c); | ||||
| } catch (ClassCastException cc) { | } catch (ClassCastException cc) { | ||||
| throw new RuntimeException(c + " doesn\'t implement ZipExtraField"); //NOSONAR | |||||
| throw new RuntimeException(c + " doesn't implement ZipExtraField"); //NOSONAR | |||||
| } catch (InstantiationException ie) { | } catch (InstantiationException ie) { | ||||
| throw new RuntimeException(c + " is not a concrete class"); //NOSONAR | throw new RuntimeException(c + " is not a concrete class"); //NOSONAR | ||||
| } catch (IllegalAccessException ie) { | } catch (IllegalAccessException ie) { | ||||
| throw new RuntimeException(c + "\'s no-arg constructor is not public"); //NOSONAR | |||||
| throw new RuntimeException(c + "'s no-arg constructor is not public"); //NOSONAR | |||||
| } | } | ||||
| } | } | ||||
| @@ -103,7 +103,7 @@ public class IntrospectionHelperTest { | |||||
| public void testSupportsCharacters() { | public void testSupportsCharacters() { | ||||
| assertTrue("IntrospectionHelperTest supports addText", ih.supportsCharacters()); | assertTrue("IntrospectionHelperTest supports addText", ih.supportsCharacters()); | ||||
| ih = IntrospectionHelper.getHelper(String.class); | ih = IntrospectionHelper.getHelper(String.class); | ||||
| assertFalse("String doesn\'t support addText", ih.supportsCharacters()); | |||||
| assertFalse("String doesn't support addText", ih.supportsCharacters()); | |||||
| } | } | ||||
| public void addText(String text) { | public void addText(String text) { | ||||
| @@ -235,7 +235,7 @@ public class AntTest { | |||||
| buildRule.getProject().resolveFile("ant/test3.log"), | buildRule.getProject().resolveFile("ant/test3.log"), | ||||
| buildRule.getProject().resolveFile("ant/test4.log")); | buildRule.getProject().resolveFile("ant/test4.log")); | ||||
| logFiles.forEach(logFile -> assertFalse(logFile.getName() + " doesn\'t exist", | |||||
| logFiles.forEach(logFile -> assertFalse(logFile.getName() + " doesn't exist", | |||||
| logFile.exists())); | logFile.exists())); | ||||
| buildRule.executeTarget("testLogfilePlacement"); | buildRule.executeTarget("testLogfilePlacement"); | ||||
| @@ -461,7 +461,7 @@ public class AntTest { | |||||
| } | } | ||||
| if (error == null) { | if (error == null) { | ||||
| try { | try { | ||||
| String msg = "Call " + calls + " refid=\'" + keys[calls] + "\'"; | |||||
| String msg = "Call " + calls + " refid='" + keys[calls] + "'"; | |||||
| if (value == null) { | if (value == null) { | ||||
| Object o = event.getProject().getReference(keys[calls]); | Object o = event.getProject().getReference(keys[calls]); | ||||
| if (expectSame[calls++]) { | if (expectSame[calls++]) { | ||||
| @@ -232,7 +232,7 @@ public class FixCrLfTest { | |||||
| // not used, but public so theoretically must remain for BC? | // not used, but public so theoretically must remain for BC? | ||||
| @Deprecated | @Deprecated | ||||
| public void assertEqualContent(File expect, File result) throws AssertionFailedError, IOException { | public void assertEqualContent(File expect, File result) throws AssertionFailedError, IOException { | ||||
| assertTrue("Expected file " + result + " doesn\'t exist", result.exists()); | |||||
| assertTrue("Expected file " + result + " doesn't exist", result.exists()); | |||||
| try (InputStream inExpect = new BufferedInputStream(Files.newInputStream(expect.toPath())); | try (InputStream inExpect = new BufferedInputStream(Files.newInputStream(expect.toPath())); | ||||
| InputStream inResult = new BufferedInputStream(Files.newInputStream(result.toPath()))) { | InputStream inResult = new BufferedInputStream(Files.newInputStream(result.toPath()))) { | ||||
| @@ -48,7 +48,7 @@ public class CommandlineTest { | |||||
| s = Commandline.translateCommandline(null); | s = Commandline.translateCommandline(null); | ||||
| assertEquals("null", 0, s.length); | assertEquals("null", 0, s.length); | ||||
| s = Commandline.translateCommandline("1 \'2\' 3"); | |||||
| s = Commandline.translateCommandline("1 '2' 3"); | |||||
| assertEquals("Simple case with single quotes", 3, s.length); | assertEquals("Simple case with single quotes", 3, s.length); | ||||
| assertEquals("Single quotes have been stripped", "2", s[1]); | assertEquals("Single quotes have been stripped", "2", s[1]); | ||||
| @@ -60,15 +60,15 @@ public class CommandlineTest { | |||||
| assertEquals("Case with double quotes and whitespace", 3, s.length); | assertEquals("Case with double quotes and whitespace", 3, s.length); | ||||
| assertEquals("Double quotes stripped, space included", "2 3", s[1]); | assertEquals("Double quotes stripped, space included", "2 3", s[1]); | ||||
| s = Commandline.translateCommandline("1 \"2\'3\" 4"); | |||||
| s = Commandline.translateCommandline("1 \"2'3\" 4"); | |||||
| assertEquals("Case with double quotes around single quote", 3, s.length); | assertEquals("Case with double quotes around single quote", 3, s.length); | ||||
| assertEquals("Double quotes stripped, single quote included", "2\'3", s[1]); | |||||
| assertEquals("Double quotes stripped, single quote included", "2'3", s[1]); | |||||
| s = Commandline.translateCommandline("1 \'2 3\' 4"); | |||||
| s = Commandline.translateCommandline("1 '2 3' 4"); | |||||
| assertEquals("Case with single quotes and whitespace", 3, s.length); | assertEquals("Case with single quotes and whitespace", 3, s.length); | ||||
| assertEquals("Single quotes stripped, space included", "2 3", s[1]); | assertEquals("Single quotes stripped, space included", "2 3", s[1]); | ||||
| s = Commandline.translateCommandline("1 \'2\"3\' 4"); | |||||
| s = Commandline.translateCommandline("1 '2\"3' 4"); | |||||
| assertEquals("Case with single quotes around double quote", 3, s.length); | assertEquals("Case with single quotes around double quote", 3, s.length); | ||||
| assertEquals("Single quotes stripped, double quote included", "2\"3", s[1]); | assertEquals("Single quotes stripped, double quote included", "2\"3", s[1]); | ||||
| @@ -93,15 +93,15 @@ public class CommandlineTest { | |||||
| assertEquals("Doublequoted null arg", 1, s.length); | assertEquals("Doublequoted null arg", 1, s.length); | ||||
| assertEquals("Doublequoted null arg", "", s[0]); | assertEquals("Doublequoted null arg", "", s[0]); | ||||
| s = Commandline.translateCommandline("\'\' a"); | |||||
| s = Commandline.translateCommandline("'' a"); | |||||
| assertEquals("Singlequoted null arg prepend", 2, s.length); | assertEquals("Singlequoted null arg prepend", 2, s.length); | ||||
| assertEquals("Singlequoted null arg prepend", "", s[0]); | assertEquals("Singlequoted null arg prepend", "", s[0]); | ||||
| assertEquals("Singlequoted null arg prepend", "a", s[1]); | assertEquals("Singlequoted null arg prepend", "a", s[1]); | ||||
| s = Commandline.translateCommandline("a \'\'"); | |||||
| s = Commandline.translateCommandline("a ''"); | |||||
| assertEquals("Singlequoted null arg append", 2, s.length); | assertEquals("Singlequoted null arg append", 2, s.length); | ||||
| assertEquals("Singlequoted null arg append", "a", s[0]); | assertEquals("Singlequoted null arg append", "a", s[0]); | ||||
| assertEquals("Singlequoted null arg append", "", s[1]); | assertEquals("Singlequoted null arg append", "", s[1]); | ||||
| s = Commandline.translateCommandline("\'\'"); | |||||
| s = Commandline.translateCommandline("''"); | |||||
| assertEquals("Singlequoted null arg", 1, s.length); | assertEquals("Singlequoted null arg", 1, s.length); | ||||
| assertEquals("Singlequoted null arg", "", s[0]); | assertEquals("Singlequoted null arg", "", s[0]); | ||||
| } | } | ||||
| @@ -112,8 +112,8 @@ public class CommandlineTest { | |||||
| @Test | @Test | ||||
| public void testTokenizerUnbalancedSingleQuote() { | public void testTokenizerUnbalancedSingleQuote() { | ||||
| thrown.expect(BuildException.class); | thrown.expect(BuildException.class); | ||||
| thrown.expectMessage("unbalanced quotes in a \'b c"); | |||||
| Commandline.translateCommandline("a \'b c"); | |||||
| thrown.expectMessage("unbalanced quotes in a 'b c"); | |||||
| Commandline.translateCommandline("a 'b c"); | |||||
| } | } | ||||
| /** | /** | ||||
| @@ -132,8 +132,8 @@ public class CommandlineTest { | |||||
| assertEquals("", Commandline.toString(null)); | assertEquals("", Commandline.toString(null)); | ||||
| assertEquals("1 2 3", Commandline.toString(new String[] {"1", "2", "3"})); | assertEquals("1 2 3", Commandline.toString(new String[] {"1", "2", "3"})); | ||||
| assertEquals("1 \"2 3\"", Commandline.toString(new String[] {"1", "2 3"})); | assertEquals("1 \"2 3\"", Commandline.toString(new String[] {"1", "2 3"})); | ||||
| assertEquals("1 \"2\'3\"", Commandline.toString(new String[] {"1", "2\'3"})); | |||||
| assertEquals("1 \'2\"3\'", Commandline.toString(new String[] {"1", "2\"3"})); | |||||
| assertEquals("1 \"2'3\"", Commandline.toString(new String[] {"1", "2'3"})); | |||||
| assertEquals("1 '2\"3'", Commandline.toString(new String[] {"1", "2\"3"})); | |||||
| } | } | ||||
| @Test | @Test | ||||
| @@ -51,7 +51,7 @@ public class DirSetTest extends AbstractFileSetTest { | |||||
| @Test | @Test | ||||
| public void testDirSetFromFileSet() { | public void testDirSetFromFileSet() { | ||||
| thrown.expect(BuildException.class); | thrown.expect(BuildException.class); | ||||
| thrown.expectMessage("dummy doesn\'t denote a DirSet"); | |||||
| thrown.expectMessage("dummy doesn't denote a DirSet"); | |||||
| fs.setProject(getProject()); | fs.setProject(getProject()); | ||||
| getProject().addReference("dummy", fs); | getProject().addReference("dummy", fs); | ||||
| ds.setRefid(new Reference(getProject(), "dummy")); | ds.setRefid(new Reference(getProject(), "dummy")); | ||||
| @@ -61,7 +61,7 @@ public class DirSetTest extends AbstractFileSetTest { | |||||
| @Test | @Test | ||||
| public void testFileSetFromDirSet() { | public void testFileSetFromDirSet() { | ||||
| thrown.expect(BuildException.class); | thrown.expect(BuildException.class); | ||||
| thrown.expectMessage("dummy doesn\'t denote a FileSet"); | |||||
| thrown.expectMessage("dummy doesn't denote a FileSet"); | |||||
| getProject().addReference("dummy", ds); | getProject().addReference("dummy", ds); | ||||
| fs.setRefid(new Reference(getProject(), "dummy")); | fs.setRefid(new Reference(getProject(), "dummy")); | ||||
| fs.getDir(getProject()); | fs.getDir(getProject()); | ||||
| @@ -42,8 +42,8 @@ public class EnumeratedAttributeTest { | |||||
| assertFalse(value.toUpperCase() + " is in TestNormal", | assertFalse(value.toUpperCase() + " is in TestNormal", | ||||
| t1.containsValue(value.toUpperCase())); | t1.containsValue(value.toUpperCase())); | ||||
| } | } | ||||
| assertFalse("TestNormal doesn\'t have \"d\" attribute", t1.containsValue("d")); | |||||
| assertFalse("TestNull doesn\'t have \"d\" attribute and doesn\'t die", | |||||
| assertFalse("TestNormal doesn't have \"d\" attribute", t1.containsValue("d")); | |||||
| assertFalse("TestNull doesn't have \"d\" attribute and doesn't die", | |||||
| (new TestNull()).containsValue("d")); | (new TestNull()).containsValue("d")); | ||||
| } | } | ||||
| @@ -128,7 +128,7 @@ public class PathTest { | |||||
| String[] l = p.list(); | String[] l = p.list(); | ||||
| if (isUnixStyle) { | if (isUnixStyle) { | ||||
| assertEquals("no drives on Unix", 2, l.length); | assertEquals("no drives on Unix", 2, l.length); | ||||
| assertThat("c resolved relative to project\'s basedir", | |||||
| assertThat("c resolved relative to project's basedir", | |||||
| l[0], endsWith("/c")); | l[0], endsWith("/c")); | ||||
| assertEquals("/test", l[1]); | assertEquals("/test", l[1]); | ||||
| } else if (isNetWare) { | } else if (isNetWare) { | ||||
| @@ -146,10 +146,10 @@ public class PathTest { | |||||
| String[] l = p.list(); | String[] l = p.list(); | ||||
| if (isUnixStyle) { | if (isUnixStyle) { | ||||
| assertEquals("no drives on Unix", 4, l.length); | assertEquals("no drives on Unix", 4, l.length); | ||||
| assertThat("c resolved relative to project\'s basedir", | |||||
| assertThat("c resolved relative to project's basedir", | |||||
| l[0], endsWith("/c")); | l[0], endsWith("/c")); | ||||
| assertEquals("/test", l[1]); | assertEquals("/test", l[1]); | ||||
| assertThat("d resolved relative to project\'s basedir", | |||||
| assertThat("d resolved relative to project's basedir", | |||||
| l[2], endsWith("/d")); | l[2], endsWith("/d")); | ||||
| assertEquals("/programs", l[3]); | assertEquals("/programs", l[3]); | ||||
| } else if (isNetWare) { | } else if (isNetWare) { | ||||
| @@ -169,7 +169,7 @@ public class PathTest { | |||||
| String[] l = p.list(); | String[] l = p.list(); | ||||
| if (isUnixStyle) { | if (isUnixStyle) { | ||||
| assertEquals("no drives on Unix", 2, l.length); | assertEquals("no drives on Unix", 2, l.length); | ||||
| assertThat("c resolved relative to project\'s basedir", | |||||
| assertThat("c resolved relative to project's basedir", | |||||
| l[0], endsWith("/c")); | l[0], endsWith("/c")); | ||||
| assertEquals("/test", l[1]); | assertEquals("/test", l[1]); | ||||
| } else if (isNetWare) { | } else if (isNetWare) { | ||||
| @@ -187,10 +187,10 @@ public class PathTest { | |||||
| String[] l = p.list(); | String[] l = p.list(); | ||||
| if (isUnixStyle) { | if (isUnixStyle) { | ||||
| assertEquals("no drives on Unix", 4, l.length); | assertEquals("no drives on Unix", 4, l.length); | ||||
| assertThat("c resolved relative to project\'s basedir", | |||||
| assertThat("c resolved relative to project's basedir", | |||||
| l[0], endsWith("/c")); | l[0], endsWith("/c")); | ||||
| assertEquals("/test", l[1]); | assertEquals("/test", l[1]); | ||||
| assertThat("d resolved relative to project\'s basedir", | |||||
| assertThat("d resolved relative to project's basedir", | |||||
| l[2], endsWith("/d")); | l[2], endsWith("/d")); | ||||
| assertEquals("/programs", l[3]); | assertEquals("/programs", l[3]); | ||||
| } else if (isNetWare) { | } else if (isNetWare) { | ||||
| @@ -211,7 +211,7 @@ public class PathTest { | |||||
| String[] l = p.list(); | String[] l = p.list(); | ||||
| if (isUnixStyle) { | if (isUnixStyle) { | ||||
| assertEquals("no drives on Unix", 2, l.length); | assertEquals("no drives on Unix", 2, l.length); | ||||
| assertThat("sys resolved relative to project\'s basedir", | |||||
| assertThat("sys resolved relative to project's basedir", | |||||
| l[0], endsWith("/sys")); | l[0], endsWith("/sys")); | ||||
| assertEquals("/test", l[1]); | assertEquals("/test", l[1]); | ||||
| } else if (isNetWare) { | } else if (isNetWare) { | ||||
| @@ -219,9 +219,9 @@ public class PathTest { | |||||
| assertEquals("volumes on NetWare", 1, l.length); | assertEquals("volumes on NetWare", 1, l.length); | ||||
| } else { | } else { | ||||
| assertEquals("no multiple character-length volumes on Windows", 2, l.length); | assertEquals("no multiple character-length volumes on Windows", 2, l.length); | ||||
| assertThat("sys resolved relative to project\'s basedir", | |||||
| assertThat("sys resolved relative to project's basedir", | |||||
| l[0], endsWith("\\sys")); | l[0], endsWith("\\sys")); | ||||
| assertThat("test resolved relative to project\'s basedir", | |||||
| assertThat("test resolved relative to project's basedir", | |||||
| l[1], endsWith("\\test")); | l[1], endsWith("\\test")); | ||||
| } | } | ||||
| } | } | ||||
| @@ -233,10 +233,10 @@ public class PathTest { | |||||
| String[] l = p.list(); | String[] l = p.list(); | ||||
| if (isUnixStyle) { | if (isUnixStyle) { | ||||
| assertEquals("no drives on Unix", 4, l.length); | assertEquals("no drives on Unix", 4, l.length); | ||||
| assertThat("sys resolved relative to project\'s basedir", | |||||
| assertThat("sys resolved relative to project's basedir", | |||||
| l[0], endsWith("/sys")); | l[0], endsWith("/sys")); | ||||
| assertEquals("/test", l[1]); | assertEquals("/test", l[1]); | ||||
| assertThat("dev resolved relative to project\'s basedir", | |||||
| assertThat("dev resolved relative to project's basedir", | |||||
| l[2], endsWith("/dev")); | l[2], endsWith("/dev")); | ||||
| assertEquals("/temp", l[3]); | assertEquals("/temp", l[3]); | ||||
| } else if (isNetWare) { | } else if (isNetWare) { | ||||
| @@ -245,13 +245,13 @@ public class PathTest { | |||||
| assertEquals("dev:\\temp", l[1].toLowerCase(Locale.US)); | assertEquals("dev:\\temp", l[1].toLowerCase(Locale.US)); | ||||
| } else { | } else { | ||||
| assertEquals("no multiple character-length volumes on Windows", 4, l.length); | assertEquals("no multiple character-length volumes on Windows", 4, l.length); | ||||
| assertThat("sys resolved relative to project\'s basedir", | |||||
| assertThat("sys resolved relative to project's basedir", | |||||
| l[0], endsWith("\\sys")); | l[0], endsWith("\\sys")); | ||||
| assertThat("test resolved relative to project\'s basedir", | |||||
| assertThat("test resolved relative to project's basedir", | |||||
| l[1], endsWith("\\test")); | l[1], endsWith("\\test")); | ||||
| assertThat("dev resolved relative to project\'s basedir", | |||||
| assertThat("dev resolved relative to project's basedir", | |||||
| l[2], endsWith("\\dev")); | l[2], endsWith("\\dev")); | ||||
| assertThat("temp resolved relative to project\'s basedir", | |||||
| assertThat("temp resolved relative to project's basedir", | |||||
| l[3], endsWith("\\temp")); | l[3], endsWith("\\temp")); | ||||
| } | } | ||||
| } | } | ||||
| @@ -263,7 +263,7 @@ public class PathTest { | |||||
| String[] l = p.list(); | String[] l = p.list(); | ||||
| if (isUnixStyle) { | if (isUnixStyle) { | ||||
| assertEquals("no drives on Unix", 2, l.length); | assertEquals("no drives on Unix", 2, l.length); | ||||
| assertThat("sys resolved relative to project\'s basedir", | |||||
| assertThat("sys resolved relative to project's basedir", | |||||
| l[0], endsWith("/sys")); | l[0], endsWith("/sys")); | ||||
| assertEquals("/test", l[1]); | assertEquals("/test", l[1]); | ||||
| } else if (isNetWare) { | } else if (isNetWare) { | ||||
| @@ -271,9 +271,9 @@ public class PathTest { | |||||
| assertEquals("sys:\\test", l[0].toLowerCase(Locale.US)); | assertEquals("sys:\\test", l[0].toLowerCase(Locale.US)); | ||||
| } else { | } else { | ||||
| assertEquals("no multiple character-length volumes on Windows", 2, l.length); | assertEquals("no multiple character-length volumes on Windows", 2, l.length); | ||||
| assertThat("sys resolved relative to project\'s basedir", | |||||
| assertThat("sys resolved relative to project's basedir", | |||||
| l[0], endsWith("\\sys")); | l[0], endsWith("\\sys")); | ||||
| assertThat("test resolved relative to project\'s basedir", | |||||
| assertThat("test resolved relative to project's basedir", | |||||
| l[1], endsWith("\\test")); | l[1], endsWith("\\test")); | ||||
| } | } | ||||
| } | } | ||||
| @@ -285,10 +285,10 @@ public class PathTest { | |||||
| String[] l = p.list(); | String[] l = p.list(); | ||||
| if (isUnixStyle) { | if (isUnixStyle) { | ||||
| assertEquals("no drives on Unix", 4, l.length); | assertEquals("no drives on Unix", 4, l.length); | ||||
| assertThat("sys resolved relative to project\'s basedir", | |||||
| assertThat("sys resolved relative to project's basedir", | |||||
| l[0], endsWith("/sys")); | l[0], endsWith("/sys")); | ||||
| assertEquals("/test", l[1]); | assertEquals("/test", l[1]); | ||||
| assertThat("dev resolved relative to project\'s basedir", | |||||
| assertThat("dev resolved relative to project's basedir", | |||||
| l[2], endsWith("/dev")); | l[2], endsWith("/dev")); | ||||
| assertEquals("/temp", l[3]); | assertEquals("/temp", l[3]); | ||||
| } else if (isNetWare) { | } else if (isNetWare) { | ||||
| @@ -297,13 +297,13 @@ public class PathTest { | |||||
| assertEquals("dev:\\temp", l[1].toLowerCase(Locale.US)); | assertEquals("dev:\\temp", l[1].toLowerCase(Locale.US)); | ||||
| } else { | } else { | ||||
| assertEquals("no multiple character-length volumes on Windows", 4, l.length); | assertEquals("no multiple character-length volumes on Windows", 4, l.length); | ||||
| assertThat("sys resolved relative to project\'s basedir", | |||||
| assertThat("sys resolved relative to project's basedir", | |||||
| l[0], endsWith("\\sys")); | l[0], endsWith("\\sys")); | ||||
| assertThat("test resolved relative to project\'s basedir", | |||||
| assertThat("test resolved relative to project's basedir", | |||||
| l[1], endsWith("\\test")); | l[1], endsWith("\\test")); | ||||
| assertThat("dev resolved relative to project\'s basedir", | |||||
| assertThat("dev resolved relative to project's basedir", | |||||
| l[2], endsWith("\\dev")); | l[2], endsWith("\\dev")); | ||||
| assertThat("temp resolved relative to project\'s basedir", | |||||
| assertThat("temp resolved relative to project's basedir", | |||||
| l[3], endsWith("\\temp")); | l[3], endsWith("\\temp")); | ||||
| } | } | ||||
| } | } | ||||
| @@ -317,7 +317,7 @@ public class PathTest { | |||||
| String[] l = p.list(); | String[] l = p.list(); | ||||
| if (isUnixStyle) { | if (isUnixStyle) { | ||||
| assertEquals("no drives on Unix", 3, l.length); | assertEquals("no drives on Unix", 3, l.length); | ||||
| assertThat("sys resolved relative to project\'s basedir", | |||||
| assertThat("sys resolved relative to project's basedir", | |||||
| l[0], endsWith("/SYS")); | l[0], endsWith("/SYS")); | ||||
| assertEquals("/JAVA/lib/rt.jar", l[1]); | assertEquals("/JAVA/lib/rt.jar", l[1]); | ||||
| assertEquals("/JAVA/lib/classes.zip", l[2]); | assertEquals("/JAVA/lib/classes.zip", l[2]); | ||||
| @@ -327,11 +327,11 @@ public class PathTest { | |||||
| assertEquals("sys:\\java\\lib\\classes.zip", l[1].toLowerCase(Locale.US)); | assertEquals("sys:\\java\\lib\\classes.zip", l[1].toLowerCase(Locale.US)); | ||||
| } else { | } else { | ||||
| assertEquals("no multiple character-length volumes on Windows", 3, l.length); | assertEquals("no multiple character-length volumes on Windows", 3, l.length); | ||||
| assertThat("sys resolved relative to project\'s basedir", | |||||
| assertThat("sys resolved relative to project's basedir", | |||||
| l[0], endsWith("\\SYS")); | l[0], endsWith("\\SYS")); | ||||
| assertThat("java/lib/rt.jar resolved relative to project\'s basedir", | |||||
| assertThat("java/lib/rt.jar resolved relative to project's basedir", | |||||
| l[1], endsWith("\\JAVA\\lib\\rt.jar")); | l[1], endsWith("\\JAVA\\lib\\rt.jar")); | ||||
| assertThat("java/lib/classes.zip resolved relative to project\'s basedir", | |||||
| assertThat("java/lib/classes.zip resolved relative to project's basedir", | |||||
| l[2], endsWith("\\JAVA\\lib\\classes.zip")); | l[2], endsWith("\\JAVA\\lib\\classes.zip")); | ||||
| } | } | ||||
| } | } | ||||
| @@ -458,10 +458,10 @@ public class FileUtilsTest { | |||||
| assertTrue("Non existing files", | assertTrue("Non existing files", | ||||
| getFileUtils().contentEquals(new File(ROOT, "foo"), | getFileUtils().contentEquals(new File(ROOT, "foo"), | ||||
| new File(ROOT, "bar"))); | new File(ROOT, "bar"))); | ||||
| assertFalse("One exists, the other one doesn\'t", | |||||
| assertFalse("One exists, the other one doesn't", | |||||
| getFileUtils().contentEquals(new File(ROOT, "foo"), | getFileUtils().contentEquals(new File(ROOT, "foo"), | ||||
| new File(ROOT, "build.xml"))); | new File(ROOT, "build.xml"))); | ||||
| assertFalse("Don\'t compare directories", | |||||
| assertFalse("Don't compare directories", | |||||
| getFileUtils().contentEquals(new File(ROOT, "src"), | getFileUtils().contentEquals(new File(ROOT, "src"), | ||||
| new File(ROOT, "src"))); | new File(ROOT, "src"))); | ||||
| assertTrue("File equals itself", | assertTrue("File equals itself", | ||||
| @@ -42,7 +42,7 @@ public class GlobPatternMapperTest { | |||||
| public void testNoPatternAtAll() { | public void testNoPatternAtAll() { | ||||
| m.setFrom("foobar"); | m.setFrom("foobar"); | ||||
| m.setTo("baz"); | m.setTo("baz"); | ||||
| assertNull("Shouldn\'t match foobar", m.mapFileName("plonk")); | |||||
| assertNull("Shouldn't match foobar", m.mapFileName("plonk")); | |||||
| String[] result = m.mapFileName("foobar"); | String[] result = m.mapFileName("foobar"); | ||||
| assertNotNull("Should match foobar", result); | assertNotNull("Should match foobar", result); | ||||
| assertEquals("only one result for foobar", 1, result.length); | assertEquals("only one result for foobar", 1, result.length); | ||||
| @@ -53,7 +53,7 @@ public class GlobPatternMapperTest { | |||||
| public void testPostfixOnly() { | public void testPostfixOnly() { | ||||
| m.setFrom("*foo"); | m.setFrom("*foo"); | ||||
| m.setTo("*plonk"); | m.setTo("*plonk"); | ||||
| assertNull("Shouldn\'t match *foo", m.mapFileName("bar.baz")); | |||||
| assertNull("Shouldn't match *foo", m.mapFileName("bar.baz")); | |||||
| String[] result = m.mapFileName("bar.foo"); | String[] result = m.mapFileName("bar.foo"); | ||||
| assertNotNull("Should match *.foo", result); | assertNotNull("Should match *.foo", result); | ||||
| assertEquals("only one result for bar.foo", 1, result.length); | assertEquals("only one result for bar.foo", 1, result.length); | ||||
| @@ -69,7 +69,7 @@ public class GlobPatternMapperTest { | |||||
| public void testPrefixOnly() { | public void testPrefixOnly() { | ||||
| m.setFrom("foo*"); | m.setFrom("foo*"); | ||||
| m.setTo("plonk*"); | m.setTo("plonk*"); | ||||
| assertNull("Shouldn\'t match foo*", m.mapFileName("bar.baz")); | |||||
| assertNull("Shouldn't match foo*", m.mapFileName("bar.baz")); | |||||
| String[] result = m.mapFileName("foo.bar"); | String[] result = m.mapFileName("foo.bar"); | ||||
| assertNotNull("Should match foo*", result); | assertNotNull("Should match foo*", result); | ||||
| assertEquals("only one result for foo.bar", 1, result.length); | assertEquals("only one result for foo.bar", 1, result.length); | ||||
| @@ -85,7 +85,7 @@ public class GlobPatternMapperTest { | |||||
| public void testPreAndPostfix() { | public void testPreAndPostfix() { | ||||
| m.setFrom("foo*bar"); | m.setFrom("foo*bar"); | ||||
| m.setTo("plonk*pling"); | m.setTo("plonk*pling"); | ||||
| assertNull("Shouldn\'t match foo*bar", m.mapFileName("bar.baz")); | |||||
| assertNull("Shouldn't match foo*bar", m.mapFileName("bar.baz")); | |||||
| String[] result = m.mapFileName("foo.bar"); | String[] result = m.mapFileName("foo.bar"); | ||||
| assertNotNull("Should match foo*bar", result); | assertNotNull("Should match foo*bar", result); | ||||
| assertEquals("only one result for foo.bar", 1, result.length); | assertEquals("only one result for foo.bar", 1, result.length); | ||||
| @@ -53,26 +53,26 @@ public abstract class RegexpMatcherTest { | |||||
| reg.setPattern("aaaa"); | reg.setPattern("aaaa"); | ||||
| assertTrue("aaaa should match itself", reg.matches("aaaa")); | assertTrue("aaaa should match itself", reg.matches("aaaa")); | ||||
| assertTrue("aaaa should match xaaaa", reg.matches("xaaaa")); | assertTrue("aaaa should match xaaaa", reg.matches("xaaaa")); | ||||
| assertFalse("aaaa shouldn\'t match xaaa", reg.matches("xaaa")); | |||||
| assertFalse("aaaa shouldn't match xaaa", reg.matches("xaaa")); | |||||
| reg.setPattern("^aaaa"); | reg.setPattern("^aaaa"); | ||||
| assertFalse("^aaaa shouldn\'t match xaaaa", reg.matches("xaaaa")); | |||||
| assertFalse("^aaaa shouldn't match xaaaa", reg.matches("xaaaa")); | |||||
| assertTrue("^aaaa should match aaaax", reg.matches("aaaax")); | assertTrue("^aaaa should match aaaax", reg.matches("aaaax")); | ||||
| reg.setPattern("aaaa$"); | reg.setPattern("aaaa$"); | ||||
| assertFalse("aaaa$ shouldn\'t match aaaax", reg.matches("aaaax")); | |||||
| assertFalse("aaaa$ shouldn't match aaaax", reg.matches("aaaax")); | |||||
| assertTrue("aaaa$ should match xaaaa", reg.matches("xaaaa")); | assertTrue("aaaa$ should match xaaaa", reg.matches("xaaaa")); | ||||
| reg.setPattern("[0-9]+"); | reg.setPattern("[0-9]+"); | ||||
| assertTrue("[0-9]+ should match 123", reg.matches("123")); | assertTrue("[0-9]+ should match 123", reg.matches("123")); | ||||
| assertTrue("[0-9]+ should match 1", reg.matches("1")); | assertTrue("[0-9]+ should match 1", reg.matches("1")); | ||||
| assertFalse("[0-9]+ shouldn\'t match \'\'", reg.matches("")); | |||||
| assertFalse("[0-9]+ shouldn\'t match a", reg.matches("a")); | |||||
| assertFalse("[0-9]+ shouldn't match ''", reg.matches("")); | |||||
| assertFalse("[0-9]+ shouldn't match a", reg.matches("a")); | |||||
| reg.setPattern("[0-9]*"); | reg.setPattern("[0-9]*"); | ||||
| assertTrue("[0-9]* should match 123", reg.matches("123")); | assertTrue("[0-9]* should match 123", reg.matches("123")); | ||||
| assertTrue("[0-9]* should match 1", reg.matches("1")); | assertTrue("[0-9]* should match 1", reg.matches("1")); | ||||
| assertTrue("[0-9]* should match \'\'", reg.matches("")); | |||||
| assertTrue("[0-9]* should match ''", reg.matches("")); | |||||
| assertTrue("[0-9]* should match a", reg.matches("a")); | assertTrue("[0-9]* should match a", reg.matches("a")); | ||||
| reg.setPattern("([0-9]+)=\\1"); | reg.setPattern("([0-9]+)=\\1"); | ||||
| assertTrue("([0-9]+)=\\1 should match 1=1", reg.matches("1=1")); | assertTrue("([0-9]+)=\\1 should match 1=1", reg.matches("1=1")); | ||||
| assertFalse("([0-9]+)=\\1 shouldn\'t match 1=2", reg.matches("1=2")); | |||||
| assertFalse("([0-9]+)=\\1 shouldn't match 1=2", reg.matches("1=2")); | |||||
| } | } | ||||
| @Test | @Test | ||||