-
Notifications
You must be signed in to change notification settings - Fork 728
fixed IO-447 #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
fixed IO-447 #21
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -292,10 +292,15 @@ long freeSpaceOS(final String path, final int os, final boolean kb, final long t | |
| * @param timeout The timeout amount in milliseconds or no timeout if the value | ||
| * is zero or less | ||
| * @return the amount of free drive space on the drive | ||
| * @throws IOException if an error occurs | ||
| * @throws IOException if an error occurs, NullPointerException if path cannot be parsed by FilenameUtils.normalize() | ||
| */ | ||
| long freeSpaceWindows(String path, final long timeout) throws IOException { | ||
| long freeSpaceWindows(String path, final long timeout) throws IOException, NullPointerException { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| path = FilenameUtils.normalize(path, false); | ||
|
|
||
| if(path == null) | ||
| throw new NullPointerException( | ||
| "The path cannot be parsed by FilenameUtils.normalize()."); | ||
|
|
||
| if (path.length() > 0 && path.charAt(0) != '"') { | ||
| path = "\"" + path + "\""; | ||
| } | ||
|
|
||
48 changes: 24 additions & 24 deletions
48
src/main/java/org/apache/commons/io/serialization/package.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,24 +1,24 @@ | ||
| <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | ||
| <!-- | ||
| Licensed to the Apache Software Foundation (ASF) under one or more | ||
| contributor license agreements. See the NOTICE file distributed with | ||
| this work for additional information regarding copyright ownership. | ||
| The ASF licenses this file to You under the Apache License, Version 2.0 | ||
| (the "License"); you may not use this file except in compliance with | ||
| the License. You may obtain a copy of the License at | ||
| http://www.apache.org/licenses/LICENSE-2.0 | ||
| Unless required by applicable law or agreed to in writing, software | ||
| distributed under the License is distributed on an "AS IS" BASIS, | ||
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| See the License for the specific language governing permissions and | ||
| limitations under the License. | ||
| --> | ||
| <html> | ||
| <body> | ||
| <p> | ||
| This package provides a framework for controlling the deserialization of classes. | ||
| </p> | ||
| </body> | ||
| </html> | ||
| <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | ||
| <!-- | ||
| Licensed to the Apache Software Foundation (ASF) under one or more | ||
| contributor license agreements. See the NOTICE file distributed with | ||
| this work for additional information regarding copyright ownership. | ||
| The ASF licenses this file to You under the Apache License, Version 2.0 | ||
| (the "License"); you may not use this file except in compliance with | ||
| the License. You may obtain a copy of the License at | ||
|
|
||
| http://www.apache.org/licenses/LICENSE-2.0 | ||
|
|
||
| Unless required by applicable law or agreed to in writing, software | ||
| distributed under the License is distributed on an "AS IS" BASIS, | ||
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| See the License for the specific language governing permissions and | ||
| limitations under the License. | ||
| --> | ||
| <html> | ||
| <body> | ||
| <p> | ||
| This package provides a framework for controlling the deserialization of classes. | ||
| </p> | ||
| </body> | ||
| </html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,61 +1,61 @@ | ||
| <?xml version="1.0"?> | ||
| <!-- | ||
| Licensed to the Apache Software Foundation (ASF) under one or more | ||
| contributor license agreements. See the NOTICE file distributed with | ||
| this work for additional information regarding copyright ownership. | ||
| The ASF licenses this file to You under the Apache License, Version 2.0 | ||
| (the "License"); you may not use this file except in compliance with | ||
| the License. You may obtain a copy of the License at | ||
| http://www.apache.org/licenses/LICENSE-2.0 | ||
| Unless required by applicable law or agreed to in writing, software | ||
| distributed under the License is distributed on an "AS IS" BASIS, | ||
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| See the License for the specific language governing permissions and | ||
| limitations under the License. | ||
| --> | ||
| <document> | ||
| <properties> | ||
| <title>Upgrade from 2.2 to 2.3</title> | ||
| <author email="dev@commons.apache.org">Commons Documentation Team</author> | ||
| </properties> | ||
| <body> | ||
| <section name="Upgrade"> | ||
| <p> | ||
| These are the release notes and advice for upgrading Commons-IO from | ||
| version 2.2 to version 2.3 | ||
| <source> | ||
| Commons IO is a package of Java utility classes like java.io. | ||
| Classes in this package are considered to be so standard and of such high | ||
| reuse as to justify existence in java.io. | ||
| The Commons IO library contains utility classes, stream implementations, file filters, | ||
| file comparators, endian transformation classes, and much more. | ||
| ============================================================================== | ||
| Apache Commons IO Version 2.3-SNAPSHOT | ||
| ============================================================================== | ||
| Changes in this version include: | ||
| New features: | ||
| o IO-322: Add and use class Charsets. Thanks to ggregory. | ||
| o IO-321: ByteOrderMark UTF_32LE is incorrect. Thanks to ggregory. | ||
| o IO-318: Add Charset sister APIs to method that take a String charset name. Thanks to ggregory. | ||
| Compatibility with 2.2 and 1.4: | ||
| Binary compatible: Yes. | ||
| Source compatible: No, see the rare case in https://issues.apache.org/jira/browse/IO-318. | ||
| Semantic compatible: No, see the rare case in https://issues.apache.org/jira/browse/IO-318. | ||
| Commons IO 2.3 requires JDK 1.6 or later. | ||
| Commons IO 2.2 requires JDK 1.5 or later. | ||
| Commons IO 1.4 requires JDK 1.3 or later. | ||
| </source> | ||
| </p> | ||
| </section> | ||
| </body> | ||
| </document> | ||
| <?xml version="1.0"?> | ||
| <!-- | ||
| Licensed to the Apache Software Foundation (ASF) under one or more | ||
| contributor license agreements. See the NOTICE file distributed with | ||
| this work for additional information regarding copyright ownership. | ||
| The ASF licenses this file to You under the Apache License, Version 2.0 | ||
| (the "License"); you may not use this file except in compliance with | ||
| the License. You may obtain a copy of the License at | ||
|
|
||
| http://www.apache.org/licenses/LICENSE-2.0 | ||
|
|
||
| Unless required by applicable law or agreed to in writing, software | ||
| distributed under the License is distributed on an "AS IS" BASIS, | ||
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| See the License for the specific language governing permissions and | ||
| limitations under the License. | ||
| --> | ||
| <document> | ||
| <properties> | ||
| <title>Upgrade from 2.2 to 2.3</title> | ||
| <author email="dev@commons.apache.org">Commons Documentation Team</author> | ||
| </properties> | ||
| <body> | ||
|
|
||
| <section name="Upgrade"> | ||
| <p> | ||
| These are the release notes and advice for upgrading Commons-IO from | ||
| version 2.2 to version 2.3 | ||
| <source> | ||
| Commons IO is a package of Java utility classes like java.io. | ||
| Classes in this package are considered to be so standard and of such high | ||
| reuse as to justify existence in java.io. | ||
|
|
||
| The Commons IO library contains utility classes, stream implementations, file filters, | ||
| file comparators, endian transformation classes, and much more. | ||
|
|
||
| ============================================================================== | ||
| Apache Commons IO Version 2.3-SNAPSHOT | ||
| ============================================================================== | ||
|
|
||
| Changes in this version include: | ||
|
|
||
| New features: | ||
| o IO-322: Add and use class Charsets. Thanks to ggregory. | ||
| o IO-321: ByteOrderMark UTF_32LE is incorrect. Thanks to ggregory. | ||
| o IO-318: Add Charset sister APIs to method that take a String charset name. Thanks to ggregory. | ||
|
|
||
| Compatibility with 2.2 and 1.4: | ||
| Binary compatible: Yes. | ||
| Source compatible: No, see the rare case in https://issues.apache.org/jira/browse/IO-318. | ||
| Semantic compatible: No, see the rare case in https://issues.apache.org/jira/browse/IO-318. | ||
|
|
||
| Commons IO 2.3 requires JDK 1.6 or later. | ||
| Commons IO 2.2 requires JDK 1.5 or later. | ||
| Commons IO 1.4 requires JDK 1.3 or later. | ||
| </source> | ||
| </p> | ||
| </section> | ||
|
|
||
| </body> | ||
| </document> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
src/test/resources/org/apache/commons/io/FileUtilsTestDataCRLF.dat
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| 1 | ||
| 2 | ||
| 3 | ||
| 1 | ||
| 2 | ||
| 3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,2 @@ | ||
| ��ݔ�Ӿ� | ||
| �������� | ||
| ��ݔ�Ӿ� | ||
| �������� |
24 changes: 12 additions & 12 deletions
24
src/test/resources/test-file-iso8859-1-shortlines-win-linebr.bin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,12 @@ | ||
| 1 | ||
| 2 | ||
| 3 | ||
| 1 | ||
|
|
||
|
|
||
|
|
||
| 2 | ||
|
|
||
|
|
||
|
|
||
| 3 | ||
|
|
||
|
|
||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,52 +1,52 @@ | ||
| A Test Line. Special chars: ÄäÜüÖöß Ãáéíïçñ ©µ¥£±²® | ||
| A Test Line. Special chars: ÄäÜüÖöß Ãáéíïçñ ©µ¥£±² | ||
| A Test Line. Special chars: ÄäÜüÖöß Ãáéíïçñ ©µ¥£± | ||
| A Test Line. Special chars: ÄäÜüÖöß Ãáéíïçñ ©µ¥£ | ||
| A Test Line. Special chars: ÄäÜüÖöß Ãáéíïçñ ©µ¥ | ||
| A Test Line. Special chars: ÄäÜüÖöß Ãáéíïçñ ©µ | ||
| A Test Line. Special chars: ÄäÜüÖöß Ãáéíïçñ © | ||
| A Test Line. Special chars: ÄäÜüÖöß Ãáéíïçñ | ||
| A Test Line. Special chars: ÄäÜüÖöß Ãáéíïçñ | ||
| A Test Line. Special chars: ÄäÜüÖöß Ãáéíïçñ | ||
| A Test Line. Special chars: ÄäÜüÖöß Ãáéíïç | ||
| A Test Line. Special chars: ÄäÜüÖöß Ãáéíï | ||
| A Test Line. Special chars: ÄäÜüÖöß Ãáéí | ||
| A Test Line. Special chars: ÄäÜüÖöß Ãáé | ||
| A Test Line. Special chars: ÄäÜüÖöß Ãá | ||
| A Test Line. Special chars: ÄäÜüÖöß Ã | ||
| A Test Line. Special chars: ÄäÜüÖöß | ||
| A Test Line. Special chars: ÄäÜüÖöß | ||
| A Test Line. Special chars: ÄäÜüÖö | ||
| A Test Line. Special chars: ÄäÜüÖ | ||
| A Test Line. Special chars: ÄäÜü | ||
| A Test Line. Special chars: ÄäÜ | ||
| A Test Line. Special chars: Ää | ||
| A Test Line. Special chars: Ä | ||
| A Test Line. Special chars: | ||
| A Test Line. Special chars: | ||
| A Test Line. Special chars | ||
| A Test Line. Special char | ||
| A Test Line. Special cha | ||
| A Test Line. Special ch | ||
| A Test Line. Special c | ||
| A Test Line. Special | ||
| A Test Line. Special | ||
| A Test Line. Specia | ||
| A Test Line. Speci | ||
| A Test Line. Spec | ||
| A Test Line. Spe | ||
| A Test Line. Sp | ||
| A Test Line. S | ||
| A Test Line. | ||
| A Test Line. | ||
| A Test Line | ||
| A Test Lin | ||
| A Test Li | ||
| A Test L | ||
| A Test | ||
| A Test | ||
| A Tes | ||
| A Te | ||
| A T | ||
| A | ||
| A | ||
| A Test Line. Special chars: ÄäÜüÖöß Ãáéíïçñ ©µ¥£±²® | ||
| A Test Line. Special chars: ÄäÜüÖöß Ãáéíïçñ ©µ¥£±² | ||
| A Test Line. Special chars: ÄäÜüÖöß Ãáéíïçñ ©µ¥£± | ||
| A Test Line. Special chars: ÄäÜüÖöß Ãáéíïçñ ©µ¥£ | ||
| A Test Line. Special chars: ÄäÜüÖöß Ãáéíïçñ ©µ¥ | ||
| A Test Line. Special chars: ÄäÜüÖöß Ãáéíïçñ ©µ | ||
| A Test Line. Special chars: ÄäÜüÖöß Ãáéíïçñ © | ||
| A Test Line. Special chars: ÄäÜüÖöß Ãáéíïçñ | ||
| A Test Line. Special chars: ÄäÜüÖöß Ãáéíïçñ | ||
| A Test Line. Special chars: ÄäÜüÖöß Ãáéíïçñ | ||
| A Test Line. Special chars: ÄäÜüÖöß Ãáéíïç | ||
| A Test Line. Special chars: ÄäÜüÖöß Ãáéíï | ||
| A Test Line. Special chars: ÄäÜüÖöß Ãáéí | ||
| A Test Line. Special chars: ÄäÜüÖöß Ãáé | ||
| A Test Line. Special chars: ÄäÜüÖöß Ãá | ||
| A Test Line. Special chars: ÄäÜüÖöß Ã | ||
| A Test Line. Special chars: ÄäÜüÖöß | ||
| A Test Line. Special chars: ÄäÜüÖöß | ||
| A Test Line. Special chars: ÄäÜüÖö | ||
| A Test Line. Special chars: ÄäÜüÖ | ||
| A Test Line. Special chars: ÄäÜü | ||
| A Test Line. Special chars: ÄäÜ | ||
| A Test Line. Special chars: Ää | ||
| A Test Line. Special chars: Ä | ||
| A Test Line. Special chars: | ||
| A Test Line. Special chars: | ||
| A Test Line. Special chars | ||
| A Test Line. Special char | ||
| A Test Line. Special cha | ||
| A Test Line. Special ch | ||
| A Test Line. Special c | ||
| A Test Line. Special | ||
| A Test Line. Special | ||
| A Test Line. Specia | ||
| A Test Line. Speci | ||
| A Test Line. Spec | ||
| A Test Line. Spe | ||
| A Test Line. Sp | ||
| A Test Line. S | ||
| A Test Line. | ||
| A Test Line. | ||
| A Test Line | ||
| A Test Lin | ||
| A Test Li | ||
| A Test L | ||
| A Test | ||
| A Test | ||
| A Tes | ||
| A Te | ||
| A T | ||
| A | ||
| A |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,2 @@ | ||
| ���������� | ||
| ���A�q�� | ||
| ���������� | ||
| ���A�q�� |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,2 @@ | ||
| �ѱ��� | ||
| ���ѹα� | ||
| �ѱ��� | ||
| ���ѹα� |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,2 @@ | ||
| ����l�� | ||
| �c�餤�� | ||
| ����l�� | ||
| �c�餤�� |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be a separate
throwsdeclaration