Migrating to JDK 1.8
This commit is contained in:
parent
bda1ac3bd4
commit
8bdf1755b7
@ -16,7 +16,7 @@
|
|||||||
// LICENSE file. Alternatively, see <http://www.gnu.org/licenses/>.
|
// LICENSE file. Alternatively, see <http://www.gnu.org/licenses/>.
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
|
|
||||||
package com.lyndir.masterpassword;
|
package com.lyndir.masterpassword.model;
|
||||||
|
|
||||||
import org.joda.time.format.DateTimeFormatter;
|
import org.joda.time.format.DateTimeFormatter;
|
||||||
import org.joda.time.format.ISODateTimeFormat;
|
import org.joda.time.format.ISODateTimeFormat;
|
@ -22,6 +22,7 @@ import static com.lyndir.lhunath.opal.system.util.ObjectUtils.*;
|
|||||||
import static com.lyndir.lhunath.opal.system.util.StringUtils.*;
|
import static com.lyndir.lhunath.opal.system.util.StringUtils.*;
|
||||||
|
|
||||||
import com.lyndir.masterpassword.*;
|
import com.lyndir.masterpassword.*;
|
||||||
|
import com.lyndir.masterpassword.model.MPConstant;
|
||||||
import javax.annotation.Nonnull;
|
import javax.annotation.Nonnull;
|
||||||
import org.joda.time.Instant;
|
import org.joda.time.Instant;
|
||||||
|
|
||||||
|
@ -25,6 +25,7 @@ import com.lyndir.lhunath.opal.system.CodeUtils;
|
|||||||
import com.lyndir.lhunath.opal.system.logging.Logger;
|
import com.lyndir.lhunath.opal.system.logging.Logger;
|
||||||
import com.lyndir.lhunath.opal.system.util.ConversionUtils;
|
import com.lyndir.lhunath.opal.system.util.ConversionUtils;
|
||||||
import com.lyndir.masterpassword.*;
|
import com.lyndir.masterpassword.*;
|
||||||
|
import com.lyndir.masterpassword.model.MPConstant;
|
||||||
import com.lyndir.masterpassword.model.MPIncorrectMasterPasswordException;
|
import com.lyndir.masterpassword.model.MPIncorrectMasterPasswordException;
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
|
@ -25,6 +25,7 @@ import com.fasterxml.jackson.databind.*;
|
|||||||
import com.google.common.primitives.UnsignedInteger;
|
import com.google.common.primitives.UnsignedInteger;
|
||||||
import com.lyndir.lhunath.opal.system.CodeUtils;
|
import com.lyndir.lhunath.opal.system.CodeUtils;
|
||||||
import com.lyndir.masterpassword.*;
|
import com.lyndir.masterpassword.*;
|
||||||
|
import com.lyndir.masterpassword.model.MPConstant;
|
||||||
import com.lyndir.masterpassword.model.MPIncorrectMasterPasswordException;
|
import com.lyndir.masterpassword.model.MPIncorrectMasterPasswordException;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
|
@ -87,7 +87,7 @@ public class MPTestSuite implements Callable<Boolean> {
|
|||||||
if ("case".equals( qName ))
|
if ("case".equals( qName ))
|
||||||
tests.cases.add( currentCase );
|
tests.cases.add( currentCase );
|
||||||
if ("algorithm".equals( qName ))
|
if ("algorithm".equals( qName ))
|
||||||
currentCase.algorithm = ConversionUtils.toInteger( text ).orNull();
|
currentCase.algorithm = ConversionUtils.toInteger( text ).orElse( null );
|
||||||
if ("fullName".equals( qName ))
|
if ("fullName".equals( qName ))
|
||||||
currentCase.fullName = text;
|
currentCase.fullName = text;
|
||||||
if ("masterPassword".equals( qName ))
|
if ("masterPassword".equals( qName ))
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
</value>
|
</value>
|
||||||
</option>
|
</option>
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="false" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="false" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||||
<output url="file://$PROJECT_DIR$/classes" />
|
<output url="file://$PROJECT_DIR$/classes" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ThriftCompiler">
|
<component name="ThriftCompiler">
|
||||||
|
@ -5,8 +5,8 @@ allprojects {
|
|||||||
version = 'GIT-SNAPSHOT'
|
version = 'GIT-SNAPSHOT'
|
||||||
|
|
||||||
tasks.withType(JavaCompile) {
|
tasks.withType(JavaCompile) {
|
||||||
sourceCompatibility = '1.7'
|
sourceCompatibility = '1.8'
|
||||||
targetCompatibility = '1.7'
|
targetCompatibility = '1.8'
|
||||||
}
|
}
|
||||||
tasks.withType(FindBugs) {
|
tasks.withType(FindBugs) {
|
||||||
reports {
|
reports {
|
||||||
|
@ -2,11 +2,11 @@ apply plugin: 'com.android.application'
|
|||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 25
|
compileSdkVersion 25
|
||||||
buildToolsVersion '25.0.0'
|
buildToolsVersion '25.0.3'
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_1_7
|
sourceCompatibility JavaVersion.VERSION_1_8
|
||||||
targetCompatibility JavaVersion.VERSION_1_7
|
targetCompatibility JavaVersion.VERSION_1_8
|
||||||
}
|
}
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
@ -15,6 +15,7 @@ android {
|
|||||||
targetSdkVersion 25
|
targetSdkVersion 25
|
||||||
versionCode 20501
|
versionCode 20501
|
||||||
versionName '2.5.1'
|
versionName '2.5.1'
|
||||||
|
jackOptions.enabled true
|
||||||
}
|
}
|
||||||
|
|
||||||
// release with: STORE_PW=$(mpw masterpassword.keystore) KEY_PW=$(mpw masterpassword-android) gradle assembleRelease
|
// release with: STORE_PW=$(mpw masterpassword.keystore) KEY_PW=$(mpw masterpassword-android) gradle assembleRelease
|
||||||
|
@ -38,6 +38,7 @@ import com.google.common.primitives.UnsignedInteger;
|
|||||||
import com.google.common.util.concurrent.ListeningExecutorService;
|
import com.google.common.util.concurrent.ListeningExecutorService;
|
||||||
import com.google.common.util.concurrent.MoreExecutors;
|
import com.google.common.util.concurrent.MoreExecutors;
|
||||||
import com.lyndir.lhunath.opal.system.logging.Logger;
|
import com.lyndir.lhunath.opal.system.logging.Logger;
|
||||||
|
import com.lyndir.masterpassword.model.MPConstant;
|
||||||
import java.text.MessageFormat;
|
import java.text.MessageFormat;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.concurrent.Executors;
|
import java.util.concurrent.Executors;
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
package com.lyndir.masterpassword.gui;
|
package com.lyndir.masterpassword.gui;
|
||||||
|
|
||||||
import com.lyndir.lhunath.opal.system.util.ConversionUtils;
|
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() {
|
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 static com.lyndir.lhunath.opal.system.util.StringUtils.*;
|
||||||
|
|
||||||
import com.google.common.base.Charsets;
|
import com.google.common.base.Charsets;
|
||||||
import com.google.common.base.Optional;
|
|
||||||
import com.google.common.io.CharSource;
|
import com.google.common.io.CharSource;
|
||||||
import com.google.common.io.Resources;
|
import com.google.common.io.Resources;
|
||||||
import com.lyndir.lhunath.opal.system.logging.Logger;
|
import com.lyndir.lhunath.opal.system.logging.Logger;
|
||||||
@ -34,6 +33,7 @@ import java.lang.reflect.InvocationTargetException;
|
|||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.util.Enumeration;
|
import java.util.Enumeration;
|
||||||
|
import java.util.Optional;
|
||||||
import java.util.jar.*;
|
import java.util.jar.*;
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
|
|
||||||
|
@ -19,9 +19,13 @@
|
|||||||
package com.lyndir.masterpassword.gui.model;
|
package com.lyndir.masterpassword.gui.model;
|
||||||
|
|
||||||
import com.google.common.collect.ImmutableList;
|
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.*;
|
||||||
import com.lyndir.masterpassword.model.impl.MPBasicSite;
|
import com.lyndir.masterpassword.model.impl.MPBasicSite;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -31,8 +35,14 @@ public class IncognitoSite extends MPBasicSite {
|
|||||||
|
|
||||||
private final IncognitoUser user;
|
private final IncognitoUser user;
|
||||||
|
|
||||||
public IncognitoSite(final IncognitoUser user, final String siteName) {
|
public IncognitoSite(final IncognitoUser user, final String name) {
|
||||||
super( siteName, user.getAlgorithm() );
|
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;
|
this.user = user;
|
||||||
}
|
}
|
||||||
|
@ -87,7 +87,7 @@ public class IncognitoAuthenticationPanel extends AuthenticationPanel<IncognitoU
|
|||||||
@Override
|
@Override
|
||||||
protected IncognitoSite createSite(final IncognitoUser user, final String siteName, final UnsignedInteger siteCounter,
|
protected IncognitoSite createSite(final IncognitoUser user, final String siteName, final UnsignedInteger siteCounter,
|
||||||
final MPResultType resultType, final MPAlgorithm algorithm) {
|
final MPResultType resultType, final MPAlgorithm algorithm) {
|
||||||
return new IncognitoSite( user, siteName, siteCounter, resultType, algorithm );
|
return new IncognitoSite( user, siteName, algorithm, siteCounter, resultType, null );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user