()
| 2010 | } |
| 2011 | |
| 2012 | private synchronized Namespaces getNamespaces() throws MessagingException { |
| 2013 | checkConnected(); |
| 2014 | |
| 2015 | IMAPProtocol p = null; |
| 2016 | |
| 2017 | if (namespaces == null) { |
| 2018 | try { |
| 2019 | p = getStoreProtocol("getNameSpaces"); |
| 2020 | namespaces = p.namespace(); |
| 2021 | } catch (BadCommandException bex) { |
| 2022 | // NAMESPACE not supported, ignore it |
| 2023 | } catch (ConnectionException cex) { |
| 2024 | throw new StoreClosedException(this, cex.getMessage()); |
| 2025 | } catch (ProtocolException pex) { |
| 2026 | throw new MessagingException(pex.getMessage(), pex); |
| 2027 | } finally { |
| 2028 | releaseStoreProtocol(p); |
| 2029 | } |
| 2030 | } |
| 2031 | return namespaces; |
| 2032 | } |
| 2033 | |
| 2034 | private Folder[] namespaceToFolders(Namespaces.Namespace[] ns, |
| 2035 | String user) { |
no test coverage detected