Skip to content

Commit

Permalink
Revert "Update dependency com.sun.xml.bind:jaxb-impl to v2.3.8 (#12858)"
Browse files Browse the repository at this point in the history
This reverts commit 3a1d6d1.
  • Loading branch information
puneetbehl committed Jul 11, 2023
1 parent 3a1d6d1 commit a30ff29
Show file tree
Hide file tree
Showing 20 changed files with 20 additions and 378 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
java: ['11', '14']
java: ['8', '11', '14']
env:
WORKSPACE: ${{ github.workspace }}
GRADLE_OPTS: -Xmx1500m -Dfile.encoding=UTF-8
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/groovy-joint-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ jobs:
run: env

# Select correct Groovy branch for this build:
- name: Checkout Groovy 3_0_X (Grails 5 and later)
- name: Checkout Groovy 3_0_X (Grails 5)
run: cd .. && git clone --depth 1 https://github.com/apache/groovy.git -b GROOVY_3_0_X --single-branch
if: github.ref == 'refs/heads/6.0.x' || github.base_ref == '6.0.x' || github.ref == 'refs/heads/5.3.x' || github.base_ref == '5.3.x' || github.ref == 'refs/heads/5.2.x' || github.base_ref == '5.2.x' || github.ref == 'refs/heads/5.1.x' || github.base_ref == '5.1.x' || github.ref == 'refs/heads/5.0.x' || github.base_ref == '5.0.x' || github.ref == 'refs/heads/master' || github.base_ref == 'master'
- name: Checkout Groovy 2_5_X (Grails 4.0.x)
if: github.ref == 'refs/heads/5.3.x' || github.base_ref == '5.3.x' || github.ref == 'refs/heads/5.2.x' || github.base_ref == '5.2.x' || github.ref == 'refs/heads/5.1.x' || github.base_ref == '5.1.x' || github.ref == 'refs/heads/5.0.x' || github.base_ref == '5.0.x' || github.ref == 'refs/heads/master' || github.base_ref == 'master'
- name: Checkout Groovy 2_5_X (Grails 4)
run: cd .. && git clone --depth 1 https://github.com/grails/grails-core.git -b GROOVY_2_5_X --single-branch
if: github.ref == 'refs/heads/4.1.x' || github.base_ref == '4.1.x' || github.ref == 'refs/heads/4.0.x' || github.base_ref == '4.0.x'
- name: Set CI_GROOVY_VERSION for Grails
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
java: ['11']
java: ['8']
env:
GIT_USER_NAME: puneetbehl
GIT_USER_EMAIL: [email protected]
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -417,8 +417,8 @@ subprojects { project ->
if(project.name == 'grails-dependencies') return
if(project.name == 'grails-bom') return

sourceCompatibility = "1.11"
targetCompatibility = "1.11"
sourceCompatibility = "1.8"
targetCompatibility = "1.8"

if(project.name =~ /^(grails-web|grails-plugin-|grails-test-suite|grails-test)/) {
dependencies {
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
projectVersion=6.0.0-SNAPSHOT
projectVersion=5.3.3-SNAPSHOT
antVersion=1.10.13
aspectjVersion=1.9.19
asyncVersion=4.0.0
Expand All @@ -20,7 +20,7 @@ jakartaAnnotationApiVersion=2.0.0
jansiVersion=1.18
javaParserCoreVersion=3.15.14
javaxAnnotationApiVersion=1.3.2
jaxbVersion=2.3.8
jaxbVersion=2.3.1
jlineVersion=2.14.6
jnaVersion=5.13.0
junitVersion=4.13.2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ class MainClassFinder {
boolean found = false

MainMethodFinder() {
super(Opcodes.ASM7)
super(Opcodes.ASM4)
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ private static void initializeState() {
final ClassReader classReader = new ClassReader(inputStream);
final String astTransformerClassName = AstTransformer.class.getSimpleName();
final ClassLoader finalClassLoader = classLoader;
classReader.accept(new ClassVisitor(Opcodes.ASM7) {
classReader.accept(new ClassVisitor(Opcodes.ASM4) {
@Override
public AnnotationVisitor visitAnnotation(String desc, boolean visible) {
try {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
package org.grails.core.cfg

import grails.plugins.GrailsPlugin
import grails.util.BuildSettings
import grails.util.Environment
import grails.util.Metadata
import groovy.transform.CompileStatic
import io.micronaut.context.env.AbstractPropertySourceLoader
import io.micronaut.context.env.MapPropertySource
import io.micronaut.context.exceptions.ConfigurationException
import io.micronaut.core.io.ResourceLoader
import org.grails.config.NavigableMap
Expand All @@ -24,7 +22,7 @@ class MicronautGroovyPropertySourceLoader extends AbstractPropertySourceLoader {

@Override
int getOrder() {
return DEFAULT_POSITION + 1
return DEFAULT_POSITION
}

@Override
Expand All @@ -39,10 +37,9 @@ class MicronautGroovyPropertySourceLoader extends AbstractPropertySourceLoader {
appVersion: Metadata.getCurrent().getApplicationVersion())
try {
def configObject = configSlurper.parse(input.getText("UTF-8"))
final Map<String, Object> propertySource = new NavigableMap()
def propertySource = new NavigableMap()
propertySource.merge(configObject.flatten(), false)
finalMap.putAll(propertySource)
processEnvironmentSpecificProperties(finalMap, propertySource)
} catch (Throwable e) {
throw new ConfigurationException("Exception occurred reading configuration [" + name + "]: " + e.getMessage(), e)
}
Expand Down Expand Up @@ -71,19 +68,4 @@ class MicronautGroovyPropertySourceLoader extends AbstractPropertySourceLoader {
return Collections.singleton("groovy")
}

@Override
protected MapPropertySource createPropertySource(String name, Map<String, Object> map, int order) {
return super.createPropertySource("grails.$name", map, order)
}

void processEnvironmentSpecificProperties(finalMap, Map<String, Object> propertySource) {
final String environmentName = Environment.current.name
if (environmentName != null) {
final String environmentPrefix = GrailsPlugin.ENVIRONMENTS + '.' + environmentName + '.'
propertySource.keySet().stream()
.filter(k -> k.startsWith(environmentPrefix))
.forEach(propertyName -> { finalMap[propertyName.substring(environmentPrefix.length())] = propertySource.get(propertyName) })
}
}

}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
org.grails.core.cfg.MicronautYamlPropertySourceLoader
org.grails.core.cfg.MicronautGroovyPropertySourceLoader
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class GrailsUtilTests {

@Test
public void testGrailsVersion() {
assertEquals("6.0.0-SNAPSHOT", GrailsUtil.getGrailsVersion());
assertEquals("5.3.3-SNAPSHOT", GrailsUtil.getGrailsVersion());
}

@AfterEach
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package org.grails.core.cfg

import grails.util.Environment
import org.grails.config.PropertySourcesConfig
import org.springframework.core.env.MutablePropertySources
import org.springframework.core.env.PropertySources
Expand All @@ -9,11 +8,7 @@ import org.springframework.core.io.Resource
import spock.lang.Specification

@SuppressWarnings("GrMethodMayBeStatic")
class GroovyConfigPropertySourceLoaderSpec extends Specification implements EnvironmentAwareSpec {

void setup() {
resetEnvironment()
}
class GroovyConfigPropertySourceLoaderSpec extends Specification {

void "test loading multiple configuration files"() {
setup:
Expand All @@ -22,7 +17,6 @@ class GroovyConfigPropertySourceLoaderSpec extends Specification implements Envi

GroovyConfigPropertySourceLoader groovyPropertySourceLoader = new GroovyConfigPropertySourceLoader()
Map<String, Object> finalMap = [:]
environment = Environment.TEST

when:
PropertySources propertySources = new MutablePropertySources()
Expand All @@ -31,9 +25,8 @@ class GroovyConfigPropertySourceLoaderSpec extends Specification implements Envi
def config = new PropertySourcesConfig(propertySources)

then:
config.size() == 9
config.size() == 7
config.getProperty("my.local.var", String.class) == "test"
config.getProperty("foo.bar", String.class) == "test"
config.getProperty("userHomeVar", String.class)

}
Expand Down

This file was deleted.

Loading

0 comments on commit a30ff29

Please sign in to comment.