S
Stefan Ram
I wrote:
public static void mergeContentsOf
( final java.nio.file.Path source,
final java.lang.String description,
final java.nio.file.Path newTarget )
throws java.lang.Exception
{ final java.nio.file.DirectoryStream directoryStream =
source.newDirectoryStream( "*" );
try
{ for( final java.nio.file.Path path : directoryStream )
{ merge( path, description, newTarget ); }}
finally
{ directoryStream.close(); }}
, the compiler replied:
Main.java:9: incompatible types
{ for( final java.nio.file.Path path : directoryStream )
^
required: Path
found: Object
1 error
, but I can't see any expression of type »Object«.
$javac -version -verbose
javac 1.7.0-ea
public static void mergeContentsOf
( final java.nio.file.Path source,
final java.lang.String description,
final java.nio.file.Path newTarget )
throws java.lang.Exception
{ final java.nio.file.DirectoryStream directoryStream =
source.newDirectoryStream( "*" );
try
{ for( final java.nio.file.Path path : directoryStream )
{ merge( path, description, newTarget ); }}
finally
{ directoryStream.close(); }}
, the compiler replied:
Main.java:9: incompatible types
{ for( final java.nio.file.Path path : directoryStream )
^
required: Path
found: Object
1 error
, but I can't see any expression of type »Object«.
$javac -version -verbose
javac 1.7.0-ea