mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Warnings fixed
GitOrigin-RevId: a4b665021ed3e1a3ea81d9333db0811afe2a529f
This commit is contained in:
committed by
intellij-monorepo-bot
parent
492561971e
commit
b5808d2c51
+7
-9
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.openapi.vfs.newvfs.persistent;
|
||||
|
||||
import com.intellij.openapi.vfs.newvfs.AttributeInputStream;
|
||||
@@ -50,7 +50,7 @@ final class PersistentFSAttributeAccessor {
|
||||
|
||||
//======== RC: methods to access attributesStorage raw byteBuffer, if storage supports it
|
||||
|
||||
protected boolean supportsRawAccess() {
|
||||
boolean supportsRawAccess() {
|
||||
return attributesStorage instanceof AttributesStorageOverBlobStorage;
|
||||
}
|
||||
|
||||
@@ -61,11 +61,10 @@ final class PersistentFSAttributeAccessor {
|
||||
*
|
||||
* @return null if an appropriate attribute record does not exist
|
||||
*/
|
||||
protected <R> @Nullable R readAttributeRaw(final int fileId,
|
||||
final @NotNull FileAttribute attribute,
|
||||
final ByteBufferReader<R> reader) throws IOException {
|
||||
if (attributesStorage instanceof AttributesStorageOverBlobStorage) {
|
||||
final AttributesStorageOverBlobStorage storage = (AttributesStorageOverBlobStorage)attributesStorage;
|
||||
<R> @Nullable R readAttributeRaw(final int fileId,
|
||||
final @NotNull FileAttribute attribute,
|
||||
final ByteBufferReader<R> reader) throws IOException {
|
||||
if (attributesStorage instanceof AttributesStorageOverBlobStorage storage) {
|
||||
return storage.readAttributeRaw(connection, fileId, attribute, buffer -> {
|
||||
if (attribute.isVersioned()) {
|
||||
final int actualVersion = DataInputOutputUtil.readINT(buffer);
|
||||
@@ -84,8 +83,7 @@ final class PersistentFSAttributeAccessor {
|
||||
public void writeAttributeRaw(final int fileId,
|
||||
final @NotNull FileAttribute attribute,
|
||||
final ByteBufferWriter writer) {
|
||||
if (attributesStorage instanceof AttributesStorageOverBlobStorage) {
|
||||
final AttributesStorageOverBlobStorage storage = (AttributesStorageOverBlobStorage)attributesStorage;
|
||||
if (attributesStorage instanceof AttributesStorageOverBlobStorage storage) {
|
||||
throw new UnsupportedOperationException("Method not implemented yet");
|
||||
//TODO RC: drill hole for storage.writeAttributeRaw(connection, fileId, attribute, writer)
|
||||
//return storage.writeAttribute(connection, fileId, attribute, buffer -> {
|
||||
|
||||
+3
-17
@@ -1,18 +1,4 @@
|
||||
/*
|
||||
* Copyright 2000-2014 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-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.psi.impl.source.resolve.reference.impl.providers;
|
||||
|
||||
import com.intellij.codeInsight.intention.FileModifier;
|
||||
@@ -112,7 +98,7 @@ final class CreateXmlElementIntentionAction implements IntentionAction {
|
||||
manager.startTemplate(targetEditor, template);
|
||||
}
|
||||
|
||||
protected void addTextTo(Template template, XmlTag rootTag) {
|
||||
private void addTextTo(Template template, XmlTag rootTag) {
|
||||
String schemaPrefix = rootTag.getPrefixByNamespace(XmlUtil.XML_SCHEMA_URI);
|
||||
if (!schemaPrefix.isEmpty()) schemaPrefix += ":";
|
||||
|
||||
@@ -132,7 +118,7 @@ final class CreateXmlElementIntentionAction implements IntentionAction {
|
||||
}
|
||||
|
||||
@Override
|
||||
public @Nullable FileModifier getFileModifierForPreview(@NotNull PsiFile target) {
|
||||
public @NotNull FileModifier getFileModifierForPreview(@NotNull PsiFile target) {
|
||||
PsiElement copy = PsiTreeUtil.findSameElementInCopy(myRef.getElement(), target);
|
||||
PsiReference reference = copy.getReference();
|
||||
|
||||
|
||||
+9
-8
@@ -210,9 +210,10 @@ final class GenerateInstanceDocumentFromSchemaDialog extends DialogWrapper {
|
||||
}
|
||||
|
||||
@Nullable
|
||||
protected @InspectionMessage String doValidateWithData() {
|
||||
@InspectionMessage
|
||||
private String doValidateWithData() {
|
||||
String rootElementName = getElementName();
|
||||
if (rootElementName == null || rootElementName.length() == 0) {
|
||||
if (rootElementName == null || rootElementName.isEmpty()) {
|
||||
return XmlBundle.message("schema2.instance.no.valid.root.element.name.validation.error");
|
||||
}
|
||||
|
||||
@@ -229,31 +230,31 @@ final class GenerateInstanceDocumentFromSchemaDialog extends DialogWrapper {
|
||||
}
|
||||
|
||||
final String fileName = getOutputFileName();
|
||||
if (fileName == null || fileName.length() == 0) {
|
||||
if (fileName == null || fileName.isEmpty()) {
|
||||
return XmlBundle.message("schema2.instance.output.file.name.is.empty.validation.problem");
|
||||
}
|
||||
return null;
|
||||
|
||||
}
|
||||
|
||||
protected static boolean isAcceptableFile(VirtualFile virtualFile) {
|
||||
private static boolean isAcceptableFile(VirtualFile virtualFile) {
|
||||
return GenerateInstanceDocumentFromSchemaAction.isAcceptableFileForGenerateSchemaFromInstanceDocument(virtualFile);
|
||||
}
|
||||
|
||||
|
||||
protected TextFieldWithBrowseButton getUrl() {
|
||||
TextFieldWithBrowseButton getUrl() {
|
||||
return generateFromUrl;
|
||||
}
|
||||
|
||||
protected JLabel getUrlText() {
|
||||
private JLabel getUrlText() {
|
||||
return generateFromUrlText;
|
||||
}
|
||||
|
||||
protected JLabel getStatusTextField() {
|
||||
private JLabel getStatusTextField() {
|
||||
return statusText;
|
||||
}
|
||||
|
||||
protected JLabel getStatusField() {
|
||||
private JLabel getStatusField() {
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user