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

 
 

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

Submitter:  Rik <rik5>
Submitted:  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
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

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>
Group administrator
Mon 02 Jul 2018 03:14:33 PM UTC, comment #7: 

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

https://wiki.octave.org/Developers
https://wiki.octave.org/Mercurial

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

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

Create a ~/.hgrc file with the lines


[ui]
username = Andrew Janke <andrew@apjanke.net>


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>
Group 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>
Group 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.

https://savannah.gnu.org/bugs/download.php?file_id=44477

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>
Group administrator
Tue 03 Apr 2018 01:22:09 AM UTC, comment #1: 

The full set of warnings on my system is


Note: org/octave/OctaveReference.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: ./org/octave/Octave.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: ./org/octave/OctaveReference.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: org/octave/Octave.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: org/octave/ClassHelper.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: org/octave/ClassHelper.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.


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>
Group Member
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.


Note: ./org/octave/Octave.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.




Rik <rik5>
Group administrator

 

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

Attach Files:
   
   
Comment:
   

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)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group 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.13-758e.
    Corresponding source code