Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions lang/java/avro/src/main/java/org/apache/avro/Conversion.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@
import java.nio.ByteBuffer;
import java.util.Collection;
import java.util.Map;
import java.util.ServiceLoader;

import org.apache.avro.generic.GenericData;
import org.apache.avro.generic.GenericEnumSymbol;
import org.apache.avro.generic.GenericFixed;
import org.apache.avro.generic.IndexedRecord;
Expand All @@ -33,11 +31,12 @@
* <p>
* Instances of this class can be added to GenericData to convert a logical type
* to a particular representation. This can be done manually, using
* {@link GenericData#addLogicalTypeConversion(Conversion)}, or automatically.
* This last option uses the Java {@link ServiceLoader}, and requires the
* implementation to be a public class with a public no-arg constructor, be
* named in a file called {@code /META-INF/services/org.apache.avro.Conversion},
* and both must available in the classpath.</li>
* {@link org.apache.avro.generic.GenericData#addLogicalTypeConversion(Conversion)},
* or automatically. This last option uses the Java
* {@link java.util.ServiceLoader}, and requires the implementation to be a
* public class with a public no-arg constructor, be named in a file called
* {@code /META-INF/services/org.apache.avro.Conversion}, and both must
* available in the classpath.
* <p>
* Implementations must provide:
* <ul>
Expand All @@ -55,7 +54,7 @@
* {@code ReflectData} or {@code ProtobufData}, for example.
*
* @param <T> a Java type that can represent the named logical type
* @see ServiceLoader
* @see java.util.ServiceLoader
*/
@SuppressWarnings("unused")
public abstract class Conversion<T> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,21 @@
* <p>
* The {@link SchemaParser} class uses this interface, supporting text based
* schema sources.
* </p>
* <p>
*
* <p>
* Implementations are located using a {@link java.util.ServiceLoader} and must
* therefore be threadsafe. See the {@code ServiceLoader} class for details on
* loading your implementation.
* </p>
* <p>
*
* @see java.util.ServiceLoader
*/
public interface FormattedSchemaParser {
/**
* <p>
* Parse schema definitions from a text based source.
* </p>
* <p>
*
* <h2>Notes for implementers:</h2>
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,23 +30,23 @@
* {@link java.util.ServiceLoader}, as its use is hardcoded as fallback when no
* service exists. This enables users to reliably override the standard JSON
* parser as well.
* </p>
* <p>
*/
public class JsonSchemaParser implements FormattedSchemaParser {
/**
* <p>
* Parse a schema written in the internal (JSON) format without any validations.
* </p>
* <p>
*
* <p>
* Using this method is only safe if used to parse a write schema (i.e., a
* schema used to read Avro data). Other usages, for example by generated Avro
* code, can cause interoperability problems.
* </p>
* <p>
*
* <p>
* Use with care and sufficient testing!
* </p>
* <p>
*
* @param fragments one or more strings making up the schema (some schemata
* exceed the compiler limits)
Expand All @@ -58,16 +58,16 @@
buffer.append(fragment);
}

boolean saved = Schema.getValidateDefaults();

Check warning on line 61 in lang/java/avro/src/main/java/org/apache/avro/JsonSchemaParser.java

View workflow job for this annotation

GitHub Actions / Java Interop (ubuntu-24.04-arm)

[deprecation] getValidateDefaults() in Schema has been deprecated

Check warning on line 61 in lang/java/avro/src/main/java/org/apache/avro/JsonSchemaParser.java

View workflow job for this annotation

GitHub Actions / Java Interop (ubuntu-latest)

[deprecation] getValidateDefaults() in Schema has been deprecated

Check warning on line 61 in lang/java/avro/src/main/java/org/apache/avro/JsonSchemaParser.java

View workflow job for this annotation

GitHub Actions / Java Test (ubuntu-24.04-arm)

[deprecation] getValidateDefaults() in Schema has been deprecated

Check warning on line 61 in lang/java/avro/src/main/java/org/apache/avro/JsonSchemaParser.java

View workflow job for this annotation

GitHub Actions / Java Test (ubuntu-24.04-arm)

[deprecation] getValidateDefaults() in Schema has been deprecated

Check warning on line 61 in lang/java/avro/src/main/java/org/apache/avro/JsonSchemaParser.java

View workflow job for this annotation

GitHub Actions / Java Test (ubuntu-24.04-arm)

[deprecation] getValidateDefaults() in Schema has been deprecated

Check warning on line 61 in lang/java/avro/src/main/java/org/apache/avro/JsonSchemaParser.java

View workflow job for this annotation

GitHub Actions / Java Test (ubuntu-24.04-arm)

[deprecation] getValidateDefaults() in Schema has been deprecated

Check warning on line 61 in lang/java/avro/src/main/java/org/apache/avro/JsonSchemaParser.java

View workflow job for this annotation

GitHub Actions / Java Test (ubuntu-latest)

[deprecation] getValidateDefaults() in Schema has been deprecated

Check warning on line 61 in lang/java/avro/src/main/java/org/apache/avro/JsonSchemaParser.java

View workflow job for this annotation

GitHub Actions / Java Test (ubuntu-latest)

[deprecation] getValidateDefaults() in Schema has been deprecated

Check warning on line 61 in lang/java/avro/src/main/java/org/apache/avro/JsonSchemaParser.java

View workflow job for this annotation

GitHub Actions / Java Test (ubuntu-latest)

[deprecation] getValidateDefaults() in Schema has been deprecated

Check warning on line 61 in lang/java/avro/src/main/java/org/apache/avro/JsonSchemaParser.java

View workflow job for this annotation

GitHub Actions / Java Test (ubuntu-latest)

[deprecation] getValidateDefaults() in Schema has been deprecated

Check warning on line 61 in lang/java/avro/src/main/java/org/apache/avro/JsonSchemaParser.java

View workflow job for this annotation

GitHub Actions / Analyze (java)

[deprecation] getValidateDefaults() in Schema has been deprecated
try {
Schema.setValidateDefaults(false);

Check warning on line 63 in lang/java/avro/src/main/java/org/apache/avro/JsonSchemaParser.java

View workflow job for this annotation

GitHub Actions / Java Interop (ubuntu-24.04-arm)

[deprecation] setValidateDefaults(boolean) in Schema has been deprecated

Check warning on line 63 in lang/java/avro/src/main/java/org/apache/avro/JsonSchemaParser.java

View workflow job for this annotation

GitHub Actions / Java Interop (ubuntu-latest)

[deprecation] setValidateDefaults(boolean) in Schema has been deprecated

Check warning on line 63 in lang/java/avro/src/main/java/org/apache/avro/JsonSchemaParser.java

View workflow job for this annotation

GitHub Actions / Java Test (ubuntu-24.04-arm)

[deprecation] setValidateDefaults(boolean) in Schema has been deprecated

Check warning on line 63 in lang/java/avro/src/main/java/org/apache/avro/JsonSchemaParser.java

View workflow job for this annotation

GitHub Actions / Java Test (ubuntu-24.04-arm)

[deprecation] setValidateDefaults(boolean) in Schema has been deprecated

Check warning on line 63 in lang/java/avro/src/main/java/org/apache/avro/JsonSchemaParser.java

View workflow job for this annotation

GitHub Actions / Java Test (ubuntu-24.04-arm)

[deprecation] setValidateDefaults(boolean) in Schema has been deprecated

Check warning on line 63 in lang/java/avro/src/main/java/org/apache/avro/JsonSchemaParser.java

View workflow job for this annotation

GitHub Actions / Java Test (ubuntu-24.04-arm)

[deprecation] setValidateDefaults(boolean) in Schema has been deprecated

Check warning on line 63 in lang/java/avro/src/main/java/org/apache/avro/JsonSchemaParser.java

View workflow job for this annotation

GitHub Actions / Java Test (ubuntu-latest)

[deprecation] setValidateDefaults(boolean) in Schema has been deprecated

Check warning on line 63 in lang/java/avro/src/main/java/org/apache/avro/JsonSchemaParser.java

View workflow job for this annotation

GitHub Actions / Java Test (ubuntu-latest)

[deprecation] setValidateDefaults(boolean) in Schema has been deprecated

Check warning on line 63 in lang/java/avro/src/main/java/org/apache/avro/JsonSchemaParser.java

View workflow job for this annotation

GitHub Actions / Java Test (ubuntu-latest)

[deprecation] setValidateDefaults(boolean) in Schema has been deprecated

Check warning on line 63 in lang/java/avro/src/main/java/org/apache/avro/JsonSchemaParser.java

View workflow job for this annotation

GitHub Actions / Java Test (ubuntu-latest)

[deprecation] setValidateDefaults(boolean) in Schema has been deprecated

Check warning on line 63 in lang/java/avro/src/main/java/org/apache/avro/JsonSchemaParser.java

View workflow job for this annotation

GitHub Actions / Analyze (java)

[deprecation] setValidateDefaults(boolean) in Schema has been deprecated
ParseContext context = new ParseContext(NameValidator.NO_VALIDATION);
Schema schema = new JsonSchemaParser().parse(context, buffer, true);
context.commit();
context.resolveAllSchemas();
return context.resolve(schema);
} finally {
Schema.setValidateDefaults(saved);

Check warning on line 70 in lang/java/avro/src/main/java/org/apache/avro/JsonSchemaParser.java

View workflow job for this annotation

GitHub Actions / Java Interop (ubuntu-24.04-arm)

[deprecation] setValidateDefaults(boolean) in Schema has been deprecated

Check warning on line 70 in lang/java/avro/src/main/java/org/apache/avro/JsonSchemaParser.java

View workflow job for this annotation

GitHub Actions / Java Interop (ubuntu-latest)

[deprecation] setValidateDefaults(boolean) in Schema has been deprecated

Check warning on line 70 in lang/java/avro/src/main/java/org/apache/avro/JsonSchemaParser.java

View workflow job for this annotation

GitHub Actions / Java Test (ubuntu-24.04-arm)

[deprecation] setValidateDefaults(boolean) in Schema has been deprecated

Check warning on line 70 in lang/java/avro/src/main/java/org/apache/avro/JsonSchemaParser.java

View workflow job for this annotation

GitHub Actions / Java Test (ubuntu-24.04-arm)

[deprecation] setValidateDefaults(boolean) in Schema has been deprecated

Check warning on line 70 in lang/java/avro/src/main/java/org/apache/avro/JsonSchemaParser.java

View workflow job for this annotation

GitHub Actions / Java Test (ubuntu-24.04-arm)

[deprecation] setValidateDefaults(boolean) in Schema has been deprecated

Check warning on line 70 in lang/java/avro/src/main/java/org/apache/avro/JsonSchemaParser.java

View workflow job for this annotation

GitHub Actions / Java Test (ubuntu-24.04-arm)

[deprecation] setValidateDefaults(boolean) in Schema has been deprecated

Check warning on line 70 in lang/java/avro/src/main/java/org/apache/avro/JsonSchemaParser.java

View workflow job for this annotation

GitHub Actions / Java Test (ubuntu-latest)

[deprecation] setValidateDefaults(boolean) in Schema has been deprecated

Check warning on line 70 in lang/java/avro/src/main/java/org/apache/avro/JsonSchemaParser.java

View workflow job for this annotation

GitHub Actions / Java Test (ubuntu-latest)

[deprecation] setValidateDefaults(boolean) in Schema has been deprecated

Check warning on line 70 in lang/java/avro/src/main/java/org/apache/avro/JsonSchemaParser.java

View workflow job for this annotation

GitHub Actions / Java Test (ubuntu-latest)

[deprecation] setValidateDefaults(boolean) in Schema has been deprecated

Check warning on line 70 in lang/java/avro/src/main/java/org/apache/avro/JsonSchemaParser.java

View workflow job for this annotation

GitHub Actions / Java Test (ubuntu-latest)

[deprecation] setValidateDefaults(boolean) in Schema has been deprecated

Check warning on line 70 in lang/java/avro/src/main/java/org/apache/avro/JsonSchemaParser.java

View workflow job for this annotation

GitHub Actions / Analyze (java)

[deprecation] setValidateDefaults(boolean) in Schema has been deprecated
}
}

Expand Down
12 changes: 6 additions & 6 deletions lang/java/avro/src/main/java/org/apache/avro/ParseContext.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@
*
* <p>
* This class is NOT thread-safe.
* </p>
* <p>
*
* <p>
* Note: this class has no use for most Avro users, but is a key component when
* implementing a schema parser.
* </p>
* <p>
*
* @see <a href="https://avro.apache.org/docs/current/specification/">JSON based
* schema definition</a>
Expand Down Expand Up @@ -129,11 +129,11 @@
/**
* <p>
* Find a schema by name and namespace.
* </p>
* <p>
*
* <p>
* That is:
* </p>
* <p>
*
* <ol>
* <li>If {@code name} is a primitive name, return a (new) schema for it</li>
Expand All @@ -150,7 +150,7 @@
* directly usable. Please {@link #put(Schema)} the schema using it in the
* context. The {@link SchemaParser} and protocol parsers will ensure you'll
* only get a resolved schema that is usable.
* </p>
* <p>
*
* @param name the schema name to find
* @param namespace the namespace to find the schema against
Expand Down Expand Up @@ -201,7 +201,7 @@
* Note that although this method works for all types except for arrays, maps
* and unions, all primitive types have already been defined upon construction.
* This means you cannot redefine a 'long' with a logical timestamp type.
* </p>
* <p>
*
* @param schema the schema to put into the context
*/
Expand Down Expand Up @@ -291,11 +291,11 @@
throw new IllegalStateException("Schemas cannot be resolved unless the ParseContext is committed.");
}
if (resolvingVisitor == null) {
NameValidator saved = Schema.getNameValidator();

Check warning on line 294 in lang/java/avro/src/main/java/org/apache/avro/ParseContext.java

View workflow job for this annotation

GitHub Actions / Java Interop (ubuntu-24.04-arm)

[deprecation] getNameValidator() in Schema has been deprecated

Check warning on line 294 in lang/java/avro/src/main/java/org/apache/avro/ParseContext.java

View workflow job for this annotation

GitHub Actions / Java Interop (ubuntu-latest)

[deprecation] getNameValidator() in Schema has been deprecated

Check warning on line 294 in lang/java/avro/src/main/java/org/apache/avro/ParseContext.java

View workflow job for this annotation

GitHub Actions / Java Test (ubuntu-24.04-arm)

[deprecation] getNameValidator() in Schema has been deprecated

Check warning on line 294 in lang/java/avro/src/main/java/org/apache/avro/ParseContext.java

View workflow job for this annotation

GitHub Actions / Java Test (ubuntu-24.04-arm)

[deprecation] getNameValidator() in Schema has been deprecated

Check warning on line 294 in lang/java/avro/src/main/java/org/apache/avro/ParseContext.java

View workflow job for this annotation

GitHub Actions / Java Test (ubuntu-24.04-arm)

[deprecation] getNameValidator() in Schema has been deprecated

Check warning on line 294 in lang/java/avro/src/main/java/org/apache/avro/ParseContext.java

View workflow job for this annotation

GitHub Actions / Java Test (ubuntu-24.04-arm)

[deprecation] getNameValidator() in Schema has been deprecated

Check warning on line 294 in lang/java/avro/src/main/java/org/apache/avro/ParseContext.java

View workflow job for this annotation

GitHub Actions / Java Test (ubuntu-latest)

[deprecation] getNameValidator() in Schema has been deprecated

Check warning on line 294 in lang/java/avro/src/main/java/org/apache/avro/ParseContext.java

View workflow job for this annotation

GitHub Actions / Java Test (ubuntu-latest)

[deprecation] getNameValidator() in Schema has been deprecated

Check warning on line 294 in lang/java/avro/src/main/java/org/apache/avro/ParseContext.java

View workflow job for this annotation

GitHub Actions / Java Test (ubuntu-latest)

[deprecation] getNameValidator() in Schema has been deprecated

Check warning on line 294 in lang/java/avro/src/main/java/org/apache/avro/ParseContext.java

View workflow job for this annotation

GitHub Actions / Java Test (ubuntu-latest)

[deprecation] getNameValidator() in Schema has been deprecated

Check warning on line 294 in lang/java/avro/src/main/java/org/apache/avro/ParseContext.java

View workflow job for this annotation

GitHub Actions / Analyze (java)

[deprecation] getNameValidator() in Schema has been deprecated
try {
// Ensure we use the same validation when copying schemas as when they were
// defined.
Schema.setNameValidator(nameValidator);

Check warning on line 298 in lang/java/avro/src/main/java/org/apache/avro/ParseContext.java

View workflow job for this annotation

GitHub Actions / Java Interop (ubuntu-24.04-arm)

[deprecation] setNameValidator(NameValidator) in Schema has been deprecated

Check warning on line 298 in lang/java/avro/src/main/java/org/apache/avro/ParseContext.java

View workflow job for this annotation

GitHub Actions / Java Interop (ubuntu-latest)

[deprecation] setNameValidator(NameValidator) in Schema has been deprecated

Check warning on line 298 in lang/java/avro/src/main/java/org/apache/avro/ParseContext.java

View workflow job for this annotation

GitHub Actions / Java Test (ubuntu-24.04-arm)

[deprecation] setNameValidator(NameValidator) in Schema has been deprecated

Check warning on line 298 in lang/java/avro/src/main/java/org/apache/avro/ParseContext.java

View workflow job for this annotation

GitHub Actions / Java Test (ubuntu-24.04-arm)

[deprecation] setNameValidator(NameValidator) in Schema has been deprecated

Check warning on line 298 in lang/java/avro/src/main/java/org/apache/avro/ParseContext.java

View workflow job for this annotation

GitHub Actions / Java Test (ubuntu-24.04-arm)

[deprecation] setNameValidator(NameValidator) in Schema has been deprecated

Check warning on line 298 in lang/java/avro/src/main/java/org/apache/avro/ParseContext.java

View workflow job for this annotation

GitHub Actions / Java Test (ubuntu-24.04-arm)

[deprecation] setNameValidator(NameValidator) in Schema has been deprecated

Check warning on line 298 in lang/java/avro/src/main/java/org/apache/avro/ParseContext.java

View workflow job for this annotation

GitHub Actions / Java Test (ubuntu-latest)

[deprecation] setNameValidator(NameValidator) in Schema has been deprecated

Check warning on line 298 in lang/java/avro/src/main/java/org/apache/avro/ParseContext.java

View workflow job for this annotation

GitHub Actions / Java Test (ubuntu-latest)

[deprecation] setNameValidator(NameValidator) in Schema has been deprecated

Check warning on line 298 in lang/java/avro/src/main/java/org/apache/avro/ParseContext.java

View workflow job for this annotation

GitHub Actions / Java Test (ubuntu-latest)

[deprecation] setNameValidator(NameValidator) in Schema has been deprecated

Check warning on line 298 in lang/java/avro/src/main/java/org/apache/avro/ParseContext.java

View workflow job for this annotation

GitHub Actions / Java Test (ubuntu-latest)

[deprecation] setNameValidator(NameValidator) in Schema has been deprecated

Check warning on line 298 in lang/java/avro/src/main/java/org/apache/avro/ParseContext.java

View workflow job for this annotation

GitHub Actions / Analyze (java)

[deprecation] setNameValidator(NameValidator) in Schema has been deprecated
SchemaResolver.ResolvingVisitor visitor = new SchemaResolver.ResolvingVisitor(oldSchemas::get);
oldSchemas.values().forEach(schema -> Schemas.visit(schema, visitor));
// Before this point is where we can get exceptions due to resolving failures.
Expand All @@ -304,7 +304,7 @@
}
resolvingVisitor = visitor;
} finally {
Schema.setNameValidator(saved);

Check warning on line 307 in lang/java/avro/src/main/java/org/apache/avro/ParseContext.java

View workflow job for this annotation

GitHub Actions / Java Interop (ubuntu-24.04-arm)

[deprecation] setNameValidator(NameValidator) in Schema has been deprecated

Check warning on line 307 in lang/java/avro/src/main/java/org/apache/avro/ParseContext.java

View workflow job for this annotation

GitHub Actions / Java Interop (ubuntu-latest)

[deprecation] setNameValidator(NameValidator) in Schema has been deprecated

Check warning on line 307 in lang/java/avro/src/main/java/org/apache/avro/ParseContext.java

View workflow job for this annotation

GitHub Actions / Java Test (ubuntu-24.04-arm)

[deprecation] setNameValidator(NameValidator) in Schema has been deprecated

Check warning on line 307 in lang/java/avro/src/main/java/org/apache/avro/ParseContext.java

View workflow job for this annotation

GitHub Actions / Java Test (ubuntu-24.04-arm)

[deprecation] setNameValidator(NameValidator) in Schema has been deprecated

Check warning on line 307 in lang/java/avro/src/main/java/org/apache/avro/ParseContext.java

View workflow job for this annotation

GitHub Actions / Java Test (ubuntu-24.04-arm)

[deprecation] setNameValidator(NameValidator) in Schema has been deprecated

Check warning on line 307 in lang/java/avro/src/main/java/org/apache/avro/ParseContext.java

View workflow job for this annotation

GitHub Actions / Java Test (ubuntu-24.04-arm)

[deprecation] setNameValidator(NameValidator) in Schema has been deprecated

Check warning on line 307 in lang/java/avro/src/main/java/org/apache/avro/ParseContext.java

View workflow job for this annotation

GitHub Actions / Java Test (ubuntu-latest)

[deprecation] setNameValidator(NameValidator) in Schema has been deprecated

Check warning on line 307 in lang/java/avro/src/main/java/org/apache/avro/ParseContext.java

View workflow job for this annotation

GitHub Actions / Java Test (ubuntu-latest)

[deprecation] setNameValidator(NameValidator) in Schema has been deprecated

Check warning on line 307 in lang/java/avro/src/main/java/org/apache/avro/ParseContext.java

View workflow job for this annotation

GitHub Actions / Java Test (ubuntu-latest)

[deprecation] setNameValidator(NameValidator) in Schema has been deprecated

Check warning on line 307 in lang/java/avro/src/main/java/org/apache/avro/ParseContext.java

View workflow job for this annotation

GitHub Actions / Java Test (ubuntu-latest)

[deprecation] setNameValidator(NameValidator) in Schema has been deprecated

Check warning on line 307 in lang/java/avro/src/main/java/org/apache/avro/ParseContext.java

View workflow job for this annotation

GitHub Actions / Analyze (java)

[deprecation] setNameValidator(NameValidator) in Schema has been deprecated
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions lang/java/avro/src/main/java/org/apache/avro/Schema.java
Original file line number Diff line number Diff line change
Expand Up @@ -400,12 +400,12 @@
/**
* <p>
* Render this as <a href="https://json.org/">JSON</a>.
* </p>
* <p>
*
* <p>
* This method is equivalent to:
* {@code SchemaFormatter.getInstance("json").format(this)}
* </p>
* <p>
*/
@Override
public String toString() {
Expand Down Expand Up @@ -591,7 +591,7 @@
*/
public Field(Field field, Schema schema) {
this(field.name, schema, field.doc, field.defaultValue, true, field.order);
putAll(field);

Check warning on line 594 in lang/java/avro/src/main/java/org/apache/avro/Schema.java

View workflow job for this annotation

GitHub Actions / Java Interop (ubuntu-latest)

[this-escape] possible 'this' escape before subclass is fully initialized

Check warning on line 594 in lang/java/avro/src/main/java/org/apache/avro/Schema.java

View workflow job for this annotation

GitHub Actions / Java Test (ubuntu-latest)

[this-escape] possible 'this' escape before subclass is fully initialized

Check warning on line 594 in lang/java/avro/src/main/java/org/apache/avro/Schema.java

View workflow job for this annotation

GitHub Actions / Java Test (ubuntu-latest)

[this-escape] possible 'this' escape before subclass is fully initialized

Check warning on line 594 in lang/java/avro/src/main/java/org/apache/avro/Schema.java

View workflow job for this annotation

GitHub Actions / Java Test (ubuntu-latest)

[this-escape] possible 'this' escape before subclass is fully initialized

Check warning on line 594 in lang/java/avro/src/main/java/org/apache/avro/Schema.java

View workflow job for this annotation

GitHub Actions / Java Test (ubuntu-latest)

[this-escape] possible 'this' escape before subclass is fully initialized

Check warning on line 594 in lang/java/avro/src/main/java/org/apache/avro/Schema.java

View workflow job for this annotation

GitHub Actions / Analyze (java)

[this-escape] possible 'this' escape before subclass is fully initialized
if (field.aliases != null)
aliases = new LinkedHashSet<>(field.aliases);
}
Expand Down Expand Up @@ -2225,7 +2225,7 @@
@SafeVarargs
public LockableArrayList(E... types) {
super(types.length);
Collections.addAll(this, types);

Check warning on line 2228 in lang/java/avro/src/main/java/org/apache/avro/Schema.java

View workflow job for this annotation

GitHub Actions / Java Interop (ubuntu-24.04-arm)

[varargs] Varargs method could cause heap pollution from non-reifiable varargs parameter types

Check warning on line 2228 in lang/java/avro/src/main/java/org/apache/avro/Schema.java

View workflow job for this annotation

GitHub Actions / Java Interop (ubuntu-latest)

[varargs] Varargs method could cause heap pollution from non-reifiable varargs parameter types

Check warning on line 2228 in lang/java/avro/src/main/java/org/apache/avro/Schema.java

View workflow job for this annotation

GitHub Actions / Java Test (ubuntu-24.04-arm)

[varargs] Varargs method could cause heap pollution from non-reifiable varargs parameter types

Check warning on line 2228 in lang/java/avro/src/main/java/org/apache/avro/Schema.java

View workflow job for this annotation

GitHub Actions / Java Test (ubuntu-24.04-arm)

[varargs] Varargs method could cause heap pollution from non-reifiable varargs parameter types

Check warning on line 2228 in lang/java/avro/src/main/java/org/apache/avro/Schema.java

View workflow job for this annotation

GitHub Actions / Java Test (ubuntu-24.04-arm)

[varargs] Varargs method could cause heap pollution from non-reifiable varargs parameter types

Check warning on line 2228 in lang/java/avro/src/main/java/org/apache/avro/Schema.java

View workflow job for this annotation

GitHub Actions / Java Test (ubuntu-24.04-arm)

[varargs] Varargs method could cause heap pollution from non-reifiable varargs parameter types

Check warning on line 2228 in lang/java/avro/src/main/java/org/apache/avro/Schema.java

View workflow job for this annotation

GitHub Actions / Java Test (ubuntu-latest)

[varargs] Varargs method could cause heap pollution from non-reifiable varargs parameter types

Check warning on line 2228 in lang/java/avro/src/main/java/org/apache/avro/Schema.java

View workflow job for this annotation

GitHub Actions / Java Test (ubuntu-latest)

[varargs] Varargs method could cause heap pollution from non-reifiable varargs parameter types

Check warning on line 2228 in lang/java/avro/src/main/java/org/apache/avro/Schema.java

View workflow job for this annotation

GitHub Actions / Java Test (ubuntu-latest)

[varargs] Varargs method could cause heap pollution from non-reifiable varargs parameter types

Check warning on line 2228 in lang/java/avro/src/main/java/org/apache/avro/Schema.java

View workflow job for this annotation

GitHub Actions / Java Test (ubuntu-latest)

[varargs] Varargs method could cause heap pollution from non-reifiable varargs parameter types

Check warning on line 2228 in lang/java/avro/src/main/java/org/apache/avro/Schema.java

View workflow job for this annotation

GitHub Actions / Analyze (java)

[varargs] Varargs method could cause heap pollution from non-reifiable varargs parameter types
}

public List<E> lock() {
Expand Down
Loading
Loading