Hi Alex,

I think the simple answer is that for an interface, you don't always
need to implement every method, only those that make sense for your
implementation. Sometimes methods are there simply as hooks to provide
guidance for when a certain function is used, but not all implementations
have all functions. So I think this just means to use common sense when
making decisions about what to do with them. If calling a certain method
should result in a exception, throw an exception. Otherwise, if it makes
sense for your implementation, just ignore the call.

I.e., it's also to guide potential implementations, so that if future
implementations choose to use a feature that's not even used in the
default one, they choose the same method signatures.

Cheers,

Murray

On 12/09/24 10:23, Alex O'Ree (Jira) wrote:
Alex O'Ree created JSPWIKI-1201:
-----------------------------------

              Summary: Javadoc clarification on PageProvider
                  Key: JSPWIKI-1201
                  URL: https://issues.apache.org/jira/browse/JSPWIKI-1201
              Project: JSPWiki
           Issue Type: Improvement
             Reporter: Alex O'Ree


I'm kind of confused as what this means, fetched sept 2024, on the PageProvider 
java interface

"You can build whatever page providers based on this, {*}just leave the unused 
methods do something useful.{*}"

I have no idea what this means. For java interfaces, you have to implement them 
all. Does this imply that unused or unimplemented functions should throw an 
exception, return null or what?



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


--

...........................................................................
Murray Altheim <murray18 at altheim dot com>                       = =  ===
http://www.altheim.com/murray/                                     ===  ===
                                                                   = =  ===
    In the evening
    The rice leaves in the garden
    Rustle in the autumn wind
    That blows through my reed hut.
           -- Minamoto no Tsunenobu

Reply via email to