From: Roedy Green on 29 Jan 2010 01:27 On Wed, 27 Jan 2010 14:55:12 -0800 (PST), laredotornado <laredotornado(a)zipmail.com> wrote, quoted or indirectly quoted someone who said : >Specifically the "throw new RemoteException(e.getMessage());" line, >with the complaint, "New exception is thrown in catch block. Original >stack trace may be lost." You would have to save the trace, and rethrow it, or dump it there. If you use IntelliJ, run the code inspector, and it will insert the appropriate annotation to suppress the warning if you ask it to. See http://mindprod.com/jgloss/annotation.html to do it manually. http://mindprod.com/jgloss/intellij.html -- Roedy Green Canadian Mind Products http://mindprod.com Computers are useless. They can only give you answers. ~ Pablo Picasso (born: 1881-10-25 died: 1973-04-08 at age: 91)
From: Roedy Green on 29 Jan 2010 01:29 On Wed, 27 Jan 2010 19:12:07 -0500, Lew <noone(a)lewscanon.com> wrote, quoted or indirectly quoted someone who said : > >- 'LOG' does not follow the Java coding conventions: > <http://java.sun.com/docs/codeconv/index.html> how can you tell without seeing his declaration for LOG? -- Roedy Green Canadian Mind Products http://mindprod.com Computers are useless. They can only give you answers. ~ Pablo Picasso (born: 1881-10-25 died: 1973-04-08 at age: 91)
From: Lew on 29 Jan 2010 08:34 Roedy Green wrote: > On Wed, 27 Jan 2010 19:12:07 -0500, Lew <noone(a)lewscanon.com> wrote, > quoted or indirectly quoted someone who said : > >> - 'LOG' does not follow the Java coding conventions: >> <http://java.sun.com/docs/codeconv/index.html> > > how can you tell without seeing his declaration for LOG? I explained my reasoning, and why it was wrong, upthread, but I'll recap for your sake, since either you didn't read it, or didn't understand it. or didn't read the links, or didn't understand them. The code convention document (not the JLS, though) suggests using all upper-case names only for class constants. The OP's code LOG.error(e.getMessage(), e); shows that 'LOG' is not a class constant. QED. I was fooled by the fact that the JLS does not suggest the same convention. -- Lew
From: Wojtek on 29 Jan 2010 10:59 Lew wrote : > Roedy Green wrote: >> On Wed, 27 Jan 2010 19:12:07 -0500, Lew <noone(a)lewscanon.com> wrote, >> quoted or indirectly quoted someone who said : >> >>> - 'LOG' does not follow the Java coding conventions: >>> <http://java.sun.com/docs/codeconv/index.html> >> >> how can you tell without seeing his declaration for LOG? > > I explained my reasoning, and why it was wrong, upthread, but I'll recap for > your sake, since either you didn't read it, or didn't understand it. or > didn't read the links, or didn't understand them. > > The code convention document (not the JLS, though) suggests using all > upper-case names only for class constants. The OP's code > > LOG.error(e.getMessage(), e); > > shows that 'LOG' is not a class constant. QED. In which way? Because LOG has a method? Then what about a String? It has methods. -- Wojtek :-)
From: John B. Matthews on 29 Jan 2010 15:36
In article <mn.e9df7da189db388f.70216(a)a.com>, Wojtek <nowhere(a)a.com> wrote: > Lew wrote : > > Roedy Green wrote: > >> On Wed, 27 Jan 2010 19:12:07 -0500, Lew <noone(a)lewscanon.com> wrote, > >> quoted or indirectly quoted someone who said : > >> > >>> - 'LOG' does not follow the Java coding conventions: > >>> <http://java.sun.com/docs/codeconv/index.html> > >> > >> how can you tell without seeing his declaration for LOG? > > > > I explained my reasoning, and why it was wrong, upthread, but I'll > > recap for your sake, since either you didn't read it, or didn't > > understand it. or didn't read the links, or didn't understand them. > > > > The code convention document (not the JLS, though) suggests using all > > upper-case names only for class constants. The OP's code > > > > LOG.error(e.getMessage(), e); > > > > shows that 'LOG' is not a class constant. QED. > > In which way? Because LOG has a method? > > Then what about a String? It has methods. I struggle with this, too. In _Effective Java_, item 56, Joshua Block expands the notion of class constant to include static final fields having a primitive type or an immutable reference type: static final Random RANDOM = new Random(); static final Integer ANSWER = Integer.valueOf(42); I'm not sure how to apply this to java.util.logging.Logger. -- John B. Matthews trashgod at gmail dot com <http://sites.google.com/site/drjohnbmatthews> |