/*
 * Copyright 2016 ZJNU ACM.
 *
 * 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
 *
 *      http://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 cn.edu.zjnu.acm.judge.config;

import cn.edu.zjnu.acm.judge.config.password.AcceptNullPasswordEncoder;
import cn.edu.zjnu.acm.judge.config.password.CombinePasswordEncoder;
import cn.edu.zjnu.acm.judge.config.password.LengthLimitedPasswordEncoder;
import cn.edu.zjnu.acm.judge.config.password.MessageDigestPasswordEncoder;
import cn.edu.zjnu.acm.judge.config.password.MultiPasswordSupport;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.NoOpPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;

/**
 *
 * @author zhanhb
 */
@Configuration
public class PasswordConfiguration {

    public static final int MAX_PASSWORD_LENGTH = 30;

    @Bean
    public PasswordEncoder passwordEncoder() {
        PasswordEncoder passwordEncoder = new LengthLimitedPasswordEncoder(
                new CombinePasswordEncoder(1,
                        NoOpPasswordEncoder.getInstance(),
                        new MultiPasswordSupport(
                                new CombinePasswordEncoder(
                                        new BCryptPasswordEncoder(6),
                                        MessageDigestPasswordEncoder.sha1(),
                                        MessageDigestPasswordEncoder.md5()
                                )
                        )
                ), MAX_PASSWORD_LENGTH);
        return new AcceptNullPasswordEncoder(passwordEncoder);
    }

}

@@ -1174,81 +1174,8 @@
 er;%0A
-import org.springframework.security.crypto.password.NoOpPasswordEncoder;%0A
 impo
@@ -1239,16 +1239,16 @@
 ncoder;%0A
+
 %0A/**%0A *%0A
@@ -1434,16 +1434,57 @@
 der() %7B%0A
+        @SuppressWarnings(%22deprecation%22)%0A
         
@@ -1597,16 +1597,16 @@
 oder(1,%0A
-
         
@@ -1621,16 +1621,61 @@
         
+org.springframework.security.crypto.password.
 NoOpPass

Add SuppressWarnings to NoOpPasswordEncoder