[jOOQ/jOOQ#14421] Update error reporting URL in log messages

This commit is contained in:
Lukas Eder 2022-12-19 10:46:09 +01:00
parent e8175b9392
commit ca266a307a
9 changed files with 27 additions and 45 deletions

View File

@ -61,7 +61,7 @@ abstract class AbstractChecker extends SourceChecker {
static Void print(Printer printer) {
try (PrintWriter writer = new PrintWriter(new FileWriter("error.txt"))){
writer.println("This is probably a bug in jOOQ-checker.");
writer.println("If you think this is a bug in jOOQ, please report it here: https://github.com/jOOQ/jOOQ/issues/new");
writer.println("If you think this is a bug in jOOQ, please report it here: https://jooq.org/bug");
writer.println("---------------------------------------------------------------------");
printer.print(writer);

View File

@ -67,7 +67,7 @@ abstract class AbstractMatcher extends BugChecker implements MethodInvocationTre
static Description print(Printer printer) {
try (PrintWriter writer = new PrintWriter(new FileWriter("error.txt"))){
writer.println("This is probably a bug in jOOQ-checker.");
writer.println("If you think this is a bug in jOOQ, please report it here: https://github.com/jOOQ/jOOQ/issues/new");
writer.println("If you think this is a bug in jOOQ, please report it here: https://jooq.org/bug");
writer.println("---------------------------------------------------------------------");
printer.print(writer);

View File

@ -166,7 +166,7 @@ public class DDLDatabase extends AbstractInterpretingDatabase {
.load(source -> DDLDatabase.this.load(ctx, source));
}
catch (ParserException e) {
log.error("An exception occurred while parsing script source : " + scripts + ". Please report this error to https://github.com/jOOQ/jOOQ/issues/new", e);
log.error("An exception occurred while parsing script source : " + scripts + ". Please report this error to https://jooq.org/bug", e);
throw e;
}
}
@ -234,7 +234,7 @@ public class DDLDatabase extends AbstractInterpretingDatabase {
+ "- The jOOQ parser doesn't understand your SQL\n"
+ "- The jOOQ DDL simulation logic (translating to H2) cannot simulate your SQL\n"
+ "\n"
+ "If you think this is a bug or a feature worth requesting, please report it here: https://github.com/jOOQ/jOOQ/issues/new/choose\n"
+ "If you think this is a bug or a feature worth requesting, please report it here: https://jooq.org/bug\n"
+ "\n"
+ "As a workaround, you can use the Settings.parseIgnoreComments syntax documented here:\n"
+ "https://www.jooq.org/doc/latest/manual/sql-building/dsl-context/custom-settings/settings-parser/");

View File

@ -442,7 +442,7 @@ public abstract class AbstractDatabase implements Database {
"Slow SQL",
"jOOQ Meta executed a slow query (slower than " + s + " seconds, configured by configuration/generator/database/logSlowQueriesAfterSeconds)"
+ "\n\n"
+ "If you think this is a bug in jOOQ, please report it here: https://github.com/jOOQ/jOOQ/issues/new"
+ "If you think this is a bug in jOOQ, please report it here: https://jooq.org/bug"
+ "\n\n```sql\n"
+ formatted(ctx.query())
+ "```\n",
@ -470,7 +470,7 @@ public abstract class AbstractDatabase implements Database {
"Slow Result Fetching",
"jOOQ Meta fetched a slow result (slower than " + s + " seconds, configured by configuration/generator/database/logSlowResultsAfterSeconds)"
+ "\n\n"
+ "If you think this is a bug in jOOQ, please report it here: https://github.com/jOOQ/jOOQ/issues/new"
+ "If you think this is a bug in jOOQ, please report it here: https://jooq.org/bug"
+ "\n\n```sql\n"
+ formatted(ctx.query())
+ "```\n",
@ -489,7 +489,7 @@ public abstract class AbstractDatabase implements Database {
? ctx.exception().getMessage()
: "No exception available")
+ "\n\n"
+ "If you think this is a bug in jOOQ, please report it here: https://github.com/jOOQ/jOOQ/issues/new"
+ "If you think this is a bug in jOOQ, please report it here: https://jooq.org/bug"
+ "\n\n"
+ "Note you can mute some exceptions using the configuration/onError flag"
+ "\n\n```sql\n"
@ -3769,7 +3769,7 @@ public abstract class AbstractDatabase implements Database {
"""
An error was encountered during code generation. This can have various reasons:
- There's a bug in jOOQ. Please report it here: https://github.com/jOOQ/jOOQ/issues/new/choose
- There's a bug in jOOQ. Please report it here: https://jooq.org/bug
- Your database user doesn't have the necessary privileges to access a metadata table
- The database connection suffered a failure

View File

@ -38,17 +38,21 @@
package org.jooq.impl;
import static org.jooq.impl.DSL.falseCondition;
import static org.jooq.impl.DSL.name;
import static org.jooq.impl.DSL.one;
import static org.jooq.impl.DSL.row;
import static org.jooq.impl.DSL.select;
import static org.jooq.impl.DSL.val;
import static org.jooq.impl.DSL.values0;
import static org.jooq.impl.Names.N_COLUMN_VALUE;
import static org.jooq.impl.Tools.componentDataType;
import static org.jooq.impl.Tools.map;
import static org.jooq.impl.Tools.visitSubquery;
import org.jooq.Context;
import org.jooq.DataType;
import org.jooq.Field;
import org.jooq.Name;
import org.jooq.Record;
import org.jooq.QueryPart;
import org.jooq.Row;
import org.jooq.Select;
import org.jooq.impl.QOM.UTransient;
@ -69,15 +73,13 @@ implements
private final DataType<?> type;
private final Name fieldAlias;
private transient Select<?> table;
ArrayTableEmulation(Object[] array, Name[] fieldAliases) {
if (Tools.isEmpty(fieldAliases))
this.fieldAlias = N_COLUMN_VALUE;
else if (fieldAliases.length == 1)
this.fieldAlias = fieldAliases[0];
else
throw new IllegalArgumentException("Array table simulations can only have a single field alias");
throw new IllegalArgumentException("Array table emulations can only have a single field alias");
this.array = array;
this.type = componentDataType(array);
@ -89,32 +91,12 @@ implements
@Override
public final void accept(Context<?> ctx) {
visitSubquery(ctx, table(), SubqueryCharacteristics.DERIVED_TABLE, true);
}
private final Select<?> table() {
if (table == null) {
Select<Record> select = null;
for (Object element : array) {
// [#1081] Be sure to get the correct cast type also for null
Field<?> val = DSL.val(element, type);
Select<Record> subselect = DSL.select(val.as(fieldAlias)).select();
if (select == null)
select = subselect;
else
select = select.unionAll(subselect);
}
// Empty arrays should result in empty tables
if (select == null)
select = DSL.select(one().as(fieldAlias)).select().where(falseCondition());
table = select;
}
return table;
visitSubquery(ctx,
array.length > 0
? values0(map(array, e -> row(val(e, type)), Row[]::new))
: select(one().as(fieldAlias)).select().where(falseCondition()),
SubqueryCharacteristics.DERIVED_TABLE,
true
);
}
}

View File

@ -108,7 +108,7 @@ final class InterpreterMetaProvider implements MetaProvider {
}
catch (ParserException e) {
log.error("An exception occurred while parsing a DDL script: " + e.getMessage()
+ ". Please report this error to https://github.com/jOOQ/jOOQ/issues/new", e);
+ ". Please report this error to https://jooq.org/bug", e);
throw e;
}
finally {

View File

@ -1238,7 +1238,7 @@ final class R2DBC {
Converter<Object, T> converter = c.converterProvider().provide((Class<Object>) o.getClass(), uType);
if (converter == null)
throw new DataTypeException("Cannot convert from " + o.getClass() + " to " + uType + ". Please report an issue here: https://github.com/jOOQ/jOOQ/issues/new. As a workaround, you can implement a ConverterProvider.");
throw new DataTypeException("Cannot convert from " + o.getClass() + " to " + uType + ". Please report an issue here: https://jooq.org/bug. As a workaround, you can implement a ConverterProvider.");
else
return scoped(converter).from(o, converterContext(c));
}

View File

@ -4778,7 +4778,7 @@ final class Tools {
}
if (i == maxConsumedResults)
log.warn("Maximum consumed results reached: " + maxConsumedResults + ". This is probably a bug. Please report to https://github.com/jOOQ/jOOQ/issues/new");
log.warn("Maximum consumed results reached: " + maxConsumedResults + ". This is probably a bug. Please report to https://jooq.org/bug");
// Call this only when there was at least one ResultSet.
if (anyResults) {

View File

@ -222,7 +222,7 @@ final class TranslatingMetaProvider implements MetaProvider {
- The jOOQ parser doesn't understand your SQL
- The jOOQ DDL interpretation logic (translating to H2) cannot simulate your SQL
If you think this is a bug or a feature worth requesting, please report it here: https://github.com/jOOQ/jOOQ/issues/new/choose
If you think this is a bug or a feature worth requesting, please report it here: https://jooq.org/bug
As a workaround, you can use the Settings.parseIgnoreComments syntax documented here:
https://www.jooq.org/doc/latest/manual/sql-building/dsl-context/custom-settings/settings-parser/