Skip to content

Commit

Permalink
After rewriting Type Information Chapter, added missing @OverRide
Browse files Browse the repository at this point in the history
  • Loading branch information
BruceEckel committed Jan 31, 2021
1 parent dfdbcf6 commit 55de56e
Show file tree
Hide file tree
Showing 1,034 changed files with 102,355 additions and 2,768 deletions.
5 changes: 0 additions & 5 deletions CI.txt

This file was deleted.

2 changes: 1 addition & 1 deletion Copyright.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright.txt
This computer source code is Copyright �2020 MindView LLC.
This computer source code is Copyright �2021 MindView LLC.
All Rights Reserved.

Permission to use, copy, modify, and distribute this
Expand Down
4 changes: 2 additions & 2 deletions annotations/AUComposition.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// annotations/AUComposition.java
// (c)2020 MindView LLC: see Copyright.txt
// (c)2021 MindView LLC: see Copyright.txt
// We make no guarantees that this code is fit for any purpose.
// Visit http://OnJava8.com for more book information.
// Creating non-embedded tests
Expand All @@ -23,8 +23,8 @@ boolean tMethodTwo() {
}
/* Output:
annotations.AUComposition
. tMethodOne
. tMethodTwo This is methodTwo
. tMethodOne
OK (2 tests)
*/
2 changes: 1 addition & 1 deletion annotations/AUExternalTest.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// annotations/AUExternalTest.java
// (c)2020 MindView LLC: see Copyright.txt
// (c)2021 MindView LLC: see Copyright.txt
// We make no guarantees that this code is fit for any purpose.
// Visit http://OnJava8.com for more book information.
// Creating non-embedded tests
Expand Down
10 changes: 5 additions & 5 deletions annotations/AtUnitExample1.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// annotations/AtUnitExample1.java
// (c)2020 MindView LLC: see Copyright.txt
// (c)2021 MindView LLC: see Copyright.txt
// We make no guarantees that this code is fit for any purpose.
// Visit http://OnJava8.com for more book information.
// {java onjava.atunit.AtUnit
Expand Down Expand Up @@ -34,15 +34,15 @@ boolean anotherDisappointment() {
}
/* Output:
annotations.AtUnitExample1
. m3
. anotherDisappointment (failed)
. methodOneTest
. failureTest (failed)
. m2 This is methodTwo
. failureTest (failed)
. anotherDisappointment (failed)
. m3
(5 tests)
>>> 2 FAILURES <<<
annotations.AtUnitExample1: failureTest
annotations.AtUnitExample1: anotherDisappointment
annotations.AtUnitExample1: failureTest
*/
12 changes: 6 additions & 6 deletions annotations/AtUnitExample2.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// annotations/AtUnitExample2.java
// (c)2020 MindView LLC: see Copyright.txt
// (c)2021 MindView LLC: see Copyright.txt
// We make no guarantees that this code is fit for any purpose.
// Visit http://OnJava8.com for more book information.
// Assertions and exceptions can be used in @Tests
Expand Down Expand Up @@ -40,18 +40,18 @@ boolean assertAndReturn() {
}
/* Output:
annotations.AtUnitExample2
. assertFailureExample java.lang.AssertionError: What
a surprise!
(failed)
. assertExample
. exceptionExample java.io.FileNotFoundException:
nofile.txt (The system cannot find the file specified)
(failed)
. assertExample
. assertAndReturn This is methodTwo
. assertFailureExample java.lang.AssertionError: What
a surprise!
(failed)
(4 tests)
>>> 2 FAILURES <<<
annotations.AtUnitExample2: exceptionExample
annotations.AtUnitExample2: assertFailureExample
annotations.AtUnitExample2: exceptionExample
*/
4 changes: 2 additions & 2 deletions annotations/AtUnitExample3.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// annotations/AtUnitExample3.java
// (c)2020 MindView LLC: see Copyright.txt
// (c)2021 MindView LLC: see Copyright.txt
// We make no guarantees that this code is fit for any purpose.
// Visit http://OnJava8.com for more book information.
// {java onjava.atunit.AtUnit
Expand Down Expand Up @@ -35,8 +35,8 @@ boolean methodOneTest() {
/* Output:
annotations.AtUnitExample3
. initialization
. methodOneTest
. m2 This is methodTwo
. methodOneTest
OK (3 tests)
*/
2 changes: 1 addition & 1 deletion annotations/AtUnitExample4.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// annotations/AtUnitExample4.java
// (c)2020 MindView LLC: see Copyright.txt
// (c)2021 MindView LLC: see Copyright.txt
// We make no guarantees that this code is fit for any purpose.
// Visit http://OnJava8.com for more book information.
// {java onjava.atunit.AtUnit
Expand Down
5 changes: 2 additions & 3 deletions annotations/AtUnitExample5.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// annotations/AtUnitExample5.java
// (c)2020 MindView LLC: see Copyright.txt
// (c)2021 MindView LLC: see Copyright.txt
// We make no guarantees that this code is fit for any purpose.
// Visit http://OnJava8.com for more book information.
// {java onjava.atunit.AtUnit
Expand All @@ -14,8 +14,7 @@ public class AtUnitExample5 {
public AtUnitExample5(String text) {
this.text = text;
}
@Override
public String toString() { return text; }
@Override public String toString() { return text; }
@TestProperty
static PrintWriter output;
@TestProperty
Expand Down
2 changes: 1 addition & 1 deletion annotations/DemoProcessFiles.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// annotations/DemoProcessFiles.java
// (c)2020 MindView LLC: see Copyright.txt
// (c)2021 MindView LLC: see Copyright.txt
// We make no guarantees that this code is fit for any purpose.
// Visit http://OnJava8.com for more book information.
import onjava.ProcessFiles;
Expand Down
4 changes: 2 additions & 2 deletions annotations/HashSetTest.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// annotations/HashSetTest.java
// (c)2020 MindView LLC: see Copyright.txt
// (c)2021 MindView LLC: see Copyright.txt
// We make no guarantees that this code is fit for any purpose.
// Visit http://OnJava8.com for more book information.
// {java onjava.atunit.AtUnit
Expand Down Expand Up @@ -29,8 +29,8 @@ void tRemove() {
}
/* Output:
annotations.HashSetTest
. tContains
. initialization
. tRemove
. tContains
OK (3 tests)
*/
2 changes: 1 addition & 1 deletion annotations/PasswordUtils.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// annotations/PasswordUtils.java
// (c)2020 MindView LLC: see Copyright.txt
// (c)2021 MindView LLC: see Copyright.txt
// We make no guarantees that this code is fit for any purpose.
// Visit http://OnJava8.com for more book information.
import java.util.*;
Expand Down
2 changes: 1 addition & 1 deletion annotations/SimulatingNull.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// annotations/SimulatingNull.java
// (c)2020 MindView LLC: see Copyright.txt
// (c)2021 MindView LLC: see Copyright.txt
// We make no guarantees that this code is fit for any purpose.
// Visit http://OnJava8.com for more book information.
import java.lang.annotation.*;
Expand Down
2 changes: 1 addition & 1 deletion annotations/StackL.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// annotations/StackL.java
// (c)2020 MindView LLC: see Copyright.txt
// (c)2021 MindView LLC: see Copyright.txt
// We make no guarantees that this code is fit for any purpose.
// Visit http://OnJava8.com for more book information.
// A stack built on a LinkedList
Expand Down
4 changes: 2 additions & 2 deletions annotations/StackLStringTst.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// annotations/StackLStringTst.java
// (c)2020 MindView LLC: see Copyright.txt
// (c)2021 MindView LLC: see Copyright.txt
// We make no guarantees that this code is fit for any purpose.
// Visit http://OnJava8.com for more book information.
// Applying @Unit to generics
Expand Down Expand Up @@ -35,8 +35,8 @@ void tTop() {
}
/* Output:
annotations.StackLStringTst
. tPop
. tTop
. tPush
. tPop
OK (3 tests)
*/
2 changes: 1 addition & 1 deletion annotations/Testable.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// annotations/Testable.java
// (c)2020 MindView LLC: see Copyright.txt
// (c)2021 MindView LLC: see Copyright.txt
// We make no guarantees that this code is fit for any purpose.
// Visit http://OnJava8.com for more book information.
package annotations;
Expand Down
2 changes: 1 addition & 1 deletion annotations/UseCase.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// annotations/UseCase.java
// (c)2020 MindView LLC: see Copyright.txt
// (c)2021 MindView LLC: see Copyright.txt
// We make no guarantees that this code is fit for any purpose.
// Visit http://OnJava8.com for more book information.
import java.lang.annotation.*;
Expand Down
6 changes: 3 additions & 3 deletions annotations/UseCaseTracker.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// annotations/UseCaseTracker.java
// (c)2020 MindView LLC: see Copyright.txt
// (c)2021 MindView LLC: see Copyright.txt
// We make no guarantees that this code is fit for any purpose.
// Visit http://OnJava8.com for more book information.
import java.util.*;
Expand Down Expand Up @@ -27,11 +27,11 @@ public static void main(String[] args) {
}
}
/* Output:
Found Use Case 49
New passwords can't equal previously used ones
Found Use Case 48
no description
Found Use Case 47
Passwords must contain at least one numeric
Found Use Case 49
New passwords can't equal previously used ones
Missing use case 50
*/
2 changes: 1 addition & 1 deletion annotations/database/Constraints.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// annotations/database/Constraints.java
// (c)2020 MindView LLC: see Copyright.txt
// (c)2021 MindView LLC: see Copyright.txt
// We make no guarantees that this code is fit for any purpose.
// Visit http://OnJava8.com for more book information.
package annotations.database;
Expand Down
2 changes: 1 addition & 1 deletion annotations/database/DBTable.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// annotations/database/DBTable.java
// (c)2020 MindView LLC: see Copyright.txt
// (c)2021 MindView LLC: see Copyright.txt
// We make no guarantees that this code is fit for any purpose.
// Visit http://OnJava8.com for more book information.
package annotations.database;
Expand Down
7 changes: 4 additions & 3 deletions annotations/database/Member.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// annotations/database/Member.java
// (c)2020 MindView LLC: see Copyright.txt
// (c)2021 MindView LLC: see Copyright.txt
// We make no guarantees that this code is fit for any purpose.
// Visit http://OnJava8.com for more book information.
package annotations.database;
Expand All @@ -16,7 +16,8 @@ public class Member {
public String getReference() { return reference; }
public String getFirstName() { return firstName; }
public String getLastName() { return lastName; }
@Override
public String toString() { return reference; }
@Override public String toString() {
return reference;
}
public Integer getAge() { return age; }
}
2 changes: 1 addition & 1 deletion annotations/database/SQLInteger.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// annotations/database/SQLInteger.java
// (c)2020 MindView LLC: see Copyright.txt
// (c)2021 MindView LLC: see Copyright.txt
// We make no guarantees that this code is fit for any purpose.
// Visit http://OnJava8.com for more book information.
package annotations.database;
Expand Down
2 changes: 1 addition & 1 deletion annotations/database/SQLString.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// annotations/database/SQLString.java
// (c)2020 MindView LLC: see Copyright.txt
// (c)2021 MindView LLC: see Copyright.txt
// We make no guarantees that this code is fit for any purpose.
// Visit http://OnJava8.com for more book information.
package annotations.database;
Expand Down
2 changes: 1 addition & 1 deletion annotations/database/TableCreator.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// annotations/database/TableCreator.java
// (c)2020 MindView LLC: see Copyright.txt
// (c)2021 MindView LLC: see Copyright.txt
// We make no guarantees that this code is fit for any purpose.
// Visit http://OnJava8.com for more book information.
// Reflection-based annotation processor
Expand Down
2 changes: 1 addition & 1 deletion annotations/database/Uniqueness.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// annotations/database/Uniqueness.java
// (c)2020 MindView LLC: see Copyright.txt
// (c)2021 MindView LLC: see Copyright.txt
// We make no guarantees that this code is fit for any purpose.
// Visit http://OnJava8.com for more book information.
// Sample of nested annotations
Expand Down
2 changes: 1 addition & 1 deletion annotations/ifx/ExtractInterface.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// annotations/ifx/ExtractInterface.java
// (c)2020 MindView LLC: see Copyright.txt
// (c)2021 MindView LLC: see Copyright.txt
// We make no guarantees that this code is fit for any purpose.
// Visit http://OnJava8.com for more book information.
// javac-based annotation processing
Expand Down
8 changes: 3 additions & 5 deletions annotations/ifx/IfaceExtractorProcessor.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// annotations/ifx/IfaceExtractorProcessor.java
// (c)2020 MindView LLC: see Copyright.txt
// (c)2021 MindView LLC: see Copyright.txt
// We make no guarantees that this code is fit for any purpose.
// Visit http://OnJava8.com for more book information.
// javac-based annotation processing
Expand All @@ -21,14 +21,12 @@ public class IfaceExtractorProcessor
interfaceMethods = new ArrayList<>();
Elements elementUtils;
private ProcessingEnvironment processingEnv;
@Override
public void init(
@Override public void init(
ProcessingEnvironment processingEnv) {
this.processingEnv = processingEnv;
elementUtils = processingEnv.getElementUtils();
}
@Override
public boolean process(
@Override public boolean process(
Set<? extends TypeElement> annotations,
RoundEnvironment env) {
for(Element elem:env.getElementsAnnotatedWith(
Expand Down
2 changes: 1 addition & 1 deletion annotations/ifx/Multiplier.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// annotations/ifx/Multiplier.java
// (c)2020 MindView LLC: see Copyright.txt
// (c)2021 MindView LLC: see Copyright.txt
// We make no guarantees that this code is fit for any purpose.
// Visit http://OnJava8.com for more book information.
// javac-based annotation processing
Expand Down
2 changes: 1 addition & 1 deletion annotations/simplest/Simple.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// annotations/simplest/Simple.java
// (c)2020 MindView LLC: see Copyright.txt
// (c)2021 MindView LLC: see Copyright.txt
// We make no guarantees that this code is fit for any purpose.
// Visit http://OnJava8.com for more book information.
// A bare-bones annotation
Expand Down
5 changes: 2 additions & 3 deletions annotations/simplest/SimpleProcessor.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// annotations/simplest/SimpleProcessor.java
// (c)2020 MindView LLC: see Copyright.txt
// (c)2021 MindView LLC: see Copyright.txt
// We make no guarantees that this code is fit for any purpose.
// Visit http://OnJava8.com for more book information.
// A bare-bones annotation processor
Expand All @@ -14,8 +14,7 @@
@SupportedSourceVersion(SourceVersion.RELEASE_8)
public class SimpleProcessor
extends AbstractProcessor {
@Override
public boolean process(
@Override public boolean process(
Set<? extends TypeElement> annotations,
RoundEnvironment env) {
for(TypeElement t : annotations)
Expand Down
2 changes: 1 addition & 1 deletion annotations/simplest/SimpleTest.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// annotations/simplest/SimpleTest.java
// (c)2020 MindView LLC: see Copyright.txt
// (c)2021 MindView LLC: see Copyright.txt
// We make no guarantees that this code is fit for any purpose.
// Visit http://OnJava8.com for more book information.
// Test the "Simple" annotation
Expand Down
2 changes: 1 addition & 1 deletion arrays/AlphabeticSearch.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// arrays/AlphabeticSearch.java
// (c)2020 MindView LLC: see Copyright.txt
// (c)2021 MindView LLC: see Copyright.txt
// We make no guarantees that this code is fit for any purpose.
// Visit http://OnJava8.com for more book information.
// Searching with a Comparator import
Expand Down
Loading

0 comments on commit 55de56e

Please sign in to comment.