bugGNU Octave - Bugs: bug #53550, New -Xlint warnings during...


bug #53550: New -Xlint warnings during compilation of Java code

Submitted by:  Rik <rik5>
Submitted on:  Tue 03 Apr 2018 12:20:01 AM UTC  
Category:  Configuration and Build System Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  Closed
Release:  dev Operating System:  GNU/Linux

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


( Jump to the original submission)

Tue 03 Jul 2018 07:26:50 AM UTC, comment #9:

Thank you!

Andrew Janke <apjanke>
Mon 02 Jul 2018 03:21:48 PM UTC, comment #8:

I committed the final patch here (http://hg.savannah.gnu.org/hgweb/octave/rev/075b9f8a32d8). You can see your name, as well as the commit message I made (hopefully, mostly accurate).

Marking as fixed and closing report.

Rik <rik5>
Project Administrator
Mon 02 Jul 2018 03:14:33 PM UTC, comment #7:

Some general resources for getting started with Octave development and contributions:


The second one has information about how to write commit messages, a sample .hgrc file, etc.

Rik <rik5>
Project Administrator
Mon 02 Jul 2018 02:25:17 PM UTC, comment #6:

Create a ~/.hgrc file with the lines

Then commit your change as a changeset with a commit message and use "hg export" to export the formatted changeset that you can attach to a bug report or email message.

See also: https://wiki.octave.org/Mercurial

John W. Eaton <jwe>
Project Administrator
Mon 02 Jul 2018 04:58:10 AM UTC, comment #5:

Credit, please! :)

Andrew Janke, andrew@apjanke.net.

Is there a way for me to include the author info in the patch file to make it more convenient for you?

Andrew Janke <apjanke>
Mon 02 Jul 2018 04:54:02 AM UTC, comment #4:

@Andrew: I'm not a Java expert, but your patch works fine. I modified the javac command to include -Xlint:deprecation and -Xlint:unchecked and there are no warnings. And 'make check' passes as well.

Ordinarily we check a patch in with the author's name and e-mail address. The name, so you can get credit, and the e-mail, in case there is ever a problem later and the coder needs to be contacted. Would you like to be credited or remain anonymous in which case I will check the change in under my name.

Rik <rik5>
Project Administrator
Sun 01 Jul 2018 02:18:31 PM UTC, comment #3:

Attached is a patch to clean up the unchecked warnings. It also replaces StringBuffer with StringBuilder and fills in empty @throws Javadoc tags, both of which some linters may complain about.


The unchecked warnings are fixed by parameterizing the types. This will have no effect on how they're called from Octave, since Octave is using reflection to invoke them, and parameterized types are a Java compile time only check.

Andrew Janke <apjanke>
Wed 11 Apr 2018 07:14:59 PM UTC, comment #2:

Attached is a list of unchecked warnings generated by compiling with -Xlint:unchecked.

(file #43881)

Rik <rik5>
Project Administrator
Tue 03 Apr 2018 01:22:09 AM UTC, comment #1:

The full set of warnings on my system is

Any changes made to the source code to use newer Java language features should correspond to the '-source' and '-target' options in the build system.

We currently build our Java classes to the Java 6 VM so that the bytecode is backwards and forwards compatible, up to and including Java 11 with my latest testing.

Mike Miller <mtmiller>
Project Administrator
Tue 03 Apr 2018 12:20:01 AM UTC, original submission:

I'm getting warnings after doing 'make distclean' and then doing a configure/build cycle. The warnings are only notes, but it would still be good if someone could stop this from printing by cleaning up the Java code.

Rik <rik5>
Project Administrator


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

Attached Files
file #44477:  clean-up-java-compiler-warnings.patch added by apjanke (7KiB - application/octet-stream - patch to clean up warnings and lint inspections)
file #43881:  unchecked.log added by rik5 (2KiB - text/x-log)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by apjanke (Updated the item)
  • -email is unavailable- added by apjanke (Adding myself to the Cc list.)
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by rik5 (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.




    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-07-02 rik5 StatusPatch Reviewed => Fixed
        Open/ClosedOpen => Closed
    2018-07-02 rik5 StatusConfirmed => Patch Reviewed
    2018-07-01 apjanke Attached File- => Added clean-up-java-compiler-warnings.patch, #44477
    2018-07-01 apjanke Carbon-Copy- => Added apjanke
    2018-04-11 rik5 Attached File- => Added unchecked.log, #43881
    2018-04-03 mtmiller StatusNone => Confirmed

    Back to the top

    Powered by Savane 3.4