[
https://issues.apache.org/jira/browse/DERBY-7076?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17097999#comment-17097999
]
Richard N. Hillegas commented on DERBY-7076:
--------------------------------------------
Thanks for the patch. Can you explain its benefits in greater detail?
When I apply the patch and try to build Derby, I get the following errors:
{noformat}
[javac]
/Users/rhillegas/derby/mainline/trunk/java/org.apache.derby.engine/org/apache/derby/diag/ErrorLogReader.java:173:
error: cannot find symbol
[javac] inputFileStreamReader = new
InputStreamReader(Files.newInputStream(Path.of(inputFileName)));
[javac]
^
[javac] symbol: method of(String)
[javac] location: interface Path
[javac]
/Users/rhillegas/derby/mainline/trunk/java/org.apache.derby.engine/org/apache/derby/diag/StatementDuration.java:166:
error: cannot find symbol
[javac] inputFileStreamReader = new
InputStreamReader(Files.newInputStream(Path.of(inputFileName)));
[javac]
^
[javac] symbol: method of(String)
[javac] location: interface Path
[javac]
/Users/rhillegas/derby/mainline/trunk/java/org.apache.derby.engine/org/apache/derby/impl/jdbc/authentication/LDAPAuthenticationSchemeImpl.java:391:
error: cannot find symbol
[javac] return
Files.newOutputStream(Path.of("DerbyLDAP.out"));
[javac] ^
[javac] symbol: method of(String)
[javac] location: interface Path
[javac]
/Users/rhillegas/derby/mainline/trunk/java/org.apache.derby.engine/org/apache/derby/impl/load/ExportWriteData.java:112:
error: cannot find symbol
[javac] anOutputStream =
Files.newOutputStream(Path.of(outputFileName));
[javac] ^
[javac] symbol: method of(String)
[javac] location: interface Path
[javac]
/Users/rhillegas/derby/mainline/trunk/java/org.apache.derby.engine/org/apache/derby/impl/load/ImportReadData.java:260:
error: cannot find symbol
[javac] inputStream = Files.newInputStream(Path.of(inputFileName));
[javac] ^
[javac] symbol: method of(String)
[javac] location: interface Path
[javac]
/Users/rhillegas/derby/mainline/trunk/java/org.apache.derby.engine/org/apache/derby/impl/services/stream/RollingFileStream.java:444:
error: cannot find symbol
[javac] OutputStream res =
Files.newOutputStream(Path.of(filename));
[javac] ^
[javac] symbol: method of(String)
[javac] location: interface Path
[javac]
/Users/rhillegas/derby/mainline/trunk/java/org.apache.derby.engine/org/apache/derby/impl/sql/execute/JarUtil.java:374:
error: cannot find symbol
[javac] return
Files.newInputStream(Path.of(externalPath));
[javac] ^
[javac] symbol: method of(String)
[javac] location: interface Path
[javac]
/Users/rhillegas/derby/mainline/trunk/java/org.apache.derby.engine/org/apache/derby/vti/XmlVTI.java:284:
error: cannot find symbol
[javac] return Files.newInputStream(
Path.of(fileName) );
[javac] ^
[javac] symbol: method of(String)
[javac] location: interface Path
[javac] 8 errors
BUILD FAILED
{noformat}
> replace old "new FileInputStreamReader()" from java.io to the java.nio
> Files.newInputStream
> -------------------------------------------------------------------------------------------
>
> Key: DERBY-7076
> URL: https://issues.apache.org/jira/browse/DERBY-7076
> Project: Derby
> Issue Type: Task
> Reporter: Yasser Mustafa Bazzi Bordonal
> Priority: Minor
> Attachments: nio.diff
>
>
> This should avoid some allocations done by the old java.io and not disrupt
> any major part of derby, since im a new contributor i would like feedback to
> see if this breaks anything since im not able to run the tests on my computer
> but it builds and works just fine.
> Thanks in advance.
> [^nio.diff]
--
This message was sent by Atlassian Jira
(v8.3.4#803005)