Skip to content

Commit d156cdb

Browse files
committed
Rollback to java 1.7 for codenvy compat
1 parent 6cfac9a commit d156cdb

7 files changed

Lines changed: 512 additions & 544 deletions

File tree

pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>org.teachingkidsprogramming</groupId>
55
<artifactId>TeachingKidsProgramming</artifactId>
6-
<version>0.0.2-SNAPSHOT</version>
6+
<version>0.0.3-SNAPSHOT</version>
77
<packaging>jar</packaging>
88
<name>${project.groupId}:${project.artifactId}</name>
99
<description>A proven library of high-quality programming courseware for kids. TKP is a designated project of the US non-profit (501c3) the MONA Foundation. The mission of the MONA Foundation is to &quot;support grassroots educational initiatives that educate everyone—including girls.&quot;</description>
@@ -103,8 +103,8 @@
103103
<artifactId>maven-compiler-plugin</artifactId>
104104
<version>3.2</version>
105105
<configuration>
106-
<source>1.8</source>
107-
<target>1.8</target>
106+
<source>1.7</source>
107+
<target>1.7</target>
108108
<encoding>ISO-8859-1</encoding>
109109
</configuration>
110110
</plugin>

src/main/java/org/teachingextensions/approvals/lite/util/FilterUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public class FilterUtils {
1313
* @return a new List containing all elements of the list for which isExtracted() would return true
1414
*/
1515
public static <T> ArrayList<T> retainExtracted(T fromObjects[], Filter filter) throws IllegalArgumentException {
16-
return fromObjects == null ? new ArrayList<>() : filter(Arrays.asList(fromObjects), filter, true);
16+
return fromObjects == null ? new ArrayList<T>() : filter(Arrays.asList(fromObjects), filter, true);
1717
}
1818

1919
/**

src/main/java/org/teachingextensions/approvals/lite/util/velocity/TestableUberspect.java

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -36,25 +36,16 @@ public class TestableUberspect implements Uberspect, UberspectLoggable {
3636
public void init() throws Exception {
3737
}
3838

39-
/**
40-
* *******************************************************************
41-
*/
4239
public void setRuntimeLogger(RuntimeLogger runtimeLogger) {
4340
introspector = new IntrospectorBase();
4441
introspectorWithLog = new Introspector(runtimeLogger);
4542
log = runtimeLogger;
4643
}
4744

48-
/**
49-
* *******************************************************************
50-
*/
5145
public Iterator getIterator(Object obj, Info i) throws Exception {
5246
return getStandardIterator(obj, i);
5347
}
5448

55-
/**
56-
* *******************************************************************
57-
*/
5849
public static Iterator getStandardIterator(Object obj, Info i) {
5950
if (obj.getClass().isArray()) {
6051
return new ArrayIterator(obj);
@@ -70,9 +61,6 @@ public static Iterator getStandardIterator(Object obj, Info i) {
7061
throw new VelocityParsingError("Could not determine type of iterator in " + "#foreach loop ", i);
7162
}
7263

73-
/**
74-
* *******************************************************************
75-
*/
7664
public VelMethod getMethod(Object obj, String methodName, Object[] args, Info i) throws Exception {
7765
if (obj == null) {
7866
throw new VelocityParsingError("tried " + getMethodText("null", methodName, args), i);
@@ -84,9 +72,6 @@ public VelMethod getMethod(Object obj, String methodName, Object[] args, Info i)
8472
return new VelMethodImpl(m);
8573
}
8674

87-
/**
88-
* *******************************************************************
89-
*/
9075
public static String getMethodText(String className, String methodName, Object[] args) {
9176
StringBuilder methodSignature = new StringBuilder();
9277
for (int i = 0; args != null && i < args.length; i++) {
@@ -96,9 +81,6 @@ public static String getMethodText(String className, String methodName, Object[]
9681
return className + "." + methodName + "(" + methodSignature + ") ";
9782
}
9883

99-
/**
100-
* *******************************************************************
101-
*/
10284
public VelPropertyGet getPropertyGet(Object obj, String identifier, Info i) throws Exception {
10385
AbstractExecutor executor;
10486
if (obj == null) {
@@ -121,16 +103,10 @@ public VelPropertyGet getPropertyGet(Object obj, String identifier, Info i) thro
121103
return new VelGetterImpl(executor);
122104
}
123105

124-
/**
125-
* *******************************************************************
126-
*/
127106
private String getPropertyText(String className, String identifier) {
128107
return className + "." + identifier + " ";
129108
}
130109

131-
/**
132-
* *******************************************************************
133-
*/
134110
public VelPropertySet getPropertySet(Object obj, String identifier, Object arg, Info i) throws Exception {
135111
Class<?> type = obj.getClass();
136112
VelMethod vm = null;
@@ -170,12 +146,7 @@ public VelPropertySet getPropertySet(Object obj, String identifier, Object arg,
170146
}
171147
return (vm != null) ? new VelSetterImpl(vm) : null;
172148
}
173-
/***********************************************************************/
174-
/* INNER CLASS */
175149

176-
/**
177-
* *******************************************************************
178-
*/
179150
public static class VelMethodImpl implements VelMethod {
180151
Method method = null;
181152

src/main/java/org/teachingextensions/approvals/lite/util/velocity/VelocityParsingError.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ public String getMessage() {
1616
return message + " " + getInfoText(info);
1717
}
1818

19-
/**
20-
* *******************************************************************
21-
*/
2219
public static String getInfoText(Info i) {
2320
return " at [" + i.getLine() + "," + i.getColumn() + "]" + " in template " + i.getTemplateName();
2421
}

src/main/java/org/teachingextensions/logo/ColorWheel.java

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,26 @@
33
import java.awt.Color;
44

55
/**
6-
* <img src="https://cdn0.iconfinder.com/data/icons/pixelo/32/color-palette.png" align="left" alt="A painter's palette" >
6+
* <img src="https://cdn0.iconfinder.com/data/icons/pixelo/32/color-palette.png" style="text-align:left" alt="A painter's palette" >
77
* ColorWheel is a place to store a color palette. <br>
88
* <b>Example:</b> If you have a palette of
9-
* <font color="blue">blue</font>,
10-
* <font color="red">red</font>,
11-
* and <font color="purple">purple</font> <br>
9+
* <font style="color: blue">blue</font>,
10+
* <font style="color: red">red</font>,
11+
* and <font style="color: purple">purple</font> <br>
1212
* and then used it to print out the numbers, you would get <br>
13-
* <font color="blue">1</font>
14-
* <font color="red">2</font>
15-
* <font color="purple">3</font>
16-
* <font color="blue">4</font>
17-
* <font color="red">5</font>
18-
* <font color="purple">6</font>
19-
* <font color="blue">7</font>
20-
* <font color="red">8</font>
21-
* <font color="purple">9</font>
13+
* <font style="color: blue">1</font>
14+
* <font style="color: red">2</font>
15+
* <font style="color: purple">3</font>
16+
* <font style="color: blue">4</font>
17+
* <font style="color: red">5</font>
18+
* <font style="color: purple">6</font>
19+
* <font style="color: blue">7</font>
20+
* <font style="color: red">8</font>
21+
* <font style="color: purple">9</font>
2222
*/
2323
public class ColorWheel
2424
{
25-
private static Wheel<Color> wheel = new Wheel<Color>();
25+
private static Wheel<Color> wheel = new Wheel<>();
2626
/**
2727
* This method adds a color to the ColorWheel. <br>
2828
* <b>Example:</b> {@code ColorWheel.addColor(PenColors.Reds.Red);}

0 commit comments

Comments
 (0)