mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Cleanup (formatting)
This commit is contained in:
@@ -34,26 +34,22 @@ class Credentials(user: String?, val password: OneTimeString? = null) {
|
||||
|
||||
fun getPasswordAsString() = password?.toString()
|
||||
|
||||
override fun equals(other: Any?): Boolean {
|
||||
if (other !is Credentials) return false
|
||||
return userName == other.userName && password == other.password
|
||||
}
|
||||
override fun equals(other: Any?) = other is Credentials && userName == other.userName && password == other.password
|
||||
|
||||
override fun hashCode() = (userName?.hashCode() ?: 0) * 37 + (password?.hashCode() ?: 0)
|
||||
|
||||
override fun toString() = "userName: $userName, password size: ${password?.length ?: 0}"
|
||||
}
|
||||
|
||||
@Suppress("FunctionName", "DeprecatedCallableAddReplaceWith")
|
||||
/**
|
||||
* @deprecated Never use it in a new code.
|
||||
*/
|
||||
/** @deprecated Never use it in a new code. */
|
||||
@Deprecated("Never use it in a new code.")
|
||||
@Suppress("FunctionName", "DeprecatedCallableAddReplaceWith")
|
||||
fun CredentialAttributes(requestor: Class<*>, userName: String?) = CredentialAttributes(requestor.name, userName, requestor)
|
||||
|
||||
@Contract("null -> false")
|
||||
fun Credentials?.isFulfilled() = this != null && userName != null && !password.isNullOrEmpty()
|
||||
|
||||
@Contract("null -> false")
|
||||
fun Credentials?.hasOnlyUserName() = this != null && userName != null && password.isNullOrEmpty()
|
||||
|
||||
fun Credentials?.isEmpty() = this == null || (userName == null && password.isNullOrEmpty())
|
||||
|
||||
+5
-19
@@ -1,22 +1,8 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.intellij.errorreport.error;
|
||||
|
||||
public class InternalEAPException extends Exception {
|
||||
public InternalEAPException(String message) {
|
||||
super(message);
|
||||
}
|
||||
}
|
||||
public InternalEAPException(String message) {
|
||||
super(message);
|
||||
}
|
||||
}
|
||||
+5
-19
@@ -1,22 +1,8 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.intellij.errorreport.error;
|
||||
|
||||
public class NoSuchEAPUserException extends Exception {
|
||||
public NoSuchEAPUserException(String message) {
|
||||
super(message);
|
||||
}
|
||||
}
|
||||
public NoSuchEAPUserException(String message) {
|
||||
super(message);
|
||||
}
|
||||
}
|
||||
+5
-19
@@ -1,22 +1,8 @@
|
||||
/*
|
||||
* Copyright 2000-2011 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.intellij.errorreport.error;
|
||||
|
||||
public class UpdateAvailableException extends Exception {
|
||||
public UpdateAvailableException(String update) {
|
||||
super(update);
|
||||
}
|
||||
}
|
||||
public UpdateAvailableException(String update) {
|
||||
super(update);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user