Skip to content

Commit

Permalink
releaase 0.9.9
Browse files Browse the repository at this point in the history
  • Loading branch information
trol73 committed Dec 28, 2016
1 parent 23bbd88 commit 3703cda
Show file tree
Hide file tree
Showing 253 changed files with 125 additions and 3,713 deletions.
2 changes: 1 addition & 1 deletion src/main/com/ibm/icu/text/CharsetDetector.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
*******************************************************************************
* Copyright (C) 2005-2013, International Business Machines Corporation and *
* others. All Rights Reserved. *
Expand Down
2 changes: 1 addition & 1 deletion src/main/com/ibm/icu/text/CharsetMatch.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
*******************************************************************************
* Copyright (C) 2005-2012, International Business Machines Corporation and *
* others. All Rights Reserved. *
Expand Down
2 changes: 1 addition & 1 deletion src/main/com/ibm/icu/text/CharsetRecog_UTF8.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
*******************************************************************************
* Copyright (C) 2005 - 2012, International Business Machines Corporation and *
* others. All Rights Reserved. *
Expand Down
2 changes: 1 addition & 1 deletion src/main/com/ibm/icu/text/CharsetRecognizer.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
*******************************************************************************
* Copyright (C) 2005-2012, International Business Machines Corporation and *
* others. All Rights Reserved. *
Expand Down
2 changes: 1 addition & 1 deletion src/main/com/mucommander/bookmark/BookmarkParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ public void endElement(String uri, String localName, String qName) throws SAXExc
}
}

private static final Logger getLogger() {
private static Logger getLogger() {
if (logger == null) {
logger = LoggerFactory.getLogger(BookmarkParser.class);
}
Expand Down
18 changes: 0 additions & 18 deletions src/main/com/mucommander/commons/conf/Configuration.java
Original file line number Diff line number Diff line change
@@ -1,21 +1,3 @@
/**
* This file is part of muCommander, http://www.mucommander.com
* Copyright (C) 2002-2010 Maxence Bernard
*
* muCommander is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* muCommander is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

package com.mucommander.commons.conf;

import java.io.*;
Expand Down
25 changes: 13 additions & 12 deletions src/main/com/mucommander/commons/file/AbstractArchiveEntryFile.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
* This file is part of muCommander, http://www.mucommander.com
* Copyright (C) 2002-2010 Maxence Bernard
*
Expand Down Expand Up @@ -58,7 +58,7 @@
public abstract class AbstractArchiveEntryFile extends AbstractFile {

/** The archive file that contains this entry */
protected AbstractArchiveFile archiveFile;
AbstractArchiveFile archiveFile;

/** This entry file's parent, can be the archive file itself if this entry is located at the top level */
protected AbstractFile parent;
Expand Down Expand Up @@ -95,7 +95,7 @@ public ArchiveEntry getEntry() {
*
* @return the AbstractArchiveFile that contains the entry represented by this file
*/
public AbstractArchiveFile getArchiveFile() {
AbstractArchiveFile getArchiveFile() {
return archiveFile;
}

Expand All @@ -107,14 +107,15 @@ public AbstractArchiveFile getArchiveFile() {
*
* @return the relative path of this entry, with respect to the archive file.
*/
public String getRelativeEntryPath() {
private String getRelativeEntryPath() {
String path = entry.getPath();

// Replace all occurrences of the entry's separator by the archive file's separator, only if the separator is
// not "/" (i.e. the entry path separator).
String separator = getSeparator();
if(!separator.equals("/"))
if (!separator.equals("/")) {
path = path.replace("/", separator);
}

return path;
}
Expand Down Expand Up @@ -146,17 +147,17 @@ public boolean isArchive() {
}

@Override
public AbstractFile[] ls() throws IOException, UnsupportedFileOperationException {
public AbstractFile[] ls() throws IOException {
return archiveFile.ls(this, null, null);
}

@Override
public AbstractFile[] ls(FilenameFilter filter) throws IOException, UnsupportedFileOperationException {
public AbstractFile[] ls(FilenameFilter filter) throws IOException {
return archiveFile.ls(this, filter, null);
}

@Override
public AbstractFile[] ls(FileFilter filter) throws IOException, UnsupportedFileOperationException {
public AbstractFile[] ls(FileFilter filter) throws IOException {
return archiveFile.ls(this, null, filter);
}

Expand Down Expand Up @@ -187,7 +188,7 @@ public FilePermissions getPermissions() {
}

@Override
public void changePermission(int access, int permission, boolean enabled) throws IOException, UnsupportedFileOperationException {
public void changePermission(int access, int permission, boolean enabled) throws IOException {
changePermissions(ByteUtils.setBit(getPermissions().getIntValue(), (permission << (access*3)), enabled));
}

Expand Down Expand Up @@ -235,7 +236,7 @@ public boolean isSystem() {
* {@link FileOperation#GET_FREE_SPACE} operations.
*/
@Override
public long getFreeSpace() throws IOException, UnsupportedFileOperationException {
public long getFreeSpace() throws IOException {
return archiveFile.getFreeSpace();
}

Expand All @@ -247,7 +248,7 @@ public long getFreeSpace() throws IOException, UnsupportedFileOperationException
* {@link FileOperation#GET_TOTAL_SPACE} operations.
*/
@Override
public long getTotalSpace() throws IOException, UnsupportedFileOperationException {
public long getTotalSpace() throws IOException {
return archiveFile.getTotalSpace();
}

Expand All @@ -259,7 +260,7 @@ public long getTotalSpace() throws IOException, UnsupportedFileOperationExceptio
* {@link FileOperation#READ_FILE} operations.
*/
@Override
public InputStream getInputStream() throws IOException, UnsupportedFileOperationException {
public InputStream getInputStream() throws IOException {
return archiveFile.getEntryInputStream(entry, null);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
* This file is part of muCommander, http://www.mucommander.com
* Copyright (C) 2002-2010 Maxence Bernard
*
Expand Down
2 changes: 1 addition & 1 deletion src/main/com/mucommander/commons/file/AbstractFile.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
* This file is part of muCommander, http://www.mucommander.com
* Copyright (C) 2002-2010 Maxence Bernard
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
* This file is part of muCommander, http://www.mucommander.com
* Copyright (C) 2002-2010 Maxence Bernard
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
* This file is part of muCommander, http://www.mucommander.com
* Copyright (C) 2002-2010 Maxence Bernard
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
* This file is part of muCommander, http://www.mucommander.com
* Copyright (C) 2002-2010 Maxence Bernard
*
Expand Down
10 changes: 4 additions & 6 deletions src/main/com/mucommander/commons/file/ArchiveEntry.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
* This file is part of muCommander, http://www.mucommander.com
* Copyright (C) 2002-2010 Maxence Bernard
*
Expand Down Expand Up @@ -37,7 +37,7 @@ public class ArchiveEntry extends SimpleFileAttributes {
private static final String SEPARATOR_STRING = String.valueOf(SEPARATOR_CHAR);

/** Encapsulated entry object */
protected Object entryObject;
private Object entryObject;

/** Caches the computed hashcode */
private int hashCode;
Expand Down Expand Up @@ -84,7 +84,7 @@ public int getDepth() {
* @param entryPath the path for which to calculate the depth
* @return the depth of the given entry path
*/
public static int getDepth(String entryPath) {
static int getDepth(String entryPath) {
return PathUtils.getDepth(entryPath, SEPARATOR_STRING);
}

Expand Down Expand Up @@ -168,10 +168,8 @@ public void setPath(String path) {
* @see PathUtils#pathEquals(String, String, String)
*/
public boolean equals(Object o) {
if(!(o instanceof ArchiveEntry))
return false;
return o instanceof ArchiveEntry && PathUtils.pathEquals(getPath(), ((ArchiveEntry) o).getPath(), SEPARATOR_STRING);

return PathUtils.pathEquals(getPath(), ((ArchiveEntry)o).getPath(), SEPARATOR_STRING);
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
* This file is part of muCommander, http://www.mucommander.com
* Copyright (C) 2002-2010 Maxence Bernard
*
Expand Down
24 changes: 12 additions & 12 deletions src/main/com/mucommander/commons/file/ArchiveEntryTree.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
* This file is part of muCommander, http://www.mucommander.com
* Copyright (C) 2002-2010 Maxence Bernard
*
Expand Down Expand Up @@ -32,21 +32,21 @@
*
* @author Maxence Bernard
*/
public class ArchiveEntryTree extends DefaultMutableTreeNode {
class ArchiveEntryTree extends DefaultMutableTreeNode {
private static Logger logger = LoggerFactory.getLogger(ArchiveEntryTree.class);

/**
* Creates a new empty tree.
*/
public ArchiveEntryTree() {
ArchiveEntryTree() {
}

/**
* Adds the given entry to the archive tree, creating parent nodes as necessary.
*
* @param entry the entry to add to the tree
*/
public void addArchiveEntry(ArchiveEntry entry) {
void addArchiveEntry(ArchiveEntry entry) {
String entryPath = entry.getPath();
int entryDepth = entry.getDepth();
int slashPos = 0;
Expand Down Expand Up @@ -75,7 +75,7 @@ public void addArchiveEntry(ArchiveEntry entry) {
}

if (matchFound) {
if(d==entryDepth) {
if (d == entryDepth) {
getLogger().trace("Replacing entry for node "+childNode);
// Replace existing entry
childNode.setUserObject(entry);
Expand All @@ -85,12 +85,11 @@ public void addArchiveEntry(ArchiveEntry entry) {
}
}
else {
if(d==entryDepth) {
if (d == entryDepth) {
// create a leaf node for the entry
entry.setExists(true); // the entry has to exist
node.add(new DefaultMutableTreeNode(entry, true));
}
else {
} else {
getLogger().trace("Creating node for "+subPath);
childNode = new DefaultMutableTreeNode(new ArchiveEntry(subPath, true, entry.getLastModifiedDate(), 0, true), true);
node.add(childNode);
Expand All @@ -112,7 +111,7 @@ public void addArchiveEntry(ArchiveEntry entry) {
* @param entryPath the path to the entry to look up in this tree
* @return the node that corresponds to the specified entry path
*/
public DefaultMutableTreeNode findEntryNode(String entryPath) {
DefaultMutableTreeNode findEntryNode(String entryPath) {
int entryDepth = ArchiveEntry.getDepth(entryPath);
int slashPos = 0;
DefaultMutableTreeNode currentNode = this;
Expand All @@ -121,19 +120,20 @@ public DefaultMutableTreeNode findEntryNode(String entryPath) {

int nbChildren = currentNode.getChildCount();
DefaultMutableTreeNode matchNode = null;
for(int c=0; c<nbChildren; c++) {
for (int c=0; c<nbChildren; c++) {
DefaultMutableTreeNode childNode = (DefaultMutableTreeNode)currentNode.getChildAt(c);

// Path comparison is 'trailing slash insensitive'
if(PathUtils.pathEquals(((ArchiveEntry)childNode.getUserObject()).getPath(), subPath, "/")) {
if (PathUtils.pathEquals(((ArchiveEntry)childNode.getUserObject()).getPath(), subPath, "/")) {
// Found the node, let's return it
matchNode = childNode;
break;
}
}

if(matchNode==null)
if (matchNode == null) {
return null; // No node maching the provided path, return null
}

currentNode = matchNode;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
* This file is part of muCommander, http://www.mucommander.com
* Copyright (C) 2002-2010 Maxence Bernard
*
Expand Down
2 changes: 1 addition & 1 deletion src/main/com/mucommander/commons/file/AuthException.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
* This file is part of muCommander, http://www.mucommander.com
* Copyright (C) 2002-2010 Maxence Bernard
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
* This file is part of muCommander, http://www.mucommander.com
* Copyright (C) 2002-2010 Maxence Bernard
*
Expand Down
2 changes: 1 addition & 1 deletion src/main/com/mucommander/commons/file/Authenticator.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
* This file is part of muCommander, http://www.mucommander.com
* Copyright (C) 2002-2010 Maxence Bernard
*
Expand Down
20 changes: 0 additions & 20 deletions src/main/com/mucommander/commons/file/Credentials.java
Original file line number Diff line number Diff line change
@@ -1,23 +1,3 @@
/**
* This file is part of muCommander, http://www.mucommander.com
* Copyright (C) 2002-2010 Maxence Bernard
*
* muCommander is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* muCommander is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/



package com.mucommander.commons.file;

/**
Expand Down
19 changes: 0 additions & 19 deletions src/main/com/mucommander/commons/file/DefaultPathCanonizer.java
Original file line number Diff line number Diff line change
@@ -1,22 +1,3 @@
/**
* This file is part of muCommander, http://www.mucommander.com
* Copyright (C) 2002-2010 Maxence Bernard
*
* muCommander is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* muCommander is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/


package com.mucommander.commons.file;

import java.util.Vector;
Expand Down
Loading

0 comments on commit 3703cda

Please sign in to comment.