GoogleCodeArchive / piccolo2d

Automatically exported from code.google.com/p/piccolo2d
0 stars 0 forks source link

Property names don't match JavaBean conventions #157

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Most boolean properties have accessors that don't follow the JavaBeans 
naming convention.  Boolean accessors should have a "is" prefix.

For example, to determine if a PNode is visible, "getVisible" is provided, 
but it should be "isVisible".

Original issue reported on code.google.com by allain.lalonde on 24 Jan 2010 at 2:42

GoogleCodeExporter commented 9 years ago
+1 from me for inclusion into 1.3.1

Original comment by heue...@gmail.com on 14 Dec 2010 at 3:10

GoogleCodeExporter commented 9 years ago
Fixing this breaks the api.

Original comment by allain.lalonde on 14 Dec 2010 at 3:16

GoogleCodeExporter commented 9 years ago
well, not if getVisible is still there

Original comment by heue...@gmail.com on 14 Dec 2010 at 4:06

GoogleCodeExporter commented 9 years ago
would we update calls to getVisible to invoke isVisible instead? if so, this is 
an api break b/c clients may be overridding getVisible()...

http://wiki.eclipse.org/Evolving_Java-based_APIs#Example_4_-_Adding_an_API_metho
d

Original comment by atdi...@gmail.com on 15 Dec 2010 at 2:41

GoogleCodeExporter commented 9 years ago
Very true.  Thanks, guys.

Most often in my own code all classes are final, or methods that are meant to 
be overridden are abstract and those not are final.  There is a Checkstyle 
warning to this effect.  In Piccolo2D almost everything is overrideable, for 
better or worse.

Allain, want to move this to Milestone-2.0 then?

Original comment by heue...@gmail.com on 15 Dec 2010 at 4:23

GoogleCodeExporter commented 9 years ago

Original comment by heue...@gmail.com on 26 Nov 2013 at 11:23