Migrating to JDK 1.8
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
package com.lyndir.masterpassword.gui;
|
||||
|
||||
import com.lyndir.lhunath.opal.system.util.ConversionUtils;
|
||||
import com.lyndir.masterpassword.MPConstant;
|
||||
import com.lyndir.masterpassword.model.MPConstant;
|
||||
|
||||
|
||||
/**
|
||||
@@ -35,6 +35,6 @@ public class Config {
|
||||
}
|
||||
|
||||
public boolean checkForUpdates() {
|
||||
return ConversionUtils.toBoolean( System.getenv( MPConstant.env_checkUpdates ) ).or( true );
|
||||
return ConversionUtils.toBoolean( System.getenv( MPConstant.env_checkUpdates ) ).orElse( true );
|
||||
}
|
||||
}
|
||||
|
@@ -21,7 +21,6 @@ package com.lyndir.masterpassword.gui;
|
||||
import static com.lyndir.lhunath.opal.system.util.StringUtils.*;
|
||||
|
||||
import com.google.common.base.Charsets;
|
||||
import com.google.common.base.Optional;
|
||||
import com.google.common.io.CharSource;
|
||||
import com.google.common.io.Resources;
|
||||
import com.lyndir.lhunath.opal.system.logging.Logger;
|
||||
@@ -34,6 +33,7 @@ import java.lang.reflect.InvocationTargetException;
|
||||
import java.net.URI;
|
||||
import java.net.URL;
|
||||
import java.util.Enumeration;
|
||||
import java.util.Optional;
|
||||
import java.util.jar.*;
|
||||
import javax.swing.*;
|
||||
|
||||
|
@@ -19,9 +19,13 @@
|
||||
package com.lyndir.masterpassword.gui.model;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.primitives.UnsignedInteger;
|
||||
import com.lyndir.masterpassword.MPAlgorithm;
|
||||
import com.lyndir.masterpassword.MPResultType;
|
||||
import com.lyndir.masterpassword.model.*;
|
||||
import com.lyndir.masterpassword.model.impl.MPBasicSite;
|
||||
import java.util.Collection;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
|
||||
/**
|
||||
@@ -31,8 +35,14 @@ public class IncognitoSite extends MPBasicSite {
|
||||
|
||||
private final IncognitoUser user;
|
||||
|
||||
public IncognitoSite(final IncognitoUser user, final String siteName) {
|
||||
super( siteName, user.getAlgorithm() );
|
||||
public IncognitoSite(final IncognitoUser user, final String name) {
|
||||
this( user, name, null, null, null, null );
|
||||
}
|
||||
|
||||
public IncognitoSite(final IncognitoUser user, final String name,
|
||||
@Nullable final MPAlgorithm algorithm, @Nullable final UnsignedInteger counter,
|
||||
@Nullable final MPResultType resultType, @Nullable final MPResultType loginType) {
|
||||
super( name, (algorithm == null)? user.getAlgorithm(): algorithm, counter, resultType, loginType );
|
||||
|
||||
this.user = user;
|
||||
}
|
||||
|
@@ -87,7 +87,7 @@ public class IncognitoAuthenticationPanel extends AuthenticationPanel<IncognitoU
|
||||
@Override
|
||||
protected IncognitoSite createSite(final IncognitoUser user, final String siteName, final UnsignedInteger siteCounter,
|
||||
final MPResultType resultType, final MPAlgorithm algorithm) {
|
||||
return new IncognitoSite( user, siteName, siteCounter, resultType, algorithm );
|
||||
return new IncognitoSite( user, siteName, algorithm, siteCounter, resultType, null );
|
||||
}
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user