mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
C-style array declaration fixed
This commit is contained in:
+2
-2
@@ -35,7 +35,7 @@ public class DarculaMenuItemUIBase extends BasicMenuItemUI {
|
||||
return new DarculaMenuItemUIBase();
|
||||
}
|
||||
|
||||
public void processMouseEvent(JMenuItem item, MouseEvent e, MenuElement path[], MenuSelectionManager manager) {
|
||||
public void processMouseEvent(JMenuItem item, MouseEvent e, MenuElement[] path, MenuSelectionManager manager) {
|
||||
Point p = e.getPoint();
|
||||
if (p.x >= 0 && p.x < item.getWidth() &&
|
||||
p.y >= 0 && p.y < item.getHeight()) {
|
||||
@@ -46,7 +46,7 @@ public class DarculaMenuItemUIBase extends BasicMenuItemUI {
|
||||
} else
|
||||
manager.setSelectedPath(path);
|
||||
} else if (item.getModel().isArmed()) {
|
||||
MenuElement newPath[] = new MenuElement[path.length - 1];
|
||||
MenuElement[] newPath = new MenuElement[path.length - 1];
|
||||
int i, c;
|
||||
for (i = 0, c = path.length - 1; i < c; i++)
|
||||
newPath[i] = path[i];
|
||||
|
||||
@@ -271,13 +271,13 @@ public class BegMenuItemUI extends BasicMenuItemUI {
|
||||
|
||||
public MenuElement[] getPath() {
|
||||
MenuSelectionManager menuselectionmanager = MenuSelectionManager.defaultManager();
|
||||
MenuElement amenuelement[] = menuselectionmanager.getSelectedPath();
|
||||
MenuElement[] amenuelement = menuselectionmanager.getSelectedPath();
|
||||
int i1 = amenuelement.length;
|
||||
if (i1 == 0){
|
||||
return new MenuElement[0];
|
||||
}
|
||||
java.awt.Container container = menuItem.getParent();
|
||||
MenuElement amenuelement1[];
|
||||
MenuElement[] amenuelement1;
|
||||
if (amenuelement[i1 - 1].getComponent() == container){
|
||||
amenuelement1 = new MenuElement[i1 + 1];
|
||||
System.arraycopy(amenuelement, 0, amenuelement1, 0, i1);
|
||||
@@ -554,7 +554,7 @@ public class BegMenuItemUI extends BasicMenuItemUI {
|
||||
|
||||
public void menuDragMouseDragged(MenuDragMouseEvent e){
|
||||
MenuSelectionManager manager=e.getMenuSelectionManager();
|
||||
MenuElement path[]=e.getPath();
|
||||
MenuElement[] path = e.getPath();
|
||||
manager.setSelectedPath(path);
|
||||
}
|
||||
|
||||
|
||||
@@ -210,13 +210,13 @@ public class IdeaMenuUI extends BasicMenuUI{
|
||||
|
||||
public MenuElement[] getPath() {
|
||||
MenuSelectionManager menuselectionmanager = MenuSelectionManager.defaultManager();
|
||||
MenuElement amenuelement[] = menuselectionmanager.getSelectedPath();
|
||||
MenuElement[] amenuelement = menuselectionmanager.getSelectedPath();
|
||||
int i1 = amenuelement.length;
|
||||
if (i1 == 0){
|
||||
return new MenuElement[0];
|
||||
}
|
||||
Container container = menuItem.getParent();
|
||||
MenuElement amenuelement1[];
|
||||
MenuElement[] amenuelement1;
|
||||
if (amenuelement[i1 - 1].getComponent() == container){
|
||||
amenuelement1 = new MenuElement[i1 + 1];
|
||||
System.arraycopy(amenuelement, 0, amenuelement1, 0, i1);
|
||||
|
||||
@@ -774,7 +774,7 @@ public class AdvancedEnhancer extends AbstractClassGenerator
|
||||
EmitUtils.constructor_switch(e, constructors, new ObjectSwitchCallback() {
|
||||
public void processCase(Object key, $Label end) {
|
||||
MethodInfo constructor = (MethodInfo)key;
|
||||
$Type types[] = constructor.getSignature().getArgumentTypes();
|
||||
$Type[] types = constructor.getSignature().getArgumentTypes();
|
||||
for (int i = 0; i < types.length; i++) {
|
||||
e.load_arg(1);
|
||||
e.push(i);
|
||||
|
||||
@@ -47,7 +47,7 @@ public class UnsyncByteArrayOutputStream extends OutputStream {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(byte b[], int off, int len) {
|
||||
public void write(byte[] b, int off, int len) {
|
||||
if ((off < 0) || (off > b.length) || (len < 0) ||
|
||||
((off + len) > b.length) || ((off + len) < 0)) {
|
||||
throw new IndexOutOfBoundsException();
|
||||
|
||||
@@ -111,7 +111,7 @@ public class ReadThread implements Runnable {
|
||||
return internalRead();
|
||||
}
|
||||
|
||||
public synchronized int read(byte b[], int off, int len) throws IOException {
|
||||
public synchronized int read(byte[] b, int off, int len) throws IOException {
|
||||
int result = waitForAvailableBytes();
|
||||
if (result == END_OF_STREAM) return END_OF_STREAM;
|
||||
return internalRead(b, off, len);
|
||||
@@ -213,7 +213,7 @@ public class ReadThread implements Runnable {
|
||||
}
|
||||
}
|
||||
|
||||
private synchronized int internalRead(byte b[], int off, int len) {
|
||||
private synchronized int internalRead(byte[] b, int off, int len) {
|
||||
int result = Math.min(len, size());
|
||||
System.arraycopy(myBuffer, myFirstIndex, b, off, result);
|
||||
myFirstIndex += result;
|
||||
|
||||
+2
-2
@@ -39,12 +39,12 @@ public class OutputStreamWrapper extends OutputStream{
|
||||
myOutputStream.close();
|
||||
}
|
||||
|
||||
public void write(byte b[]) throws IOException {
|
||||
public void write(byte[] b) throws IOException {
|
||||
myOutputStream.write(b);
|
||||
myStatistics.send(b.length);
|
||||
}
|
||||
|
||||
public void write(byte b[], int off, int len) throws IOException {
|
||||
public void write(byte[] b, int off, int len) throws IOException {
|
||||
myOutputStream.write(b, off, len);
|
||||
myStatistics.send(len);
|
||||
|
||||
|
||||
+1
-1
@@ -47,7 +47,7 @@ public abstract class AbstractOutputStreamWriter extends Writer {
|
||||
writeChar((char)chr, outputStream);
|
||||
}
|
||||
|
||||
public final void write(char buffer[], int offset, int length) throws IOException {
|
||||
public final void write(char[] buffer, int offset, int length) throws IOException {
|
||||
if (offset < 0
|
||||
|| length < 0
|
||||
|| offset + length > buffer.length) {
|
||||
|
||||
@@ -31,7 +31,7 @@ import java.io.File;
|
||||
public class Main {
|
||||
|
||||
|
||||
public static void main(String argv[]) throws Exception {
|
||||
public static void main(String[] argv) throws Exception {
|
||||
if (argv.length != 4) {
|
||||
System.out.println("Usage: Main <XSD or DTD> <input folder> <output folder> <config xml>");
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ class EscapePreprocessor extends FilterReader {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int read(char cbuf[], int off, int len) throws IOException {
|
||||
public int read(char[] cbuf, int off, int len) throws IOException {
|
||||
final int i = read();
|
||||
if (i == -1) {
|
||||
return -1;
|
||||
|
||||
Reference in New Issue
Block a user