Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
[JENKINS-29900] Fixed regression in trend detail URLs.
  • Loading branch information
uhafner committed Jun 4, 2016
1 parent b0f1a2c commit 06afb6737f9acd0d8dee646ca82aee0ea9bba41a
Showing with 10 additions and 7 deletions.
  1. +10 −7 src/main/java/hudson/plugins/analysis/graph/GraphConfiguration.java
@@ -34,7 +34,10 @@ public class GraphConfiguration {
private static final int DEFAULT_HEIGHT = 200;
private static final String DEFAULT_NAME = StringUtils.EMPTY;
private static final String DEFAULT_VALUE = StringUtils.EMPTY;
private static final BuildResultGraph DEFAULT_GRAPH = new PriorityGraph();

private static PriorityGraph createDefaultGraph() {
return new PriorityGraph();
}

/** Separator of cookie values. */
protected static final String SEPARATOR = "!";
@@ -75,7 +78,7 @@ public static GraphConfiguration createDeactivated() {
* @return a default configuration
*/
public static GraphConfiguration createDefault() {
return new GraphConfiguration(DEFAULT_GRAPH);
return new GraphConfiguration(createDefaultGraph());
}

/**
@@ -367,8 +370,8 @@ private boolean initializeFromJsonObject(final JSONObject value) {
if (StringUtils.isNotBlank(dayCountString)) {
dayCount = value.getInt("dayCountString");
}
String grapyTypeString = value.getString("graphType");
graphType = graphId2Graph.get(grapyTypeString);
String graphTypeString = value.getString("graphType");
graphType = graphId2Graph.get(graphTypeString);

useBuildDate = value.getBoolean("useBuildDateAsDomain");

@@ -498,7 +501,7 @@ private void reset() {
width = DEFAULT_WIDTH;
buildCount = DEFAULT_BUILD_COUNT;
dayCount = DEFAULT_DAY_COUNT;
graphType = DEFAULT_GRAPH;
graphType = createDefaultGraph();
useBuildDate = DEFAULT_USE_BUILD_DATE;
parameterName = DEFAULT_NAME;
parameterValue = DEFAULT_VALUE;
@@ -706,7 +709,7 @@ public String getParameterValue() {
public boolean isDefault() {
return width == DEFAULT_WIDTH
&& height == DEFAULT_HEIGHT
&& graphType == DEFAULT_GRAPH // NOPMD
&& graphType.getId() == createDefaultGraph().getId() // NOPMD
&& buildCount == DEFAULT_BUILD_COUNT
&& dayCount == DEFAULT_DAY_COUNT
&& useBuildDate == DEFAULT_USE_BUILD_DATE
@@ -753,7 +756,7 @@ public BuildResultGraph getGraph(final String graphId) {
return graphId2Graph.get(graphId);
}
else {
return DEFAULT_GRAPH;
return createDefaultGraph();
}
}

0 comments on commit 06afb67

Please sign in to comment.