Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java: warning: [removal] Character(char) in Character has been deprecated and marked for removal #1510

Closed
ryandesign opened this issue Apr 24, 2024 · 1 comment
Labels

Comments

@ryandesign
Copy link
Contributor

These warnings appear when compiling the Java bindings on macOS 14:

build-project:
     [echo] linkgrammar: /Users/runner/work/link-grammar/link-grammar/bindings/java/build.xml
    [javac] Compiling 9 source files to /Users/runner/work/link-grammar/link-grammar/bindings/java/bin
    [javac] warning: [options] bootstrap class path not set in conjunction with -source 8
    [javac] warning: [options] source value 8 is obsolete and will be removed in a future release
    [javac] warning: [options] target value 8 is obsolete and will be removed in a future release
    [javac] warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
    [javac] /Users/runner/work/link-grammar/link-grammar/bindings/java/org/linkgrammar/JSONReader.java:42: warning: [removal] Character(char) in Character has been deprecated and marked for removal
    [javac]         escapes.put(new Character('"'), new Character('"'));
    [javac]                     ^
    [javac] /Users/runner/work/link-grammar/link-grammar/bindings/java/org/linkgrammar/JSONReader.java:42: warning: [removal] Character(char) in Character has been deprecated and marked for removal
    [javac]         escapes.put(new Character('"'), new Character('"'));
    [javac]                                         ^
    [javac] /Users/runner/work/link-grammar/link-grammar/bindings/java/org/linkgrammar/JSONReader.java:43: warning: [removal] Character(char) in Character has been deprecated and marked for removal
    [javac]         escapes.put(new Character('\\'), new Character('\\'));
    [javac]                     ^
    [javac] /Users/runner/work/link-grammar/link-grammar/bindings/java/org/linkgrammar/JSONReader.java:43: warning: [removal] Character(char) in Character has been deprecated and marked for removal
    [javac]         escapes.put(new Character('\\'), new Character('\\'));
    [javac]                                          ^
    [javac] /Users/runner/work/link-grammar/link-grammar/bindings/java/org/linkgrammar/JSONReader.java:44: warning: [removal] Character(char) in Character has been deprecated and marked for removal
    [javac]         escapes.put(new Character('/'), new Character('/'));
    [javac]                     ^
    [javac] /Users/runner/work/link-grammar/link-grammar/bindings/java/org/linkgrammar/JSONReader.java:44: warning: [removal] Character(char) in Character has been deprecated and marked for removal
    [javac]         escapes.put(new Character('/'), new Character('/'));
    [javac]                                         ^
    [javac] /Users/runner/work/link-grammar/link-grammar/bindings/java/org/linkgrammar/JSONReader.java:45: warning: [removal] Character(char) in Character has been deprecated and marked for removal
    [javac]         escapes.put(new Character('b'), new Character('\b'));
    [javac]                     ^
    [javac] /Users/runner/work/link-grammar/link-grammar/bindings/java/org/linkgrammar/JSONReader.java:45: warning: [removal] Character(char) in Character has been deprecated and marked for removal
    [javac]         escapes.put(new Character('b'), new Character('\b'));
    [javac]                                         ^
    [javac] /Users/runner/work/link-grammar/link-grammar/bindings/java/org/linkgrammar/JSONReader.java:46: warning: [removal] Character(char) in Character has been deprecated and marked for removal
    [javac]         escapes.put(new Character('f'), new Character('\f'));
    [javac]                     ^
    [javac] /Users/runner/work/link-grammar/link-grammar/bindings/java/org/linkgrammar/JSONReader.java:46: warning: [removal] Character(char) in Character has been deprecated and marked for removal
    [javac]         escapes.put(new Character('f'), new Character('\f'));
    [javac]                                         ^
    [javac] /Users/runner/work/link-grammar/link-grammar/bindings/java/org/linkgrammar/JSONReader.java:47: warning: [removal] Character(char) in Character has been deprecated and marked for removal
    [javac]         escapes.put(new Character('n'), new Character('\n'));
    [javac]                     ^
    [javac] /Users/runner/work/link-grammar/link-grammar/bindings/java/org/linkgrammar/JSONReader.java:47: warning: [removal] Character(char) in Character has been deprecated and marked for removal
    [javac]         escapes.put(new Character('n'), new Character('\n'));
    [javac]                                         ^
    [javac] /Users/runner/work/link-grammar/link-grammar/bindings/java/org/linkgrammar/JSONReader.java:48: warning: [removal] Character(char) in Character has been deprecated and marked for removal
    [javac]         escapes.put(new Character('r'), new Character('\r'));
    [javac]                     ^
    [javac] /Users/runner/work/link-grammar/link-grammar/bindings/java/org/linkgrammar/JSONReader.java:48: warning: [removal] Character(char) in Character has been deprecated and marked for removal
    [javac]         escapes.put(new Character('r'), new Character('\r'));
    [javac]                                         ^
    [javac] /Users/runner/work/link-grammar/link-grammar/bindings/java/org/linkgrammar/JSONReader.java:49: warning: [removal] Character(char) in Character has been deprecated and marked for removal
    [javac]         escapes.put(new Character('t'), new Character('\t'));
    [javac]                     ^
    [javac] /Users/runner/work/link-grammar/link-grammar/bindings/java/org/linkgrammar/JSONReader.java:49: warning: [removal] Character(char) in Character has been deprecated and marked for removal
    [javac]         escapes.put(new Character('t'), new Character('\t'));
    [javac]                                         ^
    [javac] /Users/runner/work/link-grammar/link-grammar/bindings/java/org/linkgrammar/JSONReader.java:307: warning: [removal] Character(char) in Character has been deprecated and marked for removal
    [javac]                     Character value = escapes.get(new Character(c));
    [javac]                                                   ^
    [javac] 21 warnings
@linas linas changed the title warning: [removal] Character(char) in Character has been deprecated and marked for removal Java: warning: [removal] Character(char) in Character has been deprecated and marked for removal Apr 25, 2024
@linas linas added the java label Apr 25, 2024
linas added a commit to linas/link-grammar that referenced this issue May 21, 2024
Apparently, the new Character('x') style is deprecated. The fix is
described here:
https://stackoverflow.com/questions/67093884/deprecated-shortstring-how-to-update
linas added a commit that referenced this issue May 21, 2024
@linas
Copy link
Member

linas commented May 21, 2024

Thanks. Fixed in #1532

@linas linas closed this as completed May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants