Clover Coverage Report - Subsonic-Android Coverage Report
Coverage timestamp: ven dic 19 2014 17:57:13 EST
../../../../../img/srcFileCovDistChart0.png 86% of files have more coverage
9   51   3   4,5
2   22   0,33   2
2     1,5  
1    
This report was generated with an evaluation server license. Purchase Clover or configure your license.
 
  ServerTooOldException       Line # 29 9 3 0% 0.0
 
No Tests
 
1    /*
2    This file is part of Subsonic.
3   
4    Subsonic is free software: you can redistribute it and/or modify
5    it under the terms of the GNU General Public License as published by
6    the Free Software Foundation, either version 3 of the License, or
7    (at your option) any later version.
8   
9    Subsonic is distributed in the hope that it will be useful,
10    but WITHOUT ANY WARRANTY; without even the implied warranty of
11    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12    GNU General Public License for more details.
13   
14    You should have received a copy of the GNU General Public License
15    along with Subsonic. If not, see <http://www.gnu.org/licenses/>.
16   
17    Copyright 2009 (C) Sindre Mehus
18    */
19    package net.sourceforge.subsonic.androidapp.service;
20   
21    import net.sourceforge.subsonic.androidapp.domain.Version;
22   
23    /**
24    * Thrown if the REST API version implemented by the server is too old.
25    *
26    * @author Sindre Mehus
27    * @version $Id$
28    */
 
29    public class ServerTooOldException extends Exception {
30   
31    private final String text;
32    private final Version serverVersion;
33    private final Version requiredVersion;
34   
 
35  0 toggle public ServerTooOldException(String text, Version serverVersion, Version requiredVersion) {
36  0 this.text = text;
37  0 this.serverVersion = serverVersion;
38  0 this.requiredVersion = requiredVersion;
39    }
40   
 
41  0 toggle @Override
42    public String toString() {
43  0 StringBuilder builder = new StringBuilder();
44  0 if (text != null) {
45  0 builder.append(text).append(" ");
46    }
47  0 builder.append("Server API version too old. ");
48  0 builder.append("Requires ").append(requiredVersion).append(" but is ").append(serverVersion).append(".");
49  0 return builder.toString();
50    }
51    }