chore: spring-orm 이 그대로 제공하는 psl.orm 예외 2종에 @Deprecated 표기 - #376
Open
wantaekchoi wants to merge 1 commit into
Open
chore: spring-orm 이 그대로 제공하는 psl.orm 예외 2종에 @Deprecated 표기#376wantaekchoi wants to merge 1 commit into
wantaekchoi wants to merge 1 commit into
Conversation
org.egovframe.rte.psl.orm 은 Spring 의 org.springframework.orm 을 복사해 온 패키지다. package-info.java 에도 "Root package for Spring's O/R Mapping integration classes" 라고 그대로 적혀 있다. 그 복사본이 들여온 psl.orm.ibatis 아래 공개 타입 아홉 개는 전부 @deprecated 다. Spring 이 3.2 에서 org.springframework.orm.ibatis 를 폐기하고 4.0 에서 걷어냈기 때문이다. 반면 같은 복사본의 ObjectRetrievalFailureException 과 ObjectOptimisticLockingFailureException 에는 표기가 없는데, 이 둘은 Spring 이 걷어낸 적이 없다. 이 모듈이 compile 스코프로 선언한 spring-orm 이 같은 이름·같은 공개 API 로 지금도 제공한다. 저장소 어디에서도 이 두 타입을 던지거나 잡거나 참조하지 않는다. maven-javadoc-plugin 이 만드는 사용처 페이지도 "No usage" 로 나온다. 형제 아홉 개와 같은 자리에 @deprecated 를 달고 대체할 spring-orm 타입을 Javadoc 에 적었다. 공개 타입이라 제거는 하지 않는다.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
수정 사유 Reason for modification
수정된 소스 내용 Modified source
org.egovframe.rte.psl.orm은 Spring 의org.springframework.orm을 옮겨 온 패키지입니다.psl/orm/package-info.java:2가 그대로 남아 있습니다.그 아래
psl.orm.ibatis트리의 공개 타입 아홉 개는 전부@Deprecated입니다.아홉 개가 공통으로 들고 있는 사유의 첫 줄은 이렇습니다.
Spring 이
org.springframework.orm.ibatis를 걷어낸 것이 그 사유입니다. 그런데 같은 패키지 뿌리의ObjectRetrievalFailureException과ObjectOptimisticLockingFailureException에는 표기가 없습니다. 이 둘은 Spring 이 걷어낸 적이 없어서 형제 아홉 개보다 중복이 더 분명한 쪽입니다.이 모듈
pom.xml:65가spring-orm을 스코프 없이(= compile) 선언하고 그spring-orm 6.2.11이 같은 이름의 클래스를 지금도 담고 있습니다.상위 클래스가 사본과 같고 공개 멤버도 하나씩 대응합니다.
ObjectRetrievalFailureException은 양쪽 다 생성자 다섯 개,ObjectOptimisticLockingFailureException은 양쪽 다 일곱 개이고, 접근자는 둘 다getPersistentClass()·getPersistentClassName()·getIdentifier()셋입니다.저장소 안에서 이 두 타입을 import·throw·catch 하는 곳은 없습니다. 자기 선언 파일을 빼면 README 의 디렉터리 목록 두 줄이 남는 전부입니다.
제거가 아니라 표기로 간 이유입니다. 저장소 안에 참조가 없더라도 이미 배포된 아티팩트의 public 타입이라 바깥 코드의 참조까지는 알 수 없고 삭제는 소스·바이너리 비호환이 됩니다. 이 저장소에서
main의 공개 소스가 지워진 커밋은ac34b96(v4.0.0 alpha)·1da6c02(v4.1.0 FINAL)·4d97ab5(v5.0.0 FINAL) 세 건이고 전부 릴리스 커밋입니다. 그래서 형제 아홉 개와 같은 자리에 표기만 했고 실제로 걷어내는 것은 다음 릴리스 경계에서 형제들과 함께 판단하시도록 남겨 두었습니다.AS-IS / TO-BE
ObjectOptimisticLockingFailureException에도 같은 자리에 같은 형태로 세 줄을 더했습니다.{@link}에 라벨을 붙여 FQN 을 한 번 더 적은 것은, 라벨이 없으면 렌더된 문구가 이름만 남아 자기 자신을 가리키는 것처럼 읽히기 때문입니다.영향 범위
생성자·메서드 본문은 건드리지 않았습니다. 애노테이션 한 줄과 Javadoc 태그가 더해진 전부라 동작은 그대로이고 이 저장소 안에는 참조가 없어 저장소 빌드에 새로 뜨는 deprecation 경고도 없습니다.
JUnit 테스트 JUnit tests
애노테이션을 도로 빼고 같은 명령을 돌려도 126건이 그대로 통과합니다. 동작이 갈라지는 지점이 없어서입니다.
@Deprecated가 붙어 있는지 단언하는 테스트는 수정을 그대로 되읊는 것이라 새로 넣지 않았습니다.테스트 브라우저 Test Browser
테스트 스크린샷 또는 캡처 영상 Test screenshots or captured video
화면이 없는 실행환경 모듈이라 첨부하지 않았습니다.