@@ -86,7 +86,7 @@ void testNonObfuscating() throws IOException {
8686 void testObfuscating () throws IOException {
8787 try (JSONObfuscatorWriter writer = new JSONObfuscatorWriter (new StringWriter ())) {
8888 writer .startObfuscate (Obfuscator .all ());
89- assertThrows (AssertionError .class , () -> writer . assertNonObfuscating () );
89+ assertThrows (AssertionError .class , writer :: assertNonObfuscating );
9090 }
9191 }
9292 }
@@ -132,7 +132,7 @@ void testNonObfuscating() throws IOException {
132132 try (StringWriter delegate = new StringWriter ();
133133 JSONObfuscatorWriter writer = new JSONObfuscatorWriter (delegate )) {
134134
135- assertThrows (AssertionError .class , () -> writer . endObfuscate () );
135+ assertThrows (AssertionError .class , writer :: endObfuscate );
136136 writer .write ("hello world" );
137137 assertEquals ("hello world" , delegate .toString ());
138138 }
@@ -175,7 +175,7 @@ void testObfuscating() throws IOException {
175175 JSONObfuscatorWriter writer = new JSONObfuscatorWriter (delegate )) {
176176
177177 writer .startObfuscate (Obfuscator .all ());
178- assertThrows (AssertionError .class , () -> writer . startUnquote () );
178+ assertThrows (AssertionError .class , writer :: startUnquote );
179179 writer .write ("hello world" );
180180 assertEquals ("***********" , delegate .toString ());
181181 }
@@ -192,7 +192,7 @@ void testNonQuoting() throws IOException {
192192 try (StringWriter delegate = new StringWriter ();
193193 JSONObfuscatorWriter writer = new JSONObfuscatorWriter (delegate )) {
194194
195- assertThrows (AssertionError .class , () -> writer . endUnquote () );
195+ assertThrows (AssertionError .class , writer :: endUnquote );
196196 writer .write ("hello world" );
197197 assertEquals ("hello world" , delegate .toString ());
198198 }
@@ -206,23 +206,23 @@ void testQuotingNonQuoted() throws IOException {
206206
207207 writer .startUnquote ();
208208 writer .write ("hello world\" " );
209- assertThrows (AssertionError .class , () -> writer . endUnquote () );
209+ assertThrows (AssertionError .class , writer :: endUnquote );
210210 assertEquals ("" , delegate .toString ());
211211 }
212212 try (StringWriter delegate = new StringWriter ();
213213 JSONObfuscatorWriter writer = new JSONObfuscatorWriter (delegate )) {
214214
215215 writer .startUnquote ();
216216 writer .write ("\" hello world" );
217- assertThrows (AssertionError .class , () -> writer . endUnquote () );
217+ assertThrows (AssertionError .class , writer :: endUnquote );
218218 assertEquals ("" , delegate .toString ());
219219 }
220220 try (StringWriter delegate = new StringWriter ();
221221 JSONObfuscatorWriter writer = new JSONObfuscatorWriter (delegate )) {
222222
223223 writer .startUnquote ();
224224 writer .write ("\" " );
225- assertThrows (AssertionError .class , () -> writer . endUnquote () );
225+ assertThrows (AssertionError .class , writer :: endUnquote );
226226 assertEquals ("" , delegate .toString ());
227227 }
228228 }
0 commit comments