Skip to content

Commit

Permalink
Change smart to dumb quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
mernst authored Oct 11, 2024
1 parent 15cb814 commit f503ebc
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@

/**
* Denotes a String that contains either zero or an even number of unescaped single quotes —
* i.e., there must be either zero or an even number of {@code } characters in a SqlEvenQuotes
* String that are not preceded immediately by another {@code } character. (Thus, all SqlEvenQuotes
* i.e., there must be either zero or an even number of {@code '} characters in a SqlEvenQuotes
* String that are not preceded immediately by another {@code '} character. (Thus, all SqlEvenQuotes
* Strings ultimately contain an even number of {@code '} characters.) A SqlEvenQuotes String is
* syntactical to be passed to query execution methods and is guaranteed not to affect whether
* subsequent concatenations are interpreted as SQL command code or as SQL query values.
*
* <p>Common use cases include: SQL query fragments, such as SELECT * FROM; properly sanitized
* user input; and complete SQL queries, such as SELECT * FROM table WHERE field = 'value'.
* <p>Common use cases include: SQL query fragments, such as "SELECT * FROM"; properly sanitized
* user input; and complete SQL queries, such as "SELECT * FROM table WHERE field = 'value'".
*
* @checker_framework.manual #sql-quotes-checker SQL Quotes Checker
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@
import org.checkerframework.framework.qual.SubtypeOf;

/**
* Denotes a String that contains an odd number of unescaped single quotes i.e., there must be an
* odd number of characters in a SqlOddQuotes String that are not preceded immediately by another
* Denotes a String that contains an odd number of unescaped single quotes -- i.e., there must be an
* odd number of ' characters in a SqlOddQuotes String that are not preceded immediately by another
* ' character. (Thus, all SqlOddQuotes Strings ultimately contain an odd number of single quotes,
* escaped or otherwise.) SqlOddQuotes Strings are not syntactical to be passed to query execution
* methods.
*
* <p>Common use cases include: SQL query fragments to be concatenated with user input, such as
* SELECT * FROM table WHERE field = ‘”; SQL query fragments containing user input but missing an
* ending single quote, such as SELECT * FROM table WHERE field = value; connecting punctuation,
* such as “’, “; and any combinations of the above with paired-off single quotes, such as SELECT *
* FROM table WHERE field1 = value1, field2 = value2, field3 = ‘”.
* "SELECT * FROM table WHERE field = '"; SQL query fragments containing user input but missing an
* ending single quote, such as "SELECT * FROM table WHERE field = 'value"; connecting punctuation,
* such as "', "; and any combinations of the above with paired-off single quotes, such as "SELECT *
* FROM table WHERE field1 = 'value1', field2 = 'value2', field3 = '".
*
* @checker_framework.manual #sql-quotes-checker SQL Quotes Checker
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ public int hashCode() {
*
* <ul>
* <li>it is passed to another method or constructor in an @MustCallAlias position, and then
* the enclosing method returns that methods result, or the call is a super() constructor
* the enclosing method returns that method's result, or the call is a super() constructor
* call annotated with {@link MustCallAlias}, or
* <li>it is stored in an owning field of the class under analysis
* </ul>
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/MavenExample/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
<plugins>
<plugin>
<!-- This plugin execution will copy the com.google.errorprone:javac jar file to
your projects output directory without adding that jar as an explicit
your project's output directory without adding that jar as an explicit
dependency. -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
Expand Down

0 comments on commit f503ebc

Please sign in to comment.