CPD Results

The following document contains the results of PMD's CPD 5.6.1.

Duplications

File Line
net\sourceforge\javadpkg\io\impl\DataByteArraySwap.java 102
net\sourceforge\javadpkg\io\impl\DataTempFileSwap.java 140
		this.source = new DataStreamSource(new ByteArrayInputStream(this.out.toByteArray()), this.name, true);
		return this.source;
	}
	
	
	@Override
	public void close() throws IOException {
		try {
			if (this.target != null) {
				try {
					this.target.close();
				} catch (IOException e) {
					throw new IOException("Couldn't close target of swap |" + this.name + "|: " + e.getMessage(), e);
				}
			}
			if (this.source != null) {
				try {
					this.source.close();
				} catch (IOException e) {
					throw new IOException("Couldn't close source of swap |" + this.name + "|: " + e.getMessage(), e);
				}
			}
File Line
net\sourceforge\javadpkg\io\impl\FileMetaDataImpl.java 126
net\sourceforge\javadpkg\io\impl\FileMetaDataImpl.java 350
	public FileMetaDataImpl(FileMetaData parent, String name, FileOwner owner, FileMode mode, Date lastModifiedDate) {
		super();

		if (parent == null)
			throw new IllegalArgumentException("Argument path is null.");
		if (!parent.isDirectory())
			throw new IllegalArgumentException("Argument parent |" + parent.getAbsolutePath() + "| is not a directory.");
		if (name == null)
			throw new IllegalArgumentException("Argument name is null.");
		if (name.isEmpty())
			throw new IllegalArgumentException("An empty name is only valid for the root. Path: " + parent.getAbsolutePath());
		if (name.indexOf('/') != -1)
			throw new IllegalArgumentException("Argument name contains a slash: " + name);
		if (owner == null)
File Line
net\sourceforge\javadpkg\io\impl\FileMetaDataImpl.java 186
net\sourceforge\javadpkg\io\impl\FileMetaDataImpl.java 244
			throw new IllegalArgumentException("Argument path is empty.");
		if (name == null)
			throw new IllegalArgumentException("Argument name is null.");
		if (name.isEmpty())
			throw new IllegalArgumentException("Argument name is empty.");
		if (name.indexOf('/') != -1)
			throw new IllegalArgumentException("Argument name contains a slash: " + name);
		if (owner == null)
			throw new IllegalArgumentException("Argument owner is null.");
		if (mode == null)
			throw new IllegalArgumentException("Argument mode is null.");
		if (length < -1)
			throw new IllegalArgumentException("Argument length is less than -1: " + length);
		if (lastModifiedDate == null)
			throw new IllegalArgumentException("Argument lastModifiedDate is null.");
		
		this.path = this.revisePath(path);