|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| This report was generated with an evaluation server license. Purchase Clover or configure your license. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| HttpsURLRewriter | Line # 8 | 2 | 0% | 2 | 4 | 0% |
0.0
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
| No Tests | |||
| 1 | package net.sourceforge.pebble.util; | |
| 2 | ||
| 3 | /** | |
| 4 | * Rewrite Urls to use the given scheme, typically https. | |
| 5 | * @author Olaf Kock | |
| 6 | */ | |
| 7 | ||
| 8 | public class HttpsURLRewriter extends UrlRewriter { | |
| 9 | ||
| 10 | private final String currentScheme; | |
| 11 | ||
| 12 | 0 |
public HttpsURLRewriter(String currentScheme) { |
| 13 | 0 | this.currentScheme = currentScheme; |
| 14 | } | |
| 15 | ||
| 16 | 0 |
public String rewrite(String url) { |
| 17 | 0 | return Utilities.calcBaseUrl(currentScheme, url); |
| 18 | } | |
| 19 | ||
| 20 | } | |
|
||||||||||||