diff --git a/buildSrc/src/main/groovy/io/spring/gradle/convention/SortedProperties.groovy b/buildSrc/src/main/groovy/io/spring/gradle/convention/SortedProperties.groovy deleted file mode 100644 index d2e4467..0000000 --- a/buildSrc/src/main/groovy/io/spring/gradle/convention/SortedProperties.groovy +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright 2002-2017 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.spring.gradle.convention; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.Comparator; -import java.util.Enumeration; -import java.util.List; -import java.util.Properties; - -/** - * A Properties which sorts they keys so that they can be written to a File with - * the keys sorted. - * - * @author Rob Winch - * - */ -class SortedProperties extends Properties { - private static final long serialVersionUID = -6199017589626540836L; - - public Enumeration keys() { - Enumeration keysEnum = super.keys(); - List keyList = new ArrayList(); - - while (keysEnum.hasMoreElements()) { - keyList.add(keysEnum.nextElement()); - } - - Collections.sort(keyList, new Comparator() { - @Override - public int compare(Object o1, Object o2) { - return o1.toString().compareTo(o2.toString()); - } - }); - - return Collections.enumeration(keyList); - } -}