From ce7941f4d572334c4844314f17e160fcd78649b4 Mon Sep 17 00:00:00 2001 From: Jeremy Landis Date: Sun, 12 Mar 2023 15:01:56 -0400 Subject: [PATCH 1/2] [ci] Trim whitespace --- README.md | 4 +- src/it/check-fail/verify.groovy | 2 +- src/it/check-no-missing-classes/verify.groovy | 2 +- src/it/systemPropertyVariables/verify.groovy | 2 +- src/it/verify-fail/verify.groovy | 2 +- .../codehaus/mojo/spotbugs/SpotBugsGui.groovy | 2 +- .../codehaus/mojo/spotbugs/VerifyMojo.groovy | 4 +- src/site/resources/examples/spotbugs.html | 22 ++--- .../spotbugs-maven-plugin/it/App.html | 14 +-- .../spotbugs-maven-plugin/it/FooTest.html | 12 +-- .../it/package-summary.html | 6 +- .../examples/xref-test/overview-summary.html | 8 +- .../xref/AbstractMissingHashCode.html | 6 +- .../AccidentalNonConstructorInInnerClass.html | 16 ++-- .../examples/xref/AnnotationTest.html | 2 +- .../xref/AppendingToAnObjectOutputStream.html | 8 +- .../examples/xref/ArrayToString.html | 18 ++-- .../examples/xref/AssignedOnlyInCtor.html | 6 +- .../examples/xref/AssumeUnsignedBytes.html | 4 +- .../resources/examples/xref/UseInitCause.html | 8 +- ...OfNonHashableClassInHashDataStructure.html | 12 +-- .../examples/xref/UselessAssignments.html | 12 +-- .../examples/xref/UselessControlFlow.html | 14 +-- .../examples/xref/UselessCurrentThread.html | 12 +-- .../examples/xref/UselessSCMethods.html | 20 ++-- .../examples/xref/UserAss3rtion.html | 2 +- .../resources/examples/xref/UserMistakes.html | 28 +++--- .../examples/xref/badNaming/package1/A.html | 4 +- .../badNaming/package1/package-summary.html | 6 +- .../examples/xref/badNaming/package2/A.html | 4 +- .../xref/badNaming/package2/AnInterface.html | 4 +- .../badNaming/package2/package-summary.html | 6 +- .../examples/xref/equals/ArrayEquality.html | 10 +- .../examples/xref/equals/package-summary.html | 6 +- .../AllListsCouldBeEqual.html | 72 +++++++------- .../gcUnrelatedTypes/ArrayListContains.html | 96 +++++++++---------- .../gcUnrelatedTypes/ArrayListContains0.html | 74 +++++++------- .../gcUnrelatedTypes/package-summary.html | 6 +- .../examples/xref/jsr305/AlwaysBlue.html | 8 +- .../examples/xref/jsr305/package-summary.html | 6 +- .../examples/xref/npe/AtomicFieldUpdater.html | 22 ++--- .../examples/xref/npe/UseCheckUse.html | 6 +- .../examples/xref/npe/package-summary.html | 6 +- .../nullnessAnnotations/UseAnnotations.html | 12 +-- .../nullnessAnnotations/package-summary.html | 6 +- .../obligation/UsesWillCloseAnnotation.html | 12 +-- .../xref/obligation/package-summary.html | 6 +- .../examples/xref/overview-summary.html | 8 +- .../examples/xref/package-summary.html | 6 +- .../xref/uselessThread/UsefulThread.html | 4 +- .../xref/uselessThread/package-summary.html | 6 +- 51 files changed, 322 insertions(+), 322 deletions(-) diff --git a/README.md b/README.md index 2ed52ee6..7377cd92 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ mvn -DtestSrc=remote -Prun-its -Dinvoker.test=build-*,basic-1,check-nofail clean Run tests in debugger ``` -mvn -Dmaven.surefire.debug="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -Xnoagent -Djava.compiler=NONE" -Prun-its clean install +mvn -Dmaven.surefire.debug="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -Xnoagent -Djava.compiler=NONE" -Prun-its clean install ``` Run selected tests in debugger @@ -61,7 +61,7 @@ mvn -Dmaven.surefire.debug="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspe Run gui with a specific version ``` -mvn com.github.spotbugs:spotbugs-maven-plugin:4.0.0:gui +mvn com.github.spotbugs:spotbugs-maven-plugin:4.0.0:gui ``` ## Contributing ## diff --git a/src/it/check-fail/verify.groovy b/src/it/check-fail/verify.groovy index c509ec22..d5aea13e 100644 --- a/src/it/check-fail/verify.groovy +++ b/src/it/check-fail/verify.groovy @@ -15,4 +15,4 @@ */ File buildLog = new File( basedir, 'build.log' ) -assert buildLog.text.contains( '[ERROR] High: Found reliance on default encoding in UserMistakes' ) +assert buildLog.text.contains( '[ERROR] High: Found reliance on default encoding in UserMistakes' ) diff --git a/src/it/check-no-missing-classes/verify.groovy b/src/it/check-no-missing-classes/verify.groovy index 14f621bf..16739ac4 100644 --- a/src/it/check-no-missing-classes/verify.groovy +++ b/src/it/check-no-missing-classes/verify.groovy @@ -17,5 +17,5 @@ // Check no missing classes File buildLog = new File( basedir, 'build.log' ) -assert !buildLog.text.contains( 'The following classes needed for analysis were missing' ) +assert !buildLog.text.contains( 'The following classes needed for analysis were missing' ) diff --git a/src/it/systemPropertyVariables/verify.groovy b/src/it/systemPropertyVariables/verify.groovy index 1d5d6a83..d6efc030 100644 --- a/src/it/systemPropertyVariables/verify.groovy +++ b/src/it/systemPropertyVariables/verify.groovy @@ -15,4 +15,4 @@ */ File buildLog = new File( basedir, 'build.log' ) -assert buildLog.text.contains( '[java] INFO: System variables are considered to be tainted' ) +assert buildLog.text.contains( '[java] INFO: System variables are considered to be tainted' ) diff --git a/src/it/verify-fail/verify.groovy b/src/it/verify-fail/verify.groovy index c509ec22..d5aea13e 100644 --- a/src/it/verify-fail/verify.groovy +++ b/src/it/verify-fail/verify.groovy @@ -15,4 +15,4 @@ */ File buildLog = new File( basedir, 'build.log' ) -assert buildLog.text.contains( '[ERROR] High: Found reliance on default encoding in UserMistakes' ) +assert buildLog.text.contains( '[ERROR] High: Found reliance on default encoding in UserMistakes' ) diff --git a/src/main/groovy/org/codehaus/mojo/spotbugs/SpotBugsGui.groovy b/src/main/groovy/org/codehaus/mojo/spotbugs/SpotBugsGui.groovy index cd1d6519..dba282cd 100644 --- a/src/main/groovy/org/codehaus/mojo/spotbugs/SpotBugsGui.groovy +++ b/src/main/groovy/org/codehaus/mojo/spotbugs/SpotBugsGui.groovy @@ -131,7 +131,7 @@ class SpotBugsGui extends AbstractMojo implements SpotBugsPluginsTrait { */ @Parameter (defaultValue = '${session}', required = true, readonly = true) MavenSession session; - + /** * Maven Project. * diff --git a/src/main/groovy/org/codehaus/mojo/spotbugs/VerifyMojo.groovy b/src/main/groovy/org/codehaus/mojo/spotbugs/VerifyMojo.groovy index 9b8bb966..5be99611 100644 --- a/src/main/groovy/org/codehaus/mojo/spotbugs/VerifyMojo.groovy +++ b/src/main/groovy/org/codehaus/mojo/spotbugs/VerifyMojo.groovy @@ -25,8 +25,8 @@ import org.apache.maven.plugins.annotations.ResolutionScope /** * Fail the build if any SpotBugs violations can be found in a preexisting {@code spotBugs.xml} file. - * Note that unlike the {@code check} goal, this goal only reads existing XML reports, without actually performing SpotBugs analysis. - * This way, it is possible to split the analysis and verification into lifecycle phases of one's choosing. + * Note that unlike the {@code check} goal, this goal only reads existing XML reports, without actually performing SpotBugs analysis. + * This way, it is possible to split the analysis and verification into lifecycle phases of one's choosing. * One use case for that is running multiple code analyzers at once and only failing the build at a later stage, so that all of them have a chance to run. * To see more documentation about SpotBugs' options, please see the SpotBugs Manual.. * diff --git a/src/site/resources/examples/spotbugs.html b/src/site/resources/examples/spotbugs.html index 71592406..5298f13a 100644 --- a/src/site/resources/examples/spotbugs.html +++ b/src/site/resources/examples/spotbugs.html @@ -13,7 +13,7 @@ - + - +

Package badNaming.package2

@@ -49,7 +49,7 @@

Package badNaming.package2

- +
- \ No newline at end of file + diff --git a/src/site/resources/examples/xref/equals/ArrayEquality.html b/src/site/resources/examples/xref/equals/ArrayEquality.html index 2e53ccb8..9fb50be1 100644 --- a/src/site/resources/examples/xref/equals/ArrayEquality.html +++ b/src/site/resources/examples/xref/equals/ArrayEquality.html @@ -9,15 +9,15 @@
View Javadoc
 1   package equals;
-2   
+2
 3   import java.io.Serializable;
-4   
+4
 5   public class ArrayEquality {
-6   
+6
 7   	boolean reportProblemsWithArrayEquality(String[] a, String b) {
 8   		return a.equals(b);
 9   	}
-10  
+10
 11  	boolean reportProblemsWithArrayEquality2(String[] a, String b) {
 12  		return  b.equals(a);
 13  	}
@@ -45,7 +45,7 @@
 35  	boolean reportProblemsWithArrayEqualityFalsePositive2(String[] a, Cloneable b) {
 36  		return a.equals(b) || b.equals(a);
 37  	}
-38  
+38
 39  }
 

diff --git a/src/site/resources/examples/xref/equals/package-summary.html b/src/site/resources/examples/xref/equals/package-summary.html index 15004bef..307775a7 100644 --- a/src/site/resources/examples/xref/equals/package-summary.html +++ b/src/site/resources/examples/xref/equals/package-summary.html @@ -26,7 +26,7 @@ - +

Package equals

@@ -44,7 +44,7 @@

Package equals

- +
- \ No newline at end of file + diff --git a/src/site/resources/examples/xref/gcUnrelatedTypes/AllListsCouldBeEqual.html b/src/site/resources/examples/xref/gcUnrelatedTypes/AllListsCouldBeEqual.html index 8392c0f1..978ab082 100644 --- a/src/site/resources/examples/xref/gcUnrelatedTypes/AllListsCouldBeEqual.html +++ b/src/site/resources/examples/xref/gcUnrelatedTypes/AllListsCouldBeEqual.html @@ -9,7 +9,7 @@
View Javadoc
 1   package gcUnrelatedTypes;
-2   
+2
 3   import java.util.ArrayList;
 4   import java.util.Collection;
 5   import java.util.HashSet;
@@ -18,151 +18,151 @@
 8   import java.util.List;
 9   import java.util.ListIterator;
 10  import java.util.Set;
-11  
+11
 12  public class AllListsCouldBeEqual {
-13  	
+13
 14  	static class MyList<E> implements List<E> {
-15  
+15
 16  		public boolean add(E o) {
 17  	        // TODO Auto-generated method stub
 18  	        return false;
 19          }
-20  
+20
 21  		public void add(int index, E element) {
 22  	        // TODO Auto-generated method stub
-23  	        
+23
 24          }
-25  
+25
 26  		public boolean addAll(Collection<? extends E> c) {
 27  	        // TODO Auto-generated method stub
 28  	        return false;
 29          }
-30  
+30
 31  		public boolean addAll(int index, Collection<? extends E> c) {
 32  	        // TODO Auto-generated method stub
 33  	        return false;
 34          }
-35  
+35
 36  		public void clear() {
 37  	        // TODO Auto-generated method stub
-38  	        
+38
 39          }
-40  
+40
 41  		public boolean contains(Object o) {
 42  	        // TODO Auto-generated method stub
 43  	        return false;
 44          }
-45  
+45
 46  		public boolean containsAll(Collection<?> c) {
 47  	        // TODO Auto-generated method stub
 48  	        return false;
 49          }
-50  
+50
 51  		public E get(int index) {
 52  	        // TODO Auto-generated method stub
 53  	        return null;
 54          }
-55  
+55
 56  		public int indexOf(Object o) {
 57  	        // TODO Auto-generated method stub
 58  	        return 0;
 59          }
-60  
+60
 61  		public boolean isEmpty() {
 62  	        // TODO Auto-generated method stub
 63  	        return false;
 64          }
-65  
+65
 66  		public Iterator<E> iterator() {
 67  	        // TODO Auto-generated method stub
 68  	        return null;
 69          }
-70  
+70
 71  		public int lastIndexOf(Object o) {
 72  	        // TODO Auto-generated method stub
 73  	        return 0;
 74          }
-75  
+75
 76  		public ListIterator<E> listIterator() {
 77  	        // TODO Auto-generated method stub
 78  	        return null;
 79          }
-80  
+80
 81  		public ListIterator<E> listIterator(int index) {
 82  	        // TODO Auto-generated method stub
 83  	        return null;
 84          }
-85  
+85
 86  		public boolean remove(Object o) {
 87  	        // TODO Auto-generated method stub
 88  	        return false;
 89          }
-90  
+90
 91  		public E remove(int index) {
 92  	        // TODO Auto-generated method stub
 93  	        return null;
 94          }
-95  
+95
 96  		public boolean removeAll(Collection<?> c) {
 97  	        // TODO Auto-generated method stub
 98  	        return false;
 99          }
-100 
+100
 101 		public boolean retainAll(Collection<?> c) {
 102 	        // TODO Auto-generated method stub
 103 	        return false;
 104         }
-105 
+105
 106 		public E set(int index, E element) {
 107 	        // TODO Auto-generated method stub
 108 	        return null;
 109         }
-110 
+110
 111 		public int size() {
 112 	        // TODO Auto-generated method stub
 113 	        return 0;
 114         }
-115 
+115
 116 		public List<E> subList(int fromIndex, int toIndex) {
 117 	        // TODO Auto-generated method stub
 118 	        return null;
 119         }
-120 
+120
 121 		public Object[] toArray() {
 122 	        // TODO Auto-generated method stub
 123 	        return null;
 124         }
-125 
+125
 126 		public <T> T[] toArray(T[] a) {
 127 	        // TODO Auto-generated method stub
 128 	        return null;
 129         }}
 130 	public static void main(String arg[]) {
 131 		falsePositive();
-132 		
+132
 133 		List<Integer> lst = new LinkedList<Integer>();
 134 		List<Integer> lst2 = (ArrayList<Integer>)lst;
-135 		
-136 		
+135
+136
 137 		List<ArrayList<String>> mlist = null;
 138 		mlist.contains(new LinkedList<String>());
-139 
+139
 140 	}
 141 	public static void falsePositive() {
 142 		ArrayList<Integer> aLst = new ArrayList<Integer>();
 143 		LinkedList<Integer> lLst = new LinkedList<Integer>();
 144 		MyList<Integer> mLst = new MyList<Integer>();
-145 		
+145
 146 		Set<ArrayList<Integer>> alSet = new HashSet<ArrayList<Integer>>();
 147 		Set<LinkedList<Integer>> llSet = new HashSet<LinkedList<Integer>>();
-148 		
+148
 149 		System.out.println(aLst.equals(lLst));
 150 		System.out.println(mLst.equals(lLst));
-151 		
+151
 152 		alSet.contains(lLst);
 153 		alSet.contains(mLst);
 154 		alSet.containsAll(llSet);
-155 
+155
 156 	}
 157 }
 
diff --git a/src/site/resources/examples/xref/gcUnrelatedTypes/ArrayListContains.html b/src/site/resources/examples/xref/gcUnrelatedTypes/ArrayListContains.html index 3ef3e30d..6c14ae57 100644 --- a/src/site/resources/examples/xref/gcUnrelatedTypes/ArrayListContains.html +++ b/src/site/resources/examples/xref/gcUnrelatedTypes/ArrayListContains.html @@ -9,46 +9,46 @@
View Javadoc
 1   package gcUnrelatedTypes;
-2   
+2
 3   import java.util.ArrayList;
-4   
+4
 5   import edu.umd.cs.findbugs.annotations.ExpectWarning;
-6   
+6
 7   public class ArrayListContains<T> {
-8   
+8
 9   	static class Dummy {
-10  
+10
 11  	}
-12  
+12
 13  	static class DummyChild extends Dummy {
-14  
+14
 15  	}
-16  
+16
 17  	private ArrayList<?> wildcardF;
-18  
+18
 19  	private ArrayList<Dummy> dummyF;
 20  	private ArrayList<? extends Dummy> dummyEF;
 21  	private ArrayList<? super Dummy> dummySF;
-22  
+22
 23  	private ArrayList<DummyChild> childF;
 24  	private ArrayList<? extends DummyChild> childEF;
 25  	private ArrayList<? super DummyChild> childSF;
-26  
-27  	private ArrayList<T> genericF;		
+26
+27  	private ArrayList<T> genericF;
 28  	private ArrayList<? extends T> genericEF;
-29  	private ArrayList<? super T> genericSF;		
-30  
+29  	private ArrayList<? super T> genericSF;
+30
 31  	@ExpectWarning("GC")
 32  	public ArrayListContains(
-33  			ArrayList<?> wildcardF, 
-34  			ArrayList<Dummy> dummyF, 
-35  			ArrayList<? extends Dummy> dummyEF, 
-36  			ArrayList<? super Dummy> dummySF, 
-37  			ArrayList<DummyChild> childF, 
-38  			ArrayList<? extends DummyChild> childEF, 
-39  			ArrayList<? super DummyChild> childSF, 
-40  			ArrayList<T> genericF, 
-41  			ArrayList<? extends T> genericEF, 
+33  			ArrayList<?> wildcardF,
+34  			ArrayList<Dummy> dummyF,
+35  			ArrayList<? extends Dummy> dummyEF,
+36  			ArrayList<? super Dummy> dummySF,
+37  			ArrayList<DummyChild> childF,
+38  			ArrayList<? extends DummyChild> childEF,
+39  			ArrayList<? super DummyChild> childSF,
+40  			ArrayList<T> genericF,
+41  			ArrayList<? extends T> genericEF,
 42  			ArrayList<? super T> genericSF) {
 43  		this.wildcardF = wildcardF;
 44  		this.dummyF = dummyF;
@@ -60,103 +60,103 @@
 50  		this.genericF = genericF;
 51  		this.genericEF = genericEF;
 52  		this.genericSF = genericSF;
-53  
+53
 54  		Dummy dummy = new Dummy();
 55  		DummyChild dummyChild = new DummyChild();
 56  		String s = "Mismatched Type";
-57  
+57
 58  		wildcardF.contains(dummy); 				// No warning
 59  		wildcardF.contains(dummyChild); 		// No warning
 60  		wildcardF.contains(s); 					// No warning
-61  
+61
 62  		dummyF.contains(dummy); 				// No warning
 63  		dummyF.contains(dummyChild); 		 	// No warning
 64  		dummyF.contains(s); 					// HIGH
-65  
+65
 66  		dummyEF.contains(dummy); 				// No warning
 67  		dummyEF.contains(dummyChild); 		 	// No warning
 68  		dummyEF.contains(s); 					// HIGH
-69  
+69
 70  		dummySF.contains(dummy); 				// No warning
 71  		dummySF.contains(dummyChild); 		 	// No warning
 72  		dummySF.contains(s); 					// HIGH
-73  
+73
 74  		childF.contains(dummy); 				// No warning
 75  		childF.contains(dummyChild); 		 	// No warning
 76  		childF.contains(s); 					// HIGH
-77  
+77
 78  		childEF.contains(dummy); 				// No warning
 79  		childEF.contains(dummyChild); 		 	// No warning
 80  		childEF.contains(s); 					// HIGH
-81  
+81
 82  		childSF.contains(dummy); 				// No warning
 83  		childSF.contains(dummyChild); 		 	// No warning
 84  		childSF.contains(s); 					// HIGH
-85  
+85
 86  		genericF.contains(dummy); 				// No warning
 87  		genericF.contains(dummyChild); 		 	// No warning
 88  		genericF.contains(s); 					// No warning
-89  
+89
 90  		genericEF.contains(dummy); 				// No warning
 91  		genericEF.contains(dummyChild); 		    // No warning
 92  		genericEF.contains(s); 					// No warning
-93  
+93
 94  		genericSF.contains(dummy); 				// No warning
 95  		genericSF.contains(dummyChild); 		// No warning
 96  		genericSF.contains(s); 					// No warning
-97  
+97
 98  	}
-99  
+99
 100 	@ExpectWarning("GC")
 101 	public void testFields() {
 102 		Dummy dummy = new Dummy();
 103 		DummyChild dummyChild = new DummyChild();
 104 		String s = "Mismatched Type";
-105 
+105
 106 		wildcardF.contains(dummy); 				// No warning
 107 		wildcardF.contains(dummyChild); 		// No warning
 108 		wildcardF.contains(s); 					// No warning
-109 
+109
 110 		dummyF.contains(dummy); 				// No warning
 111 		dummyF.contains(dummyChild); 		 	// No warning
 112 		dummyF.contains(s); 					// HIGH
-113 
+113
 114 		dummyEF.contains(dummy); 				// No warning
 115 		dummyEF.contains(dummyChild); 		 	// No warning
 116 		dummyEF.contains(s); 					// HIGH
-117 
+117
 118 		dummySF.contains(dummy); 				// No warning
 119 		dummySF.contains(dummyChild); 		 	// No warning
 120 		dummySF.contains(s); 					// HIGH
-121 
+121
 122 		childF.contains(dummy); 				// No warning
 123 		childF.contains(dummyChild); 		 	// No warning
 124 		childF.contains(s); 					// HIGH
-125 
+125
 126 		childEF.contains(dummy); 				// No warning
 127 		childEF.contains(dummyChild); 		 	// No warning
 128 		childEF.contains(s); 					// HIGH
-129 
+129
 130 		childSF.contains(dummy); 				// No warning
 131 		childSF.contains(dummyChild); 		 	// No warning
 132 		childSF.contains(s); 					// HIGH
-133 
+133
 134 		genericF.contains(dummy); 				// No warning
 135 		genericF.contains(dummyChild); 		 	// No warning
 136 		genericF.contains(s); 					// No warning
-137 
+137
 138 		genericEF.contains(dummy); 				// No warning
 139 		genericEF.contains(dummyChild); 		// No warning
 140 		genericEF.contains(s); 					// No warning
-141 
+141
 142 		genericSF.contains(dummy); 				// No warning
 143 		genericSF.contains(dummyChild); 		// No warning
 144 		genericSF.contains(s); 					// No warning
-145 
+145
 146 		// what if <T extends Dummy> in class definition? 
 147 		// Requires more analysis -- a future enhancement
 148 		// Can we be sure that the T is the same as the one in the class/method definition
-149 
+149
 150 	}
 151 }
 
diff --git a/src/site/resources/examples/xref/gcUnrelatedTypes/ArrayListContains0.html b/src/site/resources/examples/xref/gcUnrelatedTypes/ArrayListContains0.html index 2bc5aae0..ffc9677c 100644 --- a/src/site/resources/examples/xref/gcUnrelatedTypes/ArrayListContains0.html +++ b/src/site/resources/examples/xref/gcUnrelatedTypes/ArrayListContains0.html @@ -9,70 +9,70 @@
View Javadoc
 1   package gcUnrelatedTypes;
-2   
+2
 3   import java.util.ArrayList;
-4   
+4
 5   public class ArrayListContains0<T> {
-6   
+6
 7   	static class Dummy {
-8   
+8
 9   	}
-10  
+10
 11  	static class DummyChild extends Dummy {
-12  
+12
 13  	}
-14  
+14
 15  	private ArrayList<?> wildcardF;
-16  
+16
 17  	private ArrayList<Dummy> dummyF;
 18  	private ArrayList<? extends Dummy> dummyEF;
 19  	private ArrayList<? super Dummy> dummySF;
-20  
+20
 21  	private ArrayList<DummyChild> childF;
 22  	private ArrayList<? extends DummyChild> childEF;
 23  	private ArrayList<? super DummyChild> childSF;
-24  
-25  	private ArrayList<T> genericF;		
+24
+25  	private ArrayList<T> genericF;
 26  	private ArrayList<? extends T> genericEF;
-27  	private ArrayList<? super T> genericSF;		
-28  
-29  
+27  	private ArrayList<? super T> genericSF;
+28
+29
 30  	public ArrayListContains0(
-31  			ArrayList<?> wildcardF, 
-32  			ArrayList<Dummy> dummyF, 
-33  			ArrayList<? extends Dummy> dummyEF, 
-34  			ArrayList<? super Dummy> dummySF, 
-35  			ArrayList<DummyChild> childF, 
-36  			ArrayList<? extends DummyChild> childEF, 
-37  			ArrayList<? super DummyChild> childSF, 
-38  			ArrayList<T> genericF, 
-39  			ArrayList<? extends T> genericEF, 
+31  			ArrayList<?> wildcardF,
+32  			ArrayList<Dummy> dummyF,
+33  			ArrayList<? extends Dummy> dummyEF,
+34  			ArrayList<? super Dummy> dummySF,
+35  			ArrayList<DummyChild> childF,
+36  			ArrayList<? extends DummyChild> childEF,
+37  			ArrayList<? super DummyChild> childSF,
+38  			ArrayList<T> genericF,
+39  			ArrayList<? extends T> genericEF,
 40  			ArrayList<? super T> genericSF) {
-41  
+41
 42  		Dummy dummy = new Dummy();
 43  		DummyChild dummyChild = new DummyChild();
 44  		String s = "Mismatched Type";
-45  
+45
 46  		wildcardF.contains(s); 					// No warning
-47  
+47
 48  		dummyF.contains(s); 					// HIGH
-49  
+49
 50  		dummyEF.contains(s); 					// HIGH
-51  
+51
 52  		dummySF.contains(s); 					// HIGH
-53  
+53
 54  		childF.contains(s); 					// HIGH
-55  
+55
 56  		childEF.contains(s); 					// HIGH
-57  
+57
 58  		childSF.contains(s); 					// HIGH
-59  
-60  
-61  
-62  	
+59
+60
+61
+62
 63  	}
-64  
-65  
+64
+65
 66  	}
 

diff --git a/src/site/resources/examples/xref/gcUnrelatedTypes/package-summary.html b/src/site/resources/examples/xref/gcUnrelatedTypes/package-summary.html index 4cdd4e15..e6aa34fb 100644 --- a/src/site/resources/examples/xref/gcUnrelatedTypes/package-summary.html +++ b/src/site/resources/examples/xref/gcUnrelatedTypes/package-summary.html @@ -26,7 +26,7 @@ - +

Package gcUnrelatedTypes

@@ -69,7 +69,7 @@

Package gcUnrelatedTypes

- +
- \ No newline at end of file + diff --git a/src/site/resources/examples/xref/jsr305/AlwaysBlue.html b/src/site/resources/examples/xref/jsr305/AlwaysBlue.html index e2bf40ef..5461a35f 100644 --- a/src/site/resources/examples/xref/jsr305/AlwaysBlue.html +++ b/src/site/resources/examples/xref/jsr305/AlwaysBlue.html @@ -9,18 +9,18 @@
View Javadoc
 1   package jsr305;
-2   
+2
 3   import java.lang.annotation.Retention;
 4   import java.lang.annotation.RetentionPolicy;
-5   
+5
 6   import javax.annotation.meta.TypeQualifierNickname;
 7   import javax.annotation.meta.When;
-8   
+8
 9   @ExhaustiveQualifier(value=ExhaustiveQualifier.Color.BLUE, when=When.ALWAYS)
 10  @TypeQualifierNickname
 11  @Retention(RetentionPolicy.RUNTIME)
 12  public @interface AlwaysBlue {
-13  
+13
 14  }
 

diff --git a/src/site/resources/examples/xref/jsr305/package-summary.html b/src/site/resources/examples/xref/jsr305/package-summary.html index 2df39dd8..a3ed42c3 100644 --- a/src/site/resources/examples/xref/jsr305/package-summary.html +++ b/src/site/resources/examples/xref/jsr305/package-summary.html @@ -26,7 +26,7 @@ - +

Package jsr305

@@ -44,7 +44,7 @@

Package jsr305

- +
- \ No newline at end of file + diff --git a/src/site/resources/examples/xref/npe/AtomicFieldUpdater.html b/src/site/resources/examples/xref/npe/AtomicFieldUpdater.html index 48a5aa34..55d98d7c 100644 --- a/src/site/resources/examples/xref/npe/AtomicFieldUpdater.html +++ b/src/site/resources/examples/xref/npe/AtomicFieldUpdater.html @@ -9,41 +9,41 @@
View Javadoc
 1   package npe;
-2   
+2
 3   import java.util.concurrent.atomic.AtomicIntegerFieldUpdater;
 4   import java.util.concurrent.atomic.AtomicLongFieldUpdater;
 5   import java.util.concurrent.atomic.AtomicReferenceFieldUpdater;
-6   
+6
 7   public class AtomicFieldUpdater {
-8   
+8
 9   	volatile Object x;
 10  	volatile int y;
 11      volatile long z;
-12  
-13  	AtomicReferenceFieldUpdater<AtomicFieldUpdater  , Object> updaterX 
+12
+13  	AtomicReferenceFieldUpdater<AtomicFieldUpdater  , Object> updaterX
 14  	 = AtomicReferenceFieldUpdater.newUpdater(AtomicFieldUpdater.class, Object.class, "x");
-15      
+15
 16  	AtomicIntegerFieldUpdater<AtomicFieldUpdater> updaterY
 17  	= AtomicIntegerFieldUpdater.newUpdater(AtomicFieldUpdater.class, "y");
-18  
+18
 19      AtomicLongFieldUpdater<AtomicFieldUpdater> updaterZ
 20  	= AtomicLongFieldUpdater.newUpdater(AtomicFieldUpdater.class,  "z");
-21  
+21
 22  	int f() {
 23          return x.hashCode();
 24  	}
-25  
+25
 26  	void setX(Object foo) {
 27          updaterX.set(this, foo);
 28  	}
 29  	void setY(int foo) {
 30  		updaterY.set(this, foo);
 31      }
-32  
+32
 33  	void setZ(long foo) {
 34  		updaterZ.set(this, foo);
 35      }
-36  
+36
 37  }
 

diff --git a/src/site/resources/examples/xref/npe/UseCheckUse.html b/src/site/resources/examples/xref/npe/UseCheckUse.html index c472d36e..2aba78e1 100644 --- a/src/site/resources/examples/xref/npe/UseCheckUse.html +++ b/src/site/resources/examples/xref/npe/UseCheckUse.html @@ -9,7 +9,7 @@
View Javadoc
 1   package npe;
-2   
+2
 3   public class UseCheckUse {
 4   	final Object x;
 5   	UseCheckUse(Object x) {
@@ -20,13 +20,13 @@
 10  		if (x == null) {
 11              System.out.println("x is null");
 12  		}
-13  		if (b) 
+13  		if (b)
 14  			result *= x.hashCode();
 15          else
 16  			result += x.hashCode();
 17  		return result;
 18  	}
-19  
+19
 20  }
 

diff --git a/src/site/resources/examples/xref/npe/package-summary.html b/src/site/resources/examples/xref/npe/package-summary.html index b6b07f84..29320b20 100644 --- a/src/site/resources/examples/xref/npe/package-summary.html +++ b/src/site/resources/examples/xref/npe/package-summary.html @@ -26,7 +26,7 @@ - +

Package npe

@@ -49,7 +49,7 @@

Package npe

- +
- \ No newline at end of file + diff --git a/src/site/resources/examples/xref/nullnessAnnotations/UseAnnotations.html b/src/site/resources/examples/xref/nullnessAnnotations/UseAnnotations.html index ffb9daca..7d29d8b6 100644 --- a/src/site/resources/examples/xref/nullnessAnnotations/UseAnnotations.html +++ b/src/site/resources/examples/xref/nullnessAnnotations/UseAnnotations.html @@ -9,17 +9,17 @@
View Javadoc
 1   package nullnessAnnotations;
-2   
+2
 3   import javax.annotation.CheckForNull;
 4   import javax.annotation.Nonnull;
-5   
+5
 6   public class UseAnnotations {
-7   	
+7
 8   	@CheckForNull Object f(int x) {
 9   		if (x == 0) return null;
 10  		return (Integer) x;
 11  	}
-12  	
+12
 13  	int g(@Nonnull Object x) {
 14  		return 42;
 15  	}
@@ -37,7 +37,7 @@
 27  	int foo4() {
 28  		return f(12).hashCode();  // should generate a warning here (but don't)
 29  	}
-30  
+30
 31  	int bar() {
 32  		return f(12).hashCode();  // should generate a warning here (but don't)
 33  	}
@@ -55,7 +55,7 @@
 45  		if (x > 0) y = "";
 46  		return y.hashCode();  // should generate a warning here (but don't)
 47  	}
-48  
+48
 49  }
 

diff --git a/src/site/resources/examples/xref/nullnessAnnotations/package-summary.html b/src/site/resources/examples/xref/nullnessAnnotations/package-summary.html index 59f5d915..f6966189 100644 --- a/src/site/resources/examples/xref/nullnessAnnotations/package-summary.html +++ b/src/site/resources/examples/xref/nullnessAnnotations/package-summary.html @@ -26,7 +26,7 @@ - +

Package nullnessAnnotations

@@ -44,7 +44,7 @@

Package nullnessAnnotations

- +
- \ No newline at end of file + diff --git a/src/site/resources/examples/xref/obligation/UsesWillCloseAnnotation.html b/src/site/resources/examples/xref/obligation/UsesWillCloseAnnotation.html index b216fc16..b7010f96 100644 --- a/src/site/resources/examples/xref/obligation/UsesWillCloseAnnotation.html +++ b/src/site/resources/examples/xref/obligation/UsesWillCloseAnnotation.html @@ -9,15 +9,15 @@
View Javadoc
 1   package obligation;
-2   
+2
 3   import java.io.FileInputStream;
 4   import java.io.IOException;
 5   import java.io.InputStream;
-6   
+6
 7   import javax.annotation.WillClose;
-8   
+8
 9   import edu.umd.cs.findbugs.annotations.NoWarning;
-10  
+10
 11  /**
 12   * Test to see if WillClose annotations are understood.
 13   */
@@ -33,8 +33,8 @@
 23  			cleanup(in);
 24  		}
 25  	}
-26  	
-27  	
+26
+27
 28  	public void cleanup(@WillClose InputStream in) {
 29  		try {
 30  			in.close();
diff --git a/src/site/resources/examples/xref/obligation/package-summary.html b/src/site/resources/examples/xref/obligation/package-summary.html
index 888ae825..bf415210 100644
--- a/src/site/resources/examples/xref/obligation/package-summary.html
+++ b/src/site/resources/examples/xref/obligation/package-summary.html
@@ -26,7 +26,7 @@
           		
         	
       	
-		
+
 		      	

Package obligation

@@ -44,7 +44,7 @@

Package obligation

- +
  • @@ -68,4 +68,4 @@

    Package obligation

    Copyright © 2020. All rights reserved.
- \ No newline at end of file + diff --git a/src/site/resources/examples/xref/overview-summary.html b/src/site/resources/examples/xref/overview-summary.html index 7bb68a49..1c3d292d 100644 --- a/src/site/resources/examples/xref/overview-summary.html +++ b/src/site/resources/examples/xref/overview-summary.html @@ -24,7 +24,7 @@ - +

basic-1 testing Reference

@@ -87,7 +87,7 @@

basic-1 testing Reference

- +
  • Overview
  • @@ -104,10 +104,10 @@

    basic-1 testing Reference

- +
- \ No newline at end of file + diff --git a/src/site/resources/examples/xref/package-summary.html b/src/site/resources/examples/xref/package-summary.html index 1664578c..4807b2e4 100644 --- a/src/site/resources/examples/xref/package-summary.html +++ b/src/site/resources/examples/xref/package-summary.html @@ -26,7 +26,7 @@ - +

Package (default package)

@@ -164,7 +164,7 @@

Package (default package)

- +
  • @@ -188,4 +188,4 @@

    Package (default package)

    Copyright © 2020. All rights reserved.
- \ No newline at end of file + diff --git a/src/site/resources/examples/xref/uselessThread/UsefulThread.html b/src/site/resources/examples/xref/uselessThread/UsefulThread.html index b207fe69..85755e25 100644 --- a/src/site/resources/examples/xref/uselessThread/UsefulThread.html +++ b/src/site/resources/examples/xref/uselessThread/UsefulThread.html @@ -9,12 +9,12 @@
 1   package uselessThread;
-2   
+2
 3   class UsefulThread extends Thread {
 4   	public UsefulThread() {
 5   		super("Usefull-" + System.currentTimeMillis());
 6   	}
-7   
+7
 8   	@Override
 9   	public void run() {
 10  		System.out.println("I am a useful thread!");
diff --git a/src/site/resources/examples/xref/uselessThread/package-summary.html b/src/site/resources/examples/xref/uselessThread/package-summary.html
index 6c0e6288..7a9f65b4 100644
--- a/src/site/resources/examples/xref/uselessThread/package-summary.html
+++ b/src/site/resources/examples/xref/uselessThread/package-summary.html
@@ -26,7 +26,7 @@
           		
         	
       	
-		
+
 		      	

Package uselessThread

@@ -44,7 +44,7 @@

Package uselessThread

- +
  • @@ -68,4 +68,4 @@

    Package uselessThread

    Copyright © 2020. All rights reserved.
- \ No newline at end of file + From f594c174b196532a29fb342b312004e2666a9900 Mon Sep 17 00:00:00 2001 From: Jeremy Landis Date: Sun, 12 Mar 2023 15:02:57 -0400 Subject: [PATCH 2/2] [ci] Fix end of file line markers --- .../src/main/config/spotbugs-exclude-filters.xml | 2 +- src/it/sarif-1/verify.groovy | 2 +- src/it/sarif-2/verify.groovy | 2 +- .../github/spotbugs/spotbugs-maven-plugin/it/package-frame.html | 2 +- .../examples/xref/badNaming/package1/package-frame.html | 2 +- .../examples/xref/badNaming/package2/package-frame.html | 2 +- src/site/resources/examples/xref/equals/package-frame.html | 2 +- .../resources/examples/xref/gcUnrelatedTypes/package-frame.html | 2 +- src/site/resources/examples/xref/jsr305/package-frame.html | 2 +- src/site/resources/examples/xref/npe/package-frame.html | 2 +- .../examples/xref/nullnessAnnotations/package-frame.html | 2 +- src/site/resources/examples/xref/obligation/package-frame.html | 2 +- src/site/resources/examples/xref/package-frame.html | 2 +- .../resources/examples/xref/uselessThread/package-frame.html | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/it/check-multi-filter-dups/src/main/config/spotbugs-exclude-filters.xml b/src/it/check-multi-filter-dups/src/main/config/spotbugs-exclude-filters.xml index b9b77c52..539a2ccf 100644 --- a/src/it/check-multi-filter-dups/src/main/config/spotbugs-exclude-filters.xml +++ b/src/it/check-multi-filter-dups/src/main/config/spotbugs-exclude-filters.xml @@ -3,4 +3,4 @@ xmlns="https://github.com/spotbugs/filter/3.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://github.com/spotbugs/filter/3.0.0 https://raw.githubusercontent.com/spotbugs/spotbugs/3.1.0/spotbugs/etc/findbugsfilter.xsd"> - \ No newline at end of file + diff --git a/src/it/sarif-1/verify.groovy b/src/it/sarif-1/verify.groovy index b8fcad16..d04ea45b 100644 --- a/src/it/sarif-1/verify.groovy +++ b/src/it/sarif-1/verify.groovy @@ -33,4 +33,4 @@ def results = path.runs.results[0] println "BugInstance size is ${results.size()}" -assert results.size() > 0 \ No newline at end of file +assert results.size() > 0 diff --git a/src/it/sarif-2/verify.groovy b/src/it/sarif-2/verify.groovy index a41a8c0a..d86c5fed 100644 --- a/src/it/sarif-2/verify.groovy +++ b/src/it/sarif-2/verify.groovy @@ -49,4 +49,4 @@ for (result in slurpedResult.runs.results[0]) { println "BugInstance size is ${results.size()}" -assert results.size() > 0 \ No newline at end of file +assert results.size() > 0 diff --git a/src/site/resources/examples/xref-test/com/github/spotbugs/spotbugs-maven-plugin/it/package-frame.html b/src/site/resources/examples/xref-test/com/github/spotbugs/spotbugs-maven-plugin/it/package-frame.html index 337021b9..fe38f5cd 100644 --- a/src/site/resources/examples/xref-test/com/github/spotbugs/spotbugs-maven-plugin/it/package-frame.html +++ b/src/site/resources/examples/xref-test/com/github/spotbugs/spotbugs-maven-plugin/it/package-frame.html @@ -25,4 +25,4 @@

Classes

- \ No newline at end of file + diff --git a/src/site/resources/examples/xref/badNaming/package1/package-frame.html b/src/site/resources/examples/xref/badNaming/package1/package-frame.html index 6de69498..664ce523 100644 --- a/src/site/resources/examples/xref/badNaming/package1/package-frame.html +++ b/src/site/resources/examples/xref/badNaming/package1/package-frame.html @@ -22,4 +22,4 @@

Classes

- \ No newline at end of file + diff --git a/src/site/resources/examples/xref/badNaming/package2/package-frame.html b/src/site/resources/examples/xref/badNaming/package2/package-frame.html index 1edbfce7..62d88df4 100644 --- a/src/site/resources/examples/xref/badNaming/package2/package-frame.html +++ b/src/site/resources/examples/xref/badNaming/package2/package-frame.html @@ -25,4 +25,4 @@

Classes

- \ No newline at end of file + diff --git a/src/site/resources/examples/xref/equals/package-frame.html b/src/site/resources/examples/xref/equals/package-frame.html index 3051768c..e93d4192 100644 --- a/src/site/resources/examples/xref/equals/package-frame.html +++ b/src/site/resources/examples/xref/equals/package-frame.html @@ -22,4 +22,4 @@

Classes

- \ No newline at end of file + diff --git a/src/site/resources/examples/xref/gcUnrelatedTypes/package-frame.html b/src/site/resources/examples/xref/gcUnrelatedTypes/package-frame.html index ca9f655d..b5fcefe4 100644 --- a/src/site/resources/examples/xref/gcUnrelatedTypes/package-frame.html +++ b/src/site/resources/examples/xref/gcUnrelatedTypes/package-frame.html @@ -37,4 +37,4 @@

Classes

- \ No newline at end of file + diff --git a/src/site/resources/examples/xref/jsr305/package-frame.html b/src/site/resources/examples/xref/jsr305/package-frame.html index 852be8f1..c184ad70 100644 --- a/src/site/resources/examples/xref/jsr305/package-frame.html +++ b/src/site/resources/examples/xref/jsr305/package-frame.html @@ -22,4 +22,4 @@

Classes

- \ No newline at end of file + diff --git a/src/site/resources/examples/xref/npe/package-frame.html b/src/site/resources/examples/xref/npe/package-frame.html index 4349cc00..b438d5df 100644 --- a/src/site/resources/examples/xref/npe/package-frame.html +++ b/src/site/resources/examples/xref/npe/package-frame.html @@ -25,4 +25,4 @@

Classes

- \ No newline at end of file + diff --git a/src/site/resources/examples/xref/nullnessAnnotations/package-frame.html b/src/site/resources/examples/xref/nullnessAnnotations/package-frame.html index c1c2aae4..90e66835 100644 --- a/src/site/resources/examples/xref/nullnessAnnotations/package-frame.html +++ b/src/site/resources/examples/xref/nullnessAnnotations/package-frame.html @@ -22,4 +22,4 @@

Classes

- \ No newline at end of file + diff --git a/src/site/resources/examples/xref/obligation/package-frame.html b/src/site/resources/examples/xref/obligation/package-frame.html index cb1dd530..02bc4db8 100644 --- a/src/site/resources/examples/xref/obligation/package-frame.html +++ b/src/site/resources/examples/xref/obligation/package-frame.html @@ -22,4 +22,4 @@

Classes

- \ No newline at end of file + diff --git a/src/site/resources/examples/xref/package-frame.html b/src/site/resources/examples/xref/package-frame.html index 051a1e9d..640c328b 100644 --- a/src/site/resources/examples/xref/package-frame.html +++ b/src/site/resources/examples/xref/package-frame.html @@ -94,4 +94,4 @@

Classes

- \ No newline at end of file + diff --git a/src/site/resources/examples/xref/uselessThread/package-frame.html b/src/site/resources/examples/xref/uselessThread/package-frame.html index 322b93cd..76946642 100644 --- a/src/site/resources/examples/xref/uselessThread/package-frame.html +++ b/src/site/resources/examples/xref/uselessThread/package-frame.html @@ -22,4 +22,4 @@

Classes

- \ No newline at end of file +