[ https://issues.apache.org/jira/browse/PDFBOX-2672?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14311564#comment-14311564 ]
John Hewson edited comment on PDFBOX-2672 at 2/8/15 9:45 PM: ------------------------------------------------------------- {quote} I like to use protected fields in derived classes. {quote} Yes, this is something we often do. However, when the class can be subclassed publicly, the using getters does add more robustness, especially for non-final fields. This is something we do in a few places, e.g. PDFStreamEngine, but most older code doesn't. {quote} Using setters / getters is probably making the code slower {quote} This was true in the early days of Java, but the JVM's JIT now has inlining. was (Author: jahewson): {quote} I like to use protected fields in derived classes. {quote} Yes, this is something we often do. However, when the class can be subclasses publicly, the using getters does add more robustness, especially for non-final fields. This is something we do in a few places, e.g. PDFStreamEngine, but most older code doesn't. {quote} Using setters / getters is probably making the code slower {quote} This was true in the early days of Java, but the JVM's JIT now has inlining. > Wrong code convention link on the website > ----------------------------------------- > > Key: PDFBOX-2672 > URL: https://issues.apache.org/jira/browse/PDFBOX-2672 > Project: PDFBox > Issue Type: Bug > Components: Documentation > Reporter: Andrea Vacondio > Priority: Trivial > > Currently the website page https://pdfbox.apache.org/codingconventions.html > points to the Sun's code convention -> http://java.sun.com/docs/codeconv but > that page doesn't exist anymore. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org