Test documenting LineNumber behaviour on Scala 2.11, 2.12, Java 8 (#21897)

* Test documenting the LineNumber behaviour on Scala 2.11 vs 2.12 vs Java 8 #21773

* Reindent Java sources with less space
This commit is contained in:
Johan "Party Cannon" Andrén 2016-12-06 16:12:04 +01:00 committed by Patrik Nordwall
parent 6ac50fd945
commit ad061e0208
2 changed files with 51 additions and 35 deletions

View file

@ -11,30 +11,30 @@ import java.io.Serializable;
public class LineNumberSpecCodeForJava {
// @FunctionalInterface // will be uncommented as soon as '-source 1.8' is set
public static interface F extends Serializable {
public String doit(String arg);
}
public static interface F extends Serializable {
public String doit(String arg);
}
// public F f1() { // FIXME These are commented out until the build is switched to Java 8
// return (s) -> s;
// }
public F f1() {
return (s) -> s;
}
// public F f2() {
// return (s) -> {
// System.out.println(s);
// return s;
// };
// }
public F f2() {
return (s) -> {
System.out.println(s);
return s;
};
}
public F f3() {
return new F() {
private static final long serialVersionUID = 1L;
@Override
public String doit(String arg) {
return arg;
}
};
}
public F f3() {
return new F() {
private static final long serialVersionUID = 1L;
@Override
public String doit(String arg) {
return arg;
}
};
}
}