Author: ggregory
Date: Thu Mar 29 19:15:49 2018
New Revision: 1828015
URL: http://svn.apache.org/viewvc?rev=1828015&view=rev
Log:
[VFS-657] FileSelector implementations like FileDepthSelector should throw
Exception.
Modified:
commons/proper/vfs/trunk/commons-vfs2/src/main/java/org/apache/commons/vfs2/AllFileSelector.java
commons/proper/vfs/trunk/commons-vfs2/src/main/java/org/apache/commons/vfs2/FileDepthSelector.java
commons/proper/vfs/trunk/commons-vfs2/src/main/java/org/apache/commons/vfs2/FileExtensionSelector.java
commons/proper/vfs/trunk/commons-vfs2/src/main/java/org/apache/commons/vfs2/FileFilterSelector.java
commons/proper/vfs/trunk/commons-vfs2/src/main/java/org/apache/commons/vfs2/FileTypeSelector.java
commons/proper/vfs/trunk/commons-vfs2/src/main/java/org/apache/commons/vfs2/PatternFileSelector.java
commons/proper/vfs/trunk/src/changes/changes.xml
Modified:
commons/proper/vfs/trunk/commons-vfs2/src/main/java/org/apache/commons/vfs2/AllFileSelector.java
URL:
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/commons-vfs2/src/main/java/org/apache/commons/vfs2/AllFileSelector.java?rev=1828015&r1=1828014&r2=1828015&view=diff
==============================================================================
---
commons/proper/vfs/trunk/commons-vfs2/src/main/java/org/apache/commons/vfs2/AllFileSelector.java
(original)
+++
commons/proper/vfs/trunk/commons-vfs2/src/main/java/org/apache/commons/vfs2/AllFileSelector.java
Thu Mar 29 19:15:49 2018
@@ -27,7 +27,7 @@ public class AllFileSelector implements
* @return true if the file should be selected, false otherwise.
*/
@Override
- public boolean includeFile(final FileSelectInfo fileInfo) {
+ public boolean includeFile(final FileSelectInfo fileInfo) throws Exception
{
return true;
}
@@ -38,7 +38,7 @@ public class AllFileSelector implements
* @return true if descendants should be traversed, false otherwise.
*/
@Override
- public boolean traverseDescendents(final FileSelectInfo fileInfo) {
+ public boolean traverseDescendents(final FileSelectInfo fileInfo) throws
Exception {
return true;
}
}
Modified:
commons/proper/vfs/trunk/commons-vfs2/src/main/java/org/apache/commons/vfs2/FileDepthSelector.java
URL:
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/commons-vfs2/src/main/java/org/apache/commons/vfs2/FileDepthSelector.java?rev=1828015&r1=1828014&r2=1828015&view=diff
==============================================================================
---
commons/proper/vfs/trunk/commons-vfs2/src/main/java/org/apache/commons/vfs2/FileDepthSelector.java
(original)
+++
commons/proper/vfs/trunk/commons-vfs2/src/main/java/org/apache/commons/vfs2/FileDepthSelector.java
Thu Mar 29 19:15:49 2018
@@ -67,7 +67,7 @@ public class FileDepthSelector implement
* @return true if the file or folder should be included, false otherwise.
*/
@Override
- public boolean includeFile(final FileSelectInfo fileInfo) {
+ public boolean includeFile(final FileSelectInfo fileInfo) throws Exception
{
final int depth = fileInfo.getDepth();
return minDepth <= depth && depth <= maxDepth;
}
@@ -79,7 +79,7 @@ public class FileDepthSelector implement
* @return true if the file or folder should be traversed, false otherwise.
*/
@Override
- public boolean traverseDescendents(final FileSelectInfo fileInfo) {
+ public boolean traverseDescendents(final FileSelectInfo fileInfo) throws
Exception {
return fileInfo.getDepth() < maxDepth;
}
}
Modified:
commons/proper/vfs/trunk/commons-vfs2/src/main/java/org/apache/commons/vfs2/FileExtensionSelector.java
URL:
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/commons-vfs2/src/main/java/org/apache/commons/vfs2/FileExtensionSelector.java?rev=1828015&r1=1828014&r2=1828015&view=diff
==============================================================================
---
commons/proper/vfs/trunk/commons-vfs2/src/main/java/org/apache/commons/vfs2/FileExtensionSelector.java
(original)
+++
commons/proper/vfs/trunk/commons-vfs2/src/main/java/org/apache/commons/vfs2/FileExtensionSelector.java
Thu Mar 29 19:15:49 2018
@@ -69,7 +69,7 @@ public class FileExtensionSelector imple
* @return true if the file should be selected, false otherwise.
*/
@Override
- public boolean includeFile(final FileSelectInfo fileInfo) {
+ public boolean includeFile(final FileSelectInfo fileInfo) throws Exception
{
if (this.extensions == null) {
return false;
}
@@ -88,7 +88,7 @@ public class FileExtensionSelector imple
* @return true if descendants should be traversed, fase otherwise.
*/
@Override
- public boolean traverseDescendents(final FileSelectInfo fileInfo) {
+ public boolean traverseDescendents(final FileSelectInfo fileInfo) throws
Exception {
return true;
}
}
Modified:
commons/proper/vfs/trunk/commons-vfs2/src/main/java/org/apache/commons/vfs2/FileFilterSelector.java
URL:
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/commons-vfs2/src/main/java/org/apache/commons/vfs2/FileFilterSelector.java?rev=1828015&r1=1828014&r2=1828015&view=diff
==============================================================================
---
commons/proper/vfs/trunk/commons-vfs2/src/main/java/org/apache/commons/vfs2/FileFilterSelector.java
(original)
+++
commons/proper/vfs/trunk/commons-vfs2/src/main/java/org/apache/commons/vfs2/FileFilterSelector.java
Thu Mar 29 19:15:49 2018
@@ -45,7 +45,7 @@ public class FileFilterSelector extends
* @return true if the file or folder should be included, false otherwise.
*/
@Override
- public boolean includeFile(final FileSelectInfo fileInfo) {
+ public boolean includeFile(final FileSelectInfo fileInfo) throws Exception
{
if (!super.includeFile(fileInfo)) {
return false;
}
@@ -59,7 +59,7 @@ public class FileFilterSelector extends
* @param fileInfo The file selection information.
* @return true if the file should be selected, false otherwise.
*/
- public boolean accept(final FileSelectInfo fileInfo) {
+ public boolean accept(final FileSelectInfo fileInfo) throws Exception {
if (fileFilter != null) {
return fileFilter.accept(fileInfo);
}
Modified:
commons/proper/vfs/trunk/commons-vfs2/src/main/java/org/apache/commons/vfs2/FileTypeSelector.java
URL:
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/commons-vfs2/src/main/java/org/apache/commons/vfs2/FileTypeSelector.java?rev=1828015&r1=1828014&r2=1828015&view=diff
==============================================================================
---
commons/proper/vfs/trunk/commons-vfs2/src/main/java/org/apache/commons/vfs2/FileTypeSelector.java
(original)
+++
commons/proper/vfs/trunk/commons-vfs2/src/main/java/org/apache/commons/vfs2/FileTypeSelector.java
Thu Mar 29 19:15:49 2018
@@ -40,7 +40,7 @@ public class FileTypeSelector implements
* @throws FileSystemException if an error occurs
*/
@Override
- public boolean includeFile(final FileSelectInfo fileInfo) throws
FileSystemException {
+ public boolean includeFile(final FileSelectInfo fileInfo) throws Exception
{
return fileInfo.getFile().getType() == type;
}
@@ -51,7 +51,7 @@ public class FileTypeSelector implements
* @return true if the file or folder should be traversed.
*/
@Override
- public boolean traverseDescendents(final FileSelectInfo fileInfo) {
+ public boolean traverseDescendents(final FileSelectInfo fileInfo) throws
Exception {
return true;
}
}
Modified:
commons/proper/vfs/trunk/commons-vfs2/src/main/java/org/apache/commons/vfs2/PatternFileSelector.java
URL:
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/commons-vfs2/src/main/java/org/apache/commons/vfs2/PatternFileSelector.java?rev=1828015&r1=1828014&r2=1828015&view=diff
==============================================================================
---
commons/proper/vfs/trunk/commons-vfs2/src/main/java/org/apache/commons/vfs2/PatternFileSelector.java
(original)
+++
commons/proper/vfs/trunk/commons-vfs2/src/main/java/org/apache/commons/vfs2/PatternFileSelector.java
Thu Mar 29 19:15:49 2018
@@ -83,7 +83,7 @@ public class PatternFileSelector impleme
* @return true if the file should be selected, false otherwise.
*/
@Override
- public boolean includeFile(final FileSelectInfo fileInfo) {
+ public boolean includeFile(final FileSelectInfo fileInfo) throws Exception
{
return
this.pattern.matcher(fileInfo.getFile().getName().getPath()).matches();
}
@@ -102,7 +102,7 @@ public class PatternFileSelector impleme
* @return true if descendants should be traversed, false otherwise.
*/
@Override
- public boolean traverseDescendents(final FileSelectInfo fileInfo) {
+ public boolean traverseDescendents(final FileSelectInfo fileInfo) throws
Exception {
return true;
}
}
Modified: commons/proper/vfs/trunk/src/changes/changes.xml
URL:
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/src/changes/changes.xml?rev=1828015&r1=1828014&r2=1828015&view=diff
==============================================================================
--- commons/proper/vfs/trunk/src/changes/changes.xml (original)
+++ commons/proper/vfs/trunk/src/changes/changes.xml Thu Mar 29 19:15:49 2018
@@ -59,7 +59,7 @@ The <action> type attribute can be add,u
<action issue="VFS-646" dev="ggregory" type="update">
Update Apache Commons Compress from 1.14 to 1.15.
</action>
- <action issue="VFS-589" dev="ggregory" type="add" due-to="L, Gary
Gregory">
+ <action issue="VFS-589" dev="ggregory" type="fix" due-to="L, Gary
Gregory">
SFTP moveTo operation hangs if the server does not support SSH
channelExec.
</action>
<action issue="VFS-653" dev="ggregory" type="update">
@@ -68,6 +68,9 @@ The <action> type attribute can be add,u
<action issue="VFS-655" dev="ggregory" type="fix" due-to="Arnaud MERGEY">
OSGI MANIFEST.MF "Import-Package" should be ";resolution:=optional"
for Maven "optional" dependencies.
</action>
+ <action issue="VFS-657" dev="ggregory" type="fix" due-to="Elias Putz">
+ FileSelector implementations like FileDepthSelector should throw
Exception.
+ </action>
</release>
<release version="2.2" date="2017-10-06" description="New features and bug
fix release.">
<action issue="VFS-642" dev="pschumacher" type="update"
due-to="ilangoldfeld">