Skip to content

Upgrade to Java 7 #5

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
24 changes: 0 additions & 24 deletions README.md

This file was deleted.

14 changes: 4 additions & 10 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</parent>

<artifactId>plexus-io</artifactId>
<version>2.7.2-SNAPSHOT</version>
<version>3.0.0-SNAPSHOT</version>

<name>Plexus IO Components</name>

Expand Down Expand Up @@ -72,8 +72,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<source>1.5</source>
<target>1.5</target>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
Expand Down Expand Up @@ -147,15 +147,9 @@
<configuration>
<signature>
<groupId>org.codehaus.mojo.signature</groupId>
<artifactId>java15</artifactId>
<artifactId>java17</artifactId>
<version>1.0</version>
</signature>
<ignores>
<ignore>org.codehaus.plexus.components.io.attributes.Java7FileAttributes</ignore>
<ignore>org.codehaus.plexus.components.io.attributes.Java7AttributeUtils</ignore>
<ignore>java.nio.file.*</ignore>
<ignore>java.io.File</ignore>
</ignores>
</configuration>
</plugin>
</plugins>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
/**
* @author Kristian Rosenvold
*/
public class Java7AttributeUtils
public class AttributeUtils
{
/*
Reads last-modified with proper failure handling if something goes wrong.
Expand Down Expand Up @@ -65,8 +65,8 @@ public static void chmod( @Nonnull File file, int mode )
@Nonnull
public static Set<PosixFilePermission> getPermissions( int mode )
{
Set<PosixFilePermission> perms = new HashSet<PosixFilePermission>();
//add owners permission
Set<PosixFilePermission> perms = new HashSet<>();
// add owners permission
if ( ( mode & 0400 ) > 0 )
{
perms.add( PosixFilePermission.OWNER_READ );
Expand All @@ -79,7 +79,7 @@ public static Set<PosixFilePermission> getPermissions( int mode )
{
perms.add( PosixFilePermission.OWNER_EXECUTE );
}
//add group permissions
// add group permissions
if ( ( mode & 0040 ) > 0 )
{
perms.add( PosixFilePermission.GROUP_READ );
Expand All @@ -92,7 +92,7 @@ public static Set<PosixFilePermission> getPermissions( int mode )
{
perms.add( PosixFilePermission.GROUP_EXECUTE );
}
//add others permissions
// add others permissions
if ( ( mode & 0004 ) > 0 )
{
perms.add( PosixFilePermission.OTHERS_READ );
Expand Down Expand Up @@ -125,7 +125,7 @@ public static BasicFileAttributes getFileAttributes( @Nonnull File file )
public static BasicFileAttributes getFileAttributes( Path path )
throws IOException
{
if (isUnix(path))
if ( isUnix( path ) )
{

try
Expand All @@ -140,8 +140,9 @@ public static BasicFileAttributes getFileAttributes( Path path )
return Files.readAttributes( path, BasicFileAttributes.class, LinkOption.NOFOLLOW_LINKS );
}

public static boolean isUnix(Path path) {
return path.getFileSystem().supportedFileAttributeViews().contains("unix");
public static boolean isUnix( Path path )
{
return path.getFileSystem().supportedFileAttributeViews().contains( "unix" );
}

@Nullable
Expand Down
Loading