Skip to content

Commit feb07e7

Browse files
committed
Refactoring and fix styles
1 parent ac4d165 commit feb07e7

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

core/esmf-aspect-meta-model-java/src/main/java/org/eclipse/esmf/aspectmodel/loader/MetaModelBaseAttributes.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,7 @@
2525
import org.eclipse.esmf.aspectmodel.urn.AspectModelUrn;
2626
import org.eclipse.esmf.metamodel.HasDescription;
2727
import org.eclipse.esmf.metamodel.ModelElement;
28-
import org.eclipse.esmf.metamodel.ScalarValue;
2928
import org.eclipse.esmf.metamodel.datatype.LangString;
30-
import org.eclipse.esmf.metamodel.impl.DefaultScalar;
31-
import org.eclipse.esmf.metamodel.impl.DefaultScalarValue;
3229

3330
/**
3431
* Wrapper class for the attributes all Aspect Meta Model elements have.

core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/metamodel/StaticMetaModelVisitor.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ private <T> String getOptionalStaticDeclarationValue( final Type type, final Opt
527527
}
528528

529529
if ( optionalValue.get() instanceof ScalarValue ) {
530-
return "Optional.of(" + ((ScalarValue) optionalValue.get()).accept( this, context ) + ")";
530+
return "Optional.of(" + ( (ScalarValue) optionalValue.get() ).accept( this, context ) + ")";
531531
}
532532

533533
context.getCodeGenerationConfig().importTracker().importExplicit( AspectModelJavaUtil.getDataTypeClass( type ) );
@@ -544,9 +544,9 @@ private <T> String getOptionalStaticDeclarationValue( final Type type, final Opt
544544
return "Optional.of(" + valueInitializer.apply( xsdType, valueExpression ) + ")";
545545
}
546546

547-
public String exampleValue(final Property property, final StaticCodeGenerationContext context) {
547+
public String exampleValue( final Property property, final StaticCodeGenerationContext context ) {
548548
return property.getExampleValue()
549-
.map(exampleValue -> "Optional.of(" + this.visitScalarValue(exampleValue, context) + ")")
549+
.map( exampleValue -> "Optional.of(" + this.visitScalarValue( exampleValue, context ) + ")" )
550550
.orElse("Optional.empty()");
551551
}
552552

0 commit comments

Comments
 (0)