< prev index next >
src/java.desktop/macosx/classes/sun/lwawt/macosx/CInputMethod.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
@@ -53,11 +53,11 @@
private static Map<TextAttribute, Integer>[] sHighlightStyles;
// Intitalize highlight mapping table and its mapper.
static {
@SuppressWarnings({"rawtypes", "unchecked"})
- Map<TextAttribute, Integer> styles[] = new Map[4];
+ Map<TextAttribute, Integer>[] styles = new Map[4];
HashMap<TextAttribute, Integer> map;
// UNSELECTED_RAW_TEXT_HIGHLIGHT
map = new HashMap<TextAttribute, Integer>(1);
map.put(TextAttribute.INPUT_METHOD_UNDERLINE,
@@ -611,11 +611,11 @@
theIterator = fIMContext.getCommittedText(location - fCurrentTextLength, location - fCurrentTextLength + length, null);
}
}
// Get the characters from the iterator
- char selectedText[] = new char[theIterator.getEndIndex() - theIterator.getBeginIndex()];
+ char[] selectedText = new char[theIterator.getEndIndex() - theIterator.getBeginIndex()];
char current = theIterator.first();
int index = 0;
while (current != CharacterIterator.DONE) {
selectedText[index++] = current;
current = theIterator.next();
< prev index next >