Skip to content

Commit

Permalink
8269698: Specification for methods of java.awt.im.InputContext should…
Browse files Browse the repository at this point in the history
… mention that they do nothing

Reviewed-by: serb
  • Loading branch information
Alexander Zvegintsev committed Oct 15, 2021
1 parent 8e02064 commit da8da3a
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/java.desktop/share/classes/java/awt/im/InputContext.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2021, 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
Expand Down Expand Up @@ -30,7 +30,7 @@
import java.awt.AWTEvent;
import java.beans.Transient;
import java.lang.Character.Subset;
import sun.awt.im.InputMethodContext;
import java.util.Objects;

/**
* Provides methods to control text input facilities such as input
Expand Down Expand Up @@ -144,6 +144,7 @@ public static InputContext getInstance() {
*/
public boolean selectInputMethod(Locale locale) {
// real implementation is in sun.awt.im.InputContext
Objects.requireNonNull(locale);
return false;
}

Expand Down Expand Up @@ -215,6 +216,7 @@ public void setCharacterSubsets(Subset[] subsets) {
*/
public void setCompositionEnabled(boolean enable) {
// real implementation is in sun.awt.im.InputContext
throw new UnsupportedOperationException();
}

/**
Expand All @@ -234,7 +236,7 @@ public void setCompositionEnabled(boolean enable) {
@Transient
public boolean isCompositionEnabled() {
// real implementation is in sun.awt.im.InputContext
return false;
throw new UnsupportedOperationException();
}

/**
Expand All @@ -258,6 +260,7 @@ public boolean isCompositionEnabled() {
*/
public void reconvert() {
// real implementation is in sun.awt.im.InputContext
throw new UnsupportedOperationException();
}

/**
Expand All @@ -269,6 +272,7 @@ public void reconvert() {
*/
public void dispatchEvent(AWTEvent event) {
// real implementation is in sun.awt.im.InputContext
Objects.requireNonNull(event);
}

/**
Expand All @@ -286,6 +290,7 @@ public void dispatchEvent(AWTEvent event) {
*/
public void removeNotify(Component client) {
// real implementation is in sun.awt.im.InputContext
Objects.requireNonNull(client);
}

/**
Expand Down

1 comment on commit da8da3a

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.